You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`MessageEvent` is a `package:web` type and `data` field is a JS value of type
`JSAny?`.
The receiving end of the `sink` is here:
https://github.com/dart-lang/sdk/blob/26107a319a7503deafee404e3462644a873e2920/pkg/vm_service/lib/src/vm_service.dart#L1795
This code currently does not expect to see JS objects, so passing a `JSAny?` to
the sink breaks it.
The fix should be in the generating end rather than the receiving end: `JSAny?`
is supposed to be an unboxed value, not a boxed Dart value. In an ideal world we
shouldn't be able to pass it as a Dart object. So we call `dartify` and convert
it to a Dart object.
This fixes DevTools when compiled to Wasm.
Thanks to @eyebrowsoffire and @mkustermann for help with debugging.
Co-authored-by: Kevin Moore <[email protected]>
0 commit comments