-
Notifications
You must be signed in to change notification settings - Fork 95
Conversation
| // Moving to the function bounary (in generated scopes). | ||
| while ( | ||
| foundInMax + 1 < searchIn.length && | ||
| searchIn[foundInMax].type !== "function" |
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.
runtime Scope.type property is not reliable
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 we need to fall back on block as well while we fix this?
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.
property reliable after all
| ({ isLast, result }, scope) => { | ||
| if (isLast) { | ||
| result.push([]); | ||
| } |
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.
chunk is a pretty strange term...
I think i would prefer functionScopes, perhaps we move this into a small helper function:
const functionScopes = rollupFunctionScopes(scopes)| const names = summarizedScopes.reduce( | ||
| (acc, { bindingsNames }) => acc.concat(bindingsNames), | ||
| [] | ||
| ); |
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.
it would be nice to have a small helper function: getBindingNames that can take our function scopes and return a list of names...
const names = getBindingNames(scopeChunk)| // Moving to the function bounary (in generated scopes). | ||
| while ( | ||
| foundInMax + 1 < searchIn.length && | ||
| searchIn[foundInMax].type !== "function" |
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 we need to fall back on block as well while we fix this?
| } | ||
|
|
||
| // We found chunk of the function(s) that matches the scopeChunk names. | ||
| result.push({ |
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'm a bit lost here
db97c93 to
2001349
Compare
jasonLaster
left a comment
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.
Looks good!
Associated Issue: firefox-devtools/debugger#4521
Summary of Changes