[webkit-changes] [WebKit/WebKit] 150451: Close explicitly the user media capture manager in...
youennf
noreply at github.com
Sun Jun 4 00:23:17 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1504515d9a2cfd52f76ff827505d6271484bcde7
https://github.com/WebKit/WebKit/commit/1504515d9a2cfd52f76ff827505d6271484bcde7
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-06-04 (Sun, 04 Jun 2023)
Changed paths:
M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
M Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp
M Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.h
Log Message:
-----------
Close explicitly the user media capture manager in GPUProcess when its WebProcess connection is closed
https://bugs.webkit.org/show_bug.cgi?id=257203
rdar://99093866
Reviewed by Eric Carlson.
UserMediaCaptureManagerProxy keeps sources alive until destroyed.
It is destroyed when its GPUConnectionToWebProcess is destroyed, which can take some time, given it is ref counted.
To be more proactive, we now close the UserMediaCaptureManagerProxy when GPUConnectionToWebProcess loses its IPC connection.
This stops capture sources quickly, we then close the VideoFrame Object heap so that VideoFrames gets disposed quickly.
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::didClose):
* Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
(WebKit::UserMediaCaptureManagerProxy::close):
* Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
Canonical link: https://commits.webkit.org/264854@main
More information about the webkit-changes
mailing list