Closed
Bug 592184
Opened 15 years ago
Closed 15 years ago
TM: XPC_WN_CallMethod has to set the right compartment
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: gwagner, Assigned: gwagner)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(3 files)
|
12.59 KB,
text/plain
|
Details | |
|
5.21 KB,
patch
|
Details | Diff | Splinter Review | |
|
4.53 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•15 years ago
|
||
Attachment #471161 -
Flags: review?(mrbkap)
Comment 2•15 years ago
|
||
Comment on attachment 471161 [details] [diff] [review]
patch
>diff -r 18e3ee80322f js/src/jsapi.cpp
>--- a/js/src/jsapi.cpp Tue Aug 31 11:48:58 2010 -0700
>+++ b/js/src/jsapi.cpp Wed Sep 01 10:12:02 2010 -0700
>@@ -1186,17 +1186,17 @@ JSAutoEnterCompartment::JSAutoEnterCompa
> : cx(cx), compartment(cx->compartment)
> {
> cx->compartment = newCompartment;
> }
>
> JSAutoEnterCompartment::JSAutoEnterCompartment(JSContext *cx, JSObject *target)
> : cx(cx), compartment(cx->compartment)
> {
>- cx->compartment = target->getCompartment(cx);
>+ cx->compartment = target ? target->getCompartment(cx) : cx->runtime->defaultCompartment;
This change is not needed any more.
| Assignee | ||
Comment 3•15 years ago
|
||
| Assignee | ||
Updated•15 years ago
|
Attachment #471161 -
Flags: review?(mrbkap)
| Assignee | ||
Updated•15 years ago
|
Attachment #471168 -
Flags: review?(mrbkap)
Updated•15 years ago
|
Assignee: general → anygregor
Updated•15 years ago
|
Attachment #471168 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 4•15 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Comment 5•15 years ago
|
||
Comment on attachment 471168 [details] [diff] [review]
patch
> rv = mSystemPrincipal->GetJSPrincipals(cx, &jsPrincipals);
> NS_ENSURE_SUCCESS(rv, rv);
>
> JSPrincipalsHolder princHolder(mContext, jsPrincipals);
> #endif
>
> nsCOMPtr<nsIXPCScriptable> backstagePass;
>@@ -1464,16 +1469,19 @@ mozJSComponentLoader::ImportInto(const n
> }
>
> NS_ASSERTION(mod->global, "Import table contains entry with no global");
> *_retval = mod->global;
>
> jsval symbols;
> if (targetObj) {
> JSCLContextHelper cxhelper(this);
>+ JSAutoCrossCompartmentCall ac;
>+ if (!ac.enter(mContext, mod->global))
>+ return NULL;
returning a NULL as a nsresult :(
Comment 6•15 years ago
|
||
ouch, sorry. Gregor, want to file a bug and fix this?
Comment 7•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•