File tree Expand file tree Collapse file tree 7 files changed +15
-21
lines changed
fixtures/_test/example/scopes Expand file tree Collapse file tree 7 files changed +15
-21
lines changed Original file line number Diff line number Diff line change 1
1
## 23.3.0-wip
2
2
3
+ - Filter out internal type properties from the new DDC type system. - [ #2348 ] ( https://github.com/dart-lang/webdev/pull/2348 )
4
+
3
5
## 23.2.0
4
6
5
7
- Send untruncated ` dart:developer ` logs to debugging clients. - [ #2333 ] ( https://github.com/dart-lang/webdev/pull/2333 )
Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ final ddcTemporaryTypeVariableRegExp = RegExp(r'^__t[\$\w*]+$');
20
20
final previousDdcTemporaryVariableRegExp =
21
21
RegExp (r'^(t[0-9]+\$?[0-9]*|__t[\$\w*]+)$' );
22
22
23
- /// Find the visible Dart properties from a JS Scope Chain, coming from the
23
+ /// Find the visible Dart variables from a JS Scope Chain, coming from the
24
24
/// scopeChain attribute of a Chrome CallFrame corresponding to [frame] .
25
25
///
26
26
/// See chromedevtools.github.io/devtools-protocol/tot/Debugger#type-CallFrame.
27
- Future <List <Property >> visibleProperties ({
27
+ Future <List <Property >> visibleVariables ({
28
28
required AppInspectorInterface inspector,
29
29
required WipCallFrame frame,
30
30
}) async {
Original file line number Diff line number Diff line change @@ -405,7 +405,7 @@ class Debugger extends Domain {
405
405
Future <List <BoundVariable >> variablesFor (WipCallFrame frame) async {
406
406
// TODO(alanknight): Can these be moved to dart_scope.dart?
407
407
final properties =
408
- await visibleProperties (inspector: inspector, frame: frame);
408
+ await visibleVariables (inspector: inspector, frame: frame);
409
409
final boundVariables = await Future .wait (
410
410
properties.map (_boundVariable),
411
411
);
Original file line number Diff line number Diff line change @@ -601,9 +601,18 @@ class AppInspector implements AppInspectorInterface {
601
601
);
602
602
return jsProperties
603
603
.map <Property >((each) => Property (each as Map <String , dynamic >))
604
+ .where (_isVisibleProperty)
604
605
.toList ();
605
606
}
606
607
608
+ bool _isVisibleProperty (Property property) {
609
+ // Filter out any RTI objects from the new DDC type system. See:
610
+ // https://github.com/dart-lang/webdev/issues/2316
611
+ final isRtiObject =
612
+ property.value? .className? .startsWith ('dart_rti.Rti' ) ?? false ;
613
+ return ! isRtiObject;
614
+ }
615
+
607
616
/// Calculate the number of available elements in the range.
608
617
static int _calculateRangeCount ({
609
618
int ? count,
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import 'package:dwds/src/debugging/inspector.dart';
11
11
import 'package:dwds/src/utilities/conversions.dart' ;
12
12
import 'package:test/test.dart' ;
13
13
import 'package:test_common/test_sdk_configuration.dart' ;
14
- import 'package:test_common/utilities.dart' ;
15
14
import 'package:vm_service/vm_service.dart' ;
16
15
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart' ;
17
16
@@ -161,10 +160,6 @@ void main() {
161
160
final names =
162
161
properties.map ((p) => p.name).where ((x) => x != '__proto__' ).toList ();
163
162
final expected = [
164
- if (dartSdkIsAtLeast (
165
- newDdcTypeSystemVersion,
166
- ))
167
- '\$ ti' ,
168
163
'_privateField' ,
169
164
'abstractField' ,
170
165
'closure' ,
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import 'package:dwds/src/services/chrome_proxy_service.dart';
9
9
import 'package:test/test.dart' ;
10
10
import 'package:test_common/logging.dart' ;
11
11
import 'package:test_common/test_sdk_configuration.dart' ;
12
- import 'package:test_common/utilities.dart' ;
13
12
import 'package:vm_service/vm_service.dart' ;
14
13
15
14
import 'fixtures/context.dart' ;
@@ -208,12 +207,6 @@ void main() {
208
207
expect (
209
208
variableNames,
210
209
[
211
- // TODO(https://github.com/dart-lang/webdev/issues/2316): Make sure T
212
- // doesn't show up here.
213
- if (dartSdkIsAtLeast (
214
- newDdcTypeSystemVersion,
215
- ))
216
- 'T' ,
217
210
'closureLocalInsideMethod' ,
218
211
'local' ,
219
212
'parameter' ,
@@ -229,12 +222,6 @@ void main() {
229
222
230
223
final variableNames = variables.keys.toList ()..sort ();
231
224
expect (variableNames, [
232
- // TODO(https://github.com/dart-lang/webdev/issues/2316): Make sure T
233
- // doesn't show up here.
234
- if (dartSdkIsAtLeast (
235
- newDdcTypeSystemVersion,
236
- ))
237
- 'T' ,
238
225
'this' ,
239
226
]);
240
227
});
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ class MyTestClass<T> extends MyAbstractClass {
93
93
String hello () => message;
94
94
95
95
String Function (String ) methodWithVariables () {
96
+ print ('Test class is of type $T ' );
96
97
var local = '$message + something' ;
97
98
print (local);
98
99
return (String parameter) {
You can’t perform that action at this time.
0 commit comments