Skip to content

Commit 55308d2

Browse files
authored
Add check for new JS object representation (#1360)
The debugger filters out native JS objects using the classRef's name. Since DDC will change this representation, we need to check for the new representation.
1 parent 16d098c commit 55308d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dwds/lib/src/debugging/debugger.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ class Debugger extends Domain {
331331
}
332332

333333
bool _isNativeJsObject(vm_service.InstanceRef instanceRef) =>
334+
// New type representation of JS objects reifies them to JavaScriptObject.
335+
(instanceRef?.classRef?.name == 'JavaScriptObject' &&
336+
instanceRef?.classRef?.library?.uri == 'dart:_interceptors') ||
337+
// Old type representation still needed to support older SDK versions.
334338
instanceRef?.classRef?.name == 'NativeJavaScriptObject';
335339

336340
Future<BoundVariable> _boundVariable(Property property) async {

0 commit comments

Comments
 (0)