17a6ec1b88
If object contains undefined property then JSON.stringify will skip it, if array contains undefined as property then JSON.stringify will censor it to null. [1] [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify R=alph@chromium.org Bug: none Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: Iafa9d2828d264d89b26675b0e194ad0bfc4621fc Reviewed-on: https://chromium-review.googlesource.com/834669 Reviewed-by: Alexei Filippov <alph@chromium.org> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Cr-Commit-Position: refs/heads/master@{#50220}
15 lines
524 B
JavaScript
15 lines
524 B
JavaScript
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
let {session, contextGroup, Protocol} = InspectorTest.start(
|
|
'Tests Runtime.evaluate returns object with undefined property.');
|
|
|
|
(async function test() {
|
|
InspectorTest.logMessage(await Protocol.Runtime.evaluate({
|
|
expression: '({a:undefined,b:null,c:[1, null, undefined, 4]})',
|
|
returnByValue: true
|
|
}));
|
|
InspectorTest.completeTest();
|
|
})();
|