Bug 1414840 - Don't try to recover from OOM when creating cooperative threads in the shell, r=jandem.

--HG--
extra : rebase_source : 1277619a46e0e0d98969be216ca2ca686a18dbae
extra : histedit_source : 51bedec629d587590c4d62ea246222df5916996b
This commit is contained in:
Brian Hackett 2017-12-04 07:53:04 -07:00
Родитель 5d0de25dc2
Коммит c7030b4301
1 изменённых файлов: 6 добавлений и 9 удалений

Просмотреть файл

@ -3755,15 +3755,12 @@ EvalInThread(JSContext* cx, unsigned argc, Value* vp, bool cooperative)
CooperativeBeginWait(cx);
}
auto thread = js_new<Thread>(Thread::Options().setStackSize(gMaxStackSize + 128 * 1024));
if (!thread || !thread->init(WorkerMain, input)) {
ReportOutOfMemory(cx);
if (cooperative) {
cooperationState->numThreads--;
CooperativeYield();
CooperativeEndWait(cx);
}
return false;
Thread* thread;
{
AutoEnterOOMUnsafeRegion oomUnsafe;
thread = js_new<Thread>(Thread::Options().setStackSize(gMaxStackSize + 128 * 1024));
if (!thread || !thread->init(WorkerMain, input))
oomUnsafe.crash("EvalInThread");
}
if (cooperative) {