Closed Bug 1328111 Opened 8 years ago Closed 8 years ago

Closing toolbox when toolbox tabs are not initialized leaves broken toolbox

Categories

(DevTools :: General, defect, P2)

53 Branch
defect

Tracking

(firefox52 unaffected, firefox53+ unaffected)

RESOLVED WORKSFORME
Tracking Status
firefox52 --- unaffected
firefox53 + unaffected

People

(Reporter: ntim, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

Attached image Screenshot (deleted) —
STR:
- Open a tab with toolbox closed
- Press Alt+Cmd+I (Mac) or Ctrl+Shift+I twice quickly.
- The toolbox stays in a broken state
Greg, can you take a look please? Thanks!
Flags: needinfo?(gtatum)
Keywords: regression
Hmm... I can fix the error with the following patch, but I'm getting some test failures with unresolved promises. I believe these are due to the fact that there is still some running code, but the window objects of the panels are destroyed.

https://gist.github.com/gregtatum/ce9e990eb36f560da8f86ec2c62ddcec
Flags: needinfo?(gtatum)
Version: unspecified → 53 Branch
[Tracking Requested - why for this release]: This can cause an unusable devtools toolbox
It seems like we shouldn't have to worry about this case where the toolbox has been deleted but the same instance is being reopened in the middle of deletion.  This can't be the only bug that happens due to this scenario.

Maybe it'd be easier to immediately delete the toolbox object from the this._toolboxes map when closing the toolbox [0] instead of waiting for the toolbox destroy event to fire before doing so [1]. This would ensure a new toolbox instance is created every time an open->close->reopen happens.

[0]: https://dxr.mozilla.org/mozilla-central/source/devtools/client/framework/devtools.js#469
[1]: https://dxr.mozilla.org/mozilla-central/source/devtools/client/framework/devtools.js#437
Hmm, I feel like :ochameau tweaked this process recently...
Flags: needinfo?(poirot.alex)
Tracking 53+ for the reasoning in Comment 3.
Yes, I fixed something somewhat similar but on toolbox object creation in bug 1319928.
It may be the same bug than bug 1328004. There is a race in closeToolbox, very similar to the one in showToolbox addressed in bug 1319928.
Flags: needinfo?(poirot.alex)
Hi Tim does this bug still happen for you?
Flags: needinfo?(ntim.bugs)
(In reply to David Bolter [:davidb] from comment #9)
> Hi Tim does this bug still happen for you?

Doesn't seem to be happening anymore.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(ntim.bugs)
Resolution: --- → WORKSFORME
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: