This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 139244 - [Embedded Browser] Exception when retrieving DOM node from nsIDOMNode during event capture
Summary: [Embedded Browser] Exception when retrieving DOM node from nsIDOMNode during ...
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: ceresna
URL:
Keywords:
Depends on:
Blocks: 132242
  Show dependency tree
 
Reported: 2008-07-08 12:59 UTC by Peter Zavadsky
Modified: 2008-07-25 18:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Zavadsky 2008-07-08 12:59:33 UTC
When trying to capture the events (according the example), and convert the target to DOM nodes, this exception is
produced. Also when I tried to put entire source into Moz async call, or switch off editing itself it didn't help.


org.mozilla.xpcom.XPCOMException: The function "QueryInterface" returned an error condition  (0x80004002)
	at org.mozilla.xpcom.internal.XPCOMJavaProxy.callXPCOMMethod(Native Method)
	at org.mozilla.xpcom.internal.XPCOMJavaProxy.invoke(XPCOMJavaProxy.java:143)
	at $Proxy38.queryInterface(Unknown Source)
	at org.mozilla.dom.NodeFactory.getNodeInstance(NodeFactory.java:52)
	at org.netbeans.modules.extbrowser.embedded.mozilla.impl.BrowserImpl$ControlEventListener.handleEvent(BrowserImpl.java:662)
	at com.sun.jna.Function.invokeInt(Native Method)
	at com.sun.jna.Function.invoke(Function.java:291)
	at com.sun.jna.Function.invoke(Function.java:220)
	at com.sun.jna.Library$Handler.invoke(Library.java:204)
	at $Proxy25.gtk_main_iteration(Unknown Source)
	at org.mozilla.browser.MozillaExecutor$3$1.run(MozillaExecutor.java:183)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 ceresna 2008-07-25 18:10:50 UTC
fixed rev 93066:d4795f140d35

The problem was when casting currentTarget from nsIDOMEventTarget to nsIDOMNode.
The event target was a nsIDOMWindow and not a nsIDOMNode, so an exception
was thrown. Fixed to return null instead.