dart-sdk/sdk
Srujan Gaddam d17205184a [dart2js] Handle Object members of dart:html types
`dart:html` types have changed to inherit `JavaScriptObject`. Therefore,
the dart2js runtime needs to be changed so that interceptors are still
created for those types, and they're properly handled in `toString`
calculations. Includes tests on `Object` members that are currently
inconsistent between both compilers.

This test passes on dart2js with and without making the types in `dart:html`
extend `JavaScriptObject`. This test fails in DDC for the following reasons:

- `toString` of native types calls the native `toString`
- `hashCode` for interop objects are random and not 0
- `runtimeType` of interop objects is `LegacyJavaScriptObject` not `JSObject`

Change-Id: Ibf80109174615120df9e64995fa13016f7a1677b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228741
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-01-21 01:04:10 +00:00
..
bin Add deprecation warnings 2022-01-20 11:46:27 +00:00
lib [dart2js] Handle Object members of dart:html types 2022-01-21 01:04:10 +00:00
api_readme.md Update the API docs readme 2020-01-16 21:23:09 +00:00
BUILD.gn Revert "[vm] Add analyze_snapshot tool for AOT snapshot inspection" 2021-12-16 18:32:20 +00:00