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

This commit is contained in:
Olli Pettay 2014-05-14 21:00:33 +03:00
Родитель 50b8bd17f4
Коммит 65c972d67f
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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());

Просмотреть файл

@ -3551,7 +3551,7 @@ XULDocument::OnStreamComplete(nsIStreamLoader* aLoader,
rv = mCurrentScriptProto->Compile(srcBuf,
uri, 1, this,
mCurrentPrototype,
mMasterPrototype,
this);
if (NS_SUCCEEDED(rv) && !mCurrentScriptProto->GetScriptObject()) {
// We will be notified via OnOffThreadCompileComplete when the