Title: [170975] trunk/Source/WebCore
Revision
170975
Author
psola...@apple.com
Date
2014-07-10 13:48:44 -0700 (Thu, 10 Jul 2014)

Log Message

ASSERT in SharedBuffer::maybeAppendDataArray() on MobileSafari launch
https://bugs.webkit.org/show_bug.cgi?id=134812
<rdar://problem/17628434>

Reviewed by Joseph Pecoraro.

Fix bug in my fix in r170930. Initialize the badly named m_shouldUsePurgeableMemory field to
false. This field indicates when it is okay to use purgeable memory and is set to true once
the resource is finished loading. By setting it to true in the constructor we were creating
purgeable memory while the resource was still being loaded and this triggered the assert.

No new tests. Should be covered by existing tests.

* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::SharedBuffer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (170974 => 170975)


--- trunk/Source/WebCore/ChangeLog	2014-07-10 20:33:05 UTC (rev 170974)
+++ trunk/Source/WebCore/ChangeLog	2014-07-10 20:48:44 UTC (rev 170975)
@@ -1,3 +1,21 @@
+2014-07-10  Pratik Solanki  <psola...@apple.com>
+
+        ASSERT in SharedBuffer::maybeAppendDataArray() on MobileSafari launch
+        https://bugs.webkit.org/show_bug.cgi?id=134812
+        <rdar://problem/17628434>
+
+        Reviewed by Joseph Pecoraro.
+
+        Fix bug in my fix in r170930. Initialize the badly named m_shouldUsePurgeableMemory field to
+        false. This field indicates when it is okay to use purgeable memory and is set to true once
+        the resource is finished loading. By setting it to true in the constructor we were creating
+        purgeable memory while the resource was still being loaded and this triggered the assert.
+
+        No new tests. Should be covered by existing tests.
+
+        * platform/cf/SharedBufferCF.cpp:
+        (WebCore::SharedBuffer::SharedBuffer):
+
 2014-07-10  Andreas Kling  <akl...@apple.com>
 
         [iOS WebKit2] Some memory pressure relief tweaks.

Modified: trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp (170974 => 170975)


--- trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp	2014-07-10 20:33:05 UTC (rev 170974)
+++ trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp	2014-07-10 20:48:44 UTC (rev 170975)
@@ -128,7 +128,7 @@
 
 SharedBuffer::SharedBuffer(CFArrayRef cfDataArray)
     : m_size(0)
-    , m_shouldUsePurgeableMemory(true)
+    , m_shouldUsePurgeableMemory(false)
 #if ENABLE(DISK_IMAGE_CACHE)
     , m_isMemoryMapped(false)
     , m_diskImageCacheId(DiskImageCache::invalidDiskCacheId)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to