Closed Bug 1261092 Opened 9 years ago Closed 9 years ago

Cleanup DeveloperToolbar init/destruction codepath

Categories

(DevTools Graveyard :: Graphic Commandline and Toolbar, defect)

defect
Not set
normal

Tracking

(firefox48 fixed)

RESOLVED FIXED
Firefox 48
Tracking Status
firefox48 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(1 file, 1 obsolete file)

Now that we insert the toolbar dynamically, we can simplify how it gets instanciated and destroyed. We can also remove the hardcoded DeveloperToolbar definition from /browser/. http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#160
Assignee: nobody → poirot.alex
Depends on: 1248603
Attached patch patch v2Splinter Review
Rebased.
Attachment #8736746 - Attachment is obsolete: true
Comment on attachment 8737789 [details] [diff] [review] patch v2 Review of attachment 8737789 [details] [diff] [review]: ----------------------------------------------------------------- Feel free to involve Joe, but since you asked for the devtools-unloaded removal I'm flagging you. ::: browser/base/content/browser.js @@ -160,5 @@ > -XPCOMUtils.defineLazyGetter(this, "DeveloperToolbar", function() { > - let { require } = Cu.import("resource://devtools/shared/Loader.jsm", {}); > - let { DeveloperToolbar } = require("devtools/client/shared/developer-toolbar"); > - return new DeveloperToolbar(window); > -}); This is just moved to gDevToolsBrowser, added dynamically to the chrome window. ::: devtools/bootstrap.js @@ -128,5 @@ > - if (wasVisible) { > - window.DeveloperToolbar.show(); > - } > - }); > - } We longer need this, nor listen to load/unload in developer-toolbar as developer toolbar is no longer a singleton. It is now a module and no longer a jsm, so it is itself being loaded and unloaded when the module loader does so. gDevToolsBrowser ensure calling its destroy method.
Attachment #8737789 - Flags: review?(jryans)
Comment on attachment 8737789 [details] [diff] [review] patch v2 Review of attachment 8737789 [details] [diff] [review]: ----------------------------------------------------------------- Looks reasonable to me, but let's double check with :jwalker too.
Attachment #8737789 - Flags: review?(jwalker)
Attachment #8737789 - Flags: review?(jryans)
Attachment #8737789 - Flags: review+
Comment on attachment 8737789 [details] [diff] [review] patch v2 Review of attachment 8737789 [details] [diff] [review]: ----------------------------------------------------------------- Deletes lots of code and hidden dependency.
Attachment #8737789 - Flags: review?(jwalker) → review+
https://hg.mozilla.org/integration/fx-team/rev/1300b2a51f1d65579b4875f33f0075538e1391b6 Bug 1261092 - Simplify gcli initialization/destruction codepaths. r=jryans,jwalker
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: