Commit df64feca authored by Igor Sheludko's avatar Igor Sheludko Committed by V8 LUCI CQ

[ext-code-space] Fix issues with shared GC

Bug: v8:11880, v8:12478
Change-Id: I47f5384195aee8d6f251ca141714bdaec272f62f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3318659
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78266}
parent 50553390
......@@ -1130,9 +1130,7 @@ class MarkCompactCollector::CustomRootBodyMarkingVisitor final
void VisitCodePointer(HeapObject host, CodeObjectSlot slot) override {
CHECK(V8_EXTERNAL_CODE_SPACE_BOOL);
// At the moment, custom roots cannot contain CodeDataContainers - the only
// objects that can contain Code pointers.
UNREACHABLE();
MarkObject(host, slot.load(code_cage_base()));
}
void VisitPointers(HeapObject host, MaybeObjectSlot start,
......@@ -1191,9 +1189,7 @@ class MarkCompactCollector::SharedHeapObjectVisitor final
void VisitCodePointer(HeapObject host, CodeObjectSlot slot) override {
CHECK(V8_EXTERNAL_CODE_SPACE_BOOL);
// At the moment, custom roots cannot contain CodeDataContainers - the only
// objects that can contain Code pointers.
UNREACHABLE();
MarkObject(host, slot.load(code_cage_base()));
}
void VisitPointers(HeapObject host, MaybeObjectSlot start,
......@@ -1861,9 +1857,9 @@ void MarkCompactCollector::MarkObjectsFromClientHeaps() {
[&visitor](Isolate* client) {
Heap* heap = client->heap();
HeapObjectIterator iterator(heap, HeapObjectIterator::kNoFiltering);
PtrComprCageBase cage_base(client);
for (HeapObject obj = iterator.Next(); !obj.is_null();
obj = iterator.Next()) {
PtrComprCageBase cage_base = GetPtrComprCageBase(obj);
obj.IterateFast(cage_base, &visitor);
}
});
......@@ -4450,9 +4446,9 @@ void MarkCompactCollector::UpdatePointersInClientHeaps() {
[&visitor](Isolate* client) {
Heap* heap = client->heap();
HeapObjectIterator iterator(heap, HeapObjectIterator::kNoFiltering);
PtrComprCageBase cage_base(client);
for (HeapObject obj = iterator.Next(); !obj.is_null();
obj = iterator.Next()) {
PtrComprCageBase cage_base = GetPtrComprCageBase(obj);
obj.IterateFast(cage_base, &visitor);
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment