Using local file src/sconsbuild/Debug/test_shell_tests.
authorloislo@chromium.org <loislo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 2 Feb 2012 13:26:52 +0000 (13:26 +0000)
committerloislo@chromium.org <loislo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 2 Feb 2012 13:26:52 +0000 (13:26 +0000)
Leak of 16 bytes in 1 objects allocated from:
@ 8c06b85 v8::internal::NativeObjectsExplorer::FindOrAddGroupInfo

BUG=112315
TEST=heapcheck build

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/profile-generator.cc

index 409c24c..614287f 100644 (file)
@@ -2720,6 +2720,13 @@ NativeObjectsExplorer::~NativeObjectsExplorer() {
         reinterpret_cast<List<HeapObject*>* >(p->value);
     delete objects;
   }
+  for (HashMap::Entry* p = native_groups_.Start();
+       p != NULL;
+       p = native_groups_.Next(p)) {
+    v8::RetainedObjectInfo* info =
+        reinterpret_cast<v8::RetainedObjectInfo*>(p->value);
+    info->Dispose();
+  }
 }
 
 
@@ -2824,6 +2831,7 @@ class NativeGroupRetainedObjectInfo : public v8::RetainedObjectInfo {
   virtual void Dispose() {
     CHECK(!disposed_);
     disposed_ = true;
+    delete this;
   }
   virtual bool IsEquivalent(RetainedObjectInfo* other) {
     return hash_ == other->GetHash() && !strcmp(label_, other->GetLabel());