Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions dwds/lib/src/injected/client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dwds/web/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Future<void>? main() {

Completer? readyToRunMainCompleter;

hotRestartJs = allowInterop((String runId, bool pauseIsolatesOnStart) {
if (pauseIsolatesOnStart) {
hotRestartJs = allowInterop((String runId, [bool? pauseIsolatesOnStart]) {
if (pauseIsolatesOnStart ?? false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this preferable to giving it a default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also define @JS(r'$dartHotRestartDwds') somewhere else (in google3) and this way we don't need to update the parameters there too. I'm not sure if we would if this had a default value.

readyToRunMainCompleter = Completer();
return toPromise(
manager.hotRestart(
Expand Down Expand Up @@ -344,7 +344,7 @@ external String get dartModuleStrategy;

@JS(r'$dartHotRestartDwds')
external set hotRestartJs(
Promise<bool> Function(String runId, bool pauseIsolatesOnStart) cb,
Promise<bool> Function(String runId, [bool? pauseIsolatesOnStart]) cb,
);

@JS(r'$dartReadyToRunMain')
Expand Down