зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1123394 - Stop spurious re-entry of shell interrupt callback r=shu
This commit is contained in:
Родитель
fb018eecf1
Коммит
1b718aa75f
|
@ -357,6 +357,12 @@ ShellInterruptCallback(JSContext *cx)
|
|||
if (!gServiceInterrupt)
|
||||
return true;
|
||||
|
||||
// Reset gServiceInterrupt. CancelExecution or InterruptIf will set it to
|
||||
// true to distinguish watchdog or user triggered interrupts.
|
||||
// Do this first to prevent other interrupts that may occur while the
|
||||
// user-supplied callback is executing from re-entering the handler.
|
||||
gServiceInterrupt = false;
|
||||
|
||||
bool result;
|
||||
RootedValue interruptFunc(cx, *gInterruptFunc);
|
||||
if (!interruptFunc.isNull()) {
|
||||
|
@ -379,10 +385,6 @@ ShellInterruptCallback(JSContext *cx)
|
|||
if (!result && gExitCode == 0)
|
||||
gExitCode = EXITCODE_TIMEOUT;
|
||||
|
||||
// Reset gServiceInterrupt. CancelExecution or InterruptIf will set it to
|
||||
// true to distinguish watchdog or user triggered interrupts.
|
||||
gServiceInterrupt = false;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче