Update checks that determine if WebKit is system WebKit
authorkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 19:58:06 +0000 (19:58 +0000)
committerkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 19:58:06 +0000 (19:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195756

Reviewed by Alexey Proskuryakov.

The system WebKit can be installed in additional locations, so check
for and allow those, too.

Source/WebKit:

* Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::AuxiliaryProcess::isSystemWebKit):

Source/WTF:

* wtf/Platform.h:

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

Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm

index 9b823ee..abb668d 100644 (file)
@@ -1,3 +1,15 @@
+2019-03-20  Keith Rollin  <krollin@apple.com>
+
+        Update checks that determine if WebKit is system WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=195756
+
+        Reviewed by Alexey Proskuryakov.
+
+        The system WebKit can be installed in additional locations, so check
+        for and allow those, too.
+
+        * wtf/Platform.h:
+
 2019-03-20  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         Unreviewed, further attempt to fix clang 3.8 build
index dca79da..7920c11 100644 (file)
 
 /* FIXME: move out all ENABLE() defines from here to FeatureDefines.h */
 
+#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/AdditionalPlatform.h>)
+#include <WebKitAdditions/AdditionalPlatform.h>
+#endif
+
 #if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/AdditionalFeatureDefines.h>)
 #include <WebKitAdditions/AdditionalFeatureDefines.h>
 #endif
index 99bb0fb..d590fc3 100644 (file)
@@ -1,3 +1,16 @@
+2019-03-20  Keith Rollin  <krollin@apple.com>
+
+        Update checks that determine if WebKit is system WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=195756
+
+        Reviewed by Alexey Proskuryakov.
+
+        The system WebKit can be installed in additional locations, so check
+        for and allow those, too.
+
+        * Shared/mac/AuxiliaryProcessMac.mm:
+        (WebKit::AuxiliaryProcess::isSystemWebKit):
+
 2019-03-20  Per Arne Vollan  <pvollan@apple.com>
 
         [iOS] Unable to PiP web videos in Safari due to sandbox violation
index 7ce95f1..897a35d 100644 (file)
@@ -719,6 +719,10 @@ void AuxiliaryProcess::setQOS(int latencyQOS, int throughputQOS)
 bool AuxiliaryProcess::isSystemWebKit()
 {
     static bool isSystemWebKit = [] {
+#if HAVE(ALTERNATE_SYSTEM_LAYOUT)
+        if ([[webKit2Bundle() bundlePath] hasPrefix:@"/Library/Apple/System/"])
+            return true;
+#endif
         return [[webKit2Bundle() bundlePath] hasPrefix:@"/System/"];
     }();
     return isSystemWebKit;