-
Notifications
You must be signed in to change notification settings - Fork 905
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
Add more internal callsites for better stack frames #1699
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 | ||||
---|---|---|---|---|---|---|
|
@@ -14,9 +14,14 @@ const INTERNAL_CALLSITES_REGEX = new RegExp( | |||||
'/Libraries/YellowBox/.+\\.js$', | ||||||
'/Libraries/LogBox/.+\\.js$', | ||||||
'/Libraries/Core/Timers/.+\\.js$', | ||||||
'/Libraries/WebSocket/.+\\.js', | ||||||
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.
Suggested change
|
||||||
'/Libraries/vendor/.+\\.js', | ||||||
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.
Suggested change
|
||||||
'/node_modules/react-devtools-core/.+\\.js$', | ||||||
'/node_modules/react-refresh/.+\\.js$', | ||||||
'/node_modules/scheduler/.+\\.js$', | ||||||
'/node_modules/event-target-shim/.+\\.js$', | ||||||
'/metro-runtime/.+\\.js$', | ||||||
'\\[native code\\]', | ||||||
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.
Suggested change
I suspect this string may be engine-specific - have you tested this on both JSC and Hermes? Also, bikeshedding: might be useful to include native code as intermediate frames, though I agree they're less useful at the top since we have no JS code frame to show there. |
||||||
].join('|'), | ||||||
); | ||||||
|
||||||
|
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 wonder if all of these should be prefixed with
react-native
. (Not sure)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.
Yeah probably -- I opted to minimize the diff because I wasn't sure why it was this way.
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.
@rickhanlonii mind following up with a PR with adjusted paths?
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.
The reason the
react-native
prefix is missing is because forks of React Native such asreact-native-tvos
(andreact-native-windows
?) have copies of these files but are installed withinnode_modules
using their forked name. If you match onreact-native
, you'll breakYellowBox
for all forks. You might want to usenode_modules\/(react-native(?:-(.*?))?)\/
here and below where you added the match on/node_modules/react-native/index.js
.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.
A wild Nakazawa appears!
Christoph used Context.
It's super effective!