-
Notifications
You must be signed in to change notification settings - Fork 362
Prevent web apps from freezing after hot-restarts triggered from DevTools #9125
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,6 +93,10 @@ class BreakpointManager with DisposerMixin { | |
| if ([ | ||
| EventKind.kPauseStart, | ||
| EventKind.kPausePostRequest, | ||
| // We check for a resume event because package:dwds sends a resume event | ||
| // after a hot-restart. See: | ||
| // https://github.com/dart-lang/webdev/issues/2610 | ||
| EventKind.kResume, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should make sure this doesn't cause issues for non-web apps.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed! Testing now
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed non-web apps still work as expected. Also looking into what is required to reenable the debugger panel integration test on web, since I believe that would have caught this regression: #7732 |
||
| ].contains(pauseEventKind)) { | ||
| await serviceConnection.serviceManager.isolateManager.resumeIsolate( | ||
| isolateRef, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you happen to know why we do this? This feels like a bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very good question (that could perhaps also be asked about other related code, for example why is the
notifyPausedAtStartmethod not notifying), but from my investigation:Here is where the
resumeFromStartmethod (which calls the_resumeHandlerwhich sends theResumeevent) was added:Properly set the pauseEvent dart-lang/webdev#636
And here is where it began to be called in response to "creating a new isolate" (which is not a real isolate since there are no isolates on web) and occurs in response to a hot-restart:
Faster DevTools launch dart-lang/webdev#747
(For reference, current code pointers here: #9124 (comment))
So
dwdsis sending theResumeevent to say "the isolate has been created and resumed." At least that is my understanding.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think this is a bug. Can you file an issue against DWDS and reference it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Filed dart-lang/webdev#2610