{"action":"created","issue":{"url":"https://api.github.com/repos/piroor/treestyletab/issues/887","labels_url":"https://api.github.com/repos/piroor/treestyletab/issues/887/labels{/name}","comments_url":"https://api.github.com/repos/piroor/treestyletab/issues/887/comments","events_url":"https://api.github.com/repos/piroor/treestyletab/issues/887/events","html_url":"https://github.com/piroor/treestyletab/issues/887","id":77065276,"number":887,"title":"Star UI arrow panel(Edit Bookmarks) does not popup due to landing Bug 951651","user":{"login":"alice0775","id":463803,"avatar_url":"https://avatars.githubusercontent.com/u/463803?v=3","gravatar_id":"","url":"https://api.github.com/users/alice0775","html_url":"https://github.com/alice0775","followers_url":"https://api.github.com/users/alice0775/followers","following_url":"https://api.github.com/users/alice0775/following{/other_user}","gists_url":"https://api.github.com/users/alice0775/gists{/gist_id}","starred_url":"https://api.github.com/users/alice0775/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alice0775/subscriptions","organizations_url":"https://api.github.com/users/alice0775/orgs","repos_url":"https://api.github.com/users/alice0775/repos","events_url":"https://api.github.com/users/alice0775/events{/privacy}","received_events_url":"https://api.github.com/users/alice0775/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-05-16T15:39:35Z","updated_at":"2015-08-18T16:00:54Z","closed_at":null,"body":"Just for your record.\r\n\r\nTree Style Tab0.15.2015051100a192056 does not work nicely on Aurora40.0a2 and Nightly41.0a1.\r\n\r\nAfter landing Bug 951651, Star UI arrow panel(Edit Bookmarks) does not popup.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/piroor/treestyletab/issues/comments/132259111","html_url":"https://github.com/piroor/treestyletab/issues/887#issuecomment-132259111","issue_url":"https://api.github.com/repos/piroor/treestyletab/issues/887","id":132259111,"user":{"login":"piroor","id":70062,"avatar_url":"https://avatars.githubusercontent.com/u/70062?v=3","gravatar_id":"","url":"https://api.github.com/users/piroor","html_url":"https://github.com/piroor","followers_url":"https://api.github.com/users/piroor/followers","following_url":"https://api.github.com/users/piroor/following{/other_user}","gists_url":"https://api.github.com/users/piroor/gists{/gist_id}","starred_url":"https://api.github.com/users/piroor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piroor/subscriptions","organizations_url":"https://api.github.com/users/piroor/orgs","repos_url":"https://api.github.com/users/piroor/repos","events_url":"https://api.github.com/users/piroor/events{/privacy}","received_events_url":"https://api.github.com/users/piroor/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T16:00:54Z","updated_at":"2015-08-18T16:00:54Z","body":"For developers I describe the background of the commit 4abc4413e98ee99bc1008c29df6414636c990811. I hope that this helps you to resolve bugs like this in future versions.\r\n\r\nAs the comment of 80938e8 TST fails to patch to `gEditItemOverlay.initPanel`.\r\nSteps to find the change which produces this error:\r\n\r\n 1. Find the definition of the target method: http://mxr.mozilla.org/mozilla-central/search?string=initPanel\r\n 2. See the code: http://mxr.mozilla.org/mozilla-central/source/browser/components/places/content/editBookmarkOverlay.js#165\r\n 3. See change logs of the file from the \"Hg logs\" link: http://hg.mozilla.org/mozilla-central/filelog/d5cf4e7900df/browser/components/places/content/editBookmarkOverlay.js\r\n 4. Open \"diff\" links in tabs and find the commit which removes the line: `if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) {` I've found it: http://hg.mozilla.org/mozilla-central/rev/d84b62b367b4\r\n 5. Compare the current definition of `gEditItemOverlay.initPanel` and the removed codes to find where is the correct location to insert our codes. The old patching aims to execute inserted codes only for simple bookmarks, so, the variable `isBookmark` seems to be good information to do it. In other works, we can put our code anywhere after the variable is defined. Then I decided to put my codes before the line: `let showOrCollapse =`, like:\r\n    \r\n        TreeStyleTabUtils.doPatching(gEditItemOverlay.initPanel, 'gEditItemOverlay.initPanel', function(aName, aSource) {\r\n            return eval(aName+' = '+aSource.replace(\r\n                'let showOrCollapse =',\r\n                'TreeStyleTabBookmarksServiceEditable.initParentMenuList(); $&'\r\n            ));\r\n        }, 'TreeStyleTab');\r\n    \r\n 6. Separate codes for each Firefox version (See also https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIVersionComparator ) like:\r\n    \r\n\r\n        // for Firefox 40 and later, after Bug 951651\r\n        if (Services.vc.compare(Services.appinfo.platformVersion, '40') >= 0) {\r\n            TreeStyleTabUtils.doPatching(gEditItemOverlay.initPanel, 'gEditItemOverlay.initPanel', function(aName, aSource) {\r\n                return eval(aName+' = '+aSource.replace(\r\n                    'let showOrCollapse =',\r\n                    'TreeStyleTabBookmarksServiceEditable.initParentMenuList(); $&'\r\n                ));\r\n            }, 'TreeStyleTab');\r\n        }\r\n        else {\r\n        // for Firefox 39 and olders\r\n            TreeStyleTabUtils.doPatching(gEditItemOverlay.initPanel, 'gEditItemOverlay.initPanel', function(aName, aSource) {\r\n                return eval(aName+' = '+aSource.replace(\r\n                    'if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) {',\r\n                    '$& TreeStyleTabBookmarksServiceEditable.initParentMenuList();'\r\n                ));\r\n            }, 'TreeStyleTab');\r\n        }\r\n    \r\n"}}