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: NativeImage serialization of <webview>.capturePage() result #20825

Merged
merged 1 commit into from Nov 12, 2019

Conversation

miniak
Copy link
Contributor

@miniak miniak commented Oct 29, 2019

Description of Change

Fixes #8151
Fixes #16241

Checklist

Release Notes

Notes: Fixed <webview>.capturePage() resolving with an empty object instead of NativeImage instance.

@miniak miniak requested a review from nornagon October 29, 2019 13:07
@miniak miniak self-assigned this Oct 29, 2019
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 29, 2019
@miniak miniak requested a review from zcbenz October 30, 2019 00:14
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Oct 30, 2019
@miniak miniak force-pushed the miniak/fix-webview-capture-page branch 3 times, most recently from 0388424 to 872ead0 Compare November 4, 2019 23:38
@miniak
Copy link
Contributor Author

miniak commented Nov 5, 2019

@nornagon, @MarshallOfSound can you please review?

Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

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

Let's apply the serialize / deserialize operation only where it's needed, i.e. this one capturePage operation. Otherwise we add a bunch of extra useless CPU work for no reason.

@miniak miniak force-pushed the miniak/fix-webview-capture-page branch from 872ead0 to 1dfe5ee Compare November 6, 2019 00:17
@miniak miniak requested a review from nornagon November 6, 2019 00:18
@miniak
Copy link
Contributor Author

miniak commented Nov 6, 2019

@nornagon done, I've created a separate IPC for capturePage, which does the serialization.

@miniak miniak force-pushed the miniak/fix-webview-capture-page branch 2 times, most recently from f8799ee to e6a1912 Compare November 9, 2019 09:59
@miniak miniak added wip ⚒ and removed wip ⚒ labels Nov 11, 2019
@miniak miniak force-pushed the miniak/fix-webview-capture-page branch from e6a1912 to 526485a Compare November 12, 2019 15:45
Copy link
Contributor

@alexeykuzmin alexeykuzmin left a comment

Choose a reason for hiding this comment

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

isPromise looks weird though.

@nornagon
Copy link
Member

@alexeykuzmin i agree, but it was there before, so 🤷‍♂ i guess?

@alexeykuzmin
Copy link
Contributor

@nornagon yeah, I was going to write a comment about it but then checked contents of the removed file =) The PR looks good otherwise.

@alexeykuzmin
Copy link
Contributor

The win-x64-testing failure is not related to the change. Merging.

@trop
Copy link
Contributor

trop bot commented Nov 13, 2019

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

@trop
Copy link
Contributor

trop bot commented Nov 13, 2019

@miniak has manually backported this PR to "7-1-x", please check out #21104

@trop
Copy link
Contributor

trop bot commented Nov 13, 2019

@miniak has manually backported this PR to "6-1-x", please check out #21105

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.

Electron 4.0.0 - webview.capturePage returns empty object. Remote issues with clipboard and NativeImage
4 participants