Bug 1330248 - Make sure the script still has an IonScript before attaching a stub. r=h4writer

--HG--
extra : rebase_source : b6b8710666096db583a1b212757815ce81d8882e
This commit is contained in:
Jan de Mooij 2017-01-16 13:45:01 +01:00
parent 9e0785daca
commit c0312180f5

View File

@ -933,7 +933,9 @@ IonIC::attachCacheIRStub(JSContext* cx, const CacheIRWriter& writer, CacheKind k
AutoAssertNoPendingException aanpe(cx);
JS::AutoCheckCannotGC nogc;
if (writer.failed())
// Do nothing if the IR generator failed or triggered a GC that invalidated
// the script.
if (writer.failed() || !outerScript->hasIonScript())
return false;
JitContext jctx(cx, nullptr);