BraveRewardsNativeWorker crashes when constructed before the browser is
fully initialized. This happens when an AlarmManager retention
notification (DAY_10/DAY_30/DAY_35) fires and the app process is started
by Android just to handle the broadcast — ProfileManager::
GetActiveUserProfile() dereferences a null g_browser_process in this
case.
The fix:
- Checks that GetActiveUserProfile() returns a valid profile before
creating the native worker in JNI_BraveRewardsNativeWorker_Init. If it
doesn't, the native object is not created.
- Resets the Java singleton when native init is skipped, so subsequent
calls can retry once the browser is fully initialized.
- Adds null-profile guards to IsSupported, IsSupportedSkipRegionCheck,
and IsRewardsEnabled which also call GetActiveUserProfile()
independently.
- Adds null checks for getInstance() at all call sites since it can now
return null.
Resolves: https://github.com/brave/brave-browser/issues/53877
This introduces a Chromium JavaScriptFeature based on `BraveTalkScript.js`
The script itself deviates from its original in that it is now sandboxed to the isolated content world
Exposes SERP metrics from ProfileAttributesStorage via the
VirtualPrefProvider delegate so that the ads condition matcher can
target based on a user's search engine usage patterns, for example
serving different ads to users who predominantly use Brave Search vs.
Google. The metrics are surfaced as a virtual pref under
[virtual]:serp_metrics, keeping them accessible to on-device targeting
logic without requiring a registered pref path.
* Adjust accent color palette for containers
Based on feedback from Design team, adjust the accent color palette for
containers.
* update color values for container bgs from 50 to 60
* Update key color resolving
---------
Co-authored-by: Agustín Ruiz <aguscr182@gmail.com>
* Update LocalModelsUpdater to support dense model files
Add Observer pattern to LocalModelsUpdaterState for notifying
consumers when models are ready. Add dense model file paths for
the 2_Dense and 3_Dense layers.
* Add model loading to LocalAIService and WASM bridge
* Add model loading tests for LocalAIService
Add branch-3-specific tests for the 3-way readiness model
(WASM page loaded, component ready, mojo remote bound).
Fix SetInstallDir to handle empty path as reset for test isolation.
* Read model files directly into BigBuffer shared memory
Allocate BigBuffer(size) upfront — for files >64KB this uses shared
memory internally — then read the file directly into its storage
via File::ReadAndCheck, avoiding a separate heap allocation.
Replace TryLoadModel boolean flags with BarrierClosure(2) that
fires LoadLocalModelFiles once both conditions are met: component
models delivered and WASM factory registered. A fresh barrier is
created on each reset.
Use dependency injection for LocalModelsUpdaterState instead of
GetInstance() singleton access.
This adds access to `WebState::GetFaviconStatus` in `CWVWebView`. At the moment this will always report as `nil` because we don't use Chromiums `WebFaviconDriver`
Disable Chromium tests ClassifierTab and ClassifierTab_ModelUnavailable
via filter file. These tests have an inherent race condition in
TestAnnotator's async model info callback. Chromium has also disabled
these tests upstream with DISABLED_ prefix. No Brave modifications
exist in the browsing_topics code path. Upstream flake rate: 0.3%
per LUCI Analysis (30 day lookback).
Resolves https://github.com/brave/brave-browser/issues/53618
Add upstream test failures best practices doc
Consolidates upstream-flake filter guidance from testing-isolation.md
(TI-031, TI-032, TI-041, TI-042, TI-043) and patches.md (PATCH-011)
into a dedicated testing-upstream-failures.md. Expands the flake-check
section with full script usage and the LUCI verdict table.
The 'Bridge not ready' test was creating a real iframe in jsdom via the
unmocked createBridge method. The iframe's onload event could fire
asynchronously at non-deterministic times, causing the pending
createBridge promise to resolve during a subsequent test. When the old
async executor resumed, it interfered with the currently running test,
causing all tests that use sendCommandToTrezorFrame to fail with
BridgeNotReady.
Fix by mocking createBridge in the 'Bridge not ready' test to use a
lightweight div element (to satisfy hasBridgeCreated) and return a
never-resolving promise, avoiding jsdom iframe side effects while
preserving the test's intent.
Resolves https://github.com/brave/brave-browser/issues/53483
* Fixed `CheckSettingsChanges` presubmit function
There were two problems:
1. Somehow the `registry_full_path` misses segments `chrome` and
`android` when accessing `SearchIndexProviderRegistry.java`, so
it is
`.../brave-browser/src/java/src/org/chromium/chrome/browser/settings/search/SearchIndexProviderRegistry.java`
instead of an actual
`.../brave-browser/src/chrome/android/java/src/org/chromium/chrome/browser/settings/search/SearchIndexProviderRegistry.java`
which causes the registry not being read
2. `input_api.ReadFile` could not read outside of repo root which
is `brave-browser/src/brave` so it could not read `SearchIndexProviderRegistry.java`
Fixed both with patching or chromium_presubmit_overrides.py
Resolves https://github.com/brave/brave-browser/issues/53560
Resolves https://github.com/brave/brave-browser/issues/53813
This is cr146 regression
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/aa3361c165e11f04d6cfbbadb6986d502a7f0e28
commit aa3361c165e11f04d6cfbbadb6986d502a7f0e28
Author: Samuel Huang <huangs@chromium.org>
Date: Wed Jan 21 11:41:57 2026 -0800
[Android NTP] Limit the number of MVT tiles to 8.
Previously, the Android MVT could show up to 12 tiles in total. Custom
Tiles (CT) had priority (up to 8), and Top Sites Tiles (TST) would fill
the remaining slots up to the total limit of 12.
Per UI guideline, this CL reduces the total limit from 12 to 8. Note
that CTs continue to have priority, so if a user has 8 CTs then they
don't see TSTs any more.
This is an opportunity for backend optimization:
* If 8 CTs exist then we can simply skip TST computation -- but this
would be an abrupt transition
* If 1-7 CTs exist then we can partially skip TST computation -- but
this requires more refactoring.
However, for simplicity, we skip these for now.
Bug: 477017208
Change-Id: Ie2251764b36d76c453985fbf22d101cb1354d637
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7495331
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1572479}