MarshallOfSound

#49997: fix: use destination context when wrapping VideoFrame in contextBridge

Merged
Created: Mar 2, 2026, 3:05:49 AM
Merged: Mar 2, 2026, 10:18:19 AM
4 comments
Target: main

Enter the destination context scope before creating the VideoFrame V8 wrapper, matching the sibling Element and Blob branches. Without this, ScriptState::ForCurrentRealm resolved to the calling context instead of the target context, producing an incorrect wrapper.

Also switches to ScriptState::From with an explicit context argument to make the intent clearer.

Notes: Fixed an issue where VideoFrame objects returned through contextBridge had an incorrect prototype.

Backports

39-x-y
Merged
PR Number
#50021
Merged At
Mar 3, 2026, 1:30:46 AM
Released In
v39.8.0
Release Date
Mar 3, 2026, 10:03:24 AM
40-x-y
Merged
PR Number
#50022
Merged At
Mar 3, 2026, 1:30:17 AM
Released In
v40.7.0
Release Date
Mar 3, 2026, 10:03:33 AM
41-x-y
Merged
PR Number
#50023
Merged At
Mar 3, 2026, 8:15:38 AM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron