Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1036)

Unified Diff: test/cctest/test-serialize.cc

Issue 2674593003: [TypeFeedbackVector] Root feedback vectors at function literal site. (Closed)
Patch Set: REBASE. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index aa91fe5d939a4a3a07464c95a33bd25d417582a3..ea4e35f5627a8d0d43e1e0d751300d0b77d11180 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -262,6 +262,9 @@ static void PartiallySerializeObject(Vector<const byte>* startup_blob_out,
isolate->bootstrapper()->SourceLookup<Natives>(i);
}
}
+
+ isolate->compilation_cache()->Clear();
mvstanton 2017/02/03 12:16:37 Change to CollectAllAvailableGarbage().
+
heap->CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask,
i::GarbageCollectionReason::kTesting);
heap->CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask,
@@ -370,6 +373,9 @@ static void PartiallySerializeContext(Vector<const byte>* startup_blob_out,
isolate->bootstrapper()->SourceLookup<Natives>(i);
}
}
+
+ isolate->compilation_cache()->Clear();
+
// If we don't do this then we end up with a stray root pointing at the
// context even after we have disposed of env.
heap->CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask,
@@ -1008,8 +1014,7 @@ TEST(CodeSerializerPromotedToCompilationCache) {
CHECK(isolate->compilation_cache()
->LookupScript(src, src, 0, 0, v8::ScriptOriginOptions(),
isolate->native_context(), SLOPPY)
- .ToHandleChecked()
- .is_identical_to(copy));
+ .info() == *copy);
delete cache;
}

Powered by Google App Engine
This is Rietveld 408576698