mirror of
https://github.com/electron/electron.git
synced 2026-01-23 14:28:17 -05:00
Explicitly initialize session before webContents
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
const {deprecate, Menu, session} = require('electron')
|
||||
const electron = require('electron')
|
||||
const {deprecate, Menu} = electron
|
||||
const {EventEmitter} = require('events')
|
||||
|
||||
const bindings = process.atomBinding('app')
|
||||
@@ -49,7 +50,7 @@ app.allowNTLMCredentialsForAllDomains = function (allow) {
|
||||
if (!this.isReady()) {
|
||||
this.commandLine.appendSwitch('auth-server-whitelist', domains)
|
||||
} else {
|
||||
session.defaultSession.allowNTLMCredentialsForDomains(domains)
|
||||
electron.session.defaultSession.allowNTLMCredentialsForDomains(domains)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
'use strict'
|
||||
|
||||
const {EventEmitter} = require('events')
|
||||
const {ipcMain, Menu, NavigationController} = require('electron')
|
||||
const {ipcMain, session, Menu, NavigationController} = require('electron')
|
||||
|
||||
// session is not used here, the purpose is to make sure session is initalized
|
||||
// before the webContents module.
|
||||
session
|
||||
|
||||
const binding = process.atomBinding('web_contents')
|
||||
const debuggerBinding = process.atomBinding('debugger')
|
||||
|
||||
Reference in New Issue
Block a user