Note: There are a few cases of duplicates in user autocompletion which are being worked on.

crash when calling nsIEventListenerService.getListenerInfoFor with null argument

RESOLVED FIXED in mozilla9

Status

()

Core
Event Handling
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: arno renevier, Assigned: smaug)

Tracking

Trunk
mozilla9
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
Hi,
following code in chrome context crashes mozilla:
    Components.classes["@mozilla.org/eventlistenerservice;1"].getService(Ci.nsIEventListenerService).getListenerInfoFor(null, {})
Yeah ... don't do that ;-)

Comment 2

6 years ago
Or we could NS_ENSURE_ARG_POINTER and be done with it.  Might be worth it....
(Assignee)

Comment 3

6 years ago
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
(Assignee)

Comment 4

6 years ago
Created attachment 565801 [details] [diff] [review]
WIP

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)
(Assignee)

Comment 5

6 years ago
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)
(Assignee)

Comment 6

6 years ago
http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/src/xpcconvert.cpp#486 is in the stack..
(Assignee)

Comment 7

6 years ago
Ok, found the problem, patch coming.
Assignee: nobody → Olli.Pettay
(Assignee)

Comment 8

6 years ago
Created attachment 565809 [details] [diff] [review]
patch

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 9

6 years ago
Comment on attachment 565809 [details] [diff] [review]
patch

r=me
Attachment #565809 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 10

6 years ago
https://hg.mozilla.org/mozilla-central/rev/4c02f4104c17
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.