1fada6b36f
Bug: chromium:1372500, v8:12947 Fixed: chromium:1372500 Change-Id: Id6330de5886e4ea72544b307c358e2190ea47d9c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3942586 Reviewed-by: Anton Bikineev <bikineev@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#83632}
15 lines
521 B
JavaScript
15 lines
521 B
JavaScript
// Copyright 2022 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: --harmony-symbol-as-weakmap-key --expose-gc
|
|
|
|
// Register an object in a FinalizationRegistry with a Symbol as the unregister
|
|
// token.
|
|
let fr = new FinalizationRegistry(function () {});
|
|
(function register() {
|
|
fr.register({}, "holdings", Symbol('unregisterToken'));
|
|
})();
|
|
// The unregister token should be dead, trigger its collection.
|
|
gc();
|