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: port window.open and window.opener to use ctx bridge instead of hole punching #23235

Merged
merged 2 commits into from
Apr 27, 2020

Conversation

MarshallOfSound
Copy link
Member

@MarshallOfSound MarshallOfSound commented Apr 22, 2020

Follow up to #23194

Moves all of window-setup to use ctx bridge so we don't have to hole punch.

This PR also gates the isolated_bundle behind a check for "has webview" as that is the only thing that bundle does now. It also adds a warning that contextIsolation + webviewTag is unsafe.

Notes: no-notes

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Apr 22, 2020
@MarshallOfSound MarshallOfSound force-pushed the window-open-over-bridge branch 5 times, most recently from 71c05c9 to 39771e6 Compare April 23, 2020 19:00
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Apr 23, 2020
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.

LGTM with nits

lib/browser/api/web-contents.js Outdated Show resolved Hide resolved
shell/renderer/api/electron_api_context_bridge.cc Outdated Show resolved Hide resolved
shell/renderer/api/electron_api_context_bridge.cc Outdated Show resolved Hide resolved
shell/renderer/api/electron_api_context_bridge.cc Outdated Show resolved Hide resolved
shell/renderer/api/electron_api_context_bridge.cc Outdated Show resolved Hide resolved
@zcbenz zcbenz requested a review from deepak1556 April 27, 2020 06:05
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.

LGTM, for the webview deprecation

@release-clerk
Copy link

release-clerk bot commented Apr 27, 2020

No Release Notes

@MarshallOfSound MarshallOfSound deleted the window-open-over-bridge branch April 27, 2020 19:46
@trop
Copy link
Contributor

trop bot commented Apr 27, 2020

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

@trop
Copy link
Contributor

trop bot commented Apr 27, 2020

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

@trop trop bot removed the target/8-x-y label Apr 27, 2020
@trop
Copy link
Contributor

trop bot commented Apr 27, 2020

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

MarshallOfSound added a commit that referenced this pull request Apr 27, 2020
…d of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
MarshallOfSound added a commit that referenced this pull request Apr 27, 2020
…d of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
MarshallOfSound added a commit that referenced this pull request Apr 27, 2020
…d of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
MarshallOfSound added a commit that referenced this pull request Apr 27, 2020
…d of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
MarshallOfSound added a commit that referenced this pull request Apr 27, 2020
…d of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
MarshallOfSound added a commit that referenced this pull request Apr 27, 2020
…d of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
MarshallOfSound added a commit that referenced this pull request Apr 27, 2020
… the main world (#23299)

* refactor: port parts of window-setup to use ctx bridge instead of being run in the main world (#23194)

* refactor: port parts of window-setup to use ctx bridge instead of being run in the main world

* chore: update ctx bridge specs for new base numbers

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
MarshallOfSound added a commit that referenced this pull request Apr 27, 2020
…d of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
MarshallOfSound added a commit that referenced this pull request Apr 28, 2020
… the main world (#23302)

* refactor: port parts of window-setup to use ctx bridge instead of being run in the main world (#23194)

* refactor: port parts of window-setup to use ctx bridge instead of being run in the main world

* chore: update ctx bridge specs for new base numbers

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled

* s/gin/mate

* fix: do not inject in content scripts and do not override window.history because it does not work
MarshallOfSound added a commit that referenced this pull request Apr 28, 2020
…d of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
MarshallOfSound added a commit that referenced this pull request Apr 29, 2020
… the main world (#23305)

* refactor: port parts of window-setup to use ctx bridge instead of being run in the main world (#23194)

* refactor: port parts of window-setup to use ctx bridge instead of being run in the main world

* chore: update ctx bridge specs for new base numbers

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235)

* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled

* s/gin/mate

* fix: do not inject in content scripts and do not override window.history because it does not work

* fix: electron 7 does not have an objectcache

* chore: fix linting

* chore: update tests for new values
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

3 participants