Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index ee622f2065f80bfd4b69f67e0e87a12c43f81fd8..bf459bdbdb4a4ec40dc3dd3a78520474fff2c495 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -5473,6 +5473,8 @@ void Heap::AddWeakObjectToCodeDependency(Handle<Object> obj, |
Handle<DependentCode> dep) { |
ASSERT(!InNewSpace(*obj)); |
ASSERT(!InNewSpace(*dep)); |
+ // This handle scope keeps the table handle local to this function, which |
+ // allows us to safely skip write barriers in table update operations. |
HandleScope scope(isolate()); |
Handle<WeakHashTable> table(WeakHashTable::cast(weak_object_to_code_table_), |
isolate()); |