Skip to content
Permalink
Browse files
Bug 229264: Leak of CMBufferQueueRef (up to 752 bytes each) in com.ap…
…ple.WebKit.GPU.Development process

<https://webkit.org/b/229264>
<rdar://problem/82101153>

Reviewed by Anders Carlsson.

Covered by running layout tests with --leaks plus future patch
to check for leaks in the GPU process.

* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:
(WebCore::VideoSampleBufferCompressor::initialize):
- Use adoptCF() to fix the leak since CMBufferQueueCreate()
  returns a retained object.


Canonical link: https://commits.webkit.org/240660@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
David Kilzer committed Aug 19, 2021
1 parent 298ab9b commit a5704ce5be29727441023c2c215cd4718812eaa5
Showing with 17 additions and 1 deletion.
  1. +16 −0 Source/WebCore/ChangeLog
  2. +1 −1 Source/WebCore/platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm
@@ -1,3 +1,19 @@
2021-08-18 David Kilzer <ddkilzer@apple.com>

Bug 229264: Leak of CMBufferQueueRef (up to 752 bytes each) in com.apple.WebKit.GPU.Development process
<https://webkit.org/b/229264>
<rdar://problem/82101153>

Reviewed by Anders Carlsson.

Covered by running layout tests with --leaks plus future patch
to check for leaks in the GPU process.

* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:
(WebCore::VideoSampleBufferCompressor::initialize):
- Use adoptCF() to fix the leak since CMBufferQueueCreate()
returns a retained object.

2021-08-18 David Kilzer <ddkilzer@apple.com>

Leak of CMSampleBufferRef (up to 2.25 KB each) in com.apple.WebKit.GPU.Development process
@@ -80,7 +80,7 @@
RELEASE_LOG_ERROR(MediaStream, "VideoSampleBufferCompressor unable to create buffer queue %d", error);
return false;
}
m_outputBufferQueue = outputBufferQueue;
m_outputBufferQueue = adoptCF(outputBufferQueue);
PAL::CMBufferQueueInstallTrigger(m_outputBufferQueue.get(), callback, callbackObject, kCMBufferQueueTrigger_WhenDataBecomesReady, PAL::kCMTimeZero, NULL);

m_isEncoding = true;

0 comments on commit a5704ce

Please sign in to comment.