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)
Sat, Mar 22, 9:26 PM
Unknown Object (File)
Feb 21 2025, 12:22 PM
Unknown Object (File)
Feb 21 2025, 12:22 PM
Unknown Object (File)
Feb 21 2025, 12:22 PM
Unknown Object (File)
Feb 21 2025, 12:22 PM
Unknown Object (File)
Jan 22 2025, 8:12 AM
Unknown Object (File)
Dec 24 2024, 1:25 AM
Unknown Object (File)
Dec 24 2024, 1:25 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