build: fix build by removing usage of removed preloadUrl (#33319)

This commit is contained in:
David Sanders 2022-03-17 00:13:48 -07:00 committed by GitHub
parent 4342b7ff55
commit df8fd1b269
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -571,7 +571,7 @@ const loggingEnabled = () => {
// Add JavaScript wrappers for WebContents class.
WebContents.prototype._init = function () {
const prefs = this.getLastWebPreferences() || {};
if (!prefs.nodeIntegration && (prefs.preload != null || prefs.preloadURL != null) && prefs.sandbox == null) {
if (!prefs.nodeIntegration && prefs.preload != null && prefs.sandbox == null) {
deprecate.log('The default sandbox option for windows without nodeIntegration is changing. Presently, by default, when a window has a preload script, it defaults to being unsandboxed. In Electron 20, this default will be changing, and all windows that have nodeIntegration: false (which is the default) will be sandboxed by default. If your preload script doesn\'t use Node, no action is needed. If your preload script does use Node, either refactor it to move Node usage to the main process, or specify sandbox: false in your WebPreferences.');
}
// Read off the ID at construction time, so that it's accessible even after