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/file.cc

Issue 2698813002: [dart:io][windows] Make unicode characters display correctly. (Closed)
Patch Set: Make tests pass Created 3 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
Index: runtime/bin/file.cc
diff --git a/runtime/bin/file.cc b/runtime/bin/file.cc
index feeb130fec57106d5851ef6b3fde0b32920e0b55..2c284efa17cff77b475015a14fe674bc37166823 100644
--- a/runtime/bin/file.cc
+++ b/runtime/bin/file.cc
@@ -76,6 +76,19 @@ void FUNCTION_NAME(File_SetPointer)(Dart_NativeArguments args) {
}
+void FUNCTION_NAME(File_SetTranslation)(Dart_NativeArguments args) {
+ File* file = GetFile(args);
+ ASSERT(file != NULL);
+ intptr_t translation =
+ DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 1));
siva 2017/02/22 00:58:45 Dart_GetNativeIntegerArgument might work here, jus
zra 2017/02/22 05:07:15 Done.
+ if ((translation != File::kText) && (translation != File::kBinary)) {
+ Dart_ThrowException(DartUtils::NewDartArgumentError(
+ "The argument must be a FileTranslation mode"));
+ }
+ file->SetTranslation(static_cast<File::DartFileTranslation>(translation));
+}
+
+
void FUNCTION_NAME(File_Open)(Dart_NativeArguments args) {
const char* filename =
DartUtils::GetStringValue(Dart_GetNativeArgument(args, 0));
« no previous file with comments | « runtime/bin/file.h ('k') | runtime/bin/file_android.cc » ('j') | runtime/bin/file_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698