Closed Bug 965715 Opened 10 years ago Closed 10 years ago

[regression] JavaScript-global-constructor object has no interface

Categories

(Core :: XPConnect, defect)

x86_64
Linux
defect
Not set
major

Tracking

()

RESOLVED WONTFIX

People

(Reporter: j, Unassigned)

References

Details

Attachments

(1 file)

2.18 KB, application/x-xpinstall
Details
Objects created via JavaScript-global-constructor by an add-on no longer
have the interface defined via QueryInterface: XPCOMUtils.generateQI(..).

This started happening in recent Nightlies.
Last stable release (26) still exposes the interface as expected.
Jan, could you post an example testcase (small addon that easily shows the problem)?

Or alternately, would you be willing to find the first nightly that changed the behavior?
Flags: needinfo?(j)
Attached file JsGlobal.xpi
Source of extension can also be found at:

 http://r-w-x.org/?p=jsglobal.git;a=summary

example use that fails in nightly:

g = new JsGlobal();
console.log('g.foo', g.foo);
console.log('g.bar()', g.bar());
Flags: needinfo?(j)
Jan, thanks!

It looks like the issue you're having is that nsISecurityCheckedComponent has been removed.  See bug 794943.  So Ci.nsISecurityCheckedComponent in your component is undefined and things go south.

I tried just removing the nsISecurityCheckedComponent bits and everything _seems_ to work after that...  Bobby, is that expected?
Blocks: 794943
Flags: needinfo?(bobbyholley)
Oh, I see.  There's an nsIClassInfo with DOM_OBJECT set.  So the nsISecurityCheckedComponent bits are just superfluous.
Flags: needinfo?(bobbyholley)
We're not going to reintroduce nsISecurityCheckedComponent, so wontfix, I guess, but fixing the addon in this case should be pretty simple.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
(In reply to Boris Zbarsky [:bz] from comment #5)
> fixing the addon in this case should be pretty simple.

Note that in this case, fixing the addon should just involve removing the references to nsISecurityCheckedComponent, since the addon also implements nsIClassInfo, and flags itself as DOM_OBJECT.
Thanks, removing nsISecurityCheckedComponent and related code indeed fixes Firefogg.
I remember this was needed at some point to pass File objects,
but always great if removing code can fix things.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: