OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "bin/dartutils.h" | 5 #include "bin/dartutils.h" |
6 #include "bin/dbg_connection.h" | 6 #include "bin/dbg_connection.h" |
7 #include "bin/eventhandler.h" | 7 #include "bin/eventhandler.h" |
8 #include "bin/io_buffer.h" | 8 #include "bin/io_buffer.h" |
9 #include "bin/log.h" | 9 #include "bin/log.h" |
10 #include "bin/platform.h" | 10 #include "bin/platform.h" |
11 #include "bin/process.h" | 11 #include "bin/process.h" |
12 #include "bin/socket.h" | 12 #include "bin/socket.h" |
13 #include "bin/utils.h" | 13 #include "bin/utils.h" |
14 | 14 |
15 #include "include/dart_api.h" | 15 #include "include/dart_api.h" |
16 | 16 |
17 namespace dart { | 17 namespace dart { |
18 namespace bin { | 18 namespace bin { |
19 | 19 |
20 // Global flag that is used to indicate that the VM should do a clean | 20 // Global flag that is used to indicate that the VM should do a clean |
21 // shutdown. | 21 // shutdown. |
22 bool do_vm_shutdown = true; | 22 bool do_vm_shutdown = false; |
23 | 23 |
24 static const int kProcessIdNativeField = 0; | 24 static const int kProcessIdNativeField = 0; |
25 | 25 |
26 int Process::global_exit_code_ = 0; | 26 int Process::global_exit_code_ = 0; |
27 Mutex* Process::global_exit_code_mutex_ = new Mutex(); | 27 Mutex* Process::global_exit_code_mutex_ = new Mutex(); |
28 | 28 |
29 // Extract an array of C strings from a list of Dart strings. | 29 // Extract an array of C strings from a list of Dart strings. |
30 static char** ExtractCStringList(Dart_Handle strings, | 30 static char** ExtractCStringList(Dart_Handle strings, |
31 Dart_Handle status_handle, | 31 Dart_Handle status_handle, |
32 const char* error_msg, | 32 const char* error_msg, |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 free(const_cast<char*>(system_string)); | 383 free(const_cast<char*>(system_string)); |
384 Dart_PropagateError(result); | 384 Dart_PropagateError(result); |
385 } | 385 } |
386 memmove(buffer, system_string, system_len); | 386 memmove(buffer, system_string, system_len); |
387 free(const_cast<char*>(system_string)); | 387 free(const_cast<char*>(system_string)); |
388 Dart_SetReturnValue(args, external_array); | 388 Dart_SetReturnValue(args, external_array); |
389 } | 389 } |
390 | 390 |
391 } // namespace bin | 391 } // namespace bin |
392 } // namespace dart | 392 } // namespace dart |
OLD | NEW |