[DDC] Add capability to detect whether an object is a library for custom formatting #56967
Labels
area-web
Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.
web-dev-compiler
Currently, our custom formatter in DDC formats libraries only within the context of a module. Specifically, given a module, we recognize it as a special object using
getModuleName
:sdk/sdk/lib/_internal/js_dev_runtime/private/debugger.dart
Line 628 in d05ea2f
Library
object to format each library within that module:sdk/sdk/lib/_internal/js_dev_runtime/private/debugger.dart
Line 350 in d05ea2f
With the new module format, this becomes even more important as we no longer have modules, only libraries. Once we add this capability to detect libraries,
_useNativeJSFormatter
should be updated. Similarly,debugger_test.dart
should be updated to directly pass libraries instead of wrapping them inLibrary
s. See https://dart-review.googlesource.com/c/sdk/+/389589.The text was updated successfully, but these errors were encountered: