diff options
Diffstat (limited to 'src/3rdparty/v8/test/cctest/test-api.cc')
-rw-r--r-- | src/3rdparty/v8/test/cctest/test-api.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/3rdparty/v8/test/cctest/test-api.cc b/src/3rdparty/v8/test/cctest/test-api.cc index 41eb68f..f7325df 100644 --- a/src/3rdparty/v8/test/cctest/test-api.cc +++ b/src/3rdparty/v8/test/cctest/test-api.cc @@ -15155,6 +15155,7 @@ TEST(Regress528) { v8::Persistent<Context> context; v8::Persistent<Context> other_context; int gc_count; + bool snapshot_enabled = i::Snapshot::IsEnabled(); // Create a context used to keep the code from aging in the compilation // cache. @@ -15180,10 +15181,10 @@ TEST(Regress528) { CompileRun(source_simple); other_context->Exit(); HEAP->CollectAllGarbage(i::Heap::kNoGCFlags); - if (GetGlobalObjectsCount() == 1) break; + if (GetGlobalObjectsCount() == (snapshot_enabled ? 2 : 1)) break; } CHECK_GE(2, gc_count); - CHECK_EQ(1, GetGlobalObjectsCount()); + CHECK_EQ((snapshot_enabled ? 2 : 1), GetGlobalObjectsCount()); // Eval in a function creates reference from the compilation cache to the // global object. @@ -15203,10 +15204,10 @@ TEST(Regress528) { CompileRun(source_eval); other_context->Exit(); HEAP->CollectAllGarbage(i::Heap::kNoGCFlags); - if (GetGlobalObjectsCount() == 1) break; + if (GetGlobalObjectsCount() == (snapshot_enabled ? 2 : 1)) break; } CHECK_GE(2, gc_count); - CHECK_EQ(1, GetGlobalObjectsCount()); + CHECK_EQ((snapshot_enabled ? 2 : 1), GetGlobalObjectsCount()); // Looking up the line number for an exception creates reference from the // compilation cache to the global object. @@ -15231,10 +15232,10 @@ TEST(Regress528) { CompileRun(source_exception); other_context->Exit(); HEAP->CollectAllGarbage(i::Heap::kNoGCFlags); - if (GetGlobalObjectsCount() == 1) break; + if (GetGlobalObjectsCount() == (snapshot_enabled ? 2 : 1)) break; } CHECK_GE(2, gc_count); - CHECK_EQ(1, GetGlobalObjectsCount()); + CHECK_EQ((snapshot_enabled ? 2 : 1), GetGlobalObjectsCount()); other_context.Dispose(); v8::V8::ContextDisposedNotification(); |