Closed
Bug 1036366
Opened 10 years ago
Closed 10 years ago
TypeError: this.nodelist is null if WalkerActor.querySelectorAll is called with an invalid selector
Categories
(DevTools :: Inspector, defect)
DevTools
Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 33
People
(Reporter: sjakthol, Assigned: sjakthol)
Details
Attachments
(1 file)
2.80 KB,
patch
|
pbro
:
review+
|
Details | Diff | Splinter Review |
This seem to be caused by the fact that when WalkerActor.querySelectorAll is called with an invalid selector, NodeListActor is initialized with null nodelist and calling NodeListActor.form calls nodelist.length causing the error. Steps to reproduce: 1. Open inspector. 2. Write 'div.' to the searchbox. 3. Following exception occurs. TypeError: this.nodeList is null Stack trace: exports.NodeListActor<.form@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/inspector.js:677:1 types.addActorType/type<.write@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:272:9 RetVal<.write@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:472:5 Response<.write/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:607:9 Response<.write@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:605:5 actorProto/</handler/sendReturn@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:911:1 resolve@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/core/promise.js:118:11 then@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/core/promise.js:43:43 then@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/core/promise.js:153:9 actorProto/</handler/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:929:1 Actor<._queueResponse@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:827:1 actorProto/</handler@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:926:9 DSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1103:9 LDT_send/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js -> resource://gre/modules/devtools/server/transport.js:258:11 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:80:7
Assignee | ||
Comment 1•10 years ago
|
||
Here's a simple fix to the problem that treats null nodelist parameter as an empty list. It also contains an xpcshell-test to ensure no exception is triggered and the reported length is correct for null, empty and populated nodelists. Try: https://tbpl.mozilla.org/?tree=Try&rev=fa89c6afcc9b
Assignee: nobody → sjakthol
Attachment #8453011 -
Flags: review?(pbrosset)
Comment 2•10 years ago
|
||
Comment on attachment 8453011 [details] [diff] [review] fix-this-nodelist-is-null.patch Review of attachment 8453011 [details] [diff] [review]: ----------------------------------------------------------------- Nice and simple. Nothing to comment about this.
Attachment #8453011 -
Flags: review?(pbrosset) → review+
Updated•10 years ago
|
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6da650753652
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•