mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Merge pull request #6776 from electron/remove-has-real-name-callback-property-check
Remove HasRealNamedCallbackProperty check when converting objects
This commit is contained in:
@@ -352,10 +352,6 @@ base::Value* V8ValueConverter::FromV8Object(
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip all callbacks: crbug.com/139933
|
||||
if (val->HasRealNamedCallbackProperty(key->ToString()))
|
||||
continue;
|
||||
|
||||
v8::String::Utf8Value name_utf8(key->ToString());
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
|
||||
@@ -1206,6 +1206,15 @@ describe('browser-window module', function () {
|
||||
})
|
||||
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 () {
|
||||
|
||||
@@ -294,6 +294,15 @@ describe('ipc module', function () {
|
||||
})
|
||||
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 () {
|
||||
|
||||
Reference in New Issue
Block a user