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 d3a1a5b6c491 · nodejs/node@ccf1178

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • common.gypi
  • deps/v8/src/objects
    • objects.cc
    • prototype-info.h
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
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.24',
41+
'v8_embedder_string': '-node.25',
4242

4343
##### V8 defaults for Node.js #####
4444

Collapse file

‎deps/v8/src/objects/objects.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/objects/objects.cc
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4025,6 +4025,13 @@ Handle<WeakArrayList> PrototypeUsers::Add(Isolate* isolate,
40254025

40264026
// If there are empty slots, use one of them.
40274027
int empty_slot = Smi::ToInt(empty_slot_index(*array));
4028+
4029+
if (empty_slot == kNoEmptySlotsMarker) {
4030+
// GCs might have cleared some references, rescan the array for empty slots.
4031+
PrototypeUsers::ScanForEmptySlots(*array);
4032+
empty_slot = Smi::ToInt(empty_slot_index(*array));
4033+
}
4034+
40284035
if (empty_slot != kNoEmptySlotsMarker) {
40294036
DCHECK_GE(empty_slot, kFirstIndex);
40304037
CHECK_LT(empty_slot, array->length());
@@ -4047,6 +4054,15 @@ Handle<WeakArrayList> PrototypeUsers::Add(Isolate* isolate,
40474054
return array;
40484055
}
40494056

4057+
// static
4058+
void PrototypeUsers::ScanForEmptySlots(WeakArrayList array) {
4059+
for (int i = kFirstIndex; i < array.length(); i++) {
4060+
if (array.Get(i)->IsCleared()) {
4061+
PrototypeUsers::MarkSlotEmpty(array, i);
4062+
}
4063+
}
4064+
}
4065+
40504066
WeakArrayList PrototypeUsers::Compact(Handle<WeakArrayList> array, Heap* heap,
40514067
CompactionCallback callback,
40524068
AllocationType allocation) {
Collapse file

‎deps/v8/src/objects/prototype-info.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/objects/prototype-info.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class V8_EXPORT_PRIVATE PrototypeUsers : public WeakArrayList {
9999
static inline Smi empty_slot_index(WeakArrayList array);
100100
static inline void set_empty_slot_index(WeakArrayList array, int index);
101101

102-
static void IsSlotEmpty(WeakArrayList array, int index);
102+
static void ScanForEmptySlots(WeakArrayList array);
103103

104104
DISALLOW_IMPLICIT_CONSTRUCTORS(PrototypeUsers);
105105
};

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.