Chromium Code Reviews| 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; |
| } |