[strings] Support shared LO space in externalization
We have a shared large object space now. This CL supports externalization of strings in shared LO space. Bug: v8:12957 Change-Id: Ic540aed4d3e99248ef27bdccb525a0bc8ff7b28b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4217416 Auto-Submit: Patrick Thier <pthier@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#85620}
This commit is contained in:
parent
135b63038d
commit
4001e14901
@ -388,13 +388,14 @@ void String::MakeExternalDuringGC(Isolate* isolate, T* resource) {
|
||||
// Byte size of the external String object.
|
||||
int new_size = this->SizeFromMap(new_map);
|
||||
|
||||
// Shared strings are never indirect or large.
|
||||
DCHECK(!isolate->heap()->IsLargeObject(*this));
|
||||
// Shared strings are never indirect.
|
||||
DCHECK(!StringShape(*this).IsIndirect());
|
||||
|
||||
isolate->heap()->NotifyObjectSizeChange(*this, size, new_size,
|
||||
ClearRecordedSlots::kNo,
|
||||
UpdateInvalidatedObjectSize::kNo);
|
||||
if (!isolate->heap()->IsLargeObject(*this)) {
|
||||
isolate->heap()->NotifyObjectSizeChange(*this, size, new_size,
|
||||
ClearRecordedSlots::kNo,
|
||||
UpdateInvalidatedObjectSize::kNo);
|
||||
}
|
||||
|
||||
// The external pointer slots must be initialized before the new map is
|
||||
// installed. Otherwise, a GC marking thread may see the new map before the
|
||||
|
Loading…
Reference in New Issue
Block a user