Chromium Code Reviews| Index: runtime/vm/debugger.cc |
| =================================================================== |
| --- runtime/vm/debugger.cc (revision 6239) |
| +++ runtime/vm/debugger.cc (working copy) |
| @@ -737,9 +737,23 @@ |
| RawObject* Debugger::GetStaticField(const Class& cls, |
| const String& field_name) { |
| + const Field& fld = Field::Handle(cls.LookupStaticField(field_name)); |
| + if (!fld.IsNull()) { |
| + // Return the value in the field if it has been initialized already. |
| + const Instance& value = Instance::Handle(fld.value()); |
| + ASSERT(value.raw() != Object::transition_sentinel()); |
| + if (value.raw() != Object::sentinel()) { |
| + return value.raw(); |
| + } |
| + } |
| + // There is no field or the field has not been initialized yet. |
| + // We must have a getter. Run the getter. |
| const Function& getter_func = |
| Function::Handle(cls.LookupGetterFunction(field_name)); |
| ASSERT(!getter_func.IsNull()); |
| + if (getter_func.IsNull()) { |
|
regis
2012/04/05 22:33:05
This contradicts the assert above. Left over debug
hausner
2012/04/05 22:45:30
I did this on purpose. Maybe it's not good style.
regis
2012/04/05 23:03:07
Don't you want to know that something is fishy in
|
| + return Object::null(); |
| + } |
| Object& result = Object::Handle(); |
| LongJump* base = isolate_->long_jump_base(); |