#54358: fix: don't throw from gfx geometry converters
Human: @MarshallOfSound
Requested by Sam · project thread
Description of Change
Follow-up to #54216. That PR made the gfx::Point, gfx::Rect and gfx::Insets converters throw a JS error from inside FromV8. A gin converter should only signal failure by returning false: the dispatcher in gin_helper/function_template already raises the "Error processing argument at index N, conversion failure" TypeError with the correct index, and the same converters are also reached from places where a failed conversion is not an error at all (optional arguments, Dictionary::Get on options objects, nested converters), where a pending exception would leak out of an otherwise successful call.
This keeps the finite / int-range validation from #54216 but turns it back into a plain return false, so callers get the normal conversion-failure error from the dispatcher. Adds a setContentBounds spec that goes through the gfx::Rect converter path.
Note: since #54333, BaseWindow.setBounds() no longer uses the gfx::Rect converter, so the existing setBounds spec from #54216 is covered by #54357 rather than this change.
Checklist
- I have filled out the PR description
- I have reviewed and verified the changes
- tests are changed or added
Release Notes
Notes: none
Generated by Claude Code
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