Fix ExtensionEvent serialization/deserialization mismatch   (#2800)

## Overview
Fixes a `FormatException: Expected "ExtensionEvent" as first element` that occurs when deserializing `ExtensionEvents` inside `BatchedEvents`.

Unlike other types, `ExtensionEvents` sent inside `BatchedEvents` can be missing the `"ExtensionEvent"` type header and send `params` as a JSON Map Object instead of a String.

## Changes
- Modified `ExtensionEvent.fromJson` in `dwds/lib/data/extension_request.dart` to:
    - Handle missing headers by falling back to flat list parsing (meaning it assumes alternate indices as keys/values).
    - Handle `params` whether it is a `String` or a `Map`.
3 files changed
tree: eda8bc436f42716b3f382f0fda54cc3545ea99d1
  1. .github/
  2. _analysis_config/
  3. debug_extension/
  4. dwds/
  5. dwds_test_common/
  6. example/
  7. frontend_server_client/
  8. tool/
  9. webdev/
  10. .gitattributes
  11. .gitignore
  12. AUTHORS
  13. CONTRIBUTING.md
  14. mono_repo.yaml
  15. README.md
README.md

Dart

Packages

PackageDescriptionVersion
dwdsA service that proxies between the Chrome debug protocol and the Dart VM service protocol.pub package
frontend_server_clientClient code to start and interact with the frontend_server compiler from the Dart SDK.pub package
webdevA CLI for Dart web development. Provides an easy and consistent set of features for users and tools to build and deploy web applications with Dart.pub package

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.