Commit 4afa9110 authored by Adam Klein's avatar Adam Klein Committed by Commit Bot

[cctest] Fix more flakiness in Heap-related cctests on nosnap builds

These tests assume that a newly-created Isolate is pristine, but that's
not true for nosnap builds.

TBR=ulan@chromium.org

Change-Id: Ie5d0fb0450f285c8eeb8e088feef6729102c0f14
Reviewed-on: https://chromium-review.googlesource.com/489063Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44952}
parent a32cd1c7
......@@ -310,6 +310,10 @@ UNINITIALIZED_TEST(ArrayBuffer_SemiSpaceCopyMultipleTasks) {
v8::Context::New(isolate)->Enter();
Heap* heap = i_isolate->heap();
// Ensure heap is in a clean state.
heap->CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask,
GarbageCollectionReason::kTesting);
Local<v8::ArrayBuffer> ab1 = v8::ArrayBuffer::New(isolate, 100);
Handle<JSArrayBuffer> buf1 = v8::Utils::OpenHandle(*ab1);
heap::FillCurrentPage(heap->new_space());
......
......@@ -2106,8 +2106,7 @@ TEST(GrowAndShrinkNewSpace) {
}
// Make sure we're in a consistent state to start out.
CcTest::CollectGarbage(NEW_SPACE);
CcTest::CollectGarbage(NEW_SPACE);
CcTest::CollectAllGarbage();
// Explicitly growing should double the space capacity.
size_t old_capacity, new_capacity;
......
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