Reviewers: Erik Corry,

Message:
I hope this fixes the issue from http://codereview.chromium.org/10332101/

Must admit I'm a bit in
http://knowyourmeme.com/photos/234739-i-have-no-idea-what-im-doing  mode.

Description:
Fix liveedit heap traversal bug with write barrier


Please review this at http://codereview.chromium.org/10639006/

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

Affected files:
  M src/liveedit.cc


Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index 7f6455443ef5a506ea2f665b84230782e8df80ee..8f82cfc81e633269d62efc15bf257457828e5259 100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -968,6 +968,12 @@ class ReplacingVisitor : public ObjectVisitor {
 static void ReplaceCodeObject(Code* original, Code* substitution) {
   ASSERT(!HEAP->InNewSpace(substitution));

+  // Perform a full GC in order to avoid dead objects and to
+ // notify the GC with a write barrier so that the it can keep track of where + // there are pointers in case some of the objects move in a compacting GC.
+  HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask,
+                          "liveedit.cc ReplaceCodeObject");
+
   AssertNoAllocation no_allocations_please;

   ReplacingVisitor visitor(original, substitution);


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to