You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preload script (and in fact node_bootstrap.js) is executed twice in the same process but in a different context.
How to reproduce
Struggling to isolate this from the application that is experiencing it but I have narrowed it down to this being kind of expected behavior but with a newly introduced bug in 2.0.x. Basically when you call loadURL a renderer process is initially launched pointing at about:blank. In this process renderer/init.js is called and then the window navigates to the URL you requested.
For an as yet unknown reason in 2.0.x the --preload argument is present on the renderer process when the about:blank page is loaded causing user code to execute twice in the same process. This is only a problem because native modules can only be loaded once in a given process.
The fix for this would be to revert to original behavior where the --preload (amongst others) arguments are not sent to the renderer until the users page is loaded. (Don't send them for about:blank).
I'm currently working on a minimal sample
The text was updated successfully, but these errors were encountered:
2.0.0-beta.1
Expected behavior
Preload script should execute once
Actual behavior
Preload script (and in fact
node_bootstrap.js
) is executed twice in the same process but in a different context.How to reproduce
Struggling to isolate this from the application that is experiencing it but I have narrowed it down to this being kind of expected behavior but with a newly introduced bug in
2.0.x
. Basically when you callloadURL
a renderer process is initially launched pointing atabout:blank
. In this processrenderer/init.js
is called and then the window navigates to the URL you requested.For an as yet unknown reason in
2.0.x
the--preload
argument is present on the renderer process when theabout:blank
page is loaded causing user code to execute twice in the same process. This is only a problem because native modules can only be loaded once in a given process.The fix for this would be to revert to original behavior where the
--preload
(amongst others) arguments are not sent to the renderer until the users page is loaded. (Don't send them forabout:blank
).I'm currently working on a minimal sample
The text was updated successfully, but these errors were encountered: