[test] Fix unittests/RuntimeCallStatsTest.GarbageCollection

The previous fix force --single-threaded-gc, but that has no effect
without reapplying flag implication as done in this fix.

Bug: v8:11413
Change-Id: Iecb2d74c7eb8322638dcc843723c560dcbb7bf50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912892
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74741}
This commit is contained in:
Ulan Degenbaev 2021-05-23 14:27:01 +02:00 committed by V8 LUCI CQ
parent d8c6aa70b1
commit e46ce494e1

View File

@ -7,6 +7,7 @@
#include "src/api/api-inl.h"
#include "src/base/atomic-utils.h"
#include "src/base/platform/time.h"
#include "src/flags/flags.h"
#include "src/handles/handles-inl.h"
#include "src/logging/counters.h"
#include "src/objects/objects-inl.h"
@ -627,6 +628,7 @@ TEST_F(RuntimeCallStatsTest, GarbageCollection) {
// running after this test completes and race with is_runtime_stats_enabled()
// updates.
FLAG_single_threaded_gc = true;
FlagList::EnforceFlagImplications();
v8::Isolate* isolate = v8_isolate();
RunJS(
"let root = [];"