Bug 224349

Summary: [macOS] WebProcessProxy::sendAudioComponentRegistrations leaks CFDataRef
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, jer.noble, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Eric Carlson
Reported 2021-04-08 16:41:24 PDT
WebProcessProxy::sendAudioComponentRegistrations leaks CFDataRef
Attachments
Patch (1.95 KB, patch)
2021-04-08 16:58 PDT, Eric Carlson
no flags
Eric Carlson
Comment 1 2021-04-08 16:42:30 PDT
Eric Carlson
Comment 2 2021-04-08 16:58:28 PDT
EWS
Comment 3 2021-04-08 17:39:23 PDT
Committed r275735 (236322@main): <https://commits.webkit.org/236322@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 425561 [details].
Darin Adler
Comment 4 2021-04-09 10:10:46 PDT
Comment on attachment 425561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425561&action=review > Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm:299 > + RunLoop::main().dispatch([protectedThis = WTFMove(protectedThis), registrations = adoptCF(registrations)] () mutable { We always try to keep the adoptCF as close as possible to the call that returns the retained object. Here it’s pretty close, but so easy to miss! I kind of wish there was a more straightforward way to write this. On the other hand this is clearly correct code that does the right thing now.
Note You need to log in before you can comment on or make changes to this bug.