Bug 1035287, part 1 - Add missing oom check. r=jimb.

--HG--
extra : rebase_source : 138e8d5b8cf232cfb1c8a06822c2d0423a0227c6
This commit is contained in:
Jason Orendorff 2014-07-08 19:32:06 -05:00
parent 00e7220baa
commit 74ac45c18d

View File

@ -186,6 +186,8 @@ frontend::CreateScriptSourceObject(ExclusiveContext *cx, const ReadOnlyCompileOp
return nullptr;
RootedScriptSource sso(cx, ScriptSourceObject::create(cx, ss));
if (!sso)
return nullptr;
// Off-thread compilations do all their GC heap allocation, including the
// SSO, in a temporary compartment. Hence, for the SSO to refer to the