Title: [239359] trunk/Tools
- Revision
- 239359
- Author
- [email protected]
- Date
- 2018-12-18 15:59:34 -0800 (Tue, 18 Dec 2018)
Log Message
REGRESSION: [iOS] API test TestWebKitAPI._WKDownload.OriginatingWebView is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=192810
<rdar://problem/46812536>
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
(-[OriginatingWebViewDownloadDelegate _downloadDidStart:]):
After releasing our reference to the web view, wait until the next turn of the runloop
before checking that the originatingWebView has been zeroed, since the web view might
still be referenced in the autorelease pool. This _WKDownload unit test isn't about
testing general memory management of WKWebViews, only that _WKDownload does not retain
its web view via the 'originatingWebView' property.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (239358 => 239359)
--- trunk/Tools/ChangeLog 2018-12-18 23:56:23 UTC (rev 239358)
+++ trunk/Tools/ChangeLog 2018-12-18 23:59:34 UTC (rev 239359)
@@ -1,3 +1,19 @@
+2018-12-18 David Quesada <[email protected]>
+
+ REGRESSION: [iOS] API test TestWebKitAPI._WKDownload.OriginatingWebView is a flaky failure
+ https://bugs.webkit.org/show_bug.cgi?id=192810
+ <rdar://problem/46812536>
+
+ Reviewed by Alex Christensen.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
+ (-[OriginatingWebViewDownloadDelegate _downloadDidStart:]):
+ After releasing our reference to the web view, wait until the next turn of the runloop
+ before checking that the originatingWebView has been zeroed, since the web view might
+ still be referenced in the autorelease pool. This _WKDownload unit test isn't about
+ testing general memory management of WKWebViews, only that _WKDownload does not retain
+ its web view via the 'originatingWebView' property.
+
2018-12-18 Sihui Liu <[email protected]>
Clean up IndexedDB files between tests
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm (239358 => 239359)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm 2018-12-18 23:56:23 UTC (rev 239358)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm 2018-12-18 23:59:34 UTC (rev 239359)
@@ -41,6 +41,7 @@
#import <WebKit/WKUIDelegatePrivate.h>
#import <WebKit/WKWebView.h>
#import <WebKit/WKWebViewConfiguration.h>
+#import <wtf/MainThread.h>
#import <wtf/RetainPtr.h>
#import <wtf/text/WTFString.h>
@@ -253,13 +254,13 @@
- (void)_downloadDidStart:(_WKDownload *)download
{
- @autoreleasepool {
- EXPECT_EQ([download originatingWebView], _webView);
- }
+ EXPECT_EQ([download originatingWebView], _webView);
+ _webView = nullptr;
- _webView = nullptr;
- EXPECT_NULL([download originatingWebView]);
- isDone = true;
+ WTF::callOnMainThread([download = retainPtr(download)] {
+ EXPECT_NULL([download originatingWebView]);
+ isDone = true;
+ });
}
@end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes