зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
5d0de25dc2
Коммит
c7030b4301
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче