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/vmservice_impl.h" | 5 #include "bin/vmservice_impl.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 | 8 |
9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 #define SHUTDOWN_ON_ERROR(handle) \ | 25 #define SHUTDOWN_ON_ERROR(handle) \ |
26 if (Dart_IsError(handle)) { \ | 26 if (Dart_IsError(handle)) { \ |
27 error_msg_ = strdup(Dart_GetError(handle)); \ | 27 error_msg_ = strdup(Dart_GetError(handle)); \ |
28 Dart_ExitScope(); \ | 28 Dart_ExitScope(); \ |
29 Dart_ShutdownIsolate(); \ | 29 Dart_ShutdownIsolate(); \ |
30 return false; \ | 30 return false; \ |
31 } | 31 } |
32 | 32 |
33 #define kLibrarySourceNamePrefix "/vmservice" | 33 #define kLibrarySourceNamePrefix "/vmservice" |
34 static const char* kVMServiceIOLibraryUri = "dart:vmservice_io"; | 34 static const char* const kVMServiceIOLibraryUri = "dart:vmservice_io"; |
35 static const char* kVMServiceIOLibraryScriptResourceName = "vmservice_io.dart"; | 35 static const char* const kVMServiceIOLibraryScriptResourceName = |
| 36 "vmservice_io.dart"; |
36 | 37 |
37 struct ResourcesEntry { | 38 struct ResourcesEntry { |
38 const char* path_; | 39 const char* path_; |
39 const char* resource_; | 40 const char* resource_; |
40 int length_; | 41 int length_; |
41 }; | 42 }; |
42 | 43 |
43 extern ResourcesEntry __service_bin_resources_[]; | 44 extern ResourcesEntry __service_bin_resources_[]; |
44 | 45 |
45 class Resources { | 46 class Resources { |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 Dart_Handle source = GetSource(url_string); | 416 Dart_Handle source = GetSource(url_string); |
416 if (Dart_IsError(source)) { | 417 if (Dart_IsError(source)) { |
417 return source; | 418 return source; |
418 } | 419 } |
419 return Dart_LoadSource(library, url, source, 0, 0); | 420 return Dart_LoadSource(library, url, source, 0, 0); |
420 } | 421 } |
421 | 422 |
422 | 423 |
423 } // namespace bin | 424 } // namespace bin |
424 } // namespace dart | 425 } // namespace dart |
OLD | NEW |