GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: V8: cherry-pick 1fada6b36f8d · nodejs/node@b0e8889

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • common.gypi
  • deps/v8
    • src/heap
      • mark-compact.cc
    • test/mjsunit/harmony/regress
      • regress-crbug-1372500.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.33',
39+
'v8_embedder_string': '-node.34',
4040

4141
##### V8 defaults for Node.js #####
4242

Collapse file

‎deps/v8/src/heap/mark-compact.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/heap/mark-compact.cc
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3027,7 +3027,7 @@ void MarkCompactCollector::ClearJSWeakRefs() {
30273027
};
30283028
HeapObject target = HeapObject::cast(weak_cell.target());
30293029
if (!non_atomic_marking_state()->IsBlackOrGrey(target)) {
3030-
DCHECK(!target.IsUndefined());
3030+
DCHECK(target.CanBeHeldWeakly());
30313031
// The value of the WeakCell is dead.
30323032
JSFinalizationRegistry finalization_registry =
30333033
JSFinalizationRegistry::cast(weak_cell.finalization_registry());
@@ -3049,6 +3049,7 @@ void MarkCompactCollector::ClearJSWeakRefs() {
30493049

30503050
HeapObject unregister_token = weak_cell.unregister_token();
30513051
if (!non_atomic_marking_state()->IsBlackOrGrey(unregister_token)) {
3052+
DCHECK(unregister_token.CanBeHeldWeakly());
30523053
// The unregister token is dead. Remove any corresponding entries in the
30533054
// key map. Multiple WeakCell with the same token will have all their
30543055
// unregister_token field set to undefined when processing the first
@@ -3057,7 +3058,7 @@ void MarkCompactCollector::ClearJSWeakRefs() {
30573058
JSFinalizationRegistry finalization_registry =
30583059
JSFinalizationRegistry::cast(weak_cell.finalization_registry());
30593060
finalization_registry.RemoveUnregisterToken(
3060-
JSReceiver::cast(unregister_token), isolate(),
3061+
unregister_token, isolate(),
30613062
JSFinalizationRegistry::kKeepMatchedCellsInRegistry,
30623063
gc_notify_updated_slot);
30633064
} else {
Collapse file

‎deps/v8/test/mjsunit/harmony/regress/regress-crbug-1372500.js‎

Copy file name to clipboard
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2022 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Flags: --harmony-symbol-as-weakmap-key --expose-gc
6+
7+
// Register an object in a FinalizationRegistry with a Symbol as the unregister
8+
// token.
9+
let fr = new FinalizationRegistry(function () {});
10+
(function register() {
11+
fr.register({}, "holdings", Symbol('unregisterToken'));
12+
})();
13+
// The unregister token should be dead, trigger its collection.
14+
gc();

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.