Skip to content

Separate hotRestart and hotReload into two methods each in the embedder #60528

Open
@srujzs

Description

@srujzs

Currently, hotRestart and hotReload are single entrypoints in the embedder for the DDC library bundle format.

This presents issues when it comes to debugging and deferring execution, as we don't have a mechanism to pause execution, load new sources, delete and reregister breakpoints, and then continue execution in DDC.

With hotRestart, this means main runs before we get a chance to reregister breakpoints. With hotReload, this means execution continues before we can reregister breakpoints.

Instead they should be split into two methods in the embedder each:

  • hotRestartBegin: Downloading and loading of sources and any reinitialization in the embedder.
  • hotRestartEnd: Calls main after a previous hotRestartBegin call.
  • hotReloadBegin: Downloading and loading of sources.
  • hotReloadEnd: Reinitialization, which should continue execution but with the new libraries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions