#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
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