Commit ebfa35bc authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

Revert "[string] DCHECK instead of test that ThinString's actuals have same length"

This reverts commit 802c7b3e.

Reason for revert: Cluserfuzz found a reason to have this.

Original change's description:
> [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}

Change-Id: Ib8a7b962242f8b8ab3ffc5c70ed1c84d187e5b8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3548459
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#79599}
parent 19c6bd12
......@@ -719,8 +719,9 @@ Address StringTable::TryStringToIndexOrLookupExisting(Isolate* isolate,
}
if (source.IsThinString()) {
source = ThinString::cast(source).actual();
DCHECK_EQ(string.length(), source.length());
return source.ptr();
if (string.length() == source.length()) {
return source.ptr();
}
}
if (source.IsOneByteRepresentation()) {
......
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