-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 (#…
…37570) Summary: Pull Request resolved: #37570 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, which introspects for the currently handled exception 4. We are handling this TurboModule C++ exception being thrown, suggesting `libdispatch` termination may be due to catching this C++ exception which was not otherwise handled 4. We have by this point lost the stack trace of the code invoking the callback I think if we change the timing of `abort()` to when the callback is called, we might be able to preserve the stack trace of module code calling the callback. Reviewed By: javache Differential Revision: D46175685 fbshipit-source-id: 680aa9aa5e4ca6d8dd04dfe34ec870b86c7640ef
- Loading branch information
1 parent
1691801
commit dfd445c
Showing
5 changed files
with
8 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
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