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

Unified Diff: runtime/vm/debugger.cc

Issue 2291293003: Fix evaluating in async/sync*/async* methods. (Closed)
Patch Set: Created 4 years, 4 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
« no previous file with comments | « runtime/observatory/tests/service/evaluate_in_sync_star_activation_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 155512ad4fd4b1c7e5e849f3baa3cfaaa4033002..e485255ff6b6c4f6110c74b2f97e335ab8438946 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -972,7 +972,12 @@ RawObject* ActivationFrame::GetReceiver() {
}
-bool IsPrivateVariableName(const String& var_name) {
+static bool IsSyntheticVariableName(const String& var_name) {
+ return (var_name.Length() >= 1) && (var_name.CharAt(0) == ':');
+}
+
+
+static bool IsPrivateVariableName(const String& var_name) {
return (var_name.Length() >= 1) && (var_name.CharAt(0) == '_');
}
@@ -989,7 +994,7 @@ RawObject* ActivationFrame::Evaluate(const String& expr) {
for (intptr_t i = 0; i < num_variables; i++) {
TokenPosition ignore;
VariableAt(i, &name, &ignore, &ignore, &value);
- if (!name.Equals(Symbols::This())) {
+ if (!name.Equals(Symbols::This()) && !IsSyntheticVariableName(name)) {
if (IsPrivateVariableName(name)) {
name = String::ScrubName(name);
}
« no previous file with comments | « runtime/observatory/tests/service/evaluate_in_sync_star_activation_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698