OLD | NEW |
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/external-reference-table.h" | 8 #include "src/external-reference-table.h" |
9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 deserializing_user_code_ = true; | 150 deserializing_user_code_ = true; |
151 HandleScope scope(isolate); | 151 HandleScope scope(isolate); |
152 Handle<SharedFunctionInfo> result; | 152 Handle<SharedFunctionInfo> result; |
153 { | 153 { |
154 DisallowHeapAllocation no_gc; | 154 DisallowHeapAllocation no_gc; |
155 Object* root; | 155 Object* root; |
156 VisitPointer(&root); | 156 VisitPointer(&root); |
157 DeserializeDeferredObjects(); | 157 DeserializeDeferredObjects(); |
158 FlushICacheForNewCodeObjects(); | 158 FlushICacheForNewCodeObjects(); |
159 result = Handle<SharedFunctionInfo>(SharedFunctionInfo::cast(root)); | 159 result = Handle<SharedFunctionInfo>(SharedFunctionInfo::cast(root)); |
| 160 isolate->heap()->RegisterReservationsForBlackAllocation(reservations_); |
160 } | 161 } |
161 CommitPostProcessedObjects(isolate); | 162 CommitPostProcessedObjects(isolate); |
162 isolate->heap()->RegisterReservationsForBlackAllocation(reservations_); | |
163 return scope.CloseAndEscape(result); | 163 return scope.CloseAndEscape(result); |
164 } | 164 } |
165 } | 165 } |
166 | 166 |
167 Deserializer::~Deserializer() { | 167 Deserializer::~Deserializer() { |
168 // TODO(svenpanne) Re-enable this assertion when v8 initialization is fixed. | 168 // TODO(svenpanne) Re-enable this assertion when v8 initialization is fixed. |
169 // DCHECK(source_.AtEOF()); | 169 // DCHECK(source_.AtEOF()); |
170 attached_objects_.Dispose(); | 170 attached_objects_.Dispose(); |
171 } | 171 } |
172 | 172 |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 | 812 |
813 default: | 813 default: |
814 CHECK(false); | 814 CHECK(false); |
815 } | 815 } |
816 } | 816 } |
817 CHECK_EQ(limit, current); | 817 CHECK_EQ(limit, current); |
818 return true; | 818 return true; |
819 } | 819 } |
820 } // namespace internal | 820 } // namespace internal |
821 } // namespace v8 | 821 } // namespace v8 |
OLD | NEW |