Title: [256646] trunk/Source/WebKit
- Revision
- 256646
- Author
- achristen...@apple.com
- Date
- 2020-02-14 14:37:44 -0800 (Fri, 14 Feb 2020)
Log Message
WKWebView._setResourceLoadDelegate should clear the WebPageProxy's ResourceLoadClient
https://bugs.webkit.org/show_bug.cgi?id=205887
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setResourceLoadDelegate:]):
WebPageProxy::setResourceLoadClient has some special logic to possibly clear a bit in the web process that will reduce IPCs.
This is a small oversight in my original implementation.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (256645 => 256646)
--- trunk/Source/WebKit/ChangeLog 2020-02-14 22:27:17 UTC (rev 256645)
+++ trunk/Source/WebKit/ChangeLog 2020-02-14 22:37:44 UTC (rev 256646)
@@ -1,3 +1,13 @@
+2020-02-14 Alex Christensen <achristen...@webkit.org>
+
+ WKWebView._setResourceLoadDelegate should clear the WebPageProxy's ResourceLoadClient
+ https://bugs.webkit.org/show_bug.cgi?id=205887
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _setResourceLoadDelegate:]):
+ WebPageProxy::setResourceLoadClient has some special logic to possibly clear a bit in the web process that will reduce IPCs.
+ This is a small oversight in my original implementation.
+
2020-02-14 Wenson Hsieh <wenson_hs...@apple.com>
Unreviewed, fix the iOS 13.1 build after r256520
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (256645 => 256646)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2020-02-14 22:27:17 UTC (rev 256645)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2020-02-14 22:37:44 UTC (rev 256646)
@@ -684,8 +684,13 @@
- (void)_setResourceLoadDelegate:(id<_WKResourceLoadDelegate>)delegate
{
- _page->setResourceLoadClient(_resourceLoadDelegate->createResourceLoadClient());
- _resourceLoadDelegate->setDelegate(delegate);
+ if (delegate) {
+ _page->setResourceLoadClient(_resourceLoadDelegate->createResourceLoadClient());
+ _resourceLoadDelegate->setDelegate(delegate);
+ } else {
+ _page->setResourceLoadClient(nullptr);
+ _resourceLoadDelegate->setDelegate(nil);
+ }
}
- (WKNavigation *)loadRequest:(NSURLRequest *)request
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes