Title: [259746] trunk/Tools
Revision
259746
Author
[email protected]
Date
2020-04-08 12:59:17 -0700 (Wed, 08 Apr 2020)

Log 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:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (259745 => 259746)


--- trunk/Tools/ChangeLog	2020-04-08 19:25:31 UTC (rev 259745)
+++ trunk/Tools/ChangeLog	2020-04-08 19:59:17 UTC (rev 259746)
@@ -1,3 +1,19 @@
+2020-04-08  Wenson Hsieh  <[email protected]>
+
+        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:
+
 2020-04-08  Sihui Liu  <[email protected]>
 
         [macOS] TestWebKitAPI.WKHTTPCookieStore.WithoutProcessPoolDuplicates is failing

Modified: trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm (259745 => 259746)


--- trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm	2020-04-08 19:25:31 UTC (rev 259745)
+++ trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm	2020-04-08 19:59:17 UTC (rev 259746)
@@ -71,22 +71,6 @@
 
 @implementation WKWebView (TestWebKitAPI)
 
-#if PLATFORM(IOS_FAMILY)
-
-+ (void)initialize
-{
-    // FIXME: This hack should no longer be necessary on builds that have the fix for <rdar://problem/56790195>.
-    // Calling +displayIdentifier will guarantee a call to an internal UIKit helper method that caches the fake
-    // bundle name "com.apple.TestWebKitAPI" for the rest of the process' lifetime. This allows us to avoid crashing
-    // under -[UIScrollView setContentOffset:animated:] due to telemetry code that requires a bundle identifier.
-    // Note that this swizzling is temporary, since unconditionally swizzling -[NSBundle bundleIdentifier] for the
-    // entirely of the test causes other tests to fail or time out.
-    InstanceMethodSwizzler bundleIdentifierSwizzler(NSBundle.class, @selector(bundleIdentifier), reinterpret_cast<IMP>(overrideBundleIdentifier));
-    [UIApplication displayIdentifier];
-}
-
-#endif // PLATFORM(IOS_FAMILY)
-
 - (void)loadTestPageNamed:(NSString *)pageName
 {
     NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:pageName withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];

Modified: trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h (259745 => 259746)


--- trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h	2020-04-08 19:25:31 UTC (rev 259745)
+++ trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h	2020-04-08 19:59:17 UTC (rev 259746)
@@ -268,8 +268,4 @@
 - (void)_share:(id)sender;
 @end
 
-@interface UIApplication (Internal)
-+ (NSString *)displayIdentifier;
-@end
-
 #endif // PLATFORM(IOS_FAMILY)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to