-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler
Description
Background:
The JavaScript super keyword binds to the class where it was defined in the source code.
- If that classes prototype chain is updated to point to a different superclass, the super keyword works as expected and dispatches along the new prototype chain. This is good!
- If the member containing a super call is copied into a different class, the super call is still bound to the prototype chain of the class where it was originally defined. This is bad!
The current hot reload behavior is to copy members from a new temporary class where they are defined, into the existing class from the previous generation during the initialization phase of a library. Later in the link phase the class hierarchies are connected by updating the prototype chains. This handling is causing super calls to be broken in a library that is hot reloaded, even if the diff is completely unrelated to the super call or even the class that contains it.
Metadata
Metadata
Assignees
Labels
area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler