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

Unified Diff: src/liveedit.cc

Issue 10639006: Fix liveedit heap traversal bug with write barrier (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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/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.
Erik Corry 2012/06/25 11:43:51 I think this comment should read: // Perform a fu
Peter Rybin 2012/06/25 21:43:42 Thank you!
+ HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask,
+ "liveedit.cc ReplaceCodeObject");
+
AssertNoAllocation no_allocations_please;
ReplacingVisitor visitor(original, substitution);
« 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