Chromium Code Reviews| 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 #include "include/dart_debugger_api.h" | 6 #include "include/dart_debugger_api.h" |
| 7 #include "vm/dart_api_impl.h" | 7 #include "vm/dart_api_impl.h" |
| 8 #include "vm/bootstrap_natives.h" | 8 #include "vm/bootstrap_natives.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/exceptions.h" | 10 #include "vm/exceptions.h" |
| (...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1272 | 1272 |
| 1273 Dart_Handle wrapped_result = CreateInstanceMirror(result); | 1273 Dart_Handle wrapped_result = CreateInstanceMirror(result); |
| 1274 if (Dart_IsError(wrapped_result)) { | 1274 if (Dart_IsError(wrapped_result)) { |
| 1275 Dart_PropagateError(wrapped_result); | 1275 Dart_PropagateError(wrapped_result); |
| 1276 } | 1276 } |
| 1277 Dart_SetReturnValue(args, wrapped_result); | 1277 Dart_SetReturnValue(args, wrapped_result); |
| 1278 Dart_ExitScope(); | 1278 Dart_ExitScope(); |
| 1279 } | 1279 } |
| 1280 | 1280 |
| 1281 | 1281 |
| 1282 void NATIVE_ENTRY_FUNCTION(LocalMirrorImpl_metadata)( | |
| 1283 Dart_NativeArguments args) { | |
| 1284 Dart_EnterScope(); | |
| 1285 Dart_Handle mirror = Dart_GetNativeArgument(args, 0); | |
| 1286 | |
| 1287 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
| |
| 1288 Dart_Handle result = Dart_GetMetadata(reflectee); | |
| 1289 if (Dart_IsError(result)) { | |
| 1290 Dart_PropagateError(result); | |
| 1291 } | |
| 1292 ASSERT(Dart_IsList(result)); | |
| 1293 Dart_SetReturnValue(args, result); | |
| 1294 Dart_ExitScope(); | |
| 1295 } | |
| 1296 | |
| 1282 void HandleMirrorsMessage(Isolate* isolate, | 1297 void HandleMirrorsMessage(Isolate* isolate, |
| 1283 Dart_Port reply_port, | 1298 Dart_Port reply_port, |
| 1284 const Instance& message) { | 1299 const Instance& message) { |
| 1285 UNIMPLEMENTED(); | 1300 UNIMPLEMENTED(); |
| 1286 } | 1301 } |
| 1287 | 1302 |
| 1288 } // namespace dart | 1303 } // namespace dart |
| OLD | NEW |