-
Notifications
You must be signed in to change notification settings - Fork 25.1k
feat(tm-ios): Reject Promise if Turbo Module method throws an Error #40764
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
Closed
krystofwoldrich
wants to merge
67
commits into
facebook:main
from
krystofwoldrich:kw-mixed-stack-traces-promise-ios
Closed
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
097525d
Add iOS reject promise if turbo module method throws exception
krystofwoldrich 4fc71fd
Merge remote-tracking branch 'origin/main' into kw-mixed-stack-traces…
108e205
Merge remote-tracking branch 'origin/main' into kw-mixed-stack-traces…
krystofwoldrich 0ca58bb
Merge branch 'main' into kw-mixed-stack-traces-promise
5892e50
Add Android reject async func on error
97606c9
add(ios): js stack to rejection caused by native exception or native …
2eb0a46
Fix android promise reject and add JS stack trace
a836691
Refactor java callback
be2ea63
Fix typos
ccf5460
iOS jsStack do not copy
85f48d7
Update lint
7205f1d
More lint
d92339c
Merge remote-tracking branch 'upstream/main' into kw-mixed-stack-trac…
99cb0b9
Add RCT_TRACE_PROMISE_REJECTION_ENABLED flag for iOS
732dba9
Rename the iOS flag
239667d
Add android flag and fix internal reject invocation on Hermes
882c81b
move RCTInternalPromiseRejectBlock to rct turbo module
9529dd9
Add js func returning void rethrow explanation
40163ff
Rename RCTInternalPromiseRejectBlock to RCTNSExceptionHandler
49b861d
Add CallbackWrapperExecutor type
4d40ceb
Handle all throws from Obj-Cpp
86bf079
Merge remote-tracking branch 'upstream/main' into kw-mixed-stack-trac…
b21990c
Merge branch 'main' into kw-mixed-stack-traces-promise
25b32b7
Enable trace turbo module rejection in debug iOS builds
be8e027
Make jsInvocationStack optional
377c328
Add jsInvocationStack comment
6e4b652
use ref to js stack in createRejectJSErrorValue
abf7e8a
Use only one rejectJSIFn in java
e1634a6
Rename feature flag
65982e2
fix flag func overload
ba06a6e
Update feature flag
c6dd575
Merge commit '60f5a80c1d5900e5213aabd3d3a762174996cfd1' into kw-mixed…
b01e866
clean up rct bridge
2a3f8ea
enable tracing turbo modules promises rejections in debug
bd9b7f1
unify naming
3f81d5a
Use jsi types for callback executor
1936174
access cause safe
975a511
keep js invocation stack as property
bf584da
Hold reference to stack to avoid parsing string
3937f61
Add explanation comment
c735ba9
Add test errors logs for easier verification
7e84c08
Add rejectTurboModulePromiseOnNativeError flag
2625edb
Merge commit '7e84c08ef6cc7624f922f2558dd40bec1aa5da8f' into kw-mixed…
c9c099b
Drop java changes
b5471d2
fix perform invocation
b3cfec3
use double try to catch errors
f19abd3
Add example cpp error to the ios turbo modules
95480e1
Remove unwanted Android changes
707f5aa
Once more remove Android changes
a48a1f2
Gate promise rejection on native error
d082716
Merge remote-tracking branch 'upstream/main' into kw-mixed-stack-trac…
2fdd778
rename promise reject block to RCTInvocationErrorHandler
11e9b9b
Use explicit JSError constructor
b1ea76e
clear handleCause return statements
af39197
refactor try catch use maybecatch
464f6bc
remove unnecessary copy
efa52b6
remove extra internal reject wrapper
d0dccce
Merge remote-tracking branch 'upstream/main' into kw-mixed-stack-trac…
ae80dc7
Cleanup
d5aa06b
Fix lint
5eb29ae
Merge branch 'main' into kw-mixed-stack-traces-promise-ios
krystofwoldrich be13239
Fix merge
krystofwoldrich f2e6d32
Fix review comments
krystofwoldrich 229ec73
remove duplicate imports
krystofwoldrich 41fac96
Merge remote-tracking branch 'origin/main' into kw-mixed-stack-traces…
bfb410c
fixing review comments
04fb46e
fix createJSRuntimeError and NSException parsing
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this method now unused? Can it be removed?
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.
It's used here https://github.com/krystofwoldrich/react-native/blob/41fac96681d837c80f4db8ee0ee4351d90d40b65/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm#L500