Changeset 203841 in webkit


Ignore:
Timestamp:
Jul 28, 2016 2:17:58 PM (8 years ago)
Author:
andersca@apple.com
Message:

Use a RetainPtr in WebFrameLoaderClient::assignIdentifierToInitialRequest
https://bugs.webkit.org/show_bug.cgi?id=160315

Reviewed by Tim Horton.

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::assignIdentifierToInitialRequest):

Location:
trunk/Source/WebKit/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r203756 r203841  
     12016-07-28  Anders Carlsson  <andersca@apple.com>
     2
     3        Use a RetainPtr in WebFrameLoaderClient::assignIdentifierToInitialRequest
     4        https://bugs.webkit.org/show_bug.cgi?id=160315
     5
     6        Reviewed by Tim Horton.
     7
     8        * WebCoreSupport/WebFrameLoaderClient.mm:
     9        (WebFrameLoaderClient::assignIdentifierToInitialRequest):
     10
    1112016-07-26  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r203003 r203841  
    334334    WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
    335335
    336     id object = nil;
    337     BOOL shouldRelease = NO;
     336    RetainPtr<id> object;
     337
    338338#if PLATFORM(IOS)
    339339    if (implementations->webThreadIdentifierForRequestFunc) {
     
    343343    if (implementations->identifierForRequestFunc)
    344344        object = CallResourceLoadDelegate(implementations->identifierForRequestFunc, webView, @selector(webView:identifierForInitialRequest:fromDataSource:), request.nsURLRequest(UpdateHTTPBody), dataSource(loader));
    345     else {
    346         object = [[NSObject alloc] init];
    347         shouldRelease = YES;
    348     }
    349 
    350     [webView _addObject:object forIdentifier:identifier];
    351 
    352     if (shouldRelease)
    353         [object release];
     345    else
     346        object = adoptNS([[NSObject alloc] init]);
     347
     348    [webView _addObject:object.get() forIdentifier:identifier];
    354349}
    355350
Note: See TracChangeset for help on using the changeset viewer.