Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
- Fix a bug where `dartEmitDebugEvents` was set as a `String` instead of `bool`
in the injected client.
- Emit a warning instead of crashing on missing `libraries.json`.
- Remove dead code for reading `'dart.developer.registerExtension'` and
`'dart.developer.postEvent'` events from the chrome console. These messages
haven't been written to the console since dwds v11.1.0 and Dart SDK v2.14.0.

**Breaking changes:**

Expand Down
27 changes: 2 additions & 25 deletions dwds/lib/src/services/chrome_proxy_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -876,32 +876,9 @@ ${globalLoadStrategy.loadModuleSnippet}("dart_sdk").developer.invokeExtension(
if (isolateRef.id != isolate.id) return;

var firstArgValue = event.args[0].value as String;
// TODO(grouma) - Remove when the min SDK has updated to migrate users
// over to the injected client communication approach.
// TODO(nshahan) - Migrate 'inspect' and 'log' events to the injected
// client communication approach as well?
switch (firstArgValue) {
case 'dart.developer.registerExtension':
var service = event.args[1].value as String;
isolate.extensionRPCs.add(service);
_streamNotify(
EventStreams.kIsolate,
Event(
kind: EventKind.kServiceExtensionAdded,
timestamp: DateTime.now().millisecondsSinceEpoch,
isolate: isolateRef)
..extensionRPC = service);
break;
case 'dart.developer.postEvent':
_streamNotify(
EventStreams.kExtension,
Event(
kind: EventKind.kExtension,
timestamp: DateTime.now().millisecondsSinceEpoch,
isolate: isolateRef)
..extensionKind = event.args[1].value as String
..extensionData = ExtensionData.parse(
jsonDecode(event.args[2].value as String)
as Map<String, dynamic>));
break;
case 'dart.developer.inspect':
// All inspected objects should be real objects.
if (event.args[1].type != 'object') break;
Expand Down