Commit 0ff4c85
Migrate RCTAlertManager to handle synchronous void method execution (#56801)
Summary:
Pull Request resolved: #56801
In preparation for enabling `enableSyncVoidMethods` (D104331837), which makes TurboModule void methods execute synchronously on the JS thread instead of being dispatched asynchronously.
Currently, this module overrides `methodQueue` to return `dispatch_get_main_queue()` so its void methods execute on the main thread. When `enableSyncVoidMethods` is enabled, the `methodQueue` override is ignored for void methods — they execute directly on the JS thread. This causes crashes for any UI operations that must run on the main thread.
**Fix:** Remove the `methodQueue` override. The `alertWithArgs` method already dispatches UI work onto the main thread via `RCTExecuteOnMainQueue`, so it is already safe.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D104771644
fbshipit-source-id: 4f1eae55c64e56990efc20c4b32af1d7225200371 parent e4cb767 commit 0ff4c85
1 file changed
Lines changed: 0 additions & 5 deletions
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 45 | | |
51 | 46 | | |
52 | 47 | | |
| |||
0 commit comments