Revision: 11927
Author: [email protected]
Date: Mon Jun 25 14:43:50 2012
Log: Fix liveedit heap traversal bug with write barrier
Review URL: https://chromiumcodereview.appspot.com/10639006
http://code.google.com/p/v8/source/detail?r=11927
Modified:
/branches/bleeding_edge/src/liveedit.cc
=======================================
--- /branches/bleeding_edge/src/liveedit.cc Fri Jun 22 13:50:03 2012
+++ /branches/bleeding_edge/src/liveedit.cc Mon Jun 25 14:43:50 2012
@@ -968,6 +968,14 @@
static void ReplaceCodeObject(Code* original, Code* substitution) {
ASSERT(!HEAP->InNewSpace(substitution));
+ // Perform a full GC in order to ensure that we are not in the middle of
an
+ // incremental marking phase when we are replacing the code object.
+ // Since we are not in an incremental marking phase we can write pointers
+ // to code objects (that are never in new space) without worrying about
+ // write barriers.
+ 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