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

fix: load node even if frame has opener #18152

Closed

Conversation

alexstrat
Copy link
Contributor

Description of Change

Fixes #18070
Load Node in renderer frame even if it has an opener.

Test instructions

$ git clone git@github.com:jeremyspiegel/electron-quick-start.git -b preload-not-run-on-window-open
$ cd electron-quick-start
$ npm install
$ /path/to/out/out/Debug/Electron.app/Contents/MacOS/Electron .

Verify that an alert 'preload' is shown in opened window.

Checklist

Release Notes

Notes: Fixed preload script not executed in a window created after window.open

cc @jeremyspiegel

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label May 4, 2019
@alexstrat
Copy link
Contributor Author

alexstrat commented May 4, 2019

Obviously, I bumped into #15213 and #12634 that I originally missed.

In the current state, this PR introduces a memory leak as described in #12634. I was not able to get rid of it even with calling node::FreeEnvironment(env) in WillReleaseScriptContext like done when nodeIntegrationInSubframes is enabled. (it BTW makes me think that nodeIntegrationInSubframes probably causes the same memory leaks described in #12634 but with iframes).

So I'll just close this PR and simply suggest precisions of documentation in #18156.

@alexstrat alexstrat closed this May 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-pr 🌱 PR opened in the last 24 hours
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preload script not run with nativeWindowOpen=true and window.open('')
1 participant