Skip to content

Save debug information in chrome.storage after a Dart app loads #1791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Nov 18, 2022

Conversation

elliette
Copy link
Contributor

@elliette elliette commented Nov 12, 2022

@elliette elliette marked this pull request as draft November 12, 2022 01:31
@elliette elliette changed the title [Draft] Save debug information in chrome.storage after a Dart app loads Save debug information in chrome.storage after a Dart app loads Nov 18, 2022
@elliette elliette marked this pull request as ready for review November 18, 2022 01:19
@elliette elliette requested a review from annagrin November 18, 2022 01:22
Copy link
Contributor

@annagrin annagrin left a comment

Choose a reason for hiding this comment

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

LGTM with a comment.

final worker = (await serviceWorkerTarget.worker)!;
// Note: The following delay is required to reduce flakiness (it makes
// sure the execution context is ready):
await Future.delayed(Duration(seconds: 1));
Copy link
Contributor

Choose a reason for hiding this comment

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

Is 1 second enough time to guarantee that the context is ready, or should we try a few times? Btw, is there a way to reliably check that is ready?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran this multiple times to confirm (same timeout as the other test case). I've moved the timeout itself into a const variable for both so if we do end up changing it we can just change it in one place. When I first added this, I tried explicitly waiting on the worker's execution context, but that wasn't enough to prevent the flakes.

@elliette elliette merged commit a19d563 into dart-lang:master Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants