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

Unified Diff: src/heap.cc

Issue 25702008: Enable weak embedded objects in optimized code with a fix for heap verifier. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add comment Created 7 years, 2 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 | « src/flag-definitions.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 0a594e77ee3eb95dff3789ed5fb211d54dc7d152..b0335d0efdd5da06accdc84acf018f626cf8fd66 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -6886,6 +6886,9 @@ MaybeObject* Heap::AddWeakObjectToCodeDependency(Object* obj,
WeakHashTable::cast(weak_object_to_code_table_)->Put(obj, dep);
WeakHashTable* table;
if (!maybe_obj->To(&table)) return maybe_obj;
+ if (ShouldZapGarbage() && weak_object_to_code_table_ != table) {
+ WeakHashTable::cast(weak_object_to_code_table_)->Zap(the_hole_value());
+ }
set_weak_object_to_code_table(table);
ASSERT_EQ(dep, WeakHashTable::cast(weak_object_to_code_table_)->Lookup(obj));
return weak_object_to_code_table_;
« no previous file with comments | « src/flag-definitions.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698