Changeset 245800 in webkit


Ignore:
Timestamp:
May 27, 2019 2:51:40 PM (5 years ago)
Author:
Tadeu Zagallo
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:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSScript.mm

    r245564 r245800  
    7878    if (auto metadata = FileSystem::fileMetadata(systemPath)) {
    7979        if (metadata->type != FileMetadata::Type::File) {
    80             createError([NSString stringWithFormat:@"Cache path `%s` already exists and is not a file", systemPath.utf8().data()], error);
     80            createError([NSString stringWithFormat:@"Cache path `%@` already exists and is not a file", static_cast<NSString *>(systemPath)], error);
    8181            return false;
    8282        }
     
    8585    String directory = FileSystem::directoryName(systemPath);
    8686    if (directory.isNull()) {
    87         createError([NSString stringWithFormat:@"Cache path `%s` does not contain in a valid directory", systemPath.utf8().data()], error);
     87        createError([NSString stringWithFormat:@"Cache path `%@` does not contain in a valid directory", static_cast<NSString *>(systemPath)], error);
    8888        return false;
    8989    }
    9090
    9191    if (!FileSystem::fileIsDirectory(directory, FileSystem::ShouldFollowSymbolicLinks::No)) {
    92         createError([NSString stringWithFormat:@"Cache directory `%s` is not a directory or does not exist", directory.utf8().data()], error);
     92        createError([NSString stringWithFormat:@"Cache directory `%@` is not a directory or does not exist", static_cast<NSString *>(directory)], error);
    9393        return false;
    9494    }
     
    9696#if USE(APPLE_INTERNAL_SDK)
    9797    if (rootless_check_datavault_flag(FileSystem::fileSystemRepresentation(directory).data(), nullptr)) {
    98         createError([NSString stringWithFormat:@"Cache directory `%s` is not a data vault", directory.utf8().data()], error);
     98        createError([NSString stringWithFormat:@"Cache directory `%@` is not a data vault", static_cast<NSString *>(directory)], error);
    9999        return false;
    100100    }
  • trunk/Source/JavaScriptCore/ChangeLog

    r245769 r245800  
     12019-05-27  Tadeu Zagallo  <tzagallo@apple.com>
     2
     3        Fix opensource build of testapi
     4        https://bugs.webkit.org/show_bug.cgi?id=198256
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        In r245564, we added custom entitlements to testapi to allow caching
     9        bytecode in data vaults, but we should only use the entitlements for
     10        internal builds. Otherwises, testapi gets killed on launch. Also fix the
     11        formatting for the errors added in the same patch, according to comments
     12        in the bug after the patch had already landed.
     13
     14        * API/JSScript.mm:
     15        (validateBytecodeCachePath):
     16        * Configurations/ToolExecutable.xcconfig:
     17
    1182019-05-25  Tadeu Zagallo  <tzagallo@apple.com>
    219
  • trunk/Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig

    r245594 r245800  
    4444CODE_SIGN_IDENTITY_YES = $(WK_ENGINEERING_CODE_SIGN_IDENTITY);
    4545
    46 CODE_SIGN_ENTITLEMENTS[sdk=macosx*] = $(CODE_SIGN_ENTITLEMENTS_macosx_$(TARGET_NAME));
    47 CODE_SIGN_ENTITLEMENTS_macosx_testapi = testapi.entitlements;
     46CODE_SIGN_ENTITLEMENTS[sdk=macosx*] = $(CODE_SIGN_ENTITLEMENTS_macosx_$(TARGET_NAME)_$(USE_INTERNAL_SDK));
     47CODE_SIGN_ENTITLEMENTS_macosx_testapi_YES = testapi.entitlements;
    4848
    4949CODE_SIGN_ENTITLEMENTS[sdk=iphone*] = $(CODE_SIGN_ENTITLEMENTS_ios_$(TARGET_NAME));
Note: See TracChangeset for help on using the changeset viewer.