Eagerly force GC in a few cctests to avoid spurious nosnap failures
See this v8-dev thread for more background: https://groups.google.com/d/msg/v8-dev/71PVa9fMzoc/AvBZ9Fw4BQAJ TBR=hpayer@chromium.org Change-Id: I49957a72c8faec4cf5032cbf6437a461d7139b83 Reviewed-on: https://chromium-review.googlesource.com/486062 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#44824}
This commit is contained in:
parent
0443f41ebd
commit
1c762bb8ed
@ -637,6 +637,12 @@ UNINITIALIZED_TEST(InlineAllocationObserverCadence) {
|
||||
|
||||
Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
|
||||
|
||||
// Clear out any pre-existing garbage to make the test consistent
|
||||
// across snapshot/no-snapshot builds.
|
||||
i_isolate->heap()->CollectAllGarbage(
|
||||
i::Heap::kFinalizeIncrementalMarkingMask,
|
||||
i::GarbageCollectionReason::kTesting);
|
||||
|
||||
NewSpace* new_space = i_isolate->heap()->new_space();
|
||||
|
||||
Observer observer1(512);
|
||||
|
@ -916,6 +916,10 @@ TEST(Regress436816) {
|
||||
Factory* factory = isolate->factory();
|
||||
v8::HandleScope scope(CcTest::isolate());
|
||||
|
||||
// Force a GC to free up space before we allocate objects whose
|
||||
// mid-test states would fail heap verification.
|
||||
CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
|
||||
|
||||
const int kPropsCount = kSmiValueSize * 3;
|
||||
TestPropertyKind props[kPropsCount];
|
||||
for (int i = 0; i < kPropsCount; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user