mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 950725 - Fix GetAndClearException to get/clear the exception before calling js_HandleExecutionInterrupt. r=bhackett
This commit is contained in:
parent
53c034b300
commit
a823a8daea
12
js/src/jit-test/tests/basic/bug950725.js
Normal file
12
js/src/jit-test/tests/basic/bug950725.js
Normal file
@ -0,0 +1,12 @@
|
||||
function test() {
|
||||
+ T[g].act
|
||||
}
|
||||
gc();
|
||||
var c = 0;
|
||||
for (var i = 0; i < 20; test['$+']) {
|
||||
if (c++ > 110)
|
||||
break;
|
||||
try {
|
||||
__count__(f(2), 1);
|
||||
} catch (e) {}
|
||||
}
|
@ -1035,7 +1035,7 @@ MarkJitExitFrame(JSTracer *trc, const IonFrameIterator &frame)
|
||||
MarkIonCodeRoot(trc, footer->addressOfIonCode(), "ion-exit-code");
|
||||
|
||||
const VMFunction *f = footer->function();
|
||||
if (f == nullptr || f->explicitArgs == 0)
|
||||
if (f == nullptr)
|
||||
return;
|
||||
|
||||
// Mark arguments of the VM wrapper.
|
||||
|
@ -3685,14 +3685,16 @@ js::SetCallOperation(JSContext *cx)
|
||||
bool
|
||||
js::GetAndClearException(JSContext *cx, MutableHandleValue res)
|
||||
{
|
||||
// Check the interrupt flag to allow interrupting deeply nested exception
|
||||
// handling.
|
||||
if (cx->runtime()->interrupt && !js_HandleExecutionInterrupt(cx))
|
||||
return false;
|
||||
|
||||
bool status = cx->getPendingException(res);
|
||||
cx->clearPendingException();
|
||||
return status;
|
||||
if (!status)
|
||||
return false;
|
||||
|
||||
// Check the interrupt flag to allow interrupting deeply nested exception
|
||||
// handling.
|
||||
if (cx->runtime()->interrupt)
|
||||
return js_HandleExecutionInterrupt(cx);
|
||||
return true;
|
||||
}
|
||||
|
||||
template <bool strict>
|
||||
|
Loading…
Reference in New Issue
Block a user