File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -652,12 +652,16 @@ class Debugger extends Domain {
652
652
}
653
653
}
654
654
655
- bool isNativeJsObject (InstanceRef instanceRef) =>
656
- // New type representation of JS objects reifies them to JavaScriptObject.
657
- (instanceRef? .classRef? .name == 'JavaScriptObject' &&
658
- instanceRef? .classRef? .library? .uri == 'dart:_interceptors' ) ||
659
- // Old type representation still needed to support older SDK versions.
660
- instanceRef? .classRef? .name == 'NativeJavaScriptObject' ;
655
+ bool isNativeJsObject (InstanceRef instanceRef) {
656
+ // New type representation of JS objects reifies them to a type suffixed with
657
+ // JavaScriptObject.
658
+ var className = instanceRef? .classRef? .name;
659
+ return (className != null &&
660
+ className.endsWith ('JavaScriptObject' ) &&
661
+ instanceRef? .classRef? .library? .uri == 'dart:_interceptors' ) ||
662
+ // Old type representation still needed to support older SDK versions.
663
+ className == 'NativeJavaScriptObject' ;
664
+ }
661
665
662
666
/// Returns the Dart line number for the provided breakpoint.
663
667
int _lineNumberFor (Breakpoint breakpoint) =>
You can’t perform that action at this time.
0 commit comments