[heap] Move RecomputeLimits into safepoint
Recompute heap limits while all threads are still stopped. Otherwise setting the limits races with concurrent background threads performing allocations. Bug: v8:10315 Change-Id: I17e711b960e1fde05adb4f4b794f813b94190ef1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157375 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#67280}
This commit is contained in:
parent
cdb845b099
commit
d2f8c9e404
@ -2097,6 +2097,9 @@ bool Heap::PerformGarbageCollection(
|
||||
Verify();
|
||||
}
|
||||
#endif
|
||||
|
||||
RecomputeLimits(collector);
|
||||
|
||||
if (FLAG_local_heaps) safepoint()->End();
|
||||
|
||||
{
|
||||
@ -2117,8 +2120,6 @@ bool Heap::PerformGarbageCollection(
|
||||
// Update relocatables.
|
||||
Relocatable::PostGarbageCollectionProcessing(isolate_);
|
||||
|
||||
RecomputeLimits(collector);
|
||||
|
||||
{
|
||||
GCCallbacksScope scope(this);
|
||||
if (scope.CheckReenter()) {
|
||||
|
Loading…
Reference in New Issue
Block a user