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

Unified Diff: runtime/bin/crypto.cc

Issue 11318018: - Represent strings internally in UTF-16 format, this makes it (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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
Index: runtime/bin/crypto.cc
===================================================================
--- runtime/bin/crypto.cc (revision 14314)
+++ runtime/bin/crypto.cc (working copy)
@@ -13,7 +13,8 @@
Dart_Handle count_obj = Dart_GetNativeArgument(args, 0);
int64_t count = 0;
if (!DartUtils::GetInt64Value(count_obj, &count)) {
- Dart_Handle error = Dart_NewString("Invalid argument, must be an int.");
+ Dart_Handle error =
+ DartUtils::NewString("Invalid argument, must be an int.");
Dart_ThrowException(error);
}
uint8_t* buffer = new uint8_t[count];
@@ -25,7 +26,7 @@
Dart_Handle result = Dart_NewByteArray(count);
if (Dart_IsError(result)) {
delete[] buffer;
- Dart_Handle error = Dart_NewString("Failed to allocate storage.");
+ Dart_Handle error = DartUtils::NewString("Failed to allocate storage.");
Dart_ThrowException(error);
}
Dart_ListSetAsBytes(result, 0, buffer, count);
@@ -33,4 +34,3 @@
delete[] buffer;
Dart_ExitScope();
}
-
« no previous file with comments | « runtime/bin/common.cc ('k') | runtime/bin/dartutils.h » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698