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

Unified Diff: src/objects-inl.h

Issue 7639020: Perform TODO(gc) cleanup for TODO-lockdown. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index e926ef0054256a8d57f7ffe97d80018588a70fe0..bc724dfe888770bad564452db585fffb17a7631b 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1137,7 +1137,11 @@ void HeapObject::VerifySmiField(int offset) {
Heap* HeapObject::GetHeap() {
- return MemoryChunk::FromAddress(address())->heap();
+ Heap* heap =
+ MemoryChunk::FromAddress(reinterpret_cast<Address>(this))->heap();
+ ASSERT(heap != NULL);
+ ASSERT(heap->isolate() == Isolate::Current());
+ return heap;
}
@@ -1154,9 +1158,8 @@ Map* HeapObject::map() {
void HeapObject::set_map(Map* value) {
set_map_word(MapWord::FromMap(value));
if (value != NULL) {
- // We are passing NULL as a slot because maps can never be on evacuation
- // candidate.
- // TODO(gc) Maps are compacted by a separate (non-evacuation) algorithm.
+ // TODO(1600) We are passing NULL as a slot because maps can never be on
+ // evacuation candidate.
value->GetHeap()->incremental_marking()->RecordWrite(this, NULL, value);
}
}
@@ -3450,8 +3453,7 @@ Code* SharedFunctionInfo::unchecked_code() {
void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) {
WRITE_FIELD(this, kCodeOffset, value);
- // TODO(gc) ISOLATESMERGE HEAP
- WRITE_BARRIER(HEAP, this, kCodeOffset, value);
+ WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value);
}

Powered by Google App Engine
This is Rietveld 408576698