Closed Bug 864900 Opened 7 years ago Closed 7 years ago

The listTabs protocol request can fail if made immediately after a tab is closed

Categories

(DevTools :: Debugger, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 23

People

(Reporter: past, Assigned: past)

Details

Attachments

(1 file)

Honza discovered this:

"When sending "listTabs" request shortly after closing a Firefox tab, I am seeing the following exception:

TypeError: this.browser is null
chrome://global/content/devtools/dbg-browser-actors.js (365)
chrome://global/content/devtools/dbg-browser-actors.js (402)
chrome://global/content/devtools/dbg-browser-actors.js (139)
chrome://firebug/content/debugger/actors/browserRootActor.js (73)
chrome://global/content/devtools/dbg-server.js (655)
chrome://global/content/devtools/dbg-transport.js (224)


It's because the BrowserTabActor is already exited (i.e. actor._browser is set to null) but the browser itself (the one associated with the closed tab) is still in the list of browsers (win.getBrowser().browsers)"
Attached patch Patch v1Splinter Review
The fix is simple. All tests pass locally.
Attachment #741007 - Flags: review?(rcampbell)
Attachment #741007 - Flags: review?(rcampbell) → review+
Thanks Panos, Rob!

Honza
https://hg.mozilla.org/mozilla-central/rev/6353c5dfa860
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 23
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.