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

Unified Diff: test/cctest/test-strings.cc

Issue 9408: Removed some unsafe uses of StringShape.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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/runtime.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-strings.cc
===================================================================
--- test/cctest/test-strings.cc (revision 694)
+++ test/cctest/test-strings.cc (working copy)
@@ -215,10 +215,8 @@
CHECK_EQ(c, buffer2.GetNext());
i++;
}
- StringShape shape1(*s1);
- StringShape shape2(*s2);
- s1->Get(shape1, s1->length(shape1) - 1);
- s2->Get(shape2, s2->length(shape2) - 1);
+ s1->Get(StringShape(*s1), s1->length() - 1);
+ s2->Get(StringShape(*s2), s2->length() - 1);
}
@@ -251,12 +249,10 @@
printf("7\n");
Handle<String> right_deep_slice =
Factory::NewStringSlice(left_deep_asymmetric,
- StringShape(*left_deep_asymmetric),
left_deep_asymmetric->length() - 1050,
left_deep_asymmetric->length() - 50);
Handle<String> left_deep_slice =
Factory::NewStringSlice(right_deep_asymmetric,
- StringShape(*right_deep_asymmetric),
right_deep_asymmetric->length() - 1050,
right_deep_asymmetric->length() - 50);
printf("8\n");
@@ -283,7 +279,6 @@
int start = gen() % underlying->length();
int end = start + gen() % (underlying->length() - start);
return Factory::NewStringSlice(underlying,
- StringShape(*underlying),
start,
end);
}
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698