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
Handle potential missing point stack execution points #9885
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const frame = pointStack[frameIndex]; | ||
if (frame.point) { | ||
currentPoint = frame.point.point; | ||
} |
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.
We should return;
if frame.point
is not set - otherwise the debugger will step in the top frame rather than the selected frame.
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.
Okay, yeah, that's what I was wondering.
bf8521e
to
fec16e9
Compare
Updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
Talked with Josh about this. One example where this could happen is In practice, any "top" or "bottom" stack frame (no matter which way you visualize the stack in your head) should have an execution point because there should be actual code involved. For the Redux and React usage cases, we should never run into that scenario, because we're looking at user code frames that should have actual code. |
fec16e9
to
ca88571
Compare
Added further comments clarifying the situation here. |
This is the kind of thing that's great to capture in unit tests somewhere. I don't have a ton of context (just kind of drive by skimming this thing) but I wonder if there's an opportunity for us to add a test or two here? |
This PR:
getPointStack
pointStackFrame.point
becoming optionalI think, based on https://github.com/replayio/backend/pull/8924 and https://github.com/replayio/backend/pull/8925 , that this will only ever occur if the frame just has an
EnterFrame
point and no meaningful frame steps. However, I don't know often that will occur in practice.The code compiles, and I think the logic tweaks make sense reading it.