Commit e831949f authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[test] Fix setting flags in SingleThreadedDefaultPlatformTest

We will not be able to modify flags after initializing V8 (soon).
The {SingleThreadedDefaultPlatformTest} was resetting flags during
teardown for no reason, as we do not support running multiple tests in a
row anyway. Thus remove that use of {SaveFlags} and just set the
--single-threaded flag before initializing V8.

R=ahaas@chromium.org

Bug: v8:12887
Change-Id: Ia89d442cf4b2fe2e12e258da5c0c9f1f871ded12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695378Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81024}
parent 50683aa6
......@@ -40,26 +40,16 @@ class SingleThreadedDefaultPlatformTest
::testing::Test>>> {
public:
static void SetUpTestSuite() {
CHECK_NULL(save_flags_);
save_flags_ = new i::SaveFlags();
v8::V8::SetFlagsFromString("--single-threaded");
i::FLAG_single_threaded = true;
i::FlagList::EnforceFlagImplications();
WithIsolateScopeMixin::SetUpTestSuite();
}
static void TearDownTestSuite() {
WithIsolateScopeMixin::TearDownTestSuite();
CHECK_NOT_NULL(save_flags_);
delete save_flags_;
save_flags_ = nullptr;
}
private:
static i::SaveFlags* save_flags_;
};
// static
i::SaveFlags* SingleThreadedDefaultPlatformTest::save_flags_;
TEST_F(SingleThreadedDefaultPlatformTest, SingleThreadedDefaultPlatform) {
{
i::HandleScope scope(i_isolate());
......
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