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

Side by Side Diff: src/heap/heap.cc

Issue 2872323002: [heap] Color object black on unsafe layout change. (Closed)
Patch Set: fix unused variable Created 3 years, 7 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 | « src/heap/concurrent-marking-deque.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/ast/context-slot-cache.h" 10 #include "src/ast/context-slot-cache.h"
(...skipping 4259 matching lines...) Expand 10 before | Expand all | Expand 10 after
4270 4270
4271 // Large object space doesn't use reservations, so it needs custom handling. 4271 // Large object space doesn't use reservations, so it needs custom handling.
4272 for (HeapObject* object : *large_objects) { 4272 for (HeapObject* object : *large_objects) {
4273 incremental_marking()->IterateBlackObject(object); 4273 incremental_marking()->IterateBlackObject(object);
4274 } 4274 }
4275 } 4275 }
4276 4276
4277 void Heap::NotifyObjectLayoutChange(HeapObject* object, 4277 void Heap::NotifyObjectLayoutChange(HeapObject* object,
4278 const DisallowHeapAllocation&) { 4278 const DisallowHeapAllocation&) {
4279 if (FLAG_incremental_marking && incremental_marking()->IsMarking()) { 4279 if (FLAG_incremental_marking && incremental_marking()->IsMarking()) {
4280 incremental_marking()->WhiteToGreyAndPush(object); 4280 incremental_marking()->MarkBlackAndPush(object);
4281 } 4281 }
4282 #ifdef VERIFY_HEAP 4282 #ifdef VERIFY_HEAP
4283 DCHECK(pending_layout_change_object_ == nullptr); 4283 DCHECK(pending_layout_change_object_ == nullptr);
4284 pending_layout_change_object_ = object; 4284 pending_layout_change_object_ = object;
4285 #endif 4285 #endif
4286 } 4286 }
4287 4287
4288 #ifdef VERIFY_HEAP 4288 #ifdef VERIFY_HEAP
4289 void Heap::VerifyObjectLayoutChange(HeapObject* object, Map* new_map) { 4289 void Heap::VerifyObjectLayoutChange(HeapObject* object, Map* new_map) {
4290 if (pending_layout_change_object_ == nullptr) { 4290 if (pending_layout_change_object_ == nullptr) {
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after
6528 case LO_SPACE: 6528 case LO_SPACE:
6529 return "LO_SPACE"; 6529 return "LO_SPACE";
6530 default: 6530 default:
6531 UNREACHABLE(); 6531 UNREACHABLE();
6532 } 6532 }
6533 return NULL; 6533 return NULL;
6534 } 6534 }
6535 6535
6536 } // namespace internal 6536 } // namespace internal
6537 } // namespace v8 6537 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/concurrent-marking-deque.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698