mirror of
https://github.com/nodejs/node.git
synced 2025-05-21 19:44:16 +00:00

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>
25 lines
564 B
JavaScript
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);
|