fix: Context parse error, parent should be ContextRef

Bug: https://github.com/dart-lang/sdk/issues/45083
TEST=N/A
Change-Id: I1781c83ac2e8868f1d6a49fc4a01edd3e3eef460
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192880
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
Ben Konyi
2021-05-11 17:59:54 +00:00
committed by commit-bot@chromium.org
parent b99466d472
commit 33aa207efd
4 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# Changelog
## 6.3.0-dev
## 7.0.0
- *breaking bug fix*: Fixed issue where response parsing could fail for `Context`.
- Add support for `setBreakpointState` RPC and updated `Breakpoint` class to include
`enabled` property.
+3 -2
View File
@@ -3318,7 +3318,7 @@ class Context extends Obj implements ContextRef {
/// The enclosing context for this context.
@optional
Context? parent;
ContextRef? parent;
/// The variables in this context object.
List<ContextElement>? variables;
@@ -3334,7 +3334,8 @@ class Context extends Obj implements ContextRef {
Context._fromJson(Map<String, dynamic> json) : super._fromJson(json) {
length = json['length'] ?? -1;
parent = createServiceObject(json['parent'], const ['Context']) as Context?;
parent = createServiceObject(json['parent'], const ['ContextRef'])
as ContextRef?;
variables = List<ContextElement>.from(
createServiceObject(json['variables'], const ['ContextElement'])
as List? ??
+1 -1
View File
@@ -3,7 +3,7 @@ description: >-
A library to communicate with a service implementing the Dart VM
service protocol.
version: 6.3.0-dev
version: 7.0.0
homepage: https://github.com/dart-lang/sdk/tree/master/pkg/vm_service
+1 -1
View File
@@ -1832,7 +1832,7 @@ class Context extends Object {
int length;
// The enclosing context for this context.
Context parent [optional];
@Context parent [optional];
// The variables in this context object.
ContextElement[] variables;