-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Terminate instead of throwing if TurboModule callback double-called
Summary: If a TM calls a completion callback, or resolves or rejects a promise multiple times, a C++ exception is thrown. For an in the wild crash, we are getting this signal as: 1. `libdispatch` calls std::terminate while pumping a thread's message queue 2. The hooked FB app termination handler is called 3. Our termination handler introspects the currently thrown exception. 4. The handler introspecting the currently thrown exception sees this C++ exception being thrown, suggesting `libdispatch` termination may be due to unhandled C++ exception 4. We have lost the stack trace by this point of the code invoking the returned lambas I think if we change the time of `abort()` to when the callback is called, we might be able to preserve the stack trace of module code calling the callback. Differential Revision: D46175685 fbshipit-source-id: c0bae5522db1847535d19b001d039bdd37b8c8d4
- Loading branch information
1 parent
d4f6cf1
commit 4976ff3
Showing
3 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 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 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