-
-
Notifications
You must be signed in to change notification settings - Fork 35
Fix Hermes get original function name #106
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| .DS_Store | ||
| target | ||
| Cargo.lock | ||
| .idea |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -19,6 +19,12 @@ fn test_react_native_hermes() { | |||
| ("input.js", 2, 0, None) | ||||
| ); | ||||
| assert_eq!(sm.get_original_function_name(11857), Some("<global>")); | ||||
|
|
||||
| assert_eq!( | ||||
| sm.lookup_token(0, 11947).unwrap().to_tuple(), | ||||
| ("module.js", 1, 4, None) | ||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This basically points to the
|
||||
| ); | ||||
| assert_eq!(sm.get_original_function_name(11947), Some("foo")); | ||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without the fix, this was returning |
||||
| } | ||||
|
|
||||
| #[test] | ||||
|
|
||||
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 could either do this, or change the mapping function to do
(o.line - 1, o.column), let me know what do you preferThere 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 think doing it this way is fine.