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" | |
8 #include "include/dart_tools_api.h" | |
9 #include "include/dart_native_api.h" | |
10 | |
11 #include "platform/assert.h" | |
12 #include "platform/globals.h" | |
13 | |
14 #include "bin/crypto.h" | 7 #include "bin/crypto.h" |
15 #include "bin/directory.h" | 8 #include "bin/directory.h" |
16 #include "bin/extensions.h" | 9 #include "bin/extensions.h" |
17 #include "bin/file.h" | 10 #include "bin/file.h" |
18 #include "bin/io_buffer.h" | 11 #include "bin/io_buffer.h" |
19 #include "bin/platform.h" | 12 #include "bin/platform.h" |
20 #include "bin/socket.h" | |
21 #include "bin/utils.h" | 13 #include "bin/utils.h" |
22 | 14 |
| 15 #include "include/dart_api.h" |
| 16 #include "include/dart_native_api.h" |
| 17 #include "include/dart_tools_api.h" |
| 18 |
| 19 #include "platform/assert.h" |
| 20 #include "platform/globals.h" |
| 21 |
23 // Return the error from the containing function if handle is in error handle. | 22 // Return the error from the containing function if handle is in error handle. |
24 #define RETURN_IF_ERROR(handle) \ | 23 #define RETURN_IF_ERROR(handle) \ |
25 { \ | 24 { \ |
26 Dart_Handle __handle = handle; \ | 25 Dart_Handle __handle = handle; \ |
27 if (Dart_IsError((__handle))) { \ | 26 if (Dart_IsError((__handle))) { \ |
28 return __handle; \ | 27 return __handle; \ |
29 } \ | 28 } \ |
30 } | 29 } |
31 | 30 |
32 namespace dart { | 31 namespace dart { |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 new CObjectString(CObject::NewString(os_error->message())); | 1259 new CObjectString(CObject::NewString(os_error->message())); |
1261 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); | 1260 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); |
1262 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); | 1261 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); |
1263 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); | 1262 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); |
1264 result->SetAt(2, error_message); | 1263 result->SetAt(2, error_message); |
1265 return result; | 1264 return result; |
1266 } | 1265 } |
1267 | 1266 |
1268 } // namespace bin | 1267 } // namespace bin |
1269 } // namespace dart | 1268 } // namespace dart |
OLD | NEW |