File tree Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 36
36
37
37
# Reset this number to 0 on major V8 upgrades.
38
38
# Increment by one for each non-official patch applied to deps/v8.
39
- 'v8_embedder_string' : '-node.72 ' ,
39
+ 'v8_embedder_string' : '-node.73 ' ,
40
40
41
41
##### V8 defaults for Node.js #####
42
42
Original file line number Diff line number Diff line change @@ -3347,6 +3347,10 @@ void Heap::MakeHeapIterable() {
3347
3347
mark_compact_collector ()->EnsureSweepingCompleted ();
3348
3348
}
3349
3349
3350
+ void Heap::EnsureSweepingCompleted () {
3351
+ mark_compact_collector ()->EnsureSweepingCompleted ();
3352
+ }
3353
+
3350
3354
namespace {
3351
3355
3352
3356
double ComputeMutatorUtilizationImpl (double mutator_speed, double gc_speed) {
Original file line number Diff line number Diff line change @@ -1001,6 +1001,8 @@ class Heap {
1001
1001
Reservation* reservations, const std::vector<HeapObject>& large_objects,
1002
1002
const std::vector<Address>& maps);
1003
1003
1004
+ void EnsureSweepingCompleted ();
1005
+
1004
1006
IncrementalMarking* incremental_marking () {
1005
1007
return incremental_marking_.get ();
1006
1008
}
Original file line number Diff line number Diff line change @@ -633,6 +633,11 @@ Handle<Object> JsonParser<Char>::BuildJsonObject(
633
633
DCHECK_EQ (mutable_double_address, end);
634
634
}
635
635
#endif
636
+ // Before setting the length of mutable_double_buffer back to zero, we
637
+ // must ensure that the sweeper is not running or has already swept the
638
+ // object's page. Otherwise the GC can add the contents of
639
+ // mutable_double_buffer to the free list.
640
+ isolate ()->heap ()->EnsureSweepingCompleted ();
636
641
mutable_double_buffer->set_length (0 );
637
642
}
638
643
}
You can’t perform that action at this time.
0 commit comments