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

Unified Diff: src/runtime.cc

Issue 6536: Rolled back hash calculation during flattening (Closed)
Patch Set: Created 12 years, 2 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 | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 2b0b2cd0c4894e33bc9a08f522986b50ed0935b5..92e23301b786070b788ac3d3a25053b492d26a38 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -2404,24 +2404,21 @@ static Object* Runtime_StringBuilderConcat(Arguments args) {
if (object->IsFailure()) return object;
String* answer = String::cast(object);
- StringHasher hasher(length);
for (int i = 0; i < array_length; i++) {
Object* element = fixed_array->get(i);
if (element->IsSmi()) {
int len = Smi::cast(element)->value();
int pos = len >> 11;
len &= 0x7ff;
- String::Flatten(special, answer, pos, pos + len, position, &hasher);
+ String::Flatten(special, answer, pos, pos + len, position);
position += len;
} else {
String* string = String::cast(element);
int element_length = string->length();
- String::Flatten(string, answer, 0, element_length, position, &hasher);
+ String::Flatten(string, answer, 0, element_length, position);
position += element_length;
}
}
- if (hasher.is_valid())
- answer->set_length_field(hasher.GetHashField());
return answer;
}
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698