Chromium Code Reviews| Index: runtime/vm/debugger_api_impl.cc |
| diff --git a/runtime/vm/debugger_api_impl.cc b/runtime/vm/debugger_api_impl.cc |
| index 65eedb662e82f845398c9f7b57d6849eef1865a1..eb88de83131174a6aea069cebab35a3f64f7ecf7 100644 |
| --- a/runtime/vm/debugger_api_impl.cc |
| +++ b/runtime/vm/debugger_api_impl.cc |
| @@ -460,14 +460,9 @@ DART_EXPORT Dart_Handle Dart_GetStaticFields(Dart_Handle target) { |
| Isolate* isolate = Isolate::Current(); |
| DARTSCOPE(isolate); |
| const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(target)); |
|
siva
2013/09/19 03:16:58
Ditto comment about using
const Type& type_obj = A
|
| - // For backwards compatibility we allow class objects to be passed in |
| - // for now. This needs to be removed once all code that uses class |
| - // objects is removed. |
| Class& cls = Class::Handle(); |
| if (obj.IsType()) { |
| cls = Type::Cast(obj).type_class(); |
| - } else if (obj.IsClass()) { |
| - cls = Class::Cast(obj).raw(); |
| } else { |
| return Api::NewError("%s expects argument 'target' to be a type", |
| CURRENT_FUNC); |
| @@ -514,10 +509,11 @@ DART_EXPORT Dart_Handle Dart_EvaluateExpr(Dart_Handle target_in, |
| CURRENT_FUNC); |
| } |
| UNWRAP_AND_CHECK_PARAM(String, expr, expr_in); |
| - if (target.IsInstance()) { |
| + if (target.IsType()) { |
| + const Class& cls = Class::Handle(isolate, Type::Cast(target).type_class()); |
| + return Api::NewHandle(isolate, cls.Evaluate(expr)); |
| + } else if (target.IsInstance()) { |
| return Api::NewHandle(isolate, Instance::Cast(target).Evaluate(expr)); |
| - } else if (target.IsClass()) { |
| - return Api::NewHandle(isolate, Class::Cast(target).Evaluate(expr)); |
| } else if (target.IsLibrary()) { |
| return Api::NewHandle(isolate, Library::Cast(target).Evaluate(expr)); |
| } |
| @@ -529,7 +525,7 @@ DART_EXPORT Dart_Handle Dart_GetObjClass(Dart_Handle object_in) { |
| Isolate* isolate = Isolate::Current(); |
| DARTSCOPE(isolate); |
| UNWRAP_AND_CHECK_PARAM(Instance, obj, object_in); |
| - return Api::NewHandle(isolate, obj.clazz()); |
| + return Api::NewHandle(isolate, obj.GetType()); |
| } |
| @@ -555,14 +551,6 @@ DART_EXPORT Dart_Handle Dart_GetClassFromId(intptr_t class_id) { |
| } |
| -DART_EXPORT Dart_Handle Dart_GetSuperclass(Dart_Handle cls_in) { |
| - Isolate* isolate = Isolate::Current(); |
| - DARTSCOPE(isolate); |
| - UNWRAP_AND_CHECK_PARAM(Class, cls, cls_in); |
| - return Api::NewHandle(isolate, cls.SuperClass()); |
| -} |
| - |
| - |
| DART_EXPORT Dart_Handle Dart_GetSupertype(Dart_Handle type_in) { |
| Isolate* isolate = Isolate::Current(); |
| DARTSCOPE(isolate); |