Reviewers: ulan,

Message:
PTAL

Description:
Fix for potential memory leak after putting to WeakObjectToCodeDependency table.

Please review this at https://codereview.chromium.org/254723004/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+1, -0 lines):
  M src/heap.cc


Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index a87cc1363edfda8ad44fb22911c8eca820bf1879..85c0dc6ca2fce08648991d864665360618a274f0 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -5656,6 +5656,7 @@ void Heap::AddWeakObjectToCodeDependency(Handle<Object> obj,
                                          Handle<DependentCode> dep) {
   ASSERT(!InNewSpace(*obj));
   ASSERT(!InNewSpace(*dep));
+  HandleScope scope(isolate());
Handle<WeakHashTable> table(WeakHashTable::cast(weak_object_to_code_table_),
                               isolate());
   table = WeakHashTable::Put(table, obj, dep);


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to