| 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 #ifndef BIN_DARTUTILS_H_ | 5 #ifndef BIN_DARTUTILS_H_ |
| 6 #define BIN_DARTUTILS_H_ | 6 #define BIN_DARTUTILS_H_ |
| 7 | 7 |
| 8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
| 9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
| 10 #include "include/dart_api.h" | 10 #include "include/dart_api.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 Dart_Handle library, | 98 Dart_Handle library, |
| 99 Dart_Handle url, | 99 Dart_Handle url, |
| 100 Dart_LibraryTag tag, | 100 Dart_LibraryTag tag, |
| 101 const char* filename); | 101 const char* filename); |
| 102 static Dart_Handle PrepareForScriptLoading(const char* package_root, | 102 static Dart_Handle PrepareForScriptLoading(const char* package_root, |
| 103 Dart_Handle builtin_lib); | 103 Dart_Handle builtin_lib); |
| 104 | 104 |
| 105 static bool PostNull(Dart_Port port_id); | 105 static bool PostNull(Dart_Port port_id); |
| 106 static bool PostInt32(Dart_Port port_id, int32_t value); | 106 static bool PostInt32(Dart_Port port_id, int32_t value); |
| 107 | 107 |
| 108 static Dart_Handle GetDartClass(const char* library_url, |
| 109 const char* class_name); |
| 108 // Create a new Dart OSError object with the current OS error. | 110 // Create a new Dart OSError object with the current OS error. |
| 109 static Dart_Handle NewDartOSError(); | 111 static Dart_Handle NewDartOSError(); |
| 110 // Create a new Dart OSError object with the provided OS error. | 112 // Create a new Dart OSError object with the provided OS error. |
| 111 static Dart_Handle NewDartOSError(OSError* os_error); | 113 static Dart_Handle NewDartOSError(OSError* os_error); |
| 114 static Dart_Handle NewDartExceptionWithMessage(const char* library_url, |
| 115 const char* exception_name, |
| 116 const char* message); |
| 117 static Dart_Handle NewDartArgumentError(const char* message); |
| 112 | 118 |
| 113 static void SetOriginalWorkingDirectory(); | 119 static void SetOriginalWorkingDirectory(); |
| 114 | 120 |
| 115 // Global state that stores the original working directory.. | 121 // Global state that stores the original working directory.. |
| 116 static const char* original_working_directory; | 122 static const char* original_working_directory; |
| 117 | 123 |
| 118 static const char* kDartScheme; | 124 static const char* kDartScheme; |
| 119 static const char* kDartExtensionScheme; | 125 static const char* kDartExtensionScheme; |
| 120 static const char* kBuiltinLibURL; | 126 static const char* kBuiltinLibURL; |
| 121 static const char* kCoreLibURL; | 127 static const char* kCoreLibURL; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 void* Peer() const { return cobject_->value.as_external_byte_array.peer; } | 369 void* Peer() const { return cobject_->value.as_external_byte_array.peer; } |
| 364 Dart_PeerFinalizer Callback() const { | 370 Dart_PeerFinalizer Callback() const { |
| 365 return cobject_->value.as_external_byte_array.callback; | 371 return cobject_->value.as_external_byte_array.callback; |
| 366 } | 372 } |
| 367 | 373 |
| 368 private: | 374 private: |
| 369 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); | 375 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); |
| 370 }; | 376 }; |
| 371 | 377 |
| 372 #endif // BIN_DARTUTILS_H_ | 378 #endif // BIN_DARTUTILS_H_ |
| OLD | NEW |