Commit d2f8c9e4 authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[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/+/2157375Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67280}
parent cdb845b0
......@@ -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()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment