Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Unified Diff: src/objects.cc

Issue 2377983002: Allow empty first parts of ConsStrings (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-5440.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 828fcd896a0607ecd52aacfa7f9a0e49080c15bd..717cd8ae89b1bb5a08f70a20c743be513646ed5e 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11092,7 +11092,7 @@ String* ConsStringIterator::NextLeaf(bool* blew_stack) {
if ((type & kStringRepresentationMask) != kConsStringTag) {
AdjustMaximumDepth();
int length = string->length();
- DCHECK(length != 0);
+ if (length == 0) break; // Skip empty left-hand sides of ConsStrings.
consumed_ += length;
return string;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-5440.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698