| 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 "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 | 9 |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 static bool PostNull(Dart_Port port_id); | 134 static bool PostNull(Dart_Port port_id); |
| 135 static bool PostInt32(Dart_Port port_id, int32_t value); | 135 static bool PostInt32(Dart_Port port_id, int32_t value); |
| 136 | 136 |
| 137 static Dart_Handle GetDartClass(const char* library_url, | 137 static Dart_Handle GetDartClass(const char* library_url, |
| 138 const char* class_name); | 138 const char* class_name); |
| 139 // Create a new Dart OSError object with the current OS error. | 139 // Create a new Dart OSError object with the current OS error. |
| 140 static Dart_Handle NewDartOSError(); | 140 static Dart_Handle NewDartOSError(); |
| 141 // Create a new Dart OSError object with the provided OS error. | 141 // Create a new Dart OSError object with the provided OS error. |
| 142 static Dart_Handle NewDartOSError(OSError* os_error); | 142 static Dart_Handle NewDartOSError(OSError* os_error); |
| 143 static Dart_Handle NewDartSocketIOException(const char* message, | 143 static Dart_Handle NewDartSocketException(const char* message, |
| 144 Dart_Handle os_error); | 144 Dart_Handle os_error); |
| 145 static Dart_Handle NewDartExceptionWithMessage(const char* library_url, | 145 static Dart_Handle NewDartExceptionWithMessage(const char* library_url, |
| 146 const char* exception_name, | 146 const char* exception_name, |
| 147 const char* message); | 147 const char* message); |
| 148 static Dart_Handle NewDartArgumentError(const char* message); | 148 static Dart_Handle NewDartArgumentError(const char* message); |
| 149 | 149 |
| 150 // Create a new Dart String object from a C String. | 150 // Create a new Dart String object from a C String. |
| 151 static Dart_Handle NewString(const char* str) { | 151 static Dart_Handle NewString(const char* str) { |
| 152 ASSERT(str != NULL); | 152 ASSERT(str != NULL); |
| 153 return Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str), | 153 return Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str), |
| 154 strlen(str)); | 154 strlen(str)); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 } | 507 } |
| 508 | 508 |
| 509 private: | 509 private: |
| 510 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); | 510 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); |
| 511 }; | 511 }; |
| 512 | 512 |
| 513 } // namespace bin | 513 } // namespace bin |
| 514 } // namespace dart | 514 } // namespace dart |
| 515 | 515 |
| 516 #endif // BIN_DARTUTILS_H_ | 516 #endif // BIN_DARTUTILS_H_ |
| OLD | NEW |