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

Side by Side Diff: src/snapshot/deserializer.cc

Issue 1811913002: [serializer] ensure that immortal immovable roots are correctly deserialized. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/snapshot/deserializer.h" 5 #include "src/snapshot/deserializer.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 if (!ReserveSpace()) V8::FatalProcessOutOfMemory("deserializing context"); 75 if (!ReserveSpace()) V8::FatalProcessOutOfMemory("deserializing context");
76 // No active threads. 76 // No active threads.
77 DCHECK_NULL(isolate_->thread_manager()->FirstThreadStateInUse()); 77 DCHECK_NULL(isolate_->thread_manager()->FirstThreadStateInUse());
78 // No active handles. 78 // No active handles.
79 DCHECK(isolate_->handle_scope_implementer()->blocks()->is_empty()); 79 DCHECK(isolate_->handle_scope_implementer()->blocks()->is_empty());
80 // Partial snapshot cache is not yet populated. 80 // Partial snapshot cache is not yet populated.
81 DCHECK(isolate_->partial_snapshot_cache()->is_empty()); 81 DCHECK(isolate_->partial_snapshot_cache()->is_empty());
82 82
83 { 83 {
84 DisallowHeapAllocation no_gc; 84 DisallowHeapAllocation no_gc;
85 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG_ROOT_LIST);
85 isolate_->heap()->IterateSmiRoots(this); 86 isolate_->heap()->IterateSmiRoots(this);
86 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); 87 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG);
87 isolate_->heap()->RepairFreeListsAfterDeserialization(); 88 isolate_->heap()->RepairFreeListsAfterDeserialization();
88 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); 89 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL);
89 DeserializeDeferredObjects(); 90 DeserializeDeferredObjects();
90 FlushICacheForNewIsolate(); 91 FlushICacheForNewIsolate();
91 } 92 }
92 93
93 isolate_->heap()->set_native_contexts_list( 94 isolate_->heap()->set_native_contexts_list(
94 isolate_->heap()->undefined_value()); 95 isolate_->heap()->undefined_value());
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 811
811 default: 812 default:
812 CHECK(false); 813 CHECK(false);
813 } 814 }
814 } 815 }
815 CHECK_EQ(limit, current); 816 CHECK_EQ(limit, current);
816 return true; 817 return true;
817 } 818 }
818 } // namespace internal 819 } // namespace internal
819 } // namespace v8 820 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/snapshot/serializer.h » ('j') | src/snapshot/serializer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698