Closed
Bug 850308
Opened 12 years ago
Closed 12 years ago
Devtools: EventEmitter Error while browsing
Categories
(DevTools :: Framework, defect)
DevTools
Framework
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 849500
People
(Reporter: sys.sgx, Unassigned)
Details
Attachments
(1 file)
45.98 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.0; rv:22.0) Gecko/20130312 Firefox/22.0
Build ID: 20130312031046
Steps to reproduce:
Do *exactly* as described: :)
1. Open new tab, browse to google.com
2. Open Error Console, clear everything.
3. Open Web Console (it's cleared). Now Devtools bar is open too.
4. Move your mouse to the "Inspector" button of the DevTools bar, click the "Inspector" button, and then hover over to the google logo in the page and click it (to focus on it). Don't click anywhere else on the page.
5. Check to see that you already have a warning right now on the Error Console (XUL box).
6. Now, having the google logo clicked and focused and while on the Inspector panel, click with your mouse the "Reload" page button.
7. You will now have multiple errors on the Error Console.
I've also noticed similar errors while basically using the developer tools, and then the page changes state, ie reloads.
Expected results:
The DevTools should be more page state aware.
Component: Developer Tools: Framework → Developer Tools: Console
OS: Windows Vista → All
Hardware: x86 → All
Version: 22 Branch → Trunk
Comment 2•12 years ago
|
||
TabTarget._setupRemoteListeners / onRemoteTabNavigated does:
this.emit("navigate", aPacket);
Where aPacket is from the tabNavigated event.
But InspectorPanel.onNavigatedAway / onDOMReady (which is called by the "navigate" event) assumes that the emitted object is a window not a packet.
It looks to me as though Target.jsm is wrong and we need to do something like:
let window = this._tab.linkedBrowser.contentWindow;
this.emit("navigate", aPacket);
Flags: needinfo?(paul)
Comment 5•12 years ago
|
||
(In reply to Paul Rouget [:paul] from comment #3)
> Isn't this code for remote targets?
Hmm, yes.
So the problem is that this event is being fired from 2 places. The best fix would be a remote inspector. How's that coming on Paul? :)
In the short term I guess it's better to have an event object that looks like:
{
packet: ...
window: ...
}
Only one of which is filled in, and the event handlers, have to check. Ug.
Is there a better solution?
Comment 6•12 years ago
|
||
This doesn't look to be a Web Console bug.
Status: UNCONFIRMED → NEW
Component: Developer Tools: Console → Developer Tools: Framework
Ever confirmed: true
Comment 7•12 years ago
|
||
This is the same issue as bug 849500.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•