Commit 5a065cf8 authored by peter.rybin@gmail.com's avatar peter.rybin@gmail.com

Fix liveedit heap traversal bug with write barrier

Review URL: https://chromiumcodereview.appspot.com/10639006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 51afb2ad
......@@ -968,6 +968,14 @@ class ReplacingVisitor : public ObjectVisitor {
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment