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

Unified Diff: src/runtime.cc

Issue 669159: Fixed filling of char array in StringToArray. (Closed)
Patch Set: Fix typo Created 10 years, 10 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/string-split-cache.js » ('j') | 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 d0f90818d6460ca04330746ac3ab2c7b519d1943..90bbaf32d66787bacaa45fb494224479249eaeed 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -4233,7 +4233,7 @@ static int CopyCachedAsciiCharsToArray(const char* chars,
}
if (i < length) {
ASSERT(Smi::FromInt(0) == 0);
- memset(elements->data_start() + i, 0, length - i);
+ memset(elements->data_start() + i, 0, kPointerSize * (length - i));
}
#ifdef DEBUG
for (int j = 0; j < length; ++j) {
« no previous file with comments | « no previous file | test/mjsunit/string-split-cache.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698