#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::Argumentsinstead of storing araw_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
Invokerstack-allocated and drop theraw_ptrfor itsArguments
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
- tests are changed or added
Release Notes
Notes: none
Backports
45-x-y
In-flightSemver 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