mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1232859 - Don't crash or abort compilation if we're unable to compile the regex stubs. r=nbp
This commit is contained in:
parent
2eb4030f07
commit
a34aedbb0c
12
js/src/jit-test/tests/ion/bug1232859.js
Normal file
12
js/src/jit-test/tests/ion/bug1232859.js
Normal file
@ -0,0 +1,12 @@
|
||||
// |jit-test| error:recursion
|
||||
x = /x/;
|
||||
z = [];
|
||||
y = Object.defineProperty(z, "valueOf", {
|
||||
get: function() {
|
||||
+y;
|
||||
for (var i = 0; i < 1; i++) {
|
||||
a = x.exec(0);
|
||||
}
|
||||
}
|
||||
})
|
||||
z + '';
|
@ -5044,7 +5044,7 @@ IonBuilder::inlineScriptedCall(CallInfo& callInfo, JSFunction* target)
|
||||
if (types && !types->unknown()) {
|
||||
TemporaryTypeSet* clonedTypes = types->clone(alloc_->lifoAlloc());
|
||||
if (!clonedTypes)
|
||||
return oom();
|
||||
return false;
|
||||
MTypeBarrier* barrier = MTypeBarrier::New(alloc(), callInfo.thisArg(), clonedTypes);
|
||||
current->add(barrier);
|
||||
if (barrier->type() == MIRType_Undefined)
|
||||
|
@ -1140,11 +1140,6 @@ class IonBuilder
|
||||
|
||||
IonBuilder* outermostBuilder();
|
||||
|
||||
bool oom() {
|
||||
abortReason_ = AbortReason_Alloc;
|
||||
return false;
|
||||
}
|
||||
|
||||
struct LoopHeader {
|
||||
jsbytecode* pc;
|
||||
MBasicBlock* header;
|
||||
|
@ -1864,8 +1864,8 @@ IonBuilder::inlineRegExpMatcher(CallInfo& callInfo)
|
||||
|
||||
JSContext* cx = GetJitContext()->cx;
|
||||
if (!cx->compartment()->jitCompartment()->ensureRegExpMatcherStubExists(cx)) {
|
||||
oom();
|
||||
return InliningStatus_Error;
|
||||
cx->clearPendingException(); // OOM or overrecursion.
|
||||
return InliningStatus_NotInlined;
|
||||
}
|
||||
|
||||
callInfo.setImplicitlyUsedUnchecked();
|
||||
@ -1918,8 +1918,8 @@ IonBuilder::inlineRegExpTester(CallInfo& callInfo)
|
||||
|
||||
JSContext* cx = GetJitContext()->cx;
|
||||
if (!cx->compartment()->jitCompartment()->ensureRegExpTesterStubExists(cx)) {
|
||||
oom();
|
||||
return InliningStatus_Error;
|
||||
cx->clearPendingException(); // OOM or overrecursion.
|
||||
return InliningStatus_NotInlined;
|
||||
}
|
||||
|
||||
callInfo.setImplicitlyUsedUnchecked();
|
||||
|
Loading…
Reference in New Issue
Block a user