Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Unified Diff: runtime/vm/debugger.cc

Issue 1854243002: VM: Evaluate-in-frame should happen in the scope of the method class, not the receiver class. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index b30a33142820226ed76e0c6c3a60d554a9c90760..66ae53aceb16b150d4c6857ec9f9173da0b91b40 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -1071,12 +1071,14 @@ RawObject* ActivationFrame::Evaluate(const String& expr) {
Array::Handle(Array::MakeArray(param_values)));
} else {
const Object& receiver = Object::Handle(GetReceiver());
+ const Class& method_cls = Class::Handle(function().Owner());
hausner 2016/04/04 19:52:32 I think this should be the method's origin(), not
rmacnak 2016/04/04 22:07:26 Good catch.
ASSERT(receiver.IsInstance() || receiver.IsNull());
if (!(receiver.IsInstance() || receiver.IsNull())) {
return Object::null();
}
const Instance& inst = Instance::Cast(receiver);
- return inst.Evaluate(expr,
+ return inst.Evaluate(method_cls,
+ expr,
Array::Handle(Array::MakeArray(param_names)),
Array::Handle(Array::MakeArray(param_values)));
}

Powered by Google App Engine
This is Rietveld 408576698