MarshallOfSound

#54286: perf: cherry-pick gin binding-call improvements from Chromium

Merged
Created: Sep 24, 2026, 2:19:44 AM
Merged: Sep 24, 2026, 5:08:29 AM
3 comments
Target: main

Description of Change

Cherry-picks four upstream gin CLs that trim per-call overhead on the JS → C++ binding boundary. No behaviour change; each patch can be dropped once its CL lands and rolls in.

  • 8455783: derive the isolate in gin::Arguments instead of storing a raw_ptr (42.3 → 27.9 ns per no-op call with BRP)
  • 8454983: copy ASCII one-byte strings out directly in Converter<std::string> (72.4 → 58.2 ns for a short string arg)
  • 8455325: take the callback by const reference in Invoker::DispatchToCallback (42.3 → 32.1 ns)
  • 8455902: mark Invoker stack-allocated and drop the raw_ptr for its Arguments

Checklist

Release Notes

Notes: none

Backports

45-x-y
In-flight
PR Number
#54295
Waiting to be merged

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