Closed Bug 1245287 Opened 8 years ago Closed 8 years ago

Add toolbox API and events for tool registration

Categories

(DevTools :: Framework, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox47 --- fixed

People

(Reporter: bgrins, Unassigned)

References

Details

Attachments

(1 file)

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
Blocks: 1221545
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+
https://hg.mozilla.org/mozilla-central/rev/a81960ce939e
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: