REGRESSION: API test failure: _WKDownload.OriginatingWebView
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Dec 2016 23:58:46 +0000 (23:58 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Dec 2016 23:58:46 +0000 (23:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=166033
<rdar://problem/29758428>

Reviewed by Simon Fraser.

Add an @autoreleasepool around the code that allocates the WKWebView,
so that it can be destroyed by removing the last reference in _downloadDidStart.

* TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm:
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210082 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm

index 472b8ad..f393d04 100644 (file)
@@ -1,3 +1,17 @@
+2016-12-21  Alexey Proskuryakov  <ap@apple.com>
+
+        REGRESSION: API test failure: _WKDownload.OriginatingWebView
+        https://bugs.webkit.org/show_bug.cgi?id=166033
+        <rdar://problem/29758428>
+
+        Reviewed by Simon Fraser.
+
+        Add an @autoreleasepool around the code that allocates the WKWebView, 
+        so that it can be destroyed by removing the last reference in _downloadDidStart.
+
+        * TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm:
+        (TEST):
+
 2016-12-21  Daniel Bates  <dabates@apple.com>
 
         WebKitTestRunner: Add comment to TestRunner::setCanOpenWindows()
index 9670058..151b7b7 100644 (file)
@@ -257,7 +257,7 @@ TEST(_WKDownload, OriginatingWebView)
 {
     RetainPtr<DownloadNavigationDelegate> navigationDelegate = adoptNS([[DownloadNavigationDelegate alloc] init]);                 
     RetainPtr<OriginatingWebViewDownloadDelegate> downloadDelegate;
-    {
+    @autoreleasepool {
         RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
         [webView setNavigationDelegate:navigationDelegate.get()];
         downloadDelegate = adoptNS([[OriginatingWebViewDownloadDelegate alloc] initWithWebView:webView.get()]);