Bug 160642 - [Cocoa] Reply block leaks if the remote object doesn’t call it
Summary: [Cocoa] Reply block leaks if the remote object doesn’t call it
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: mitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-06 19:23 PDT by mitz
Modified: 2017-02-06 09:06 PST (History)
2 users (show)

See Also:


Attachments
Release unused reply blocks (10.59 KB, patch)
2016-08-06 19:32 PDT, mitz
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2016-08-06 19:23:07 PDT
When invoking a method with a reply block on a remote object proxy, if the remote object doesn’t invoke the reply block, it leaks on the sender side.

Patch forthcoming.
Comment 1 mitz 2016-08-06 19:32:01 PDT
Created attachment 285516 [details]
Release unused reply blocks
Comment 2 Sam Weinig 2016-08-07 13:50:26 PDT
Comment on attachment 285516 [details]
Release unused reply blocks

View in context: https://bugs.webkit.org/attachment.cgi?id=285516&action=review

> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm:89
> +        class DoneWhenDestroyed : public WTF::RefCounted<DoneWhenDestroyed> {

I don't think you need the WTF:: here, but it also doesn't hurt.
Comment 3 mitz 2016-08-07 13:52:19 PDT
Fixed in <https://trac.webkit.org/r204245>.
Comment 4 Anders Carlsson 2017-02-06 09:06:45 PST
This is the cause of rdar://problem/30229358.