Skip to content

refactor: correctly serialize nativeImage/buffer with typeUtils - #23666

Merged
codebytere merged 4 commits into
masterfrom
update-typeutils
May 20, 2020
Merged

codebytere merged 4 commits into
masterfrom
update-typeutils

Conversation

@codebytere

@codebytere codebytere commented May 19, 2020 •

Copy link
Copy Markdown
Member

Description of Change

Fixes an issue where Buffers and NativeImages were not being correctly serialized within typeUtils. I plan to follow this PR with a slightly larger one that consolidates serialization and deserialization using this file, but that'll require some rethinking of how we track values and their types.

cc @miniak @nornagon @MarshallOfSound

Checklist

Release Notes

Notes: none

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label May 19, 2020
@codebytere
codebytere requested a review from nornagon May 19, 2020 16:48

@MarshallOfSound MarshallOfSound left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests? 🤔 Specifically tests for nativeImages with multiple representations

Comment thread spec-main/api-remote-spec.ts Resolved
@codebytere
codebytere force-pushed the update-typeutils branch 2 times, most recently from a045520 to 2c73974 Compare May 19, 2020 20:02
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label May 20, 2020
@codebytere
codebytere merged commit 4b23a85 into master May 20, 2020
@jkleinsc
jkleinsc deleted the update-typeutils branch May 22, 2020 00:45
codebytere added a commit that referenced this pull request May 27, 2020
* refactor: correctly serialize nativeImage/buffer with typeUtils

* test: add serialization specs

* fix: construct from dataURL

* test: test for dataURL specificity
@trop

trop Bot commented May 27, 2020

Copy link
Copy Markdown
Contributor

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

codebytere added a commit that referenced this pull request May 27, 2020
* refactor: correctly serialize nativeImage/buffer with typeUtils

* test: add serialization specs

* fix: construct from dataURL

* test: test for dataURL specificity
@trop

trop Bot commented May 27, 2020

Copy link
Copy Markdown
Contributor

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

@trop trop Bot removed the in-flight/8-x-y label Jun 8, 2020
codebytere added a commit that referenced this pull request Jun 8, 2020
* fix: nativeImage remote serialization (#23543)

We weren't serializing nativeImages properly in the remote module, leading to gin conversion errors when trying to, for example, create a new context menu in the renderer with icons using nativeImage. This fixes that by adding a new special case to handle them.

* refactor: correctly serialize nativeImage/buffer with typeUtils (#23666)

* refactor: correctly serialize nativeImage/buffer with typeUtils

* test: add serialization specs

* fix: construct from dataURL

* test: test for dataURL specificity

* refactor: use typeutils for nativeImage serialization

* fix: ensure nativeImage serialization main->renderer

* chore: fix FTBFS

Co-authored-by: Charles Kerr <[email protected]>
@trop trop Bot added the merged/8-x-y label Jun 8, 2020
@ckerr ckerr mentioned this pull request Jun 8, 2020
5 of 6 tasks
@trop

trop Bot commented Jun 8, 2020

Copy link
Copy Markdown
Contributor

@ckerr has manually backported this PR to "7-3-x", please check out #24021

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