Chromium Code Reviews

Unified Diff: test/cctest/test-api.cc

Issue 2829223002: Add setter to Isolate for allowing Atomics.wait (Closed)
Patch Set: add test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 50c57f1949f178f3e3e1422591d741c97262ff63..30e60c344d2ae55a225363d1277b915da8e398cd 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -26557,3 +26557,18 @@ TEST(DeterministicRandomNumberGeneration) {
v8::internal::FLAG_random_seed = previous_seed;
}
+
+UNINITIALIZED_TEST(AllowAtomicsWait) {
+ using namespace i;
+ v8::Isolate::CreateParams create_params;
+ create_params.allow_atomics_wait = false;
+ create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+ v8::Isolate* isolate = v8::Isolate::New(create_params);
+ Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
+ {
+ CHECK_EQ(false, i_isolate->allow_atomics_wait());
+ isolate->SetAllowAtomicsWait(true);
+ CHECK_EQ(true, i_isolate->allow_atomics_wait());
+ }
+ isolate->Dispose();
+}
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine