Closed Bug 1079131 Opened 10 years ago Closed 9 years ago

[highlighter] Highlighter doesn't stop tracking the mouse and JS error in e10s

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(e10s+)

RESOLVED WORKSFORME
Tracking Status
e10s + ---

People

(Reporter: pbro, Assigned: miker)

References

Details

(Whiteboard: [e10s-m6])

STR:

- open an e10s window
- open the inspector
- click on the element picker icon
- hover elements on the page
- then, with the element picker mode still ON, move your mouse over the inspector panel (this should highlight elements in the page)
- click on one of the nodes in the inspector (the element picker should still be ON)
- then move your mouse back over the page and try to select an element by clicking it

=> Expected: the element should be selected in the inspector and the element picker mode should be OFF

=> Actual: the picker mode remains ON

Then clicking on the element picker button to try and turn it off throws an error in the console:

console.error: 
  Message: TypeError: target.removeEventListener is not a function
  Stack:
    exports.HighlighterActor<._stopPickerListeners@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/highlighter.js:237:5
exports.HighlighterActor<.cancelPick<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/highlighter.js:255:7
actorProto/</handler@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:955:19
DSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1407:15
ChildDebuggerTransport.prototype.receiveMessage@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/transport/transport.js:708:5

exports.HighlighterActor<._stopPickerListeners@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/highlighter.js:237:5
exports.HighlighterActor<.cancelPick<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/highlighter.js:255:7
actorProto/</handler@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:955:19
DSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1407:15
ChildDebuggerTransport.prototype.receiveMessage@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/transport/transport.js:708:5
console.error: 
  Protocol error (unknownError): TypeError: target.removeEventListener is not a function

Remy Sharp of jsbin has been testing the devtools recently and stumbled on this issue while recording this video: https://www.youtube.com/watch?v=4muwlibj6zA
Of course, to make things fun, this doesn't seem to always happen. If it doesn't, keep playing with the highlighter, inspector and pick mode. It's usually easy enough to reproduce the problem.
And ... now I can't reproduce anymore.
Remy, if you have better steps to reproduce that lead to the problem 100% of the times, that'd be great.
The randomness of it makes me thing this is a timing issue.
Blocks: dte10s
tracking-e10s: --- → ?
I can reproduce this sometimes. I added some logging and the problem is when we get the docShell's chromeEventHandler it doesn't implement nsIDOMEventTarget:

Good:
----
docShell.chromeEventHandler [xpconnect wrapped nsIDOMEventTarget]

Bad:
----
docShell.chromeEventHandler [xpconnect wrapped nsISupports]


I personally don't know how it can get in that state, but bug 992778 was mentioned in a related comment, so I'm CCing Alex who fixed that.
Flags: needinfo?(poirot.alex)
I'm not able to reproduce it easily. (Not being able to reproduce it after 10 times on various websites)

I would say that docShell.chromeEventHandler exposing only nsISupports may tell us that this docshell is destroyed.
That would be worth trying to check for docShell.contentViewer / docShell.contentViewer.DOMDocument / docShell.contentViewer.DOMDocument.readyState.
Flags: needinfo?(poirot.alex)
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Depends on: 985597
I can't reproduce this at all with the patch for bug 985597 applied (highlighter in canvas frame).
These DevTools bugs should probably block e10s from riding to Aurora.
devtools bugs will block the e10s merge to Aurora, but blassey would like them to be tracked by dte10s meta bug 875871, not the tracking-e10s=m6+ flag.
Whiteboard: [e10s-m6]
Patrick: I still can't reproduce this... are we okay to close it?
Flags: needinfo?(pbrosset)
Yep, can't reproduce either. Let's close it.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(pbrosset)
Resolution: --- → WORKSFORME
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.