mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 936236 - Wait on background sweeping to complete after large-allocation-failure callback (r=jonco)
--HG-- extra : rebase_source : a93e691cbd76995abfa4ceed709c495fdb97d62c
This commit is contained in:
parent
5864b3d72e
commit
e7f39fa9fe
@ -1726,7 +1726,7 @@ struct JSRuntime : public JS::shadow::Runtime,
|
||||
if (!largeAllocationFailureCallback || bytes < LARGE_ALLOCATION)
|
||||
return nullptr;
|
||||
largeAllocationFailureCallback();
|
||||
return js_calloc(bytes);
|
||||
return onOutOfMemory(reinterpret_cast<void *>(1), bytes);
|
||||
}
|
||||
|
||||
void *reallocCanGC(void *p, size_t bytes) {
|
||||
@ -1736,7 +1736,7 @@ struct JSRuntime : public JS::shadow::Runtime,
|
||||
if (!largeAllocationFailureCallback || bytes < LARGE_ALLOCATION)
|
||||
return nullptr;
|
||||
largeAllocationFailureCallback();
|
||||
return js_realloc(p, bytes);
|
||||
return onOutOfMemory(p, bytes);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user