Skip to content
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: errors thrown in functions over the contextBridge #28346

Merged
merged 3 commits into from Mar 30, 2021

Conversation

codebytere
Copy link
Member

Description of Change

Closes #28327.

Fixes an issue where errors thrown in functions passed over the contextBridge would be prefixed with Uncaught Error so that the error message then incorrectly displayed as Error: Uncaught Error: test. This is owed to the fact that errors aren't serializable as-is, so we should be pulling the message off the exception and re-constructing and throwing it in the destination context

Tested with https://gist.github.com/f11c77f9bc2cbf98d42a9fcaf477c80a.

Checklist

Release Notes

Notes: Fixed an issue where errors thrown in functions passed over the contextBridge could be displayed incorrectly.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 23, 2021
@codebytere codebytere added the semver/patch backwards-compatible bug fixes label Mar 23, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 24, 2021
@codebytere codebytere merged commit 9fecf83 into master Mar 30, 2021
@release-clerk
Copy link

release-clerk bot commented Mar 30, 2021

Release Notes Persisted

Fixed an issue where errors thrown in functions passed over the contextBridge could be displayed incorrectly.

@codebytere codebytere deleted the fix-errors-thrown-isolated branch March 30, 2021 07:26
@trop
Copy link
Contributor

trop bot commented Mar 30, 2021

I was unable to backport this PR to "11-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Mar 30, 2021

I was unable to backport this PR to "12-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot removed the target/12-x-y label Mar 30, 2021
@trop
Copy link
Contributor

trop bot commented Mar 30, 2021

I was unable to backport this PR to "13-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Mar 30, 2021

@codebytere has manually backported this PR to "13-x-y", please check out #28446

@trop
Copy link
Contributor

trop bot commented Mar 30, 2021

@codebytere has manually backported this PR to "12-x-y", please check out #28447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: "Uncaught Error:" added to message of errors thrown in a function defined in preload script
2 participants