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

refactor: correctly serialize nativeImage/buffer with typeUtils #23666

Merged
merged 4 commits into from
May 20, 2020

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented May 19, 2020

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 in the last 24 hours label May 19, 2020
@codebytere codebytere requested a review from nornagon May 19, 2020 16:48
Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

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

@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 in the last 24 hours 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
Copy link
Contributor

trop bot commented May 27, 2020

@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
Copy link
Contributor

trop bot commented May 27, 2020

@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 <charles@charleskerr.com>
@trop trop bot added the merged/8-x-y label Jun 8, 2020
@ckerr ckerr mentioned this pull request Jun 8, 2020
6 tasks
@trop
Copy link
Contributor

trop bot commented Jun 8, 2020

@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.

None yet

2 participants