Closed Bug 689128 Opened 8 years ago Closed 8 years ago

crash when calling nsIEventListenerService.getListenerInfoFor with null argument

Categories

(Core :: User events and focus handling, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: arno, Assigned: smaug)

Details

Attachments

(1 file, 1 obsolete file)

Hi,
following code in chrome context crashes mozilla:
    Components.classes["@mozilla.org/eventlistenerservice;1"].getService(Ci.nsIEventListenerService).getListenerInfoFor(null, {})
Or we could NS_ENSURE_ARG_POINTER and be done with it.  Might be worth it....
Not so fun; bug 587698 disabled *all* our event listener service tests, and now
even those ones not using JSD fail because of compartment mismatch, and once that problem is fixed
there is an assertion I don't quite understand yet...
Target Milestone: --- → mozilla9
Version: unspecified → Trunk
Attached patch WIP (obsolete) — Splinter Review
but getEventTargetChainFor call causes still 
###!!! ASSERTION: Non-global object has the wrong flags: '!(jsclazz->flags & JSCLASS_IS_GLOBAL)', file /home/smaug/mozilla/hg/m-c/js/src/xpconnect/src/xpcwrappednative.cpp, line 1146
XPCWrappedNative::Init(XPCCallContext&, JSObject*, int, XPCNativeScriptableCreateInfo const*) (/home/smaug/mozilla/hg/m-c/js/src/xpconnect/src/xpcwrappednative.cpp:1145)
So the assertion happens somehow when page's JS touches TabChildGlobal.

I wonder what has changed since bug 587698 to cause that assertion to fire.
(The assertion has been there for a long time)
Ok, found the problem, patch coming.
Assignee: nobody → Olli.Pettay
Attached patch patchSplinter Review
The patch has sort of random stuff that is needed to be able to run the
tests again without errors or assertions.
Attachment #565801 - Attachment is obsolete: true
Attachment #565809 - Flags: review?(bzbarsky)
Comment on attachment 565809 [details] [diff] [review]
patch

r=me
Attachment #565809 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/4c02f4104c17
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.