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

[heap][test] Set FLAG_local_heaps first before creating context

FLAG_local_heaps needs to be set before creating the context, otherwise
the StressConcurrentAllocatorTask is already started. Setting the flag
then races with background thread, which checks FLAG_local_heaps while
creating LocalHeap.

Bug: v8:10315
Change-Id: If6de748ec174dffb94a2582d24e37d24586ee95a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2404823Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69850}
parent e9d3d232
...@@ -70,8 +70,8 @@ class ConcurrentSearchThread final : public v8::base::Thread { ...@@ -70,8 +70,8 @@ class ConcurrentSearchThread final : public v8::base::Thread {
// Uses linear search on a flat object, with up to 8 elements. // Uses linear search on a flat object, with up to 8 elements.
TEST(LinearSearchFlatObject) { TEST(LinearSearchFlatObject) {
CcTest::InitializeVM();
FLAG_local_heaps = true; FLAG_local_heaps = true;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate(); Isolate* isolate = CcTest::i_isolate();
std::unique_ptr<PersistentHandles> ph = isolate->NewPersistentHandles(); std::unique_ptr<PersistentHandles> ph = isolate->NewPersistentHandles();
......
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