Skip to content

Commit

Permalink
Unreviewed, reverting 275886@main
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270808
rdar://124398466

REGRESSION(275886@main): Breaks test runs.

Reverted change:

    Adopt com.apple.developer.cs.allow-jit entitlement for iOS.
    https://bugs.webkit.org/show_bug.cgi?id=270723
    rdar://122841355
    https://commits.webkit.org/275886@main

Canonical link: https://commits.webkit.org/275913@main
  • Loading branch information
Mark Lam committed Mar 11, 2024
1 parent b5d883c commit 1cc0435
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 27 deletions.
22 changes: 8 additions & 14 deletions Source/JavaScriptCore/Scripts/process-entitlements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,16 @@ function maccatalyst_process_testapi_entitlements()

function ios_family_process_jsc_entitlements()
{
if [[ "${PLATFORM_NAME}" != watchos ]]; then
plistbuddy Add :com.apple.private.verified-jit bool YES
if [[ "${PLATFORM_NAME}" == iphoneos ]]; then
if (( $(( ${SDK_VERSION_ACTUAL} )) >= 170400 )); then
plistbuddy Add :com.apple.developer.cs.allow-jit bool YES
plistbuddy Add :com.apple.developer.web-browser-engine.webcontent bool YES
else
plistbuddy Add :dynamic-codesigning bool YES
fi
else
plistbuddy Add :dynamic-codesigning bool YES
fi
fi
plistbuddy Add :com.apple.private.verified-jit bool YES
plistbuddy Add :dynamic-codesigning bool YES
plistbuddy Add :com.apple.developer.kernel.extended-virtual-addressing bool YES
}

function ios_family_process_testapi_entitlements()
{
ios_family_process_jsc_entitlements
}

rm -f "${WK_PROCESSED_XCENT_FILE}"
plistbuddy Clear dict

Expand Down Expand Up @@ -158,13 +152,13 @@ then
if [[ "${PRODUCT_NAME}" == jsc ||
"${PRODUCT_NAME}" == dynbench ||
"${PRODUCT_NAME}" == minidom ||
"${PRODUCT_NAME}" == testapi ||
"${PRODUCT_NAME}" == testair ||
"${PRODUCT_NAME}" == testb3 ||
"${PRODUCT_NAME}" == testdfg ||
"${PRODUCT_NAME}" == testmasm ||
"${PRODUCT_NAME}" == testmem ||
"${PRODUCT_NAME}" == testRegExp ]]; then ios_family_process_jsc_entitlements
elif [[ "${PRODUCT_NAME}" == testapi ]]; then ios_family_process_testapi_entitlements
else echo "Unsupported/unknown product: ${PRODUCT_NAME}"
fi
else
Expand Down
6 changes: 3 additions & 3 deletions Source/JavaScriptCore/jit/ExecutableAllocator.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2024 Apple Inc. All rights reserved.
* Copyright (C) 2008-2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -159,7 +159,7 @@ static bool isJITEnabled()
{
bool jitEnabled = !g_jscConfig.jitDisabled;
#if HAVE(IOS_JIT_RESTRICTIONS)
jitEnabled = jitEnabled && (processHasEntitlement("dynamic-codesigning"_s) || processHasEntitlement("com.apple.developer.cs.allow-jit"_s));
jitEnabled = jitEnabled && processHasEntitlement("dynamic-codesigning"_s);
#elif HAVE(MAC_JIT_RESTRICTIONS) && USE(APPLE_INTERNAL_SDK)
jitEnabled = jitEnabled && processHasEntitlement("com.apple.security.cs.allow-jit"_s);
#endif
Expand All @@ -179,7 +179,7 @@ void ExecutableAllocator::disableJIT()

#if HAVE(IOS_JIT_RESTRICTIONS) || HAVE(MAC_JIT_RESTRICTIONS) && USE(APPLE_INTERNAL_SDK)
#if HAVE(IOS_JIT_RESTRICTIONS)
bool shouldDisableJITMemory = processHasEntitlement("dynamic-codesigning"_s) || processHasEntitlement("com.apple.developer.cs.allow-jit"_s);
bool shouldDisableJITMemory = processHasEntitlement("dynamic-codesigning"_s);
#else
bool shouldDisableJITMemory = processHasEntitlement("com.apple.security.cs.allow-jit"_s) && !isKernOpenSource();
#endif
Expand Down
13 changes: 3 additions & 10 deletions Source/WebKit/Scripts/process-entitlements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,10 @@ fi

function ios_family_process_webcontent_entitlements()
{
if [[ "${PLATFORM_NAME}" != watchos ]]; then
if [[ "${WK_PLATFORM_NAME}" != watchos ]]
then
plistbuddy Add :com.apple.private.verified-jit bool YES
if [[ "${PLATFORM_NAME}" == iphoneos ]]; then
if (( $(( ${SDK_VERSION_ACTUAL} )) >= 170400 )); then
plistbuddy Add :com.apple.developer.cs.allow-jit bool YES
else
plistbuddy Add :dynamic-codesigning bool YES
fi
else
plistbuddy Add :dynamic-codesigning bool YES
fi
plistbuddy Add :dynamic-codesigning bool YES
fi
plistbuddy Add :com.apple.developer.kernel.extended-virtual-addressing bool YES

Expand Down

0 comments on commit 1cc0435

Please sign in to comment.