mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 730697 - Add missing OOM checks in JS type inference code. r=bhackett
--HG-- extra : rebase_source : 00e7f02d87f51a2cc2a4955de30c6f3f6c9b21ca
This commit is contained in:
parent
b3d0051497
commit
2bdd8d6d14
@ -2412,6 +2412,11 @@ ScriptAnalysis::addTypeBarrier(JSContext *cx, const jsbytecode *pc, TypeSet *tar
|
||||
|
||||
barrier = cx->typeLifoAlloc().new_<TypeBarrier>(target, type, (JSObject *) NULL, JSID_VOID);
|
||||
|
||||
if (!barrier) {
|
||||
cx->compartment->types.setPendingNukeTypes(cx);
|
||||
return;
|
||||
}
|
||||
|
||||
barrier->next = code.typeBarriers;
|
||||
code.typeBarriers = barrier;
|
||||
}
|
||||
@ -2438,6 +2443,11 @@ ScriptAnalysis::addSingletonTypeBarrier(JSContext *cx, const jsbytecode *pc, Typ
|
||||
TypeBarrier *barrier = cx->typeLifoAlloc().new_<TypeBarrier>(target, Type::UndefinedType(),
|
||||
singleton, singletonId);
|
||||
|
||||
if (!barrier) {
|
||||
cx->compartment->types.setPendingNukeTypes(cx);
|
||||
return;
|
||||
}
|
||||
|
||||
barrier->next = code.typeBarriers;
|
||||
code.typeBarriers = barrier;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user