Fix test failures on the bot.
[WebKit-https.git] / Source / WebKit2 / UIProcess / API / Cocoa / WKProcessPool.mm
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];
     });