Closed Bug 481349 Opened 15 years ago Closed 14 years ago

"Error ... Exception ... NS_ERROR_ILLEGAL_VALUE ... dom.js :: anonymous :: line 169", after using "find by clicking"...

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sgautherie, Unassigned)

References

()

Details

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090228 SeaMonkey/2.0b1pre] (experimental/_m-c_, home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/f7f62131998d
 +http://hg.mozilla.org/comm-central/rev/7ea34ef19dc4)

Reduced steps:
1) Start SeaMonkey (with new profile).
2) Open DOMi.
3) File > Inspect Content Document > "Welcome to SeaMonkey"
4) Click on "Find a node to inspect by clicking on it" and click on something ont that page in the browser.
5) File > Inspect Content Document > (any of the) "about:blank".
5r)
{
Error: uncaught exception: [Exception... "Illegal value"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: chrome://inspector/content/viewers/dom/dom.js :: anonymous :: line 169"  data: no]
}

The triggering step is 4.
{
157   isCommandEnabled: function(aCommand)

167     if (/^cmdEdit(Paste|Insert)/.test(aCommand)) {
168       selectedNode = new XPCNativeWrapper(viewer.selectedNode, "nodeType",
169                                           "parentNode", "childNodes");
170       if (selectedNode.parentNode)
171         parentNode = new XPCNativeWrapper(selectedNode.parentNode, "nodeType");
172     }
}
You don't have to use select by click for this to happen. It will happen any time you inspect a new document and the tree selection beforehand isn't the document (root?) node.
Fixed as of bug 589299.  The XPCNativeWrapper constructor doesn't like nulls.
Blocks: DOMi2.0.9
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.