Fix test failures on the bot.
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2014 23:25:52 +0000 (23:25 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2014 23:25:52 +0000 (23:25 +0000)
* UIProcess/API/Cocoa/WKProcessPool.mm:
(websiteDataDirectoryURL):
If we have no bundle identifier, use the process name.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm

index 3ea4b9d4d18a2eafb206bbac2a9c55d617ae636d..6e4d9dea88ae93b7cfa246596b6fcab2d0dbbb92 100644 (file)
@@ -1,3 +1,11 @@
+2014-05-23  Anders Carlsson  <andersca@apple.com>
+
+        Fix test failures on the bot.
+
+        * UIProcess/API/Cocoa/WKProcessPool.mm:
+        (websiteDataDirectoryURL):
+        If we have no bundle identifier, use the process name.
+
 2014-05-23  Enrica Casucci  <enrica@apple.com>
 
         REGRESSION (iOS WebKit2): Autocorrection is not accurate when changing selection.
index 8718780a23eac60065727573b84d4161871f9c7e..e5e376f8e61354ad7ef1578d9075533c77e161cf 100644 (file)
@@ -115,7 +115,12 @@ static NSURL *websiteDataDirectoryURL(NSString *directoryName)
             RELEASE_ASSERT_NOT_REACHED();
 
         url = [url URLByAppendingPathComponent:@"WebKit" isDirectory:YES];
-        url = [url URLByAppendingPathComponent:[[NSBundle mainBundle] bundleIdentifier] isDirectory:YES];
+
+        NSString *bundleIdentifier = [NSBundle mainBundle].bundleIdentifier;
+        if (!bundleIdentifier)
+            bundleIdentifier = [NSProcessInfo processInfo].processName;
+
+        url = [url URLByAppendingPathComponent:bundleIdentifier isDirectory:YES];
 
         websiteDataURL = [[url URLByAppendingPathComponent:@"WebsiteData" isDirectory:YES] retain];
     });