Skip to content

fix: NativeImage serialization of <webview>.capturePage() result - #20825

Merged
alexeykuzmin merged 1 commit into
masterfrom
miniak/fix-webview-capture-page
Nov 12, 2019
Merged

alexeykuzmin merged 1 commit into
masterfrom
miniak/fix-webview-capture-page

Conversation

@miniak

@miniak miniak commented Oct 29, 2019 •

Copy link
Copy Markdown
Contributor

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 recently 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 recently label Oct 30, 2019
@miniak
miniak requested a review from deepak1556 November 1, 2019 16:30
@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

miniak commented Nov 5, 2019

Copy link
Copy Markdown
Contributor Author

@nornagon, @MarshallOfSound can you please review?

@nornagon nornagon left a comment

Copy link
Copy Markdown
Contributor

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

miniak commented Nov 6, 2019

Copy link
Copy Markdown
Contributor Author

@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

@alexeykuzmin alexeykuzmin left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@alexeykuzmin

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

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

@miniak
miniak deleted the miniak/fix-webview-capture-page branch November 13, 2019 08:04
@trop

trop Bot commented Nov 13, 2019

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Nov 13, 2019

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Nov 13, 2019

Copy link
Copy Markdown
Contributor

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

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)
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