Changeset 256646 in webkit


Ignore:
Timestamp:
Feb 14, 2020 2:37:44 PM (4 years ago)
Author:
achristensen@apple.com
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.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r256634 r256646  
     12020-02-14  Alex Christensen  <achristensen@webkit.org>
     2
     3        WKWebView._setResourceLoadDelegate should clear the WebPageProxy's ResourceLoadClient
     4        https://bugs.webkit.org/show_bug.cgi?id=205887
     5
     6        * UIProcess/API/Cocoa/WKWebView.mm:
     7        (-[WKWebView _setResourceLoadDelegate:]):
     8        WebPageProxy::setResourceLoadClient has some special logic to possibly clear a bit in the web process that will reduce IPCs.
     9        This is a small oversight in my original implementation.
     10
    1112020-02-14  Wenson Hsieh  <wenson_hsieh@apple.com>
    212
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r256236 r256646  
    685685- (void)_setResourceLoadDelegate:(id<_WKResourceLoadDelegate>)delegate
    686686{
    687     _page->setResourceLoadClient(_resourceLoadDelegate->createResourceLoadClient());
    688     _resourceLoadDelegate->setDelegate(delegate);
     687    if (delegate) {
     688        _page->setResourceLoadClient(_resourceLoadDelegate->createResourceLoadClient());
     689        _resourceLoadDelegate->setDelegate(delegate);
     690    } else {
     691        _page->setResourceLoadClient(nullptr);
     692        _resourceLoadDelegate->setDelegate(nil);
     693    }
    689694}
    690695
Note: See TracChangeset for help on using the changeset viewer.