Skip to content

refactor: add Error to isSerializableObject() - #20886

Merged
nornagon merged 1 commit into
masterfrom
miniak/error-is-serializable
Nov 4, 2019
Merged

nornagon merged 1 commit into
masterfrom
miniak/error-is-serializable

Conversation

@miniak

@miniak miniak commented Oct 31, 2019 •

Copy link
Copy Markdown
Contributor

Description of Change

When sending Error from main to renderer in the remote we handle it first to preserve custom properties, so this change is safe:

} else if (value instanceof Error) {
type = 'error'
} else if (isSerializableObject(value)) {
type = 'value'

Follow-up to #20427

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • PR title follows semantic commit guidelines

Release Notes

Notes: no-notes

@miniak
miniak requested a review from nornagon October 31, 2019 15:32
@miniak miniak self-assigned this Oct 31, 2019
@electron-cation electron-cation Bot added new-pr 🌱 PR opened recently and removed new-pr 🌱 PR opened recently labels Oct 31, 2019
@miniak
miniak requested review from deepak1556 and zcbenz November 2, 2019 10:27
@miniak

miniak commented Nov 4, 2019

Copy link
Copy Markdown
Contributor Author

@nornagon can you please review?

@nornagon
nornagon merged commit a034f5d into master Nov 4, 2019
@release-clerk

release-clerk Bot commented Nov 4, 2019

Copy link
Copy Markdown

No Release Notes

codebytere pushed a commit that referenced this pull request Nov 14, 2019
)

* refactor: add Error to isSerializableObject() (#20886)

* fix: NativeImage serialization of <webview>.capturePage() result (#20825)
@miniak
miniak deleted the miniak/error-is-serializable branch November 18, 2019 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants