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

[WebCodecs] an encoder or decoder with being processed content should not be GCed #5745

Conversation

youennf
Copy link
Contributor

@youennf youennf commented Oct 25, 2022

856428a

[WebCodecs] an encoder or decoder with being processed content should not be GCed
https://bugs.webkit.org/show_bug.cgi?id=246995
rdar://problem/101533086

Reviewed by Eric Carlson.

Add a counter for frames/chunks being processed by internal encoders/decoders.
Make sure encoders and decoders are not GCed when the counter is not zero.

* LayoutTests/TestExpectations:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp:
(WebCore::WebCodecsVideoDecoder::decode):
(WebCore::WebCodecsVideoDecoder::virtualHasPendingActivity const):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.h:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:
(WebCore::WebCodecsVideoEncoder::encode):
(WebCore::WebCodecsVideoEncoder::virtualHasPendingActivity const):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h:

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

f18ae70

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

@youennf youennf self-assigned this Oct 25, 2022
@youennf youennf added Media Bugs related to the HTML 5 Media elements. WebKit Nightly Build labels Oct 25, 2022
Copy link
Contributor

@eric-carlson eric-carlson left a comment

Choose a reason for hiding this comment

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

r=me

@youennf youennf added the merge-queue Applied to send a pull request to merge-queue label Oct 25, 2022
@webkit-commit-queue webkit-commit-queue added merging-blocked Applied to prevent a change from being merged and removed merge-queue Applied to send a pull request to merge-queue labels Oct 25, 2022
@youennf youennf force-pushed the eng/WebCodecs-an-encoder-or-decoder-with-being-processed-content-should-not-be-GCed branch from 2934176 to f18ae70 Compare October 26, 2022 07:56
@youennf youennf added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Oct 26, 2022
… not be GCed

https://bugs.webkit.org/show_bug.cgi?id=246995
rdar://problem/101533086

Reviewed by Eric Carlson.

Add a counter for frames/chunks being processed by internal encoders/decoders.
Make sure encoders and decoders are not GCed when the counter is not zero.

* LayoutTests/TestExpectations:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp:
(WebCore::WebCodecsVideoDecoder::decode):
(WebCore::WebCodecsVideoDecoder::virtualHasPendingActivity const):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.h:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:
(WebCore::WebCodecsVideoEncoder::encode):
(WebCore::WebCodecsVideoEncoder::virtualHasPendingActivity const):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h:

Canonical link: https://commits.webkit.org/256007@main
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/WebCodecs-an-encoder-or-decoder-with-being-processed-content-should-not-be-GCed branch from f18ae70 to 856428a Compare October 26, 2022 11:16
@webkit-commit-queue
Copy link
Collaborator

Committed 256007@main (856428a): https://commits.webkit.org/256007@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit 856428a into WebKit:main Oct 26, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements.
Projects
None yet
4 participants