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

zcbenz
Copy link
Member

@zcbenz zcbenz 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 a team October 18, 2018 07:26
Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

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

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

atom/browser/api/atom_api_web_contents.h Show resolved Hide resolved
@zcbenz zcbenz force-pushed the remove-webcontents-createfrom branch 2 times, most recently from e232af4 to f9c20ff Compare October 19, 2018 02:22
@zcbenz zcbenz force-pushed the remove-webcontents-createfrom branch from f9c20ff to 994fe36 Compare October 19, 2018 07:25
@zcbenz zcbenz merged commit 94aa076 into master Oct 19, 2018
@release-clerk
Copy link

release-clerk bot commented Oct 19, 2018

No Release Notes

@zcbenz zcbenz deleted the remove-webcontents-createfrom branch October 19, 2018 08:52
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