Title: [117201] trunk/Source/_javascript_Core
Revision
117201
Author
[email protected]
Date
2012-05-15 18:44:18 -0700 (Tue, 15 May 2012)

Log Message

Block freeing thread should not free blocks when we are actively requesting them
https://bugs.webkit.org/show_bug.cgi?id=86519

Reviewed by Geoff Garen.

* heap/BlockAllocator.h:
(JSC::BlockAllocator::allocate): Reordering the setting of the flag so its done 
while we hold the lock to ensure proper locking.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (117200 => 117201)


--- trunk/Source/_javascript_Core/ChangeLog	2012-05-16 01:42:46 UTC (rev 117200)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-05-16 01:44:18 UTC (rev 117201)
@@ -1,3 +1,14 @@
+2012-05-15  Mark Hahnenberg  <[email protected]>
+
+        Block freeing thread should not free blocks when we are actively requesting them
+        https://bugs.webkit.org/show_bug.cgi?id=86519
+
+        Reviewed by Geoff Garen.
+
+        * heap/BlockAllocator.h:
+        (JSC::BlockAllocator::allocate): Reordering the setting of the flag so its done 
+        while we hold the lock to ensure proper locking.
+
 2012-05-15  Filip Pizlo  <[email protected]>
 
         shrinkToFit() is often not called for Vectors in CodeBlock

Modified: trunk/Source/_javascript_Core/heap/BlockAllocator.h (117200 => 117201)


--- trunk/Source/_javascript_Core/heap/BlockAllocator.h	2012-05-16 01:42:46 UTC (rev 117200)
+++ trunk/Source/_javascript_Core/heap/BlockAllocator.h	2012-05-16 01:44:18 UTC (rev 117201)
@@ -65,8 +65,8 @@
 
 inline HeapBlock* BlockAllocator::allocate()
 {
+    MutexLocker locker(m_freeBlockLock);
     m_isCurrentlyAllocating = true;
-    MutexLocker locker(m_freeBlockLock);
     if (!m_numberOfFreeBlocks) {
         ASSERT(m_freeBlocks.isEmpty());
         return 0;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to