| 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 <string.h> | 5 #include <string.h> |
| 6 | 6 |
| 7 #include "../include/dart_api.h" | 7 #include "../include/dart_api.h" |
| 8 | 8 |
| 9 #define EXPORT_SYMBOL __attribute__ ((visibility ("default"))) | 9 #define EXPORT_SYMBOL __attribute__ ((visibility ("default"))) |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 Dart_SetReturnValue(arguments, object); | 25 Dart_SetReturnValue(arguments, object); |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| 29 extern "C" Dart_NativeFunction ResolveName(Dart_Handle name, int argc) { | 29 extern "C" Dart_NativeFunction ResolveName(Dart_Handle name, int argc) { |
| 30 assert(Dart_IsString8(name)); | 30 assert(Dart_IsString8(name)); |
| 31 const char* cname; | 31 const char* cname; |
| 32 Dart_Handle check_error; | 32 Dart_Handle check_error; |
| 33 | 33 |
| 34 check_error = Dart_StringToCString(name, &cname); | 34 check_error = Dart_StringToCString(name, &cname); |
| 35 if (Dart_IsError(check_error)) return NULL; | 35 if (Dart_IsError(check_error)) { |
| 36 Dart_PropateError(check_error); |
| 37 } |
| 36 if (!strcmp("Cat_IfNull", cname) && argc == 2) { | 38 if (!strcmp("Cat_IfNull", cname) && argc == 2) { |
| 37 return IfNull; | 39 return IfNull; |
| 38 } | 40 } |
| 39 return NULL; | 41 return NULL; |
| 40 } | 42 } |
| OLD | NEW |