node/deps/v8/test/mjsunit/regress/regress-crbug-881247.js
Michaël Zasso 9d434db6ef
deps: patch V8 to 7.0.276.36
Refs: https://github.com/v8/v8/compare/7.0.276.35...7.0.276.36

PR-URL: https://github.com/nodejs/node/pull/24109
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-11-09 12:11:30 +01:00

25 lines
564 B
JavaScript

// Copyright 2018 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.
// Flags: --allow-natives-syntax
const resolvedPromise = Promise.resolve();
function spread() {
const result = { ...resolvedPromise };
%HeapObjectVerify(result);
return result;
}
resolvedPromise[undefined] = {a:1};
%HeapObjectVerify(resolvedPromise);
spread();
resolvedPromise[undefined] = undefined;
%HeapObjectVerify(resolvedPromise);
spread();
%HeapObjectVerify(resolvedPromise);