Remove check for SkipSafariExecutableEntitlementChecks
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 4 Feb 2017 00:05:51 +0000 (00:05 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 4 Feb 2017 00:05:51 +0000 (00:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=167762

Reviewed by Dan Bernstein.

Follow-up fix: don't break internal behavior.

* Scripts/webkitdirs.pm:
(safariPath):
(executableHasEntitlements): Deleted.
(safariPathFromSafariBundle): Deleted.
(installedSafariPath): Deleted.

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

Tools/ChangeLog
Tools/Scripts/webkitdirs.pm

index 0c0e0f6..37fa254 100644 (file)
@@ -1,3 +1,18 @@
+2017-02-03  Alexey Proskuryakov  <ap@apple.com>
+
+        Remove check for SkipSafariExecutableEntitlementChecks
+        https://bugs.webkit.org/show_bug.cgi?id=167762
+
+        Reviewed by Dan Bernstein.
+
+        Follow-up fix: don't break internal behavior.
+
+        * Scripts/webkitdirs.pm:
+        (safariPath):
+        (executableHasEntitlements): Deleted.
+        (safariPathFromSafariBundle): Deleted.
+        (installedSafariPath): Deleted.
+
 2017-02-03  Daniel Bates  <dabates@apple.com>
 
         [Mac][WK2] Add SPI to override the Content Security Policy of a page
index 3f7e38d..7b98839 100755 (executable)
@@ -846,36 +846,13 @@ sub setArchitecture
     $architecture = $passedArchitecture if $passedArchitecture;
 }
 
-sub executableHasEntitlements
-{
-    my $executablePath = shift;
-    return (`codesign -d --entitlements - $executablePath 2>&1` =~ /<key>/);
-}
-
-sub safariPathFromSafariBundle
-{
-    my ($safariBundle) = @_;
-
-    die "Safari path is only relevant on Apple Mac platform\n" unless isAppleMacWebKit();
-
-    my $safariPath = "$safariBundle/Contents/MacOS/Safari";
-    my $safariForWebKitDevelopmentPath = "$safariBundle/Contents/MacOS/SafariForWebKitDevelopment";
-
-    return $safariForWebKitDevelopmentPath if -f $safariForWebKitDevelopmentPath && executableHasEntitlements($safariPath);
-
-    return $safariPath;
-}
-
-sub installedSafariPath
-{
-    return safariPathFromSafariBundle("/Applications/Safari.app");
-}
-
 # Locate Safari.
 sub safariPath
 {
     die "Safari path is only relevant on Apple Mac platform\n" unless isAppleMacWebKit();
 
+    my $safariPath;
+
     # Use WEBKIT_SAFARI environment variable if present.
     my $safariBundle = $ENV{WEBKIT_SAFARI};
     if (!$safariBundle) {
@@ -884,11 +861,14 @@ sub safariPath
         if (-d "$configurationProductDir/Safari.app") {
             $safariBundle = "$configurationProductDir/Safari.app";
         }
-        if (!$safariBundle) {
-            return installedSafariPath();
-        }
     }
-    my $safariPath = safariPathFromSafariBundle($safariBundle);
+
+    if ($safariBundle) {
+        $safariPath = "$safariBundle/Contents/MacOS/Safari";
+    } else {
+        $safariPath = "/Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment";
+    }
+
     die "Can't find executable at $safariPath.\n" if !-x $safariPath;
     return $safariPath;
 }