| 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 #include "bin/dartutils.h" | 5 #include "bin/dartutils.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 | 9 |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; | 28 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; |
| 29 const char* DartUtils::kCoreLibURL = "dart:core"; | 29 const char* DartUtils::kCoreLibURL = "dart:core"; |
| 30 const char* DartUtils::kInternalLibURL = "dart:_internal"; | 30 const char* DartUtils::kInternalLibURL = "dart:_internal"; |
| 31 const char* DartUtils::kIsolateLibURL = "dart:isolate"; | 31 const char* DartUtils::kIsolateLibURL = "dart:isolate"; |
| 32 const char* DartUtils::kIOLibURL = "dart:io"; | 32 const char* DartUtils::kIOLibURL = "dart:io"; |
| 33 const char* DartUtils::kIOLibPatchURL = "dart:io-patch"; | 33 const char* DartUtils::kIOLibPatchURL = "dart:io-patch"; |
| 34 const char* DartUtils::kUriLibURL = "dart:uri"; | 34 const char* DartUtils::kUriLibURL = "dart:uri"; |
| 35 const char* DartUtils::kHttpScheme = "http:"; | 35 const char* DartUtils::kHttpScheme = "http:"; |
| 36 const char* DartUtils::kVMServiceLibURL = "dart:vmservice"; | 36 const char* DartUtils::kVMServiceLibURL = "dart:vmservice"; |
| 37 | 37 |
| 38 const char* DartUtils::kIdFieldName = "_id"; | |
| 39 | |
| 40 uint8_t DartUtils::magic_number[] = { 0xf5, 0xf5, 0xdc, 0xdc }; | 38 uint8_t DartUtils::magic_number[] = { 0xf5, 0xf5, 0xdc, 0xdc }; |
| 41 | 39 |
| 42 static bool IsWindowsHost() { | 40 static bool IsWindowsHost() { |
| 43 #if defined(TARGET_OS_WINDOWS) | 41 #if defined(TARGET_OS_WINDOWS) |
| 44 return true; | 42 return true; |
| 45 #else // defined(TARGET_OS_WINDOWS) | 43 #else // defined(TARGET_OS_WINDOWS) |
| 46 return false; | 44 return false; |
| 47 #endif // defined(TARGET_OS_WINDOWS) | 45 #endif // defined(TARGET_OS_WINDOWS) |
| 48 } | 46 } |
| 49 | 47 |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 new CObjectString(CObject::NewString(os_error->message())); | 1118 new CObjectString(CObject::NewString(os_error->message())); |
| 1121 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); | 1119 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); |
| 1122 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); | 1120 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); |
| 1123 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); | 1121 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); |
| 1124 result->SetAt(2, error_message); | 1122 result->SetAt(2, error_message); |
| 1125 return result; | 1123 return result; |
| 1126 } | 1124 } |
| 1127 | 1125 |
| 1128 } // namespace bin | 1126 } // namespace bin |
| 1129 } // namespace dart | 1127 } // namespace dart |
| OLD | NEW |