hermes-windows/test/hermes/weakmap-cycle.js

19 строки
394 B
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: %hermes -gc-max-heap=64M %s
// REQUIRES: !slow_debug
(function () {
var foo = new WeakMap();
for (var i = 0; i < 4000000; i++) {
var x = {};
foo.set(x, x);
}
})();