Allow for suffixes to com.apple.WebKit.WebContent
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2018 21:06:31 +0000 (21:06 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2018 21:06:31 +0000 (21:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189972

Reviewed by Chris Dumez.

Source/bmalloc:

* bmalloc/ProcessCheck.mm:
(bmalloc::gigacageEnabledForProcess):

Source/WebCore:

* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::isInWebProcess):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/ProcessCheck.mm

index 7026bba..2a186d1 100644 (file)
@@ -1,3 +1,13 @@
+2018-09-25  Alex Christensen  <achristensen@webkit.org>
+
+        Allow for suffixes to com.apple.WebKit.WebContent
+        https://bugs.webkit.org/show_bug.cgi?id=189972
+
+        Reviewed by Chris Dumez.
+
+        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+        (WebCore::isInWebProcess):
+
 2018-09-25  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [iOS] Fix the open source iOS 12 build after r236445
index 00250a7..6530c02 100644 (file)
@@ -86,9 +86,7 @@ uint32_t applicationSDKVersion()
 
 bool isInWebProcess()
 {
-    static bool mainBundleIsWebProcess = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebKit.WebContent.Development"]
-        || [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebKit.WebContent"]
-        || [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebProcess"];
+    static bool mainBundleIsWebProcess = [[[NSBundle mainBundle] bundleIdentifier] hasPrefix:@"com.apple.WebKit.WebContent"];
     return mainBundleIsWebProcess;
 }
 
index 40e887d..785455f 100644 (file)
@@ -1,3 +1,13 @@
+2018-09-25  Alex Christensen  <achristensen@webkit.org>
+
+        Allow for suffixes to com.apple.WebKit.WebContent
+        https://bugs.webkit.org/show_bug.cgi?id=189972
+
+        Reviewed by Chris Dumez.
+
+        * bmalloc/ProcessCheck.mm:
+        (bmalloc::gigacageEnabledForProcess):
+
 2018-09-24  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         Rename WTF_COMPILER_GCC_OR_CLANG to WTF_COMPILER_GCC_COMPATIBLE
index ddc27cb..90fdc3b 100644 (file)
@@ -38,9 +38,7 @@ bool gigacageEnabledForProcess()
 
     NSString *appName = [[NSBundle mainBundle] bundleIdentifier];
     if (appName) {
-        bool isWebProcess = [appName isEqualToString:@"com.apple.WebKit.WebContent.Development"]
-            || [appName isEqualToString:@"com.apple.WebKit.WebContent"]
-            || [appName isEqualToString:@"com.apple.WebProcess"];
+        bool isWebProcess = [appName hasPrefix:@"com.apple.WebKit.WebContent"];
         return isWebProcess;
     }