You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should findrefs display context/scope objects? #195
Let's say we have an object which is not referenced by any other objects, but is scoped by a function or by a script. Should v8 findrefs [obj addr] return nothing (current behavior), or should it return the scope this object belongs to? IMO we should change the behavior to return the scope as well, because looking at the output from the example below it seems like there are Lero instances leaking, even though it's not true.
A just created a PR llnode/pull/227 to approach this issue. It seems that some Function-Variables are not referenced by any Context unless a nested closure references it.
The idea is to store all contexts and look in each one when we try to find references for an object.
Activity
bnoordhuis commentedon May 11, 2018
Including the owning context(s) in the output sounds like a good idea to me.
joyeecheung commentedon May 14, 2018
SGTM, otherwise one will hit a dead end with objects like that.
src: show context objects within `findrefs`
src: show context objects within `findrefs`
src: show context objects within `findrefs`
Drieger commentedon Sep 4, 2018
A just created a PR llnode/pull/227 to approach this issue. It seems that some Function-Variables are not referenced by any
Contextunless a nested closure references it.The idea is to store all contexts and look in each one when we try to find references for an object.
src: show context objects within `findrefs`
src: show context objects within `findrefs`
src: show context objects within `findrefs`
src: show context objects within `findrefs`
src: show context objects within `findrefs`
src: show context objects within `findrefs`
watson commentedon Apr 2, 2019
Wasn't this addressed in #227?
mmarchini commentedon Apr 2, 2019
Yes. I was keeping this open as a reminder to show stack locals in findrefs, but I'm not even sure it's possible. Closing.