Changeset 287784 in webkit
- Timestamp:
- Jan 7, 2022, 2:45:01 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
-
JavaScriptCore/API/JSWrapperMap.mm (modified) (2 diffs)
-
JavaScriptCore/API/tests/testapi.cpp (modified) (1 diff)
-
JavaScriptCore/API/tests/testapi.mm (modified) (1 diff)
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/runtime/JSLock.cpp (modified) (1 diff)
-
JavaScriptCore/runtime/ObjectPrototype.cpp (modified) (1 diff)
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/cocoa/LanguageCocoa.mm (modified) (1 diff)
-
WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSWrapperMap.mm
r273194 r287784 51 51 #else 52 52 static constexpr int32_t firstJavaScriptCoreVersionWithInitConstructorSupport = 0x21A0400; // 538.4.0 53 #if PLATFORM(IOS_FAMILY)54 static constexpr uint32_t firstSDKVersionWithInitConstructorSupport = DYLD_IOS_VERSION_10_0;55 #elif PLATFORM(MAC)56 static constexpr uint32_t firstSDKVersionWithInitConstructorSupport = 0xA0A00; // OSX 10.10.057 #endif58 53 #endif 59 54 … … 703 698 return true; 704 699 #else 705 // First check to see the version of JavaScriptCore we directly linked against. 706 static int32_t versionOfLinkTimeJavaScriptCore = 0; 707 if (!versionOfLinkTimeJavaScriptCore) 708 versionOfLinkTimeJavaScriptCore = NSVersionOfLinkTimeLibrary("JavaScriptCore"); 709 // Only do the link time version comparison if we linked directly with JavaScriptCore 710 if (versionOfLinkTimeJavaScriptCore != -1) 711 return versionOfLinkTimeJavaScriptCore >= firstJavaScriptCoreVersionWithInitConstructorSupport; 712 713 // If we didn't link directly with JavaScriptCore, 714 // base our check on what SDK was used to build the application. 715 static uint32_t programSDKVersion = 0; 716 if (!programSDKVersion) 717 programSDKVersion = applicationSDKVersion(); 718 719 return programSDKVersion >= firstSDKVersionWithInitConstructorSupport; 700 static const bool supportsInitMethodConstructors = []() -> bool { 701 // First check to see the version of JavaScriptCore we directly linked against. 702 int32_t versionOfLinkTimeJavaScriptCore = NSVersionOfLinkTimeLibrary("JavaScriptCore"); 703 704 // Only do the link time version comparison if we linked directly with JavaScriptCore 705 if (versionOfLinkTimeJavaScriptCore != -1) 706 return versionOfLinkTimeJavaScriptCore >= firstJavaScriptCoreVersionWithInitConstructorSupport; 707 708 return linkedOnOrAfter(SDKVersion::FirstVersionThatSupportsInitConstructors); 709 }(); 710 return supportsInitMethodConstructors; 720 711 #endif 721 712 } -
trunk/Source/JavaScriptCore/API/tests/testapi.cpp
r278888 r287784 618 618 { 619 619 #if PLATFORM(COCOA) 620 bool useLegacyDrain = false; 621 #if PLATFORM(MAC) 622 useLegacyDrain = applicationSDKVersion() < DYLD_MACOSX_VERSION_12_00; 623 #elif PLATFORM(WATCH) 624 // Don't check, JSC isn't API on watch anyway. 625 #elif PLATFORM(IOS_FAMILY) 626 useLegacyDrain = applicationSDKVersion() < DYLD_IOS_VERSION_15_0; 627 #else 628 #error "Unsupported Cocoa Platform" 629 #endif 620 bool useLegacyDrain = !linkedOnOrAfter(SDKVersion::FirstThatDoesNotDrainTheMicrotaskQueueWhenCallingObjC); 630 621 if (useLegacyDrain) 631 622 return; -
trunk/Source/JavaScriptCore/API/tests/testapi.mm
r287368 r287784 2739 2739 @autoreleasepool { 2740 2740 #if PLATFORM(COCOA) 2741 bool useLegacyDrain = false; 2742 #if PLATFORM(MAC) 2743 useLegacyDrain = applicationSDKVersion() < DYLD_MACOSX_VERSION_12_00; 2744 #elif PLATFORM(WATCH) 2745 // Don't check, JSC isn't API on watch anyway. 2746 #elif PLATFORM(IOS_FAMILY) 2747 useLegacyDrain = applicationSDKVersion() < DYLD_IOS_VERSION_15_0; 2748 #else 2749 #error "Unsupported Cocoa Platform" 2750 #endif 2741 bool useLegacyDrain = !linkedOnOrAfter(SDKVersion::FirstThatDoesNotDrainTheMicrotaskQueueWhenCallingObjC); 2751 2742 if (useLegacyDrain) 2752 2743 return; -
trunk/Source/JavaScriptCore/ChangeLog
r287770 r287784 1 2022-01-07 Tim Horton <timothy_horton@apple.com> 2 3 Adopt linkedOnOrAfter() in more places 4 https://bugs.webkit.org/show_bug.cgi?id=234951 5 6 Reviewed by Wenson Hsieh. 7 8 * API/JSWrapperMap.mm: 9 (supportsInitMethodConstructors): 10 * API/tests/testapi.cpp: 11 (TestAPI::promiseDrainDoesNotEatExceptions): 12 * API/tests/testapi.mm: 13 (testMicrotaskWithFunction): 14 * runtime/JSLock.cpp: 15 (JSC::JSLock::willReleaseLock): 16 * runtime/ObjectPrototype.cpp: 17 (JSC::isPokerBros): 18 Adopt linkedOnOrAfter. 19 1 20 2022-01-07 Alex Christensen <achristensen@webkit.org> 2 21 -
trunk/Source/JavaScriptCore/runtime/JSLock.cpp
r278888 r287784 206 206 static std::once_flag once; 207 207 std::call_once(once, [] { 208 #if PLATFORM(MAC) 209 useLegacyDrain = applicationSDKVersion() < DYLD_MACOSX_VERSION_12_00; 210 #elif PLATFORM(WATCH) 211 // Don't check, JSC isn't API on watch anyway. 212 #elif PLATFORM(IOS_FAMILY) 213 useLegacyDrain = applicationSDKVersion() < DYLD_IOS_VERSION_15_0; 214 #else 215 #error "Unsupported Cocoa Platform" 216 #endif 208 useLegacyDrain = !linkedOnOrAfter(SDKVersion::FirstThatDoesNotDrainTheMicrotaskQueueWhenCallingObjC); 217 209 }); 218 210 #endif -
trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
r286994 r287784 318 318 return bundleID 319 319 && CFEqual(bundleID, CFSTR("com.kpgame.PokerBros")) 320 && applicationSDKVersion() < DYLD_IOS_VERSION_14_0;320 && !linkedOnOrAfter(SDKVersion::FirstWithoutPokerBrosBuiltInTagQuirk); 321 321 } 322 322 #endif -
trunk/Source/WTF/ChangeLog
r287770 r287784 1 2022-01-07 Tim Horton <timothy_horton@apple.com> 2 3 Adopt linkedOnOrAfter() in more places 4 https://bugs.webkit.org/show_bug.cgi?id=234951 5 6 Reviewed by Wenson Hsieh. 7 8 * wtf/cocoa/LanguageCocoa.mm: 9 (WTF::canMinimizeLanguages): 10 Adopt linkedOnOrAfter and simplify. 11 12 * wtf/cocoa/RuntimeApplicationChecksCocoa.h: 13 The weird mismatch between the iOS and macOS values for FirstVersionThatSupportsInitConstructors 14 is correct; the iOS version was bumped in r202670. 15 1 16 2022-01-07 Alex Christensen <achristensen@webkit.org> 2 17 -
trunk/Source/WTF/wtf/cocoa/LanguageCocoa.mm
r280811 r287784 57 57 { 58 58 static const bool result = []() -> bool { 59 #if PLATFORM(MAC) 60 if (applicationSDKVersion() < DYLD_MACOSX_VERSION_10_15_4) 61 return false; 62 #endif 63 #if PLATFORM(IOS) 64 if (applicationSDKVersion() < DYLD_IOS_VERSION_13_4) 65 return false; 66 #endif 67 return [NSLocale respondsToSelector:@selector(minimizedLanguagesFromLanguages:)]; 59 return linkedOnOrAfter(SDKVersion::FirstThatMinimizesLanguages) && [NSLocale respondsToSelector:@selector(minimizedLanguagesFromLanguages:)]; 68 60 }(); 69 61 return result; -
trunk/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h
r287737 r287784 42 42 FirstWithoutTheSecretSocietyHiddenMysteryWindowOpenQuirk = DYLD_IOS_VERSION_10_0, 43 43 FirstWithUnprefixedPlaysInlineAttribute = DYLD_IOS_VERSION_10_0, 44 FirstVersionThatSupportsInitConstructors = DYLD_IOS_VERSION_10_0, 44 45 FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_IOS_VERSION_11_0, 45 46 FirstWithExpiredOnlyReloadBehavior = DYLD_IOS_VERSION_11_0, … … 66 67 FirstThatRestrictsBaseURLSchemes = DYLD_IOS_VERSION_13_4, 67 68 FirstThatSendsNativeMouseEvents = DYLD_IOS_VERSION_13_4, 69 FirstThatMinimizesLanguages = DYLD_IOS_VERSION_13_4, 68 70 FirstWithSessionCleanupByDefault = DYLD_IOS_VERSION_14_0, 69 71 FirstWithInitializeWebKit2MainThreadAssertion = DYLD_IOS_VERSION_14_0, … … 71 73 FirstWithWebSQLDisabledByDefaultInLegacyWebKit = DYLD_IOS_VERSION_14_0, 72 74 FirstWithoutLaBanquePostaleQuirks = DYLD_IOS_VERSION_14_0, 75 FirstWithoutPokerBrosBuiltInTagQuirk = DYLD_IOS_VERSION_14_0, 73 76 FirstVersionWithiOSAppsOnMacOS = DYLD_IOS_VERSION_14_2, 74 77 FirstWithDataURLFragmentRemoval = DYLD_IOS_VERSION_14_5, … … 82 85 FirstWithApplicationCacheDisabledByDefault = DYLD_IOS_VERSION_15_0, 83 86 FirstWithoutExpandoIndexedPropertiesOnWindow = DYLD_IOS_VERSION_15_0, 87 FirstThatDoesNotDrainTheMicrotaskQueueWhenCallingObjC = DYLD_IOS_VERSION_15_0, 84 88 FirstWithAuthorizationHeaderOnSameOriginRedirects = DYLD_IOS_VERSION_15_4, 85 89 FirstForbiddingDotPrefixedFonts = DYLD_IOS_VERSION_16_0, 86 90 #elif PLATFORM(MAC) 91 FirstVersionThatSupportsInitConstructors = 0xA0A00, // OS X 10.10 87 92 FirstThatConvertsInvalidURLsToBlank = DYLD_MACOSX_VERSION_10_12, 88 93 FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_MACOSX_VERSION_10_13, … … 98 103 FirstWhereSiteSpecificQuirksAreEnabledByDefault = DYLD_MACOSX_VERSION_10_15_1, 99 104 FirstThatRestrictsBaseURLSchemes = DYLD_MACOSX_VERSION_10_15_4, 105 FirstThatMinimizesLanguages = DYLD_MACOSX_VERSION_10_15_4, 100 106 FirstWithSessionCleanupByDefault = DYLD_MACOSX_VERSION_10_16, 101 107 FirstWithInitializeWebKit2MainThreadAssertion = DYLD_MACOSX_VERSION_10_16, … … 103 109 FirstWithDataURLFragmentRemoval = DYLD_MACOSX_VERSION_11_3, 104 110 FirstWithHTMLDocumentSupportedPropertyNames = DYLD_MACOSX_VERSION_11_3, 105 FirstWithNullOriginForNonSpecialSchemedURLs = DYLD_MACOSX_VERSION_12_00,106 FirstWithDOMWindowReuseRestriction = DYLD_MACOSX_VERSION_12_00,107 111 FirstWithBlankViewOnJSPrompt = DYLD_MACOSX_VERSION_11_3, 108 112 FirstWithoutClientCertificateLookup = DYLD_MACOSX_VERSION_11_3, 109 113 FirstThatDefaultsToPassiveWheelListenersOnDocument = DYLD_MACOSX_VERSION_11_3, 110 114 FirstThatAllowsWheelEventGesturesToBecomeNonBlocking = DYLD_MACOSX_VERSION_11_3, 115 FirstWithNullOriginForNonSpecialSchemedURLs = DYLD_MACOSX_VERSION_12_00, 116 FirstWithDOMWindowReuseRestriction = DYLD_MACOSX_VERSION_12_00, 117 FirstThatDoesNotDrainTheMicrotaskQueueWhenCallingObjC = DYLD_MACOSX_VERSION_12_00, 111 118 FirstWithApplicationCacheDisabledByDefault = DYLD_MACOSX_VERSION_12_00, 112 119 FirstWithoutExpandoIndexedPropertiesOnWindow = DYLD_MACOSX_VERSION_12_00,
Note:
See TracChangeset
for help on using the changeset viewer.