dart-lang / dart-lang/webdev

Help flutter register callbacks on chrome proxy service

Open
#1,315 9 comments 0 reactions 0 assignees View on GitHub
P4
Dominant language
Dart
Stars
224
Forks
94
Avg merge
4d 3h
Merged PRs (30d)
2

Description

Flutter engine in native world registers `_flutter.listViews` extension on the VM. App registers extensions on the VM as well, and clients such as dart-code that are connected to flutter daemon call those extensions. Flutter daemon calls `_flutter.listViews` before proceeding to call methods registered by the app.

The web engine does not have information about the VM and its isolates so it cannot implement `_flutter.listViews` method that requires this information. For a short term solution, we are implementing `_flutter.listViews` directly in dwds, but it would be cleaner and less bug prone to implement a solution somewhere in flutter (in case that API changes, for example).

Possible solutions:
- sdk `developer` library can provide information about VM uri so flutter web engine can connect to it and
retrieve isolate information and implement `_flutter.listView`
- dwds can provide a hook to register service extensions directly on the chrome proxy service.

Contributor guide

Open the contributing guide

Research direction

The issue names dwds, the Chrome proxy service, the SDK developer library, and the _flutter.listViews extension, but no files or tests. Start by tracing the existing _flutter.listViews handling in dwds and comparing the two proposed callback-registration approaches. Done means an agreed Flutter-side integration is documented and supports registering the required service callbacks.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.