Skip to content

Commit 9573154

Browse files
jensjohaCommit Bot
authored andcommitted
[observatory] Fix/workaround a few crashes
TEST=N/A Change-Id: I992acd131cee6473827d3a4306c37678cbe55d2b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229966 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com>
1 parent 9848aa4 commit 9573154

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

runtime/observatory/lib/src/elements/debugger.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2545,7 +2545,7 @@ class DebuggerFrameElement extends CustomElement implements Renderable {
25452545
if (_expanded) {
25462546
final homeMethod = _frame.function!.homeMethod;
25472547
String? homeMethodName;
2548-
if ((homeMethod.dartOwner is S.Class) && homeMethod.isStatic!) {
2548+
if ((homeMethod.dartOwner is S.Class) && homeMethod.isStatic == true) {
25492549
homeMethodName = '<class>';
25502550
} else if (homeMethod.dartOwner is S.Library) {
25512551
homeMethodName = '<library>';

runtime/observatory/lib/src/service/object.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3098,7 +3098,11 @@ class Context extends HeapObject implements M.Context {
30983098
} else {
30993099
var localVariables = <ContextElement>[];
31003100
for (var element in map['variables']) {
3101-
localVariables.add(new ContextElement(element));
3101+
try {
3102+
localVariables.add(new ContextElement(element));
3103+
} catch (e) {
3104+
// Swallowing '$e' to still show stuff...
3105+
}
31023106
}
31033107
variables = localVariables;
31043108
}

0 commit comments

Comments
 (0)