Don't allow duplicate object in a parsed array
This feature was introduced to fix #874 but caused the converter to go through a deep nested object sometimes, which made program crash on Windows. So we have to revert the fix even though it makes a regression. Fixes atom/atom#4904.
This commit is contained in:
parent
640c8f88ff
commit
609e3ec3ff
2 changed files with 1 additions and 12 deletions
|
@ -294,10 +294,7 @@ base::Value* V8ValueConverter::FromV8Array(
|
|||
if (!val->HasRealIndexedProperty(i))
|
||||
continue;
|
||||
|
||||
// When parsing elements in an array, we use a new state so we can have the
|
||||
// same object showed twice in array.
|
||||
FromV8ValueState new_state;
|
||||
base::Value* child = FromV8ValueImpl(&new_state, child_v8, isolate);
|
||||
base::Value* child = FromV8ValueImpl(state, child_v8, isolate);
|
||||
if (child)
|
||||
result->Append(child);
|
||||
else
|
||||
|
|
|
@ -60,14 +60,6 @@ describe 'ipc module', ->
|
|||
done()
|
||||
ipc.send 'message', obj
|
||||
|
||||
it 'should work when sending the same object twice in one message', (done) ->
|
||||
obj = key: 'some'
|
||||
ipc.once 'message', (message) ->
|
||||
assert.deepEqual message[0], obj
|
||||
assert.deepEqual message[1], obj
|
||||
done()
|
||||
ipc.send 'message', [obj, obj]
|
||||
|
||||
describe 'ipc.sendSync', ->
|
||||
it 'can be replied by setting event.returnValue', ->
|
||||
msg = ipc.sendSync 'echo', 'test'
|
||||
|
|
Loading…
Reference in a new issue