Repository navigation
Fix race condition when initializing node integration - #1044
Merged
Merged
Conversation
This greatly simplified our code, and it is not useful to enable node integrations in frames.
Contributor
Author
|
@paulcbetts Can you test if this fixes #1028 for your? |
Contributor
|
@zcbenz no dice :( Patched init.js: global.wtf = [];
wtf.push(window.location.href);
wtf.push(window.location.protocol);
if (nodeIntegration === 'true' || nodeIntegration === 'all' || nodeIntegration === 'except-iframe' || nodeIntegration === 'manual-enable-iframe') {
/* ... */ |
Contributor
Author
|
@paulcbetts Can you provide a minimal app that shows this problem? I wonder if it only occurs when we used some APIs in code, because I never encountered a similar problem in Atom editor. |
Contributor
|
@zcbenz I can work on that, yeah - I'm out today but I'll have a look tonight |
Contributor
Author
|
@paulcbetts Cool, thanks! |
When we recevied messages from browser, we will try to transfer the message to web page, and when we do that blink will create an empty document when there is no document object yet, which will make our init script run when window.location is still about:blank.
After the simplification of code this class is no longer needed.
Contributor
Author
|
@paulcbetts #1028 should have been fixed by 0bcc9b7, can you have a test of this branch? |
Contributor
|
Works perfectly! 🎉 |
zcbenz
added a commit
that referenced
this pull request
Jan 25, 2015
Fix race condition when initializing node integration
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
iframes, because you can either use<webview>instead, or just access node integration in parent frame. This greatly simplified the node integration code in renderer process, also fixes Having multiple JavaScript contexts causes a race condition in uv event loop handling #894 and fixes add/remove iframe cause memory leak #789.