[string] DCHECK instead of test that ThinString's actuals have same length
ThinStrings always forward to internalized strings that have the same character contents and thus the same length. Change-Id: I5929d266f96b23029f4786baf993a431cf4ad38d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3541522 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#79582}
This commit is contained in:
parent
ffae028b37
commit
802c7b3e16
@ -719,9 +719,8 @@ Address StringTable::TryStringToIndexOrLookupExisting(Isolate* isolate,
|
||||
}
|
||||
if (source.IsThinString()) {
|
||||
source = ThinString::cast(source).actual();
|
||||
if (string.length() == source.length()) {
|
||||
return source.ptr();
|
||||
}
|
||||
DCHECK_EQ(string.length(), source.length());
|
||||
return source.ptr();
|
||||
}
|
||||
|
||||
if (source.IsOneByteRepresentation()) {
|
||||
|
Loading…
Reference in New Issue
Block a user