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
Unknown Object (File)
Tue, Nov 26, 4:21 AM
Unknown Object (File)
Mon, Nov 25, 5:08 AM
Unknown Object (File)
Sat, Nov 23, 5:44 AM
Unknown Object (File)
Nov 16 2024, 6:34 AM
Unknown Object (File)
Nov 16 2024, 6:26 AM
Unknown Object (File)
Nov 16 2024, 4:56 AM
Unknown Object (File)
Nov 1 2024, 4:22 PM
Unknown Object (File)
Nov 1 2024, 4:22 PM
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