Skip to content

Commit

Permalink
Fixed "skip frames" missing when adding extra calls on the stack to c…
Browse files Browse the repository at this point in the history
…ache stack frames
  • Loading branch information
iNinja committed Jan 30, 2025
1 parent c860581 commit a98c9c4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ public static StackFrame GetCurrentStackFrame(

return CachedStackFrames.GetOrAdd(
key,
_ => new StackFrame(skipFrames, true));
// Need to skip the call to the delegate + GetOrAdd when creating the frame
_ => new StackFrame(skipFrames + 2, true));
}

// ConcurrentDictionary is thread-safe and only locks when adding a new item.
Expand Down

0 comments on commit a98c9c4

Please sign in to comment.