Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebKit MediaRecorderPrivate should not be refcounted #18887

Conversation

youennf
Copy link
Contributor

@youennf youennf commented Oct 10, 2023

5ac998d

WebKit MediaRecorderPrivate should not be refcounted
https://bugs.webkit.org/show_bug.cgi?id=262945
rdar://problem/116726041

Reviewed by Alex Christensen and Chris Dumez.

Given MediaRecorderPrivate is stored as a std::unique_ptr, it is best to not ref/deref.
Instead MediaRecorderPrivate stores a ref counted object that is observing GPUProcess connection closure.

* Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
(WebKit::MediaRecorderPrivate::MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::startRecording):
(WebKit::MediaRecorderPrivate::gpuProcessConnectionDidClose):
* Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.h:

Canonical link: https://commits.webkit.org/269195@main

feae42e

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@youennf youennf requested a review from cdumez as a code owner October 10, 2023 08:41
@youennf youennf self-assigned this Oct 10, 2023
@youennf youennf added the WebRTC For bugs in WebRTC label Oct 10, 2023
Copy link
Contributor

@cdumez cdumez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess @JonWBedard hasn't landed the makeUniqueWithoutRefCountedCheck() yet since I don't see it fixed in this patch?

@youennf youennf added the merge-queue Applied to send a pull request to merge-queue label Oct 11, 2023
https://bugs.webkit.org/show_bug.cgi?id=262945
rdar://problem/116726041

Reviewed by Alex Christensen and Chris Dumez.

Given MediaRecorderPrivate is stored as a std::unique_ptr, it is best to not ref/deref.
Instead MediaRecorderPrivate stores a ref counted object that is observing GPUProcess connection closure.

* Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
(WebKit::MediaRecorderPrivate::MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::startRecording):
(WebKit::MediaRecorderPrivate::gpuProcessConnectionDidClose):
* Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.h:

Canonical link: https://commits.webkit.org/269195@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WebKit-MediaRecorderPrivate-should-not-be-refcounted branch from feae42e to 5ac998d Compare October 11, 2023 09:57
@webkit-commit-queue
Copy link
Collaborator

Committed 269195@main (5ac998d): https://commits.webkit.org/269195@main

Reviewed commits have been landed. Closing PR #18887 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Oct 11, 2023
@webkit-commit-queue webkit-commit-queue merged commit 5ac998d into WebKit:main Oct 11, 2023
@youennf
Copy link
Contributor Author

youennf commented Oct 11, 2023

Hum, I forgot to include the changes that were asked, will do in a follow-up

webkit-commit-queue pushed a commit to youennf/WebKit that referenced this pull request Oct 11, 2023
…95@main

https://bugs.webkit.org/show_bug.cgi?id=263011
rdar://116806970

Reviewed by Alex Christensen and Chris Dumez.

I did not push all changes related to the review of WebKit#18887 in https://commits.webkit.org/269195@main.
Adding them here.

* Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
(WebKit::MediaRecorderPrivate::MediaRecorderPrivate):
* Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.h:

Canonical link: https://commits.webkit.org/269207@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebRTC For bugs in WebRTC
Projects
None yet
5 participants