Title: [210346] branches/safari-603-branch/Tools
Revision
210346
Author
matthew_han...@apple.com
Date
2017-01-05 09:09:12 -0800 (Thu, 05 Jan 2017)

Log Message

Merge r210093. rdar://problem/29758423

Modified Paths

Diff

Modified: branches/safari-603-branch/Tools/ChangeLog (210345 => 210346)


--- branches/safari-603-branch/Tools/ChangeLog	2017-01-05 17:09:09 UTC (rev 210345)
+++ branches/safari-603-branch/Tools/ChangeLog	2017-01-05 17:09:12 UTC (rev 210346)
@@ -1,5 +1,23 @@
 2017-01-05  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r210093. rdar://problem/29758423
+
+    2016-12-21  Alexey Proskuryakov  <a...@apple.com>
+
+            REGRESSION: API test failure: WKWebView.LocalStorageClear
+            https://bugs.webkit.org/show_bug.cgi?id=166032
+            <rdar://problem/29758423>
+
+            Reviewed by Simon Fraser.
+
+            Add an @autoreleasepool around the code that allocates then clears the WKWebView,
+            to ensure that the view is destroyed before the callback fires.
+
+            * TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm:
+            (TEST):
+
+2017-01-05  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r210082. rdar://problem/29758428
 
     2016-12-21  Alexey Proskuryakov  <a...@apple.com>

Modified: branches/safari-603-branch/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm (210345 => 210346)


--- branches/safari-603-branch/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm	2017-01-05 17:09:09 UTC (rev 210345)
+++ branches/safari-603-branch/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm	2017-01-05 17:09:12 UTC (rev 210346)
@@ -61,15 +61,17 @@
     [configuration _setNeedsStorageAccessFromFileURLsQuirk:NO];
     [configuration _setAllowUniversalAccessFromFileURLs:YES];
 
-    RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
+    @autoreleasepool {
+        RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
 
-    NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"LocalStorageClear" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
-    [webView loadRequest:request];
+        NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"LocalStorageClear" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
+        [webView loadRequest:request];
 
-    TestWebKitAPI::Util::run(&readyToContinue);
-    readyToContinue = false;
+        TestWebKitAPI::Util::run(&readyToContinue);
+        readyToContinue = false;
 
-    webView = nil;
+        webView = nil;
+    }
 
     NSString *dbPath = [@"~/Library/WebKit/TestWebKitAPI/WebsiteData/LocalStorage/file__0.localstorage" stringByExpandingTildeInPath];
     NSString *dbSHMPath = [@"~/Library/WebKit/TestWebKitAPI/WebsiteData/LocalStorage/file__0.localstorage-shm" stringByExpandingTildeInPath];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to