Closed
Bug 1348318
Opened 8 years ago
Closed 8 years ago
`toolbox.win.top` doesn't work well for undocked windows
Categories
(DevTools :: Framework, enhancement, P1)
DevTools
Framework
Tracking
(firefox55 fixed)
RESOLVED
FIXED
Firefox 55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: jryans, Assigned: jryans)
Details
Attachments
(1 file)
In bug 1346647, we fixed one usage of `toolbox.win.top` that was breaking RDM button for undocked toolboxes.
In general, it may not make sense to check windows like this given that undocked toolboxes exist.
The only other case currently is:
http://searchfox.org/mozilla-central/rev/006005beff40d377cfd2f69d3400633c5ff09127/devtools/client/framework/devtools-browser.js#754
Assignee | ||
Comment 1•8 years ago
|
||
When closing an undocked toolbox currently, that if check on the window does miss the toolbox, but `toolbox.destroy` ends up being called through another path, probably because of unloading the toolbox's window.
So, it doesn't seem too critical, just a nice to have fix so that this works in all toolbox types.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Component: Developer Tools → Developer Tools: Framework
Assignee | ||
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8848550 [details]
Bug 1348318 - Avoid toolbox.win.top with undocked toolboxes.
https://reviewboard.mozilla.org/r/121454/#review123496
Thanks for this cleanup!
::: devtools/client/framework/devtools-browser.js:754
(Diff revision 1)
>
> BrowserMenus.removeMenus(win.document);
>
> // Destroy toolboxes for closed window
> for (let [target, toolbox] of gDevTools._toolboxes) {
> - if (toolbox.win.top == win) {
> + if (target.tab.ownerDocument.defaultView == win) {
You may want to check that target.tab is defined as it may not necessarely be set. Only TabTarget have it defined.
It will be undefined for toolboxes from bug 1348012... I don't know if there is any other such scenario that already exists.
Attachment #8848550 -
Flags: review?(poirot.alex) → review+
Assignee | ||
Comment 5•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8848550 [details]
Bug 1348318 - Avoid toolbox.win.top with undocked toolboxes.
https://reviewboard.mozilla.org/r/121454/#review123496
> You may want to check that target.tab is defined as it may not necessarely be set. Only TabTarget have it defined.
> It will be undefined for toolboxes from bug 1348012... I don't know if there is any other such scenario that already exists.
Yep, seems safest to check, I'll add it!
Comment hidden (mozreview-request) |
Pushed by jryans@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/d06ce06386ad
Avoid toolbox.win.top with undocked toolboxes. r=ochameau
Comment 8•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•