mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 993772 - Switch to the singleton compilation scope for XBL compilation. r=mrbkap
This commit is contained in:
parent
edb924cc7d
commit
2029789a7d
@ -566,7 +566,7 @@ void
|
||||
AssertInCompilationScope()
|
||||
{
|
||||
AutoJSContext cx;
|
||||
MOZ_ASSERT(JS_GetClass(JS::CurrentGlobalOrNull(cx)) ==
|
||||
&nsXBLDocGlobalObject::gSharedGlobalClass);
|
||||
// Note - Inverting the order of these operands is a rooting hazard.
|
||||
MOZ_ASSERT(xpc::GetCompilationScope() == JS::CurrentGlobalOrNull(cx));
|
||||
}
|
||||
#endif
|
||||
|
@ -201,7 +201,7 @@ nsXBLProtoImpl::CompilePrototypeMembers(nsXBLPrototypeBinding* aBinding)
|
||||
// bind the prototype to a real xbl instance, we'll clone the pre-compiled JS into the real instance's
|
||||
// context.
|
||||
AutoSafeJSContext cx;
|
||||
JS::Rooted<JSObject*> compilationGlobal(cx, aBinding->XBLDocumentInfo()->GetCompilationGlobal());
|
||||
JS::Rooted<JSObject*> compilationGlobal(cx, xpc::GetCompilationScope());
|
||||
NS_ENSURE_TRUE(compilationGlobal, NS_ERROR_UNEXPECTED);
|
||||
JSAutoCompartment ac(cx, compilationGlobal);
|
||||
|
||||
|
@ -919,7 +919,7 @@ nsXBLPrototypeBinding::Read(nsIObjectInputStream* aStream,
|
||||
}
|
||||
|
||||
AutoSafeJSContext cx;
|
||||
JS::Rooted<JSObject*> compilationGlobal(cx, aDocInfo->GetCompilationGlobal());
|
||||
JS::Rooted<JSObject*> compilationGlobal(cx, xpc::GetCompilationScope());
|
||||
NS_ENSURE_TRUE(compilationGlobal, NS_ERROR_UNEXPECTED);
|
||||
JSAutoCompartment ac(cx, compilationGlobal);
|
||||
|
||||
@ -1072,7 +1072,7 @@ nsXBLPrototypeBinding::Write(nsIObjectOutputStream* aStream)
|
||||
// computed on demand.
|
||||
|
||||
AutoSafeJSContext cx;
|
||||
JS::Rooted<JSObject*> compilationGlobal(cx, mXBLDocInfoWeak->GetCompilationGlobal());
|
||||
JS::Rooted<JSObject*> compilationGlobal(cx, xpc::GetCompilationScope());
|
||||
NS_ENSURE_TRUE(compilationGlobal, NS_ERROR_UNEXPECTED);
|
||||
JSAutoCompartment ac(cx, compilationGlobal);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user