This change removes patching for `WeakWrapperSharedURLLoaderFactory`,
which was initially necessary to enable daling pointer detection.
`TestURLLoaderFactory::GetSafeWeakWrapper()` provides a weak reference,
which are checked, and are more appropriate for this case, where
dangling is expected.
Resolves https://github.com/brave/brave-browser/issues/42000
[DanglingPtr] Default `enable_dangling_raw_ptr_feature_flag`
This flag should not be set to `true` but rather defaulted on Linux, as
we don't want the flag being swtiched on for Release builds, which don't
support it.
This change switches on the dangling pointer detector for Linux. It also
includes a couple patches for chromium, that will have to be
investigated and corrected. With the detector on for Linux, there will
be a first line of bug prevention with this instrumentation, as it will
act as the first barrier for new cases of dangling pointers being
introduced in our codebase.
Resolves https://github.com/brave/brave-browser/issues/41955
* Add command line key to diagnose Sync Passwords switch issue
To see additional diagnostic output, add `--verbose_sync_passwords_pref` through QA Preferences/Command line
[DanglingPtr] Fix UaFs with `SidePanelEntry` observation
This change addresses the uaf cases we were having with the multisource
observation for `SidePanelEntry` on `SidebarContainerView`. The main
issue we were having is that we can't precisely be notified of when a
given `SidePanelEntry` is going out of scope, and in many cases the
instances would be destroyed before the lifetime of
`SidebarContainerView`. In such cases, the observation would be kept
around in the multisource observer, and eventually would cause an UaF,
as the multisource observer was being destroyed and trying to remove the
outstanding observations that were dangling.
`SidePanelEntry` observations do dangle in upstream. That's the model
they have for the lifetimes: FeatureFoo is destroyed before
`SidePanelEntry`. There are exactly 2 ways for a `SidePanelEntry` to be
destroyed in chromium: FeatureFoo destroyes it via Deregister, or
`SidePanelRegistry` is destroyed before `FeatureFoo`.
`SidebarContainerView` cannot in a reliable way keep track of these
guarantees.
This change is predicated on the fact that `SidebarContainerView` will
always outlive all the use of events by any living `SidePanelEntry`
instance.
In this change we introduce a customisation point to `SidePanelEntry`
that allows us to check if a certain entry is being observed or not. If
it is we don't double-observe. Observations are then removed when a tab
is destroyed, which includes when it gets moved to another Browser
window.
Resolvesbrave/brave-browser#39053Resolvesbrave/brave-browser#41924
This handles the condition where the all the credentials for a given day
are redeemed and there are none left. This shouldn't happen - but can
happen if there are network issues. Specifically, when the client doesn't
receive response from server after redeeming the credential.
Fixes https://github.com/brave/brave-browser/issues/33031
Introduces full-page UI. Requires the AIChatHistory feature flag to be enabled.
Receives title events for conversations from the conversation API.
---------
Co-authored-by: Taher <8665427+nullhook@users.noreply.github.com>
Co-authored-by: Jay Harris <jay.harris@outlook.co.nz>
[CodeHealth] Disallow new `NOTREACHED_IN_MIGRATION` instances
This PR adds a new presubmit check to prevent the introduction of new
occurrences for `NOTREACHED_IN_MIGRATION`. This macro is supposed to be
on its way out, however there are still new occurrances being introduced
in recent times.
* Update settings_manage_profile.ts
* Add Manage Profile page to customize padding
* imports: order alphabetically
* Fix brave://settings/braveSync/setup image padding
Fixes the image being left out of the margin
* Fix padding on inner setting pages
* changed token to spacing
* Update settings_manage_profile.ts
* Added meld integration endpoints and initial UI to fetch quotes
* WIP: Quotes component
* Added quote details and action button
* Fetch service providers and add props to quotes component
* Added quote list in fund wallet page
* Improve useBuy hook, filter assets and add flip amounts functionality
* Fixed caret alignment
* Added mockCountries and mockPaymentMethods for storybook and testing
* Added query for fetching meld payment methods
* Update modal background filter and blur
* Added country and payment method filters
* Created country and payment method filter component and sotrybook story
* Added payment method and country filter modal
* Fix duplicated icon declaration
* Add contract address to search and add list header
* Added list title style
* Add space
* Added endpoint for creating meld buy widget
* Refactor: Rename args type name
* feat: Create and launch meld widget
* Fix type error
* feat: Added search for quotes, spacing improvements
* Add default payment method
* Code Cleanup and Route Params
---------
Co-authored-by: Douglas Daniel <douglashdaniel@gmail.com>