#48161: refactor: allocate gin_helper::internal::Event on cpp heap
Description of Change
Part of #47922
gin_helper::internal::Event
is constructed and maintained only for the lifetime of an event, there are no off-heap references to the object which also simplifies reasoning its lifetime, the cpp heap allocated instance is passed to event emitting callsites as raw pointer, this is fine as V8 can trace pointers on the stack via conservative stack scanning.
Release Notes
Notes: Electron.Event
object backing class is now managed by v8
Backports
No Backports Requested
This pull request doesn't have any backports requested or created for older release branches.
What are backports?
Backports are copies of changes made to the main branch that are applied to older release branches. They ensure that bug fixes and important changes are available in maintained older versions of Electron.
Semver Impact
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