Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

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

Issue 2054693002: [stubs] Fixed PrimaryStubCache and SecondaryStubCache tests. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | 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 2bb4efa74546356cfc1577ea2f81b6bc809cdc0b..71e2bc2d5a2dff8cfcac6aa4717bc0614bc0eaee 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -21481,10 +21481,9 @@ TEST(ScopedMicrotasks) {
env->GetIsolate()->SetMicrotasksPolicy(v8::MicrotasksPolicy::kAuto);
}
-#if defined(ENABLE_DISASSEMBLER) && !defined(V8_USE_EXTERNAL_STARTUP_DATA)
+#ifdef ENABLE_DISASSEMBLER
// FLAG_test_primary_stub_cache and FLAG_test_secondary_stub_cache are read
// only when ENABLE_DISASSEMBLER is not defined.
-// These tests are valid only for no-snapshot mode.
namespace {
@@ -21537,8 +21536,10 @@ void StubCacheHelper(bool primary) {
create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
create_params.counter_lookup_callback = LookupCounter;
v8::Isolate* isolate = v8::Isolate::New(create_params);
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
- {
+ if (!i_isolate->snapshot_available()) {
+ // The test is valid only for no-snapshot mode.
v8::Isolate::Scope isolate_scope(isolate);
LocalContext env(isolate);
v8::HandleScope scope(isolate);
@@ -21570,7 +21571,7 @@ UNINITIALIZED_TEST(PrimaryStubCache) { StubCacheHelper(true); }
UNINITIALIZED_TEST(SecondaryStubCache) { StubCacheHelper(false); }
-#endif // ENABLE_DISASSEMBLER && !V8_USE_EXTERNAL_STARTUP_DATA
+#endif // ENABLE_DISASSEMBLER
#ifdef DEBUG
static int cow_arrays_created_runtime = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698