Closed
Bug 605634
Opened 14 years ago
Closed 14 years ago
Opening two Web Consoles on the same URI causes errors
Categories
(DevTools :: General, defect, P2)
DevTools
General
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: pcwalton, Assigned: pcwalton)
References
Details
(Whiteboard: [patch bitrotted])
Attachments
(1 obsolete file)
When two Web Consoles are open on two tabs with the same URI and one is closed, the second one throws errors when closed.
The proposed patch fixes this issue. I noticed this bug when fixing an issue that would cause the test "browser_webconsole_bug
_597103_deactivateHUDForContext_unfocused_window.js" for bug 597103 to fail when the browser home page was set to an unreachable URL. This patch fixes the bug in that test, which allows it to serve as a test case for this issue as well.
Attachment #484499 -
Flags: feedback?(mihai.sucan)
Updated•14 years ago
|
blocking2.0: --- → ?
Updated•14 years ago
|
Blocks: devtools4b8
Comment 1•14 years ago
|
||
Comment on attachment 484499 [details] [diff] [review]
Proposed patch.
The patch looks good to me. Thanks for the test fix!
Attachment #484499 -
Flags: feedback?(mihai.sucan) → feedback+
Assignee | ||
Updated•14 years ago
|
Attachment #484499 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 2•14 years ago
|
||
Per a discussion with gavin in #devtools, this test failure is more mysterious than it seems. I can reliably reproduce the test failure by disabling my network connection. The issue is that the URL http://www.mozilla.org/projects/firefox/4.0b8pre/firstrun/ automatically loads in a new tab in the window that OpenBrowserWindow() opens, and the loading of *that* page is what triggers the tab2Loaded() event. If that page doesn't load, then the event never occurs.
Changing OpenBrowserWindow() to window.openDialog() avoids the loading of that URL (because it bypasses the "defaultArgs" property of the nsIBrowserHandler), and this allows the test to succeed.
The strange issues are as follows:
(1) The newly-created tab created by the line "tab2 = win2.gBrowser.addTab()" cannot be made into the selected tab by the line "win2.gBrowser.selectedTab = tab2". The selected tab remains set to the URL http://www.mozilla.org/projects/firefox/4.0b8pre/firstrun/.
(2) Until that Mozilla URI is successfully loaded, "tab2" never loads, and therefore the "tab2Loaded" event never fires.
Based on this, I have a feeling this might be CSR related, but I'm not sure.
Assignee | ||
Comment 3•14 years ago
|
||
The problem can also be reproduced by changing "TEST_URI" in the window.openDialog() call to an invalid URI that never loads.
Assignee | ||
Comment 4•14 years ago
|
||
Wrapping the addTab() call in a setTimeout(function() { ... addTab() ... }, 0) wrapper fixes the issue.
Comment 5•14 years ago
|
||
What's the current status of this? (and is it just a test failure?)
Assignee | ||
Comment 6•14 years ago
|
||
Still applies. It's more or less just a test failure; as I recall I've never seen it outside of that environment.
Comment 8•14 years ago
|
||
removing blocking flag, since this is apparently a test-only problem.
blocking2.0: ? → ---
Comment 9•14 years ago
|
||
This bug (and patch) is no longer valid. There have been numerous code changes which make this code obsolete.
Comment 10•14 years ago
|
||
marking invalid based on c#9.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
Whiteboard: [patch bitrotted]
Updated•14 years ago
|
Attachment #484499 -
Attachment is obsolete: true
Attachment #484499 -
Flags: review?(gavin.sharp)
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•