Reviewers: Michael Starzinger,

Description:
Fix CopyCode to properly record object pointer writes.

[email protected]

Please review this at https://codereview.chromium.org/14587008/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/heap.cc


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);
+  //  RecordWrites(new_code->address(), 0, Code::kHeaderSize);
+
   return new_code;
 }



--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to