New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: optional postMessage transfer arg #32433
Conversation
b4f2bda
to
90b008f
Compare
Failure not relevant:
is a known flake. |
Release Notes Persisted
|
I have automatically backported this PR to "14-x-y", please check out #32457 |
I have automatically backported this PR to "15-x-y", please check out #32458 |
I have automatically backported this PR to "17-x-y", please check out #32459 |
I have automatically backported this PR to "16-x-y", please check out #32460 |
Description of Change
Closes #32427.
Fixes an issue where attempts to use
ipcRenderer.postMessage
without the ostensibly optionaltransfer
argument would throwTypeError: Invalid value for transfer
. This was happening becauseabsl::optional
value checks considerundefined
a value, so we were incorrectly trying to convertundefined
into an array of transferrable objects. This is fixed by checking explicitly fortransfer
beingundefined
.Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where
ipcRenderer.postMessage
would throw errors when thetransfer
argument was not passed.