Title: [245800] trunk/Source/_javascript_Core
Revision
245800
Author
tzaga...@apple.com
Date
2019-05-27 14:51:40 -0700 (Mon, 27 May 2019)

Log Message

Fix opensource build of testapi
https://bugs.webkit.org/show_bug.cgi?id=198256

Reviewed by Alexey Proskuryakov.

In r245564, we added custom entitlements to testapi to allow caching
bytecode in data vaults, but we should only use the entitlements for
internal builds. Otherwises, testapi gets killed on launch. Also fix the
formatting for the errors added in the same patch, according to comments
in the bug after the patch had already landed.

* API/JSScript.mm:
(validateBytecodeCachePath):
* Configurations/ToolExecutable.xcconfig:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/API/JSScript.mm (245799 => 245800)


--- trunk/Source/_javascript_Core/API/JSScript.mm	2019-05-27 21:50:08 UTC (rev 245799)
+++ trunk/Source/_javascript_Core/API/JSScript.mm	2019-05-27 21:51:40 UTC (rev 245800)
@@ -77,7 +77,7 @@
 
     if (auto metadata = FileSystem::fileMetadata(systemPath)) {
         if (metadata->type != FileMetadata::Type::File) {
-            createError([NSString stringWithFormat:@"Cache path `%s` already exists and is not a file", systemPath.utf8().data()], error);
+            createError([NSString stringWithFormat:@"Cache path `%@` already exists and is not a file", static_cast<NSString *>(systemPath)], error);
             return false;
         }
     }
@@ -84,18 +84,18 @@
 
     String directory = FileSystem::directoryName(systemPath);
     if (directory.isNull()) {
-        createError([NSString stringWithFormat:@"Cache path `%s` does not contain in a valid directory", systemPath.utf8().data()], error);
+        createError([NSString stringWithFormat:@"Cache path `%@` does not contain in a valid directory", static_cast<NSString *>(systemPath)], error);
         return false;
     }
 
     if (!FileSystem::fileIsDirectory(directory, FileSystem::ShouldFollowSymbolicLinks::No)) {
-        createError([NSString stringWithFormat:@"Cache directory `%s` is not a directory or does not exist", directory.utf8().data()], error);
+        createError([NSString stringWithFormat:@"Cache directory `%@` is not a directory or does not exist", static_cast<NSString *>(directory)], error);
         return false;
     }
 
 #if USE(APPLE_INTERNAL_SDK)
     if (rootless_check_datavault_flag(FileSystem::fileSystemRepresentation(directory).data(), nullptr)) {
-        createError([NSString stringWithFormat:@"Cache directory `%s` is not a data vault", directory.utf8().data()], error);
+        createError([NSString stringWithFormat:@"Cache directory `%@` is not a data vault", static_cast<NSString *>(directory)], error);
         return false;
     }
 #endif

Modified: trunk/Source/_javascript_Core/ChangeLog (245799 => 245800)


--- trunk/Source/_javascript_Core/ChangeLog	2019-05-27 21:50:08 UTC (rev 245799)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-05-27 21:51:40 UTC (rev 245800)
@@ -1,3 +1,20 @@
+2019-05-27  Tadeu Zagallo  <tzaga...@apple.com>
+
+        Fix opensource build of testapi
+        https://bugs.webkit.org/show_bug.cgi?id=198256
+
+        Reviewed by Alexey Proskuryakov.
+
+        In r245564, we added custom entitlements to testapi to allow caching
+        bytecode in data vaults, but we should only use the entitlements for
+        internal builds. Otherwises, testapi gets killed on launch. Also fix the
+        formatting for the errors added in the same patch, according to comments
+        in the bug after the patch had already landed.
+
+        * API/JSScript.mm:
+        (validateBytecodeCachePath):
+        * Configurations/ToolExecutable.xcconfig:
+
 2019-05-25  Tadeu Zagallo  <tzaga...@apple.com>
 
         JITOperations getByVal should mark negative array indices as out-of-bounds

Modified: trunk/Source/_javascript_Core/Configurations/ToolExecutable.xcconfig (245799 => 245800)


--- trunk/Source/_javascript_Core/Configurations/ToolExecutable.xcconfig	2019-05-27 21:50:08 UTC (rev 245799)
+++ trunk/Source/_javascript_Core/Configurations/ToolExecutable.xcconfig	2019-05-27 21:51:40 UTC (rev 245800)
@@ -43,8 +43,8 @@
 CODE_SIGN_IDENTITY_NO = -;
 CODE_SIGN_IDENTITY_YES = $(WK_ENGINEERING_CODE_SIGN_IDENTITY);
 
-CODE_SIGN_ENTITLEMENTS[sdk=macosx*] = $(CODE_SIGN_ENTITLEMENTS_macosx_$(TARGET_NAME));
-CODE_SIGN_ENTITLEMENTS_macosx_testapi = testapi.entitlements;
+CODE_SIGN_ENTITLEMENTS[sdk=macosx*] = $(CODE_SIGN_ENTITLEMENTS_macosx_$(TARGET_NAME)_$(USE_INTERNAL_SDK));
+CODE_SIGN_ENTITLEMENTS_macosx_testapi_YES = testapi.entitlements;
 
 CODE_SIGN_ENTITLEMENTS[sdk=iphone*] = $(CODE_SIGN_ENTITLEMENTS_ios_$(TARGET_NAME));
 CODE_SIGN_ENTITLEMENTS_ios_minidom = entitlements.plist;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to