Skip to content
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

fix: allow optional abs_path and lineno for JsFrame #1581

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

samuelmaddock
Copy link

@samuelmaddock samuelmaddock commented Jan 8, 2025

fixes #1580

It's possible for V8 to format a JS frame location to only contain <anonymous> (see AppendFileLocation). In such cases, JSON deserialization should pass, but symbolification should fail.

Here's an example call stack this addresses:

Error: Example unresponsive call stack
    at Object.hasOwnProperty (<anonymous>)

Also, this is the first Rust code I've written so please lmk what can be improved!

@samuelmaddock samuelmaddock force-pushed the fix/optional-frame-props branch from 829c938 to 13cc9d3 Compare January 8, 2025 22:27
@samuelmaddock samuelmaddock force-pushed the fix/optional-frame-props branch from 13cc9d3 to 2b799fe Compare January 8, 2025 22:28
crates/symbolicator-js/src/symbolication.rs Show resolved Hide resolved
crates/symbolicator-js/src/lookup.rs Outdated Show resolved Hide resolved
crates/symbolicator-js/src/symbolication.rs Outdated Show resolved Hide resolved

let module = lookup.get_module(&raw_frame.abs_path).await;
let module = lookup.get_module(&abs_path).await;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what we should do here, we're fetching the module identified by "" here. This seems wrong.

@loewenheim 👀

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found there was an unused JsModuleErrorKind::InvalidAbsPath which fits here nicely. b381fe3

@Dav1dde Dav1dde requested a review from loewenheim January 9, 2025 08:16
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 58.92857% with 23 lines in your changes missing coverage. Please review.

Project coverage is 73.77%. Comparing base (5a85fd7) to head (2b799fe).
Report is 196 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1581      +/-   ##
==========================================
- Coverage   76.09%   73.77%   -2.32%     
==========================================
  Files         101      105       +4     
  Lines       15262    16186     +924     
==========================================
+ Hits        11613    11941     +328     
- Misses       3649     4245     +596     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Call stacks containing <anonymous> source fail to symbolicate
2 participants