-
Notifications
You must be signed in to change notification settings - Fork 85
Migrate debugger instance helper to null safety #1677
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
Migrate debugger instance helper to null safety #1677
Conversation
…ll-safety-dwds-domain
…ll-safety-dwds-debugging3
properties.sublist(0, min(count ?? length, numberOfProperties)); | ||
: (await instanceRefFor(remoteObject))?.length; | ||
final indexed = properties.sublist( | ||
0, min(count ?? length ?? numberOfProperties, numberOfProperties)); |
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.
I know this whole block of code from line 278 - 283 was already here before the null-safety migration, but trying to follow everything going on is pretty confusing. Maybe we could pull this out into a couple helper methods (e.g., _getPropertiesSublist
if offset
and count
are set, and _getAllProperties
if not)? Also are we using offset
anywhere? I would think it should be the first argument to .sublist
if it's defined.
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.
Would it be ok to do it in a separate PR? This way we could figure out what the offset is for and add some tests as well, without mixing too many changes in the null-safety migration PR.
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.
LGTM with one comment. Thanks!
Migrate debugger/instance.dart helper to null safety
Towards: #1327