JimB1
August 20, 2026, 1:32am
1
Description of the issue:
V8 optimization should be, but is not, disabled when visiting unfamiliar sites and using the enhanced security option (see below).
How can this issue be reproduced?
In brave://settings/content/v8 choose the middle setting, to automatically disable optimizations on unfamiliar sites.
Browse to an unfamiliar site (one you haven’t visited before).
Observe that the optimizer has ostensibly not been disabled, since the warning/button on the URL bar does not appear. On the other hand if you repeat the test with the optimizers “hard off” (bottom option), you do see the icon. In the case of unfamiliar sites, the behavior should be the same.
Expected result:
You should see the button notifying you that the optimizer is disabled (and offering to enable it for the site).
Brave Version( check About Brave):
1.93.137 Chromium: 151.0.7922.169 (Official Build) (64-bit)
Additional Information:
This combination (setting + unfamiliar site) works correctly on Chrome so this behavior appears to be specific to Brave for some reason.
289wk
August 20, 2026, 11:19am
2
@Mattches
OP report above, and possibly a related issue at:
‘Brave V8 Optimization Security Setting Bug ’
JimB1
August 25, 2026, 6:58am
3
Bump?
(Other issue seems to have been deleted?)
JimB1
September 12, 2026, 12:27pm
4
I see someone helpfully filed a GitHub issue for me.
opened 02:57AM - 26 Aug 26 UTC
> **Note:** This report was generated with AI assistance (automated code-path an… alysis of Brave/Chromium sources), based on the user report linked below. Root-cause analysis and fix suggestions should be human-verified before acting on them.
**Title:** V8 optimization "disable on unfamiliar sites" setting has no effect — every site treated as familiar because the `UrlHighConfidenceAllowlist` store is never downloaded in Brave builds
**Labels:** `OS/desktop`, `area/privacy-security`, `bug`
---
## Description
User report (community thread: https://community.brave.app/t/v8-optimization-security-settings-do-not-work-correctly/657169, user JimB1):
The middle option at `brave://settings/content/v8` ("disable JavaScript optimization on unfamiliar sites" — upstream Chromium name: "JavaScript optimization" / "Javascript guardrails") does nothing in Brave: visiting an unfamiliar site does NOT disable the V8 optimizing compiler and does NOT show the shield page-action icon in the omnibox. The bottom option ("disable everywhere") works and shows the icon. The same middle option works correctly in Chrome.
Per the analysis below, this is a Brave-specific client-side bug, not a settings/UI issue.
## Steps to reproduce
1. Fresh profile, Safe Browsing enabled (required for the middle option to be selectable)
2. `brave://settings/content/v8` → select middle option "Disable on unfamiliar sites"
3. Visit an unfamiliar site (fresh domain never visited before in this profile; not a search-engine results page)
4. Observe omnibox
**Expected result:** shield icon appears (action `kActionShowJsOptimizationsIcon`); V8 optimizing compiler disabled for that site's renderer; bubble: "For security, Brave turns off JavaScript optimization when you visit a site for the first time." + Enable button (writes per-site ALLOW exception + reload infobar). This is what Chrome does.
**Actual result:** no icon; optimizer stays enabled. Setting is inert on every site.
## Version
Reproduced per report on Brave 1.93.137 / Chromium 151.0.7922.169, Windows. Per code analysis, affects all desktop builds where the setting exists (code verified identical on 151 branch-heads and current 152). All channels, all desktop platforms.
## Root cause analysis
Decision chain when navigating with the middle option selected:
1. Setting selected → `GeneratedJavascriptOptimizerPref::SetPref` (`chrome/browser/content_settings/generated_javascript_optimizer_pref.cc:74-82`) writes content setting ALLOW (user source) + pref `safebrowsing.javascript_optimizer_blocked_for_unfamiliar_sites=true`.
2. `ComputeDefaultJavascriptOptimizerSetting` (`chrome/browser/site_protection/site_familiarity_utils.cc:108`) correctly returns `kBlockedForUnfamiliarSites` — all preconditions hold in Brave (SB on, `kProcessSelectionDeferringConditions` on, user-source setting).
3. Navigation adds `SiteFamiliarityProcessSelectionDeferringCondition` (`chrome/browser/chrome_content_browser_client.cc:5616-5632`) → `SiteFamiliarityFetcher::Start` (`chrome/browser/site_protection/site_familiarity_fetcher.cc:60`) evaluates familiarity: engagement score ≥ threshold, history visit ≥ 24h old, **or on Safe Browsing high-confidence allowlist**.
4. **Bug:** `CheckUrlForHighConfidenceAllowlist` (`components/safe_browsing/core/browser/db/sb_local_database_manager.cc:514`; `v4_local_database_manager.cc` on cr151) **fails OPEN** — if the allowlist store is unavailable it returns `url_on_high_confidence_allowlist = TRUE`.
5. The allowlist store is never created in Brave: its `ListInfo` sync flag is `kSyncOnChromeDesktopBuilds = kIsChromeBranded && kSyncOnDesktopBuilds`, where `kIsChromeBranded = BUILDFLAG(GOOGLE_CHROME_BRANDING)` (`sb_local_database_manager.cc:81-89, 115-118`). Brave is non-Chrome-branded → list never requested/downloaded.
6. Therefore the allowlist check always returns TRUE → `SiteFamiliarityFetcher` verdict `kFamiliar` for **every** site (`fetcher.cc:201-213`) → `AreV8OptimizationsEnabledForSite` (`chrome_content_browser_client.cc:8155-8260`) returns enabled → renderer not flagged → `AreV8OptimizationsDisabled(web_contents)` false → icon hidden (`chrome/browser/ui/views/js_optimization/js_optimizations_page_action_controller.cc:64-70`).
This also explains why the bottom option works in Brave: it is a pure content-setting path (BLOCK) with no familiarity consult (`chrome_content_browser_client.cc:8212-8219`), and why the middle option works in Chrome: branded builds sync the allowlist store, so fresh sites are not on it and are correctly judged unfamiliar.
Verification aid: `chrome://safe-browsing/#tab-log` shows `SiteFamiliarityFetcher decision [URL] ... [Verdict]: Familiar [OnSBAllowlist]` — on Brave, fresh sites show Familiar via allowlist hit even though the list is never downloaded.
Note (by design, affects Chrome too): a site becomes familiar after ~24h of history or sufficient engagement, so re-testing the same site later shows no icon even in Chrome.
## How to enable support — fix options
### Option A — Minimal client patch (no server dependency), recommended short term
Patch `CheckUrlForHighConfidenceAllowlist` so a missing/unconfigured allowlist store returns FALSE (fail-closed / skip the allowlist signal) instead of TRUE. Then familiarity = engagement + history only, and the middle option becomes fully functional.
Trade-off: sites on Google's high-confidence allowlist (well-known top sites) are treated unfamiliar on first visit in Brave → icon appears slightly more often than Chrome until familiarity accrues. Filing an upstream crbug for the fail-open-in-non-branded-builds behavior is the cleanest long-term fix.
### Option B — Full enablement (proxy the allowlist list)
1. Client: patch the `ListInfo` gating for `UrlHighConfidenceAllowlist` from `kSyncOnChromeDesktopBuilds` to `kSyncOnDesktopBuilds` (or a Brave buildflag) in `sb_local_database_manager.cc:81-118` + cr151 `v4_local_database_manager.cc` equivalent → store gets created and included in the v4 `threatListUpdates:fetch` request.
2. Network: no client change needed — Brave already host-rewrites `https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch` to `safebrowsing.brave.com` (`components/static_redirect_helper/static_redirect_helper.cc:85-105`, endpoint buildflag `components/safebrowsing/BUILD.gn:10`; HSTS-pinned, network-audit allowlisted, BraveServiceKey header automatic).
3. Server: `safebrowsing.brave.com` proxy must pass through list data for `UrlHighConfidenceAllowlist` (server-side task, needs services-team coordination + privacy sign-off; same exposure model as existing proxied lists).
4. Note `CheckUrlForHighConfidenceAllowlist` also fail-opens when the store has <100 entries — after enablement, verify store size passes that check.
### Testing for either option
- New browser test: middle option selected, SB on, navigate to fresh site, assert `kActionShowJsOptimizationsIcon` visible + `chrome://safe-browsing/#tab-log` verdict Unfamiliar (fails today — red test proving the bug).
- Review existing Brave filter `browser_tests.filter:359` (`JavascriptOptimizerBrowserTest_CustomDeferralCondition.ChangeJavascriptOptimizerStatePriorToProcessSelection`, filtered since cr144) — candidate to unfilter once fixed.
- Manual QA matrix: fresh site day-1 (icon, unfamiliar), same site +24h (no icon, familiar), DSE results page (familiar), per-site Enable exception honored on next process.
## Additional info
- Upstream related: crbug 457420369 (exception takes effect next process), crbug 452130797 (speculative RFH familiarity TODO).
- Brave-side overrides already verified harmless: `IsJitDisabledForSite` override only (`brave/browser/brave_content_browser_client.cc:1716`, `kBraveV8JitlessMode` disabled by default); no plaster rewrites or chromium_src overrides touch this path.
- No existing brave-browser issue found for this.
## Other information
- Original user report: https://community.brave.app/t/v8-optimization-security-settings-do-not-work-correctly/657169 (user JimB1)
- Brave version: 1.93.137, Chromium 151.0.7922.169
- OS/Arch: Windows (analysis suggests all desktop platforms affected)