Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #18918 - Null deref in BRAVE_ICON_LABEL_BUBBLE_VIEW_GET_HIGHLIGHT_PATH #10647

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

#define BRAVE_ICON_LABEL_BUBBLE_VIEW_GET_HIGHLIGHT_PATH \
if (!ShouldShowSeparator()) \
highlight_bounds.Inset(0, 0, 1, 0); \
auto layout_radius = \
GetLayoutProvider()->GetCornerRadiusMetric(views::Emphasis::kMaximum); \
const SkRect new_rect = RectToSkRect(highlight_bounds); \
#define BRAVE_ICON_LABEL_BUBBLE_VIEW_GET_HIGHLIGHT_PATH \
if (!ShouldShowSeparator()) \
highlight_bounds.Inset(0, 0, 1, 0); \
const auto* layout_provider = GetLayoutProvider(); \
auto layout_radius = corner_radius; \
if (layout_provider) { \
layout_radius = \
layout_provider->GetCornerRadiusMetric(views::Emphasis::kMaximum); \
} \
const SkRect new_rect = RectToSkRect(highlight_bounds); \
return SkPath().addRoundRect(new_rect, layout_radius, layout_radius);

#include "../../../../../../../chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc"
Expand Down