From 3164e58d270ffa6291e5c510f36d1702f10878ac Mon Sep 17 00:00:00 2001 From: Srujan Gaddam Date: Wed, 21 Jul 2021 10:22:20 -0700 Subject: [PATCH] Add check for new JS object representation 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. --- dwds/lib/src/debugging/debugger.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dwds/lib/src/debugging/debugger.dart b/dwds/lib/src/debugging/debugger.dart index fdbc58319..86702dedd 100644 --- a/dwds/lib/src/debugging/debugger.dart +++ b/dwds/lib/src/debugging/debugger.dart @@ -331,6 +331,10 @@ class Debugger extends Domain { } bool _isNativeJsObject(vm_service.InstanceRef instanceRef) => + // New type representation of JS objects reifies them to JavaScriptObject. + (instanceRef?.classRef?.name == 'JavaScriptObject' && + instanceRef?.classRef?.library?.uri == 'dart:_interceptors') || + // Old type representation still needed to support older SDK versions. instanceRef?.classRef?.name == 'NativeJavaScriptObject'; Future _boundVariable(Property property) async {