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

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

Issue 1818953002: Perform RegisterReservationsForBlackAllocation atomically with deserialization of code. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698