diff --git a/atom/common/native_mate_converters/v8_value_converter.cc b/atom/common/native_mate_converters/v8_value_converter.cc index 6d159d4daf39..eb3ff3c8c32b 100644 --- a/atom/common/native_mate_converters/v8_value_converter.cc +++ b/atom/common/native_mate_converters/v8_value_converter.cc @@ -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; diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 5d5481a5ebae..362105c7bb15 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -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 () { diff --git a/spec/api-ipc-spec.js b/spec/api-ipc-spec.js index 8a57fb0ab2ba..8d08baf0bcbf 100644 --- a/spec/api-ipc-spec.js +++ b/spec/api-ipc-spec.js @@ -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 () {