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: remove api::WebContents::CreateFrom #15241

Merged
merged 1 commit into from Oct 19, 2018

Conversation

Projects
None yet
2 participants
@zcbenz
Copy link
Member

commented Oct 18, 2018

Description of Change

Currently the WebContents::CreateFrom method can have 3 different kinds of behaviors depending on different conditions, and it is impossible to know which path it would go by simply looking at the code.

This PR separates it to 3 methods with different names, and makes the behavior explicit by name.

As a side effect we can avoid creating V8 wrapper for WebContents in some cases when the WebContents is not accessed from JS.

This PR should not have any behavior change on existing code.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are changed or added
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines

Release Notes

Notes: Remove api::WebContents::CreateFrom.

@zcbenz zcbenz requested a review from as a code owner Oct 18, 2018

@deepak1556
Copy link
Member

left a comment

This is great! LGTM, seems like tests are failing in ci related to this PR. Thanks!

Show resolved Hide resolved atom/browser/api/atom_api_web_contents.h

@zcbenz zcbenz force-pushed the remove-webcontents-createfrom branch 2 times, most recently from e232af4 to f9c20ff Oct 19, 2018

@zcbenz zcbenz force-pushed the remove-webcontents-createfrom branch from f9c20ff to 994fe36 Oct 19, 2018

@zcbenz zcbenz merged commit 94aa076 into master Oct 19, 2018

27 checks passed

Absolute Zero
Artifact Comparison No Changes
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
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
ci/circleci: linux-arm-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-checkout Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing-tests Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing-tests Your tests passed on CircleCI!
Details
electron-arm-testing Build #20181019.22 succeeded
Details
electron-arm64-testing Build #20181019.22 succeeded
Details
electron-lint Build #20181019.20 succeeded
Details
electron-mas-testing Build #20181019.31 succeeded
Details
electron-osx-testing Build #20181019.31 succeeded
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Oct 19, 2018

No Release Notes

@zcbenz zcbenz deleted the remove-webcontents-createfrom branch Oct 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.