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

Unified Diff: runtime/bin/main.cc

Issue 17406010: Move getters from Options to Platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed Dart_GetType Created 7 years, 6 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 | « runtime/bin/io_natives.cc ('k') | runtime/bin/platform.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 4211705782684b30c40f70ca677c4b7366d5f284..18f7667fcb006623cb6c0642b782e3da7d892840 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -402,23 +402,21 @@ static Dart_Handle SetupRuntimeOptions(CommandLineOptions* options,
if (Dart_IsError(io_lib)) {
return io_lib;
}
- Dart_Handle runtime_options_class_name =
- DartUtils::NewString("_OptionsImpl");
- if (Dart_IsError(runtime_options_class_name)) {
- return runtime_options_class_name;
+ Dart_Handle platform_class_name = DartUtils::NewString("Platform");
+ if (Dart_IsError(platform_class_name)) {
+ return platform_class_name;
}
- Dart_Handle runtime_options_type = Dart_GetType(
- io_lib, runtime_options_class_name, 0, NULL);
- if (Dart_IsError(runtime_options_type)) {
- return runtime_options_type;
+ Dart_Handle platform_type =
+ Dart_GetType(io_lib, platform_class_name, 0, NULL);
+ if (Dart_IsError(platform_type)) {
+ return platform_type;
}
- Dart_Handle executable_name_name =
- DartUtils::NewString("_nativeExecutable");
+ Dart_Handle executable_name_name = DartUtils::NewString("_nativeExecutable");
if (Dart_IsError(executable_name_name)) {
return executable_name_name;
}
Dart_Handle set_executable_name =
- Dart_SetField(runtime_options_type,
+ Dart_SetField(platform_type,
executable_name_name,
dart_executable);
if (Dart_IsError(set_executable_name)) {
@@ -429,10 +427,19 @@ static Dart_Handle SetupRuntimeOptions(CommandLineOptions* options,
return script_name_name;
}
Dart_Handle set_script_name =
- Dart_SetField(runtime_options_type, script_name_name, dart_script);
+ Dart_SetField(platform_type, script_name_name, dart_script);
if (Dart_IsError(set_script_name)) {
return set_script_name;
}
+ Dart_Handle runtime_options_class_name = DartUtils::NewString("_OptionsImpl");
+ if (Dart_IsError(runtime_options_class_name)) {
+ return runtime_options_class_name;
+ }
+ Dart_Handle runtime_options_type = Dart_GetType(
+ io_lib, runtime_options_class_name, 0, NULL);
+ if (Dart_IsError(runtime_options_type)) {
+ return runtime_options_type;
+ }
Dart_Handle native_name = DartUtils::NewString("_nativeArguments");
if (Dart_IsError(native_name)) {
return native_name;
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698