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

Unified Diff: src/heap.cc

Issue 14587008: Fix CopyCode to properly record object pointer writes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 6a6afc022e54aff302e78a78abf2ecdaaf7dd423..57ab8796739445d31f48ca6434ac26c1cc289f89 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3862,6 +3862,11 @@ MaybeObject* Heap::CopyCode(Code* code) {
ASSERT(!isolate_->code_range()->exists() ||
isolate_->code_range()->contains(code->address()));
new_code->Relocate(new_addr - old_addr);
+
+ // Make sure new object is handled properly by the GC.
+ incremental_marking()->RecordWrites(new_code);
Michael Starzinger 2013/05/14 16:43:10 So I looked into this write-barrier and I don't th
+ // RecordWrites(new_code->address(), 0, Code::kHeaderSize);
+
return new_code;
}
« 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