-
Notifications
You must be signed in to change notification settings - Fork 361
Integrate leak_tracker. #4891
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
Integrate leak_tracker. #4891
Conversation
packages/devtools_app/lib/src/screens/memory/panes/leaks/controller.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/memory/panes/leaks/controller.dart
Outdated
Show resolved
Hide resolved
| final message = EventFromApp.fromVmServiceEvent(vmServiceEvent)?.message; | ||
| if (message == null) return; | ||
|
|
||
| if (message is LeakTrackingStarted) { |
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.
Nit: maybe change this to use a switch statement instead?
if (message == null) return;
switch(message.runtimeType) {
case LeakTrackingStarted:
...
case LeakSummary:
...
default:
throw StateError('...');
}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.
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.
Ah good point. Waiting for patterns SGTM.

See UX in description of dart-lang/leak_tracker#20