Chromium Code Reviews| Index: runtime/lib/mirrors.cc |
| =================================================================== |
| --- runtime/lib/mirrors.cc (revision 23823) |
| +++ runtime/lib/mirrors.cc (working copy) |
| @@ -1279,6 +1279,21 @@ |
| } |
| +void NATIVE_ENTRY_FUNCTION(LocalMirrorImpl_metadata)( |
| + Dart_NativeArguments args) { |
| + Dart_EnterScope(); |
| + Dart_Handle mirror = Dart_GetNativeArgument(args, 0); |
| + |
| + Dart_Handle reflectee = UnwrapMirror(mirror); |
|
ahe
2013/06/11 08:48:10
What happens if mirror is not a mirror?
gbracha
2013/06/12 21:21:18
The first argument is the receiver. The only way y
|
| + Dart_Handle result = Dart_GetMetadata(reflectee); |
| + if (Dart_IsError(result)) { |
| + Dart_PropagateError(result); |
| + } |
| + ASSERT(Dart_IsList(result)); |
| + Dart_SetReturnValue(args, result); |
| + Dart_ExitScope(); |
| +} |
| + |
| void HandleMirrorsMessage(Isolate* isolate, |
| Dart_Port reply_port, |
| const Instance& message) { |