Closed
Bug 1490507
Opened 6 years ago
Closed 6 years ago
nsIXPCWrappedJSObjectGetter is unused
Categories
(Core :: XPConnect, enhancement, P3)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
Details
Attachments
(2 files)
The interface nsIXPCWrappedJSObjectGetter appears to be completely unused, but there's a gigantic comment before it, in nsIXPConnect.idl, that sounds like it is possibly still relevant, although it talks about an interface nsIXPCSecurityManager which does not exist any more. The comment itself does not seem to have been touched since 2001. There's a reference to this comment ("See the comment preceding nsIXPCWrappedJSObjectGetter in nsIXPConnect.idl.") before GetDoubleWrappedJSObject in XPCWrappedNativeJSOps.cpp. Anyways, I would like to get rid of this interface, but I'm not sure if I should just move the comment to GetDoubleWrappedJSObject or what.
Assignee | ||
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•6 years ago
|
||
The big comment also contains the typo "implemementation".
Assignee | ||
Comment 2•6 years ago
|
||
Removing nsIXPCWrappedJSObjectGetter or making it not scriptable would save tens of bytes in binary size, by eliminating XPT data.
Assignee | ||
Comment 3•6 years ago
|
||
I'll just make it not scriptable in bug 1490503.
Comment 4•6 years ago
|
||
If the IID isn't referenced anywhere, I think the interface can just go away. A lot of the old security manager is gone now.
Assignee | ||
Comment 5•6 years ago
|
||
Yeah. The question is, what should I do with the comment, which seems about 75% relevant and 25% obsolete.
Comment 6•6 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #5) > Yeah. The question is, what should I do with the comment, which seems about > 75% relevant and 25% obsolete. I'd clean it up and move it here: https://searchfox.org/mozilla-central/rev/de7676288a78b70d2b9927c79493adbf294faad5/js/xpconnect/src/XPCWrappedNativeJSOps.cpp#149
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → continuation
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Depends on 5690
Comment 9•6 years ago
|
||
Comment on attachment 9008491 [details] Bug 1490507, part 1 - Remove nsIXPCWrappedJSObjectGetter and move the comment Bobby Holley (:bholley) has approved the revision.
Attachment #9008491 -
Flags: review+
Comment 10•6 years ago
|
||
Comment on attachment 9008492 [details] Bug 1490507, part 2 - Fix up the comment about double wrapping Bobby Holley (:bholley) has approved the revision.
Attachment #9008492 -
Flags: review+
Assignee | ||
Comment 11•6 years ago
|
||
Boris, Bobby wanted me to ask if we expose XPCWJS to content at all these days. There's a bit of code at the end of XPC_WN_DoubleWrappedGetter that does a IsSystemCaller() check that I mentioned in my comment. Bobby wanted me to note it if these shouldn't be in content any more.
Flags: needinfo?(bzbarsky)
Comment 12•6 years ago
|
||
See bug 1478359 comment 5 and bug 1478359 comment 6: XBL implements="" and its replacement via CustomElementRegistry::CallGetCustomInterface use XPCWrappedJS. To the extent that we do this for elements not in chrome, we will have XPCWrappedJS for a non-chrome thing. Now that said, the real question is whether we expose double-wrapped XPCWrappedJS to content, right? The answer there is bug 1207321 comment 2: Only if you do enablePrivilege or are a remote-XUL domain. And we should really get rid of those... Once we do that, I think this check can probably go away, since we won't have XPCWrapped_Native_ exposed to content.
Flags: needinfo?(bzbarsky)
Comment 13•6 years ago
|
||
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0cbd91ad500b part 1 - Remove nsIXPCWrappedJSObjectGetter and move the comment r=bholley https://hg.mozilla.org/integration/autoland/rev/644d4b1846b0 part 2 - Fix up the comment about double wrapping r=bholley
Comment 14•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0cbd91ad500b https://hg.mozilla.org/mozilla-central/rev/644d4b1846b0
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•