mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Track visited parents and null out cycles
This commit is contained in:
@@ -270,10 +270,13 @@ describe('chromium feature', function () {
|
||||
w = BrowserWindow.fromId(ipcRenderer.sendSync('create-window-with-options-cycle'))
|
||||
w.loadURL('file://' + fixtures + '/pages/window-open.html')
|
||||
w.webContents.once('new-window', (event, url, frameName, disposition, options) => {
|
||||
assert.deepEqual(options, {
|
||||
show: false,
|
||||
foo: {
|
||||
bar: null
|
||||
assert.equal(options.show, false)
|
||||
assert.deepEqual(options.foo, {
|
||||
bar: null,
|
||||
baz: {
|
||||
hello: {
|
||||
world: true
|
||||
}
|
||||
}
|
||||
})
|
||||
done()
|
||||
|
||||
@@ -237,6 +237,11 @@ ipcMain.on('create-window-with-options-cycle', (event) => {
|
||||
// nulled out at the IPC layer
|
||||
const foo = {}
|
||||
foo.bar = foo
|
||||
foo.baz = {
|
||||
hello: {
|
||||
world: true
|
||||
}
|
||||
}
|
||||
const window = new BrowserWindow({show: false, foo: foo})
|
||||
event.returnValue = window.id
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user