Bug 1009624 - startup crash in nsXULPrototypeDocument::GetCompilationGlobal(), r=bholley

--HG--
extra : rebase_source : a43ae920b713957acdc43900e7dd16ed5d963ce6
This commit is contained in:
Olli Pettay 2014-05-13 22:03:42 +03:00
parent 4f600d1b82
commit 072237c928

View File

@ -2628,7 +2628,7 @@ nsXULPrototypeScript::Compile(JS::SourceBufferHolder& aSrcBuf,
nsIOffThreadScriptReceiver *aOffThreadReceiver /* = nullptr */)
{
// We'll compile the script in the compilation scope.
MOZ_ASSERT(aProtoDoc);
NS_ENSURE_STATE(aProtoDoc);
NS_ENSURE_TRUE(xpc::GetCompilationScope(), NS_ERROR_UNEXPECTED);
AutoSafeJSContext cx;
JSAutoCompartment ac(cx, xpc::GetCompilationScope());