⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259746 in webkit


Ignore:
Timestamp:
Apr 8, 2020, 12:59:17 PM (6 years ago)
Author:
Wenson Hsieh
Message:

Remove a workaround that allows many API tests to pass on iOS 13.2
https://bugs.webkit.org/show_bug.cgi?id=209709

Reviewed by Megan Gardner.

Removes a workaround added in r256297 to get API tests passing on iOS 13.2. This workaround swizzled
-[NSBundle bundleIdentifier] to return a non-null string, in order to avoid a crash introduced by
<rdar://problem/56301207>. This was subsequently fixed in <rdar://problem/56790195>, which has made its way
into iOS 13.4.

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(+[WKWebView initialize]): Deleted.

  • TestWebKitAPI/ios/UIKitSPI.h:
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r259745 r259746  
     12020-04-08  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Remove a workaround that allows many API tests to pass on iOS 13.2
     4        https://bugs.webkit.org/show_bug.cgi?id=209709
     5
     6        Reviewed by Megan Gardner.
     7
     8        Removes a workaround added in r256297 to get API tests passing on iOS 13.2. This workaround swizzled
     9        `-[NSBundle bundleIdentifier]` to return a non-null string, in order to avoid a crash introduced by
     10        <rdar://problem/56301207>. This was subsequently fixed in <rdar://problem/56790195>, which has made its way
     11        into iOS 13.4.
     12
     13        * TestWebKitAPI/cocoa/TestWKWebView.mm:
     14        (+[WKWebView initialize]): Deleted.
     15        * TestWebKitAPI/ios/UIKitSPI.h:
     16
    1172020-04-08  Sihui Liu  <sihui_liu@apple.com>
    218
  • trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm

    r259551 r259746  
    7272@implementation WKWebView (TestWebKitAPI)
    7373
    74 #if PLATFORM(IOS_FAMILY)
    75 
    76 + (void)initialize
    77 {
    78     // FIXME: This hack should no longer be necessary on builds that have the fix for <rdar://problem/56790195>.
    79     // Calling +displayIdentifier will guarantee a call to an internal UIKit helper method that caches the fake
    80     // bundle name "com.apple.TestWebKitAPI" for the rest of the process' lifetime. This allows us to avoid crashing
    81     // under -[UIScrollView setContentOffset:animated:] due to telemetry code that requires a bundle identifier.
    82     // Note that this swizzling is temporary, since unconditionally swizzling -[NSBundle bundleIdentifier] for the
    83     // entirely of the test causes other tests to fail or time out.
    84     InstanceMethodSwizzler bundleIdentifierSwizzler(NSBundle.class, @selector(bundleIdentifier), reinterpret_cast<IMP>(overrideBundleIdentifier));
    85     [UIApplication displayIdentifier];
    86 }
    87 
    88 #endif // PLATFORM(IOS_FAMILY)
    89 
    9074- (void)loadTestPageNamed:(NSString *)pageName
    9175{
  • trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h

    r258919 r259746  
    269269@end
    270270
    271 @interface UIApplication (Internal)
    272 + (NSString *)displayIdentifier;
    273 @end
    274 
    275271#endif // PLATFORM(IOS_FAMILY)
Note: See TracChangeset for help on using the changeset viewer.