Commit 9d2344d1 authored by jochen@chromium.org's avatar jochen@chromium.org

Tests that make a stack allocated persistent weak and rely on gc need to force gc

Otherwise, if during a fuzzer test incremental marking is running, we'll
crash in the weak callback

BUG=none
TBR=verwaest@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/101843002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9087d5f8
......@@ -13153,7 +13153,7 @@ THREADED_TEST(NewPersistentHandleFromWeakCallback) {
// weak callback of the first handle would be able to 'reallocate' it.
handle1.SetWeak(&handle1, NewPersistentHandleCallback);
handle2.Reset();
CcTest::heap()->CollectAllGarbage(i::Heap::kNoGCFlags);
CcTest::heap()->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask);
}
......@@ -13179,7 +13179,7 @@ THREADED_TEST(DoNotUseDeletedNodesInSecondLevelGc) {
}
handle1.SetWeak(&handle1, DisposeAndForceGcCallback);
to_be_disposed.Reset(isolate, handle2);
CcTest::heap()->CollectAllGarbage(i::Heap::kNoGCFlags);
CcTest::heap()->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask);
}
void DisposingCallback(
......@@ -13208,7 +13208,7 @@ THREADED_TEST(NoGlobalHandlesOrphaningDueToWeakCallback) {
}
handle2.SetWeak(&handle2, DisposingCallback);
handle3.SetWeak(&handle3, HandleCreatingCallback);
CcTest::heap()->CollectAllGarbage(i::Heap::kNoGCFlags);
CcTest::heap()->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask);
}
......
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