Closed
Bug 993053
Opened 11 years ago
Closed 11 years ago
Add xpc::InitGlobal containing the common code for wrapping main-thread XPConnect and WebIDL globals
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: peterv, Assigned: peterv)
References
Details
Attachments
(1 file)
(deleted),
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8402820 -
Flags: review?(bobbyholley)
Comment 1•11 years ago
|
||
Comment on attachment 8402820 [details] [diff] [review]
v1
Review of attachment 8402820 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/xpconnect/src/nsXPConnect.cpp
@@ +406,5 @@
> + // create ends up there.
> + JSAutoCompartment ac(aJSContext, aGlobal);
> + if (!(aFlags & nsIXPConnect::OMIT_COMPONENTS_OBJECT)) {
> + // XPCCallContext gives us an active request needed to save/restore.
> + if (!GetCompartmentPrivate(aGlobal)->scope->AttachComponentsObject(aJSContext) ||
Preexisting, I guess, but do we know that the private already exists, or should this use EnsureCompartmentPrivate?
@@ +414,5 @@
> + }
> +
> + // Stuff coming through this path always ends up as a DOM global.
> + // XXX Someone who knows why we can assert this should re-check
> + // (after bug 720580).
Remove this comment while you're here, bholley confirmed that the assertion is correct back in the day, but I never got around to removing it again.
Comment 2•11 years ago
|
||
Comment on attachment 8402820 [details] [diff] [review]
v1
Review of attachment 8402820 [details] [diff] [review]:
-----------------------------------------------------------------
r=bholley
::: js/xpconnect/src/nsXPConnect.cpp
@@ +406,5 @@
> + // create ends up there.
> + JSAutoCompartment ac(aJSContext, aGlobal);
> + if (!(aFlags & nsIXPConnect::OMIT_COMPONENTS_OBJECT)) {
> + // XPCCallContext gives us an active request needed to save/restore.
> + if (!GetCompartmentPrivate(aGlobal)->scope->AttachComponentsObject(aJSContext) ||
We do know. XPCWrappedNativeScope creates it in the constructor.
Attachment #8402820 -
Flags: review?(bobbyholley) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•