Merge pull request #6776 from electron/remove-has-real-name-callback-property-check
Remove HasRealNamedCallbackProperty check when converting objects
This commit is contained in:
commit
25f29e30f5
3 changed files with 18 additions and 4 deletions
|
@ -352,10 +352,6 @@ base::Value* V8ValueConverter::FromV8Object(
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip all callbacks: crbug.com/139933
|
|
||||||
if (val->HasRealNamedCallbackProperty(key->ToString()))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
v8::String::Utf8Value name_utf8(key->ToString());
|
v8::String::Utf8Value name_utf8(key->ToString());
|
||||||
|
|
||||||
v8::TryCatch try_catch;
|
v8::TryCatch try_catch;
|
||||||
|
|
|
@ -1206,6 +1206,15 @@ describe('browser-window module', function () {
|
||||||
})
|
})
|
||||||
w.loadURL(server.url)
|
w.loadURL(server.url)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('works with result objects that have DOM class prototypes', function (done) {
|
||||||
|
w.webContents.executeJavaScript('document.location', function (result) {
|
||||||
|
assert.equal(result.origin, server.url)
|
||||||
|
assert.equal(result.protocol, 'http:')
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
w.loadURL(server.url)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('offscreen rendering', function () {
|
describe('offscreen rendering', function () {
|
||||||
|
|
|
@ -294,6 +294,15 @@ describe('ipc module', function () {
|
||||||
})
|
})
|
||||||
ipcRenderer.send('message', currentDate)
|
ipcRenderer.send('message', currentDate)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('can send objects with DOM class prototypes', function (done) {
|
||||||
|
ipcRenderer.once('message', function (event, value) {
|
||||||
|
assert.equal(value.protocol, 'file:')
|
||||||
|
assert.equal(value.hostname, '')
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
ipcRenderer.send('message', document.location)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('ipc.sendSync', function () {
|
describe('ipc.sendSync', function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue