Bug 1207922 - Part 2: Propagate OOM thrown from stub generation. r=till

This commit is contained in:
Tooru Fujisawa 2016-01-07 16:50:55 +09:00
parent 09be7a7c79
commit 611f45b2a4
3 changed files with 10 additions and 4 deletions

View File

@ -2,5 +2,5 @@ if (!('oomTest' in this))
quit();
oomTest(() => assertEq("foobar\xff5baz\u1200".search(/bar\u0178\d/i), 3));
// will fix in Part 2.
//oomTest(() => assertEq((/(?!(?!(?!6)[\Wc]))/i).test(), false));
oomTest(() => assertEq((/(?!(?!(?!6)[\Wc]))/i).test(), false));
oomTest(() => assertEq((/bar\u0178\d/i).exec("foobar\xff5baz\u1200") != null, true));

View File

@ -5081,6 +5081,8 @@ IonBuilder::inlineScriptedCall(CallInfo& callInfo, JSFunction* target)
abortReason_ = AbortReason_Inlining;
} else if (inlineBuilder.abortReason_ == AbortReason_Inlining) {
abortReason_ = AbortReason_Inlining;
} else if (inlineBuilder.abortReason_ == AbortReason_Alloc) {
abortReason_ = AbortReason_Alloc;
} else if (inlineBuilder.abortReason_ == AbortReason_PreliminaryObjects) {
const ObjectGroupVector& groups = inlineBuilder.abortedPreliminaryGroups();
MOZ_ASSERT(!groups.empty());

View File

@ -1865,8 +1865,10 @@ IonBuilder::inlineRegExpMatcher(CallInfo& callInfo)
return InliningStatus_NotInlined;
JSContext* cx = GetJitContext()->cx;
if (!cx->compartment()->jitCompartment()->ensureRegExpMatcherStubExists(cx))
if (!cx->compartment()->jitCompartment()->ensureRegExpMatcherStubExists(cx)) {
oom();
return InliningStatus_Error;
}
callInfo.setImplicitlyUsedUnchecked();
@ -1917,8 +1919,10 @@ IonBuilder::inlineRegExpTester(CallInfo& callInfo)
return InliningStatus_NotInlined;
JSContext* cx = GetJitContext()->cx;
if (!cx->compartment()->jitCompartment()->ensureRegExpTesterStubExists(cx))
if (!cx->compartment()->jitCompartment()->ensureRegExpTesterStubExists(cx)) {
oom();
return InliningStatus_Error;
}
callInfo.setImplicitlyUsedUnchecked();