[Mac] Cache callbacks for cache partitioning may be passed null
authorjpfau@apple.com <jpfau@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Feb 2014 00:31:23 +0000 (00:31 +0000)
committerjpfau@apple.com <jpfau@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Feb 2014 00:31:23 +0000 (00:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129175

Reviewed by Brady Eidson.

Source/WebKit2:

* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
(WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):

WebKitLibraries:

* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMavericks.a:
* libWebKitSystemInterfaceMountainLion.a:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164516 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp
WebKitLibraries/ChangeLog
WebKitLibraries/libWebKitSystemInterfaceLion.a
WebKitLibraries/libWebKitSystemInterfaceMavericks.a
WebKitLibraries/libWebKitSystemInterfaceMountainLion.a

index 5103334..e21dc76 100644 (file)
@@ -1,3 +1,13 @@
+2014-02-21  Jeffrey Pfau  <jpfau@apple.com>
+
+        [Mac] Cache callbacks for cache partitioning may be passed null
+        https://bugs.webkit.org/show_bug.cgi?id=129175
+
+        Reviewed by Brady Eidson.
+
+        * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
+        (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
+
 2014-02-21  Benjamin Poulain  <bpoulain@apple.com>
 
         [iOS][WK2] Update the visible content rects on zoom
index 4dcda31..7c788f9 100644 (file)
@@ -66,8 +66,10 @@ void WebResourceCacheManager::cfURLCacheHostNamesWithCallback(CacheCallback call
     WKCFURLCacheCopyAllPartitionNames(^(CFArrayRef partitionNames) {
         RetainPtr<CFArrayRef> hostNamesInPersistentStore = adoptCF(WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition(CFSTR("")));
         RetainPtr<CFMutableArrayRef> hostNames = adoptCF(CFArrayCreateMutableCopy(0, 0, hostNamesInPersistentStore.get()));
-        CFArrayAppendArray(hostNames.get(), partitionNames, CFRangeMake(0, CFArrayGetCount(partitionNames)));
-        CFRelease(partitionNames);
+        if (partitionNames) {
+            CFArrayAppendArray(hostNames.get(), partitionNames, CFRangeMake(0, CFArrayGetCount(partitionNames)));
+            CFRelease(partitionNames);
+        }
         callback(std::move(hostNames));
     });
 }
index 0046252..250f004 100644 (file)
@@ -1,3 +1,14 @@
+2014-02-21  Jeffrey Pfau  <jpfau@apple.com>
+
+        [Mac] Cache callbacks for cache partitioning may be passed null
+        https://bugs.webkit.org/show_bug.cgi?id=129175
+
+        Reviewed by Brady Eidson.
+
+        * libWebKitSystemInterfaceLion.a:
+        * libWebKitSystemInterfaceMavericks.a:
+        * libWebKitSystemInterfaceMountainLion.a:
+
 2014-02-11  Roger Fong  <roger_fong@apple.com>
 
         [Windows] Set ENABLE_CSS_SHAPE_INSIDE feature flag on Windows.
index ff5cdd8..e26613f 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLion.a and b/WebKitLibraries/libWebKitSystemInterfaceLion.a differ
index 34f2e5a..458249e 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceMavericks.a and b/WebKitLibraries/libWebKitSystemInterfaceMavericks.a differ
index 95aecc9..52d0e96 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a and b/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a differ