Page MenuHomePhabricator

[native] Catch when initializeCryptoAccount fails to schedule on crypto thread
ClosedPublic

Authored by ashoat on Sep 30 2024, 12:11 PM.
Tags
None
Referenced Files
F3274084: D13525.id44706.diff
Sat, Nov 16, 6:26 AM
F3270967: D13525.diff
Sat, Nov 16, 4:56 AM
Unknown Object (File)
Fri, Nov 1, 4:22 PM
Unknown Object (File)
Fri, Nov 1, 4:22 PM
Unknown Object (File)
Fri, Nov 1, 4:22 PM
Unknown Object (File)
Fri, Nov 1, 4:21 PM
Unknown Object (File)
Fri, Nov 1, 5:35 AM
Unknown Object (File)
Fri, Nov 1, 5:28 AM
Subscribers

Details

Summary

In ENG-9416: Account deletion broken on build 408, the app crashes because a task on a WorkerThread throws an uncaught exception while trying to schedule a task on the crypto WorkerThread.

This doesn't happen when the JS thread tries to schedule a task on a WorkerThread, as any C++ exceptions on the JS thread are caught and converted to JS exceptions.

The only place we schedule onto the crypto WorkerThread from another WorkerThread is in initializeCryptoAccount. Adding a try-catch here allows us to avoid this crash.

Test Plan

I tested using this patch and confirmed that the exception doesn't crash the app

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable