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 11## 23.3.0-wip
22
3+ - Filter out internal type properties from the new DDC type system. - [ #2348 ] ( https://github.com/dart-lang/webdev/pull/2348 )
4+
35## 23.2.0
46
57- 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*]+$');
2020final previousDdcTemporaryVariableRegExp =
2121 RegExp (r'^(t[0-9]+\$?[0-9]*|__t[\$\w*]+)$' );
2222
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
2424/// scopeChain attribute of a Chrome CallFrame corresponding to [frame] .
2525///
2626/// See chromedevtools.github.io/devtools-protocol/tot/Debugger#type-CallFrame.
27- Future <List <Property >> visibleProperties ({
27+ Future <List <Property >> visibleVariables ({
2828 required AppInspectorInterface inspector,
2929 required WipCallFrame frame,
3030}) async {
Original file line number Diff line number Diff line change @@ -405,7 +405,7 @@ class Debugger extends Domain {
405405 Future <List <BoundVariable >> variablesFor (WipCallFrame frame) async {
406406 // TODO(alanknight): Can these be moved to dart_scope.dart?
407407 final properties =
408- await visibleProperties (inspector: inspector, frame: frame);
408+ await visibleVariables (inspector: inspector, frame: frame);
409409 final boundVariables = await Future .wait (
410410 properties.map (_boundVariable),
411411 );
Original file line number Diff line number Diff line change @@ -601,9 +601,18 @@ class AppInspector implements AppInspectorInterface {
601601 );
602602 return jsProperties
603603 .map <Property >((each) => Property (each as Map <String , dynamic >))
604+ .where (_isVisibleProperty)
604605 .toList ();
605606 }
606607
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+
607616 /// Calculate the number of available elements in the range.
608617 static int _calculateRangeCount ({
609618 int ? count,
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import 'package:dwds/src/debugging/inspector.dart';
1111import 'package:dwds/src/utilities/conversions.dart' ;
1212import 'package:test/test.dart' ;
1313import 'package:test_common/test_sdk_configuration.dart' ;
14- import 'package:test_common/utilities.dart' ;
1514import 'package:vm_service/vm_service.dart' ;
1615import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart' ;
1716
@@ -161,10 +160,6 @@ void main() {
161160 final names =
162161 properties.map ((p) => p.name).where ((x) => x != '__proto__' ).toList ();
163162 final expected = [
164- if (dartSdkIsAtLeast (
165- newDdcTypeSystemVersion,
166- ))
167- '\$ ti' ,
168163 '_privateField' ,
169164 'abstractField' ,
170165 'closure' ,
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import 'package:dwds/src/services/chrome_proxy_service.dart';
99import 'package:test/test.dart' ;
1010import 'package:test_common/logging.dart' ;
1111import 'package:test_common/test_sdk_configuration.dart' ;
12- import 'package:test_common/utilities.dart' ;
1312import 'package:vm_service/vm_service.dart' ;
1413
1514import 'fixtures/context.dart' ;
@@ -208,12 +207,6 @@ void main() {
208207 expect (
209208 variableNames,
210209 [
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' ,
217210 'closureLocalInsideMethod' ,
218211 'local' ,
219212 'parameter' ,
@@ -229,12 +222,6 @@ void main() {
229222
230223 final variableNames = variables.keys.toList ()..sort ();
231224 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' ,
238225 'this' ,
239226 ]);
240227 });
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ class MyTestClass<T> extends MyAbstractClass {
9393 String hello () => message;
9494
9595 String Function (String ) methodWithVariables () {
96+ print ('Test class is of type $T ' );
9697 var local = '$message + something' ;
9798 print (local);
9899 return (String parameter) {
You can’t perform that action at this time.
0 commit comments