Merge pull request #10264 from electron/fix-sandbox-crash-on-background-tab

Fix sandbox crash when opening a background tab
This commit is contained in:
Cheng Zhao 2017-08-17 15:57:29 +09:00 committed by GitHub
commit f6792c0232

View file

@ -43,8 +43,9 @@ BrowserWindow.prototype._init = function () {
userGesture, left, top, width,
height) => {
let urlFrameName = v8Util.getHiddenValue(webContents, 'url-framename')
if ((disposition !== 'foreground-tab' && disposition !== 'new-window') ||
!urlFrameName) {
if ((disposition !== 'foreground-tab' && disposition !== 'new-window' &&
disposition !== 'background-tab') || !urlFrameName) {
event.preventDefault()
return
}