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

feat: promisify webContents.savePage() #16742

Merged
merged 6 commits into from Feb 14, 2019

Conversation

@codebytere
Copy link
Member

commented Feb 5, 2019

Description of Change

This PR promisifies webContents.savePage(). There was, unfortunately, no way to perfectly maintain backwards compatibility that I was able to see; previously, this method returned a Boolean and called the callback with an error but now it calls the callback with both the Boolean and the error and returns nothing.

cc @deepak1556 @ckerr

Checklist

Release Notes

Notes: Converted webContents.savePage() to return a Promise instead of taking a callback.

@codebytere codebytere requested review from as code owners Feb 5, 2019

@codebytere codebytere force-pushed the promisify-savepage branch from 5d95eb4 to 0351700 Feb 5, 2019

@codebytere codebytere force-pushed the promisify-savepage branch from 0351700 to 52645a2 Feb 5, 2019

@codebytere codebytere changed the title feat: promisify webContents.savePage() [wip] feat: promisify webContents.savePage() Feb 6, 2019

@codebytere codebytere force-pushed the promisify-savepage branch 2 times, most recently from b3f0083 to 1dfca39 Feb 6, 2019

@codebytere codebytere changed the title [wip] feat: promisify webContents.savePage() feat: promisify webContents.savePage() Feb 6, 2019

@miniak

miniak approved these changes Feb 9, 2019

@ckerr
Copy link
Member

left a comment

Mostly nits. Elevating to 'Request changes' for the docs error.

Show resolved Hide resolved atom/browser/api/save_page_handler.cc
Show resolved Hide resolved atom/browser/api/atom_api_web_contents.cc Outdated
Show resolved Hide resolved docs/api/web-contents.md Outdated
Show resolved Hide resolved docs/api/web-contents.md Outdated
@ckerr

ckerr approved these changes Feb 13, 2019

codebytere added some commits Feb 5, 2019

@codebytere codebytere force-pushed the promisify-savepage branch from 517af79 to 0cbef75 Feb 13, 2019

@codebytere codebytere merged commit de27911 into master Feb 14, 2019

12 of 15 checks passed

appveyor: win-x64-testing AppVeyor build failed
Details
appveyor: win-x64-testing-pr AppVeyor build failed
Details
Artifact Comparison Changes Detected
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-debug AppVeyor build succeeded
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-debug AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
electron-arm-testing Build #20190213.64 succeeded
Details
electron-arm64-testing Build #20190213.63 succeeded
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Feb 14, 2019

Release Notes Persisted

Converted webContents.savePage() to return a Promise instead of taking a callback.

@codebytere codebytere deleted the promisify-savepage branch Feb 14, 2019

@codebytere

This comment has been minimized.

Copy link
Member Author

commented Feb 14, 2019

/trop run backport-to 5-0-x

@trop

This comment has been minimized.

Copy link
Contributor

commented Feb 14, 2019

The backport process for this PR has been manually initiated,
sending your 1's and 0's to "5-0-x" here we go! :D

@trop

This comment has been minimized.

Copy link
Contributor

commented Feb 14, 2019

I was unable to backport this PR to "5-0-x" cleanly;
you will need to perform this backport manually.

codebytere added a commit that referenced this pull request Feb 14, 2019

feat: promisify webContents.savePage() (#16742)
* feat: promisify webContents.savePage()

* no need to make compatible w callbacks, we're breaking it

* fix promise resolve type

* address feedback from review

* fix promise return text

* update smoke test

@codebytere codebytere referenced this pull request Feb 14, 2019

Closed

feat: promisify webContents.savePage() #16967

5 of 6 tasks complete

codebytere added a commit that referenced this pull request Feb 16, 2019

feat: promisify webContents.savePage() (#16742)
* feat: promisify webContents.savePage()

* no need to make compatible w callbacks, we're breaking it

* fix promise resolve type

* address feedback from review

* fix promise return text

* update smoke test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.