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

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

Issue 11028027: Revert trunk to bleeding_edge at r12484 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 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 | « test/cctest/test-api.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-compiler.cc
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index 7700a980d2fd0b84232133c2ffc5eea4545ac653..961c94bff084361fa5957fa2fa12f964e443a5ad 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -68,9 +68,15 @@ v8::Handle<v8::Value> PrintExtension::Print(const v8::Arguments& args) {
for (int i = 0; i < args.Length(); i++) {
if (i != 0) printf(" ");
v8::HandleScope scope;
- v8::String::Utf8Value str(args[i]);
- if (*str == NULL) return v8::Undefined();
- printf("%s", *str);
+ v8::Handle<v8::Value> arg = args[i];
+ v8::Handle<v8::String> string_obj = arg->ToString();
+ if (string_obj.IsEmpty()) return string_obj;
+ int length = string_obj->Length();
+ uint16_t* string = NewArray<uint16_t>(length + 1);
+ string_obj->Write(string);
+ for (int j = 0; j < length; j++)
+ printf("%lc", static_cast<wchar_t>(string[j]));
+ DeleteArray(string);
}
printf("\n");
return v8::Undefined();
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698