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

chore: cherry-pick 999cc7185e93 and 0f0b3a54c53c from chromium #37477

Merged
merged 5 commits into from
Mar 9, 2023

Conversation

ppontes
Copy link
Member

@ppontes ppontes commented Mar 3, 2023

[M108-LTS] Simplify WebMediaPlayerMSCompositor destruction.

The code was only sometimes calling StopUsingProvider() and posted
the submitter destruction unnecessarily.

Destruction now works the same as in VideoFrameCompositor, where the
class itself is responsible for calling StopUsingProvider() during
its own destruction.

(cherry picked from commit cbd238e85903b7d94910bd2c6362ff9abf9908cc)

Fixed: 1407701
Disallow-Recycled-Builds: test-failures
Change-Id: Ia649cb5532519468eea34e12745ed9c990580d82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4195824
Auto-Submit: Dale Curtis dalecurtis@chromium.org
Commit-Queue: Tony Herre toprice@chromium.org
Cr-Original-Commit-Position: refs/heads/main@{#1098505}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4225498
Reviewed-by: Oleh Lamzin lamzin@google.com
Owners-Override: Oleh Lamzin lamzin@google.com
Commit-Queue: Roger Felipe Zanoni da Silva rzanoni@google.com
Cr-Commit-Position: refs/branch-heads/5359@{#1391}
Cr-Branched-From: 27d3765d341b09369006d030f83f582a29eb57ae-refs/heads/main@{#1058933}

================================

[M108-LTS] Further simplify WebMediaPlayerMSCompositor lifetime.

M108 merge issues:
third_party/blink/renderer/modules/mediastream/webmediaplayer_ms.cc:
- video_task_runner_ is named io_task_runner_ in 108

third_party/blink/renderer/modules/mediastream/webmediaplayer_ms_compositor.cc:
- video_task_runner_ is named io_task_runner_ in 108 (conflict in ReplaceCurrentFrameWithACopy)

Due to the raw pointer held by VideoFrameSubmitter, there may be
tasks pending on the compositor task runner after the RefCounted
traits have "destructed" WebMediaPlayerMSCompositor. Through this
raw pointer VFS was invoking OnContextLost which attempts to use
the zero ref count compositor.

The solution here is again similar to VideoFrameCompositor, its
destruction should be explicit instead of a tangle of RefCounted
owners.

(cherry picked from commit 1622bffc6534a0cc4f53d07c43e0cd8f49975d10)

Fixed: 1407701, 1411601
Change-Id: Ic77294d1113d54ab83bc0f5b625a997edf57bf7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4210508
Commit-Queue: Tony Herre toprice@chromium.org
Auto-Submit: Dale Curtis dalecurtis@chromium.org
Cr-Original-Commit-Position: refs/heads/main@{#1099726}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4225393
Commit-Queue: Roger Felipe Zanoni da Silva rzanoni@google.com
Reviewed-by: Oleh Lamzin lamzin@google.com
Owners-Override: Oleh Lamzin lamzin@google.com
Cr-Commit-Position: refs/branch-heads/5359@{#1392}
Cr-Branched-From: 27d3765d341b09369006d030f83f582a29eb57ae-refs/heads/main@{#1058933}

Ref electron/security#282

Notes: Security: backported fix for CVE-2023-0931.

@ppontes ppontes requested a review from a team as a code owner March 3, 2023 00:18
@ppontes ppontes added security 🔒 semver/patch backwards-compatible bug fixes backport-check-skip Skip trop's backport validity checking 22-x-y labels Mar 3, 2023
@electron-cation electron-cation bot added new-pr 🌱 PR opened in the last 24 hours and removed new-pr 🌱 PR opened in the last 24 hours labels Mar 3, 2023
@ppontes ppontes marked this pull request as draft March 3, 2023 00:31
@ppontes ppontes force-pushed the cherry-pick/22-x-y/chromium/999cc7185e93 branch from 80a9671 to ba4c493 Compare March 3, 2023 00:48
@ppontes ppontes marked this pull request as ready for review March 3, 2023 00:49
@ppontes ppontes changed the title chore: cherry-pick 999cc7185e93 from chromium chore: cherry-pick 999cc7185e93 and 0f0b3a54c53c from chromium Mar 3, 2023
@jkleinsc jkleinsc merged commit 432eba9 into 22-x-y Mar 9, 2023
@jkleinsc jkleinsc deleted the cherry-pick/22-x-y/chromium/999cc7185e93 branch March 9, 2023 03:02
@release-clerk
Copy link

release-clerk bot commented Mar 9, 2023

Release Notes Persisted

Security: backported fix for CVE-2023-0931.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
22-x-y backport-check-skip Skip trop's backport validity checking security 🔒 semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants