Add toolbox API and events for tool registration

RESOLVED FIXED in Firefox 47

Status

defect
RESOLVED FIXED
3 years ago
10 months ago

People

(Reporter: bgrins, Unassigned)

Tracking

unspecified
Firefox 47

Firefox Tracking Flags

(firefox47 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
As mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1221545#c9, I think it'd be valuable to expose tool registration information from the toolbox level.  Right now that all happens through gDevTools, but for individual panels I'd rather expose it through the toolbox because:

1) It can fire after any relevant UI changes have happened (like adding / removing tabs in the toolbox)
2) If a tool doesn't correctly unbind event handlers, at least the leak will be contained to a toolbox instance and not gDevTools which is a jsm
(Reporter)

Updated

3 years ago
Blocks: 1221545
(Reporter)

Comment 2

3 years ago
Ryan, I'd like your feedback on this plan.  I think it will lead to a better patch in Bug 1221545 and think it's a good idea because of Comment 0 here, but I'm open to other options.
Comment on attachment 8715029 [details]
MozReview Request: Bug 1245287 - Add toolbox API for isToolRegistered and events for tool-registered and tool-unregistered;r=jryans

https://reviewboard.mozilla.org/r/33311/#review30159

This seems reasonable to me.  It makes sense for the toolbox to be able to answer these questions.

Note that after bug 1188405, gDevTools will be in CommonJS modules, so the part about it being a JSM that's alive forever won't be true much longer.
Attachment #8715029 - Flags: review?(jryans) → review+

Comment 6

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/a81960ce939e
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47

Updated

10 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.