Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index 986970444fabf7eec8a981ea245eb2292258ee3a..bdd6560cad22fca9d2c08266571e3630835c706a 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -559,6 +559,8 @@ void String::StringVerify() { |
ConsString::cast(this)->ConsStringVerify(); |
} else if (IsSlicedString()) { |
SlicedString::cast(this)->SlicedStringVerify(); |
+ } else if (IsThinString()) { |
+ ThinString::cast(this)->ThinStringVerify(); |
} |
} |
@@ -570,12 +572,17 @@ void ConsString::ConsStringVerify() { |
CHECK(this->length() >= ConsString::kMinLength); |
CHECK(this->length() == this->first()->length() + this->second()->length()); |
if (this->IsFlat()) { |
- // A flat cons can only be created by String::SlowTryFlatten. |
- // Afterwards, the first part may be externalized. |
- CHECK(this->first()->IsSeqString() || this->first()->IsExternalString()); |
+ // A flat cons can only be created by String::SlowFlatten. |
+ // Afterwards, the first part may be externalized or internalized. |
+ CHECK(this->first()->IsSeqString() || this->first()->IsExternalString() || |
+ this->first()->IsThinString()); |
} |
} |
+void ThinString::ThinStringVerify() { |
+ CHECK(this->actual()->IsInternalizedString()); |
+ CHECK(this->actual()->IsSeqString() || this->actual()->IsExternalString()); |
+} |
void SlicedString::SlicedStringVerify() { |
CHECK(!this->parent()->IsConsString()); |