Files
Brian R. Bondy a4dbd4092c Defer OpenOriginSettings out of CredentialSummary callback (#36705)
Calling chrome::ShowSettingsSubPageForProfile inline from the SKU
CredentialSummary mojo reply runs during the same dispatch frame that
just fired SetPurchased() — which reloads managed prefs via the policy
provider observer chain. Opening a settings tab synchronously from that
mid-cascade state has produced BackupRefPtr dangling raw_ptr crashes
when the Refresh button on account.brave.com first detects a purchase.

Set did_open_origin_settings_ before posting and let the helper run on
the next loop iteration; the WeakPtr guards against the service being
torn down between the post and the run.

Also drop a stray LOG(ERROR) debug print left in OnCredentialSummary.

Fixes brave/brave-browser#55632
2026-05-26 16:42:27 -04:00
..