HomePhabricator
Diffusion Comm 2b70bbf14cd4

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

Description

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

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

Reviewers: will, varun

Reviewed By: will

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D13525

Details

Provenance
ashoatAuthored on Sep 30 2024, 11:41 AM
Reviewer
will
Differential Revision
D13525: [native] Catch when initializeCryptoAccount fails to schedule on crypto thread
Parents
rCOMM66dfefbeff67: [native] Increase WorkerThread MPMCQueue capacity to 500
Branches
Unknown
Tags
Unknown