Title: [183938] trunk/Source/_javascript_Core
Revision
183938
Author
akl...@apple.com
Date
2015-05-07 11:32:29 -0700 (Thu, 07 May 2015)

Log Message

Worker threads leak WeakBlocks (as seen on leaks bot)
<https://webkit.org/b/144721>
<rdar://problem/20848288>

Reviewed by Darin Adler.

Nuke any remaining empty WeakBlocks when the Heap is being torn down.
Trying to peek into these blocks after the VM is dead would be a bug anyway.

This fixes a ~750 KB leak seen on the leaks bot.

* heap/Heap.cpp:
(JSC::Heap::~Heap):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (183937 => 183938)


--- trunk/Source/_javascript_Core/ChangeLog	2015-05-07 18:26:14 UTC (rev 183937)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-05-07 18:32:29 UTC (rev 183938)
@@ -1,3 +1,19 @@
+2015-05-07  Andreas Kling  <akl...@apple.com>
+
+        Worker threads leak WeakBlocks (as seen on leaks bot)
+        <https://webkit.org/b/144721>
+        <rdar://problem/20848288>
+
+        Reviewed by Darin Adler.
+
+        Nuke any remaining empty WeakBlocks when the Heap is being torn down.
+        Trying to peek into these blocks after the VM is dead would be a bug anyway.
+
+        This fixes a ~750 KB leak seen on the leaks bot.
+
+        * heap/Heap.cpp:
+        (JSC::Heap::~Heap):
+
 2015-05-05  Geoffrey Garen  <gga...@apple.com>
 
         Don't branch when accessing the callee

Modified: trunk/Source/_javascript_Core/heap/Heap.cpp (183937 => 183938)


--- trunk/Source/_javascript_Core/heap/Heap.cpp	2015-05-07 18:26:14 UTC (rev 183937)
+++ trunk/Source/_javascript_Core/heap/Heap.cpp	2015-05-07 18:32:29 UTC (rev 183938)
@@ -369,6 +369,8 @@
 
 Heap::~Heap()
 {
+    for (WeakBlock* block : m_logicallyEmptyWeakBlocks)
+        WeakBlock::destroy(block);
 }
 
 bool Heap::isPagedOut(double deadline)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to