| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "include/dart_debugger_api.h" | 10 #include "include/dart_debugger_api.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 Dart_Handle runtime_options_class = Dart_GetClass( | 192 Dart_Handle runtime_options_class = Dart_GetClass( |
| 193 core_lib, runtime_options_class_name); | 193 core_lib, runtime_options_class_name); |
| 194 if (Dart_IsError(runtime_options_class)) { | 194 if (Dart_IsError(runtime_options_class)) { |
| 195 return runtime_options_class; | 195 return runtime_options_class; |
| 196 } | 196 } |
| 197 Dart_Handle script_name_name = Dart_NewString("_nativeScript"); | 197 Dart_Handle script_name_name = Dart_NewString("_nativeScript"); |
| 198 if (Dart_IsError(script_name_name)) { | 198 if (Dart_IsError(script_name_name)) { |
| 199 return script_name_name; | 199 return script_name_name; |
| 200 } | 200 } |
| 201 Dart_Handle set_script_name = | 201 Dart_Handle set_script_name = |
| 202 Dart_SetStaticField(runtime_options_class, script_name_name, dart_script); | 202 Dart_SetField(runtime_options_class, script_name_name, dart_script); |
| 203 if (Dart_IsError(set_script_name)) { | 203 if (Dart_IsError(set_script_name)) { |
| 204 return set_script_name; | 204 return set_script_name; |
| 205 } | 205 } |
| 206 Dart_Handle native_name = Dart_NewString("_nativeArguments"); | 206 Dart_Handle native_name = Dart_NewString("_nativeArguments"); |
| 207 if (Dart_IsError(native_name)) { | 207 if (Dart_IsError(native_name)) { |
| 208 return native_name; | 208 return native_name; |
| 209 } | 209 } |
| 210 | 210 |
| 211 return Dart_SetStaticField(runtime_options_class, | 211 return Dart_SetField(runtime_options_class, native_name, dart_arguments); |
| 212 native_name, | |
| 213 dart_arguments); | |
| 214 } | 212 } |
| 215 | 213 |
| 216 | 214 |
| 217 static void DumpPprofSymbolInfo() { | 215 static void DumpPprofSymbolInfo() { |
| 218 if (generate_pprof_symbols_filename != NULL) { | 216 if (generate_pprof_symbols_filename != NULL) { |
| 219 Dart_EnterScope(); | 217 Dart_EnterScope(); |
| 220 File* pprof_file = | 218 File* pprof_file = |
| 221 File::Open(generate_pprof_symbols_filename, File::kWriteTruncate); | 219 File::Open(generate_pprof_symbols_filename, File::kWriteTruncate); |
| 222 ASSERT(pprof_file != NULL); | 220 ASSERT(pprof_file != NULL); |
| 223 void* buffer; | 221 void* buffer; |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 EventHandler::Terminate(); | 601 EventHandler::Terminate(); |
| 604 // Terminate process exit-code handler. | 602 // Terminate process exit-code handler. |
| 605 Process::TerminateExitCodeHandler(); | 603 Process::TerminateExitCodeHandler(); |
| 606 | 604 |
| 607 free(const_cast<char*>(original_script_name)); | 605 free(const_cast<char*>(original_script_name)); |
| 608 free(const_cast<char*>(original_working_directory)); | 606 free(const_cast<char*>(original_working_directory)); |
| 609 free(const_cast<char*>(original_script_url)); | 607 free(const_cast<char*>(original_script_url)); |
| 610 | 608 |
| 611 return 0; | 609 return 0; |
| 612 } | 610 } |
| OLD | NEW |