Changeset 204232 in webkit


Ignore:
Timestamp:
Aug 6, 2016 6:41:40 PM (8 years ago)
Author:
mitz@apple.com
Message:

[Cocoa] -[_WKRemoteObjectRegistry() _invokeMethod:] leaks a block
https://bugs.webkit.org/show_bug.cgi?id=160636

Reviewed by Darin Adler.

  • Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:

(-[_WKRemoteObjectRegistry _invokeMethod:]): Release the block returned from

NSMakeSpecialForwardingCaptureBlock.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r204226 r204232  
     12016-08-06  Dan Bernstein  <mitz@apple.com>
     2
     3        [Cocoa] -[_WKRemoteObjectRegistry() _invokeMethod:] leaks a block
     4        https://bugs.webkit.org/show_bug.cgi?id=160636
     5
     6        Reviewed by Darin Adler.
     7
     8        * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
     9        (-[_WKRemoteObjectRegistry _invokeMethod:]): Release the block returned from
     10          __NSMakeSpecialForwardingCaptureBlock.
     11
    1122016-08-06  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm

    r194496 r204232  
    218218            uint64_t replyID = replyInfo->replyID;
    219219            id replyBlock = __NSMakeSpecialForwardingCaptureBlock(wireBlockSignature._typeString.UTF8String, [interface, remoteObjectRegistry, replyID](NSInvocation *invocation) {
    220 
    221220                auto encoder = adoptNS([[WKRemoteObjectEncoder alloc] init]);
    222221                [encoder encodeObject:invocation forKey:invocationKey];
     
    229228            // Make sure that the block won't be destroyed before the invocation.
    230229            objc_setAssociatedObject(invocation, replyBlockKey, replyBlock, OBJC_ASSOCIATION_RETAIN);
     230            [replyBlock release];
     231
    231232            break;
    232233        }
Note: See TracChangeset for help on using the changeset viewer.