This repository has been archived by the owner on May 10, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #8109: Don't call fetch promotions on uninitialized rewards servi…
…ces (#8110) Calling rewards engine APIs before the engine has been initialized can cause a crash because the `WhenReady` method used inside `RewardsEngineImpl` will queue up what is assumed a `SingleThreadedTaskRunner`. This is not the case for iOS which uses a standard sequenced task runner. This call to fetch promotions happens when showing the rewards panel but the rewards engine may not be initialized until the panel is shown (a sec/privacy requirement to not make API calls to rewards services until a user interacts with the feature), so it was being scheduled instead of executing immediately, thus hitting the threading issue on the brave-core side
- Loading branch information