| 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" | |
| 9 #include "bin/utils.h" | |
| 10 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 |
| 10 #include "platform/assert.h" |
| 11 #include "platform/globals.h" | 11 #include "platform/globals.h" |
| 12 | 12 |
| 13 namespace dart { | 13 namespace dart { |
| 14 namespace bin { | 14 namespace bin { |
| 15 | 15 |
| 16 // Forward declarations. | 16 // Forward declarations. |
| 17 class File; | 17 class File; |
| 18 class OSError; |
| 18 | 19 |
| 19 /* Handles error handles returned from Dart API functions. If a value | 20 /* Handles error handles returned from Dart API functions. If a value |
| 20 * is an error, uses Dart_PropagateError to throw it to the enclosing | 21 * is an error, uses Dart_PropagateError to throw it to the enclosing |
| 21 * Dart activation. Otherwise, returns the original handle. | 22 * Dart activation. Otherwise, returns the original handle. |
| 22 * | 23 * |
| 23 * This function can be used to wrap most API functions, but API | 24 * This function can be used to wrap most API functions, but API |
| 24 * functions can also be nested without this error check, since all | 25 * functions can also be nested without this error check, since all |
| 25 * API functions return any error handles passed in as arguments, unchanged. | 26 * API functions return any error handles passed in as arguments, unchanged. |
| 26 */ | 27 */ |
| 27 static inline Dart_Handle ThrowIfError(Dart_Handle handle) { | 28 static inline Dart_Handle ThrowIfError(Dart_Handle handle) { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 static const char* original_working_directory; | 184 static const char* original_working_directory; |
| 184 | 185 |
| 185 static const char* kDartScheme; | 186 static const char* kDartScheme; |
| 186 static const char* kDartExtensionScheme; | 187 static const char* kDartExtensionScheme; |
| 187 static const char* kAsyncLibURL; | 188 static const char* kAsyncLibURL; |
| 188 static const char* kBuiltinLibURL; | 189 static const char* kBuiltinLibURL; |
| 189 static const char* kCoreLibURL; | 190 static const char* kCoreLibURL; |
| 190 static const char* kIOLibURL; | 191 static const char* kIOLibURL; |
| 191 static const char* kIOLibPatchURL; | 192 static const char* kIOLibPatchURL; |
| 192 static const char* kUriLibURL; | 193 static const char* kUriLibURL; |
| 193 static const char* kUtfLibURL; | |
| 194 static const char* kIsolateLibURL; | |
| 195 static const char* kScalarlistLibURL; | |
| 196 static const char* kWebLibURL; | |
| 197 | 194 |
| 198 static const char* kIdFieldName; | 195 static const char* kIdFieldName; |
| 199 | 196 |
| 200 static uint8_t magic_number[]; | 197 static uint8_t magic_number[]; |
| 201 | 198 |
| 202 private: | 199 private: |
| 203 static const char* GetCanonicalPath(const char* reference_dir, | 200 static const char* GetCanonicalPath(const char* reference_dir, |
| 204 const char* filename); | 201 const char* filename); |
| 205 | 202 |
| 206 DISALLOW_ALLOCATION(); | 203 DISALLOW_ALLOCATION(); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 } | 495 } |
| 499 | 496 |
| 500 private: | 497 private: |
| 501 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); | 498 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); |
| 502 }; | 499 }; |
| 503 | 500 |
| 504 } // namespace bin | 501 } // namespace bin |
| 505 } // namespace dart | 502 } // namespace dart |
| 506 | 503 |
| 507 #endif // BIN_DARTUTILS_H_ | 504 #endif // BIN_DARTUTILS_H_ |
| OLD | NEW |