Closed Bug 1250832 Opened 8 years ago Closed 7 years ago

Remove devtools globals from browser.xul

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(firefox58 fixed)

RESOLVED FIXED
Firefox 58
Tracking Status
firefox58 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

(Whiteboard: [btpp-fix-later])

Attachments

(2 files)

Here is the current list of globals:

gDevTools, gDevToolsBrowser, HUDService:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#7544

ScratchPad, ResponsiveUI, EyeDropper:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#7616

DeveloperToolbar, BrowserToolboxProcess:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#160

Most of them are used to implement hardcoded menus.
Once we insert menus dynamically (bug 124860), we won't need these globals.
None of browser code actually use any of these globals.
But I would have to check for any of them if some addons are using them.
So we will most likely keep some for compatiblity, like gDevTools.
Depends on: 1250833
I opened bug 1250833 in order to stop using these globals from devtools codebase.
Attached patch patch v1Splinter Review
Priority: -- → P2
Whiteboard: [btpp-fix-later]
Depends on: 1258987
The `ResponsiveUI` bit can surely be removed now, since the lazy getter was already removed in bug 1399449.
Comment on attachment 8911806 [details]
Bug 1250832 - Remove DevTools globals from browser.xul scope.

https://reviewboard.mozilla.org/r/183232/#review188466

Thanks for the cleanup! :)

::: browser/base/content/browser.js:8562
(Diff revision 1)
>        gBrowser.selectedTab = newTab;
>        break;
>    }
>  }
>  
>  var Scratchpad = {

I believe this `var Scratchpad` should also be removed.
Attachment #8911806 - Flags: review?(jryans) → review+
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/418e79946237
Remove DevTools globals from browser.xul scope. r=jryans
Backed out for failing devtools/client/commandline/test/browser_cmd_csscoverage_startstop.js on Windows 7 debug:

https://hg.mozilla.org/integration/autoland/rev/d4a29741c62807f145203dc5689cb74bfbd83daa

Push which ran failing test: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=f8b6f4681fb8830cbdb904c0ee77313ebfebc31e&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=133305665&repo=autoland
> TEST-UNEXPECTED-FAIL | devtools/client/commandline/test/browser_cmd_csscoverage_startstop.js | Uncaught exception - at chrome://mochitests/content/browser/devtools/client/commandline/test/browser_cmd_csscoverage_startstop.js:53 - ReferenceError: gDevTools is not defined
Flags: needinfo?(poirot.alex)
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5ab65f749652
Remove DevTools globals from browser.xul scope. r=jryans
https://hg.mozilla.org/mozilla-central/rev/5ab65f749652
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: