| 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;
|
|
|