chrome: win: Fix crash on ShowProfileErrorDialog (fixes #3648)

This commit is contained in:
Marshall Greenblatt 2024-02-15 12:22:52 -05:00
parent 90775f149f
commit ec122a9148
1 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ index b169371e4d42f..509e4bda85b47 100644
// on the screen, we can't actually attach to it. // on the screen, we can't actually attach to it.
parent_window = nullptr; parent_window = nullptr;
diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc
index 3daf40d463e32..dc3712bf6dc89 100644 index 3daf40d463e32..2d84ad7a43c96 100644
--- components/constrained_window/constrained_window_views.cc --- components/constrained_window/constrained_window_views.cc
+++ components/constrained_window/constrained_window_views.cc +++ components/constrained_window/constrained_window_views.cc
@@ -105,15 +105,24 @@ void UpdateModalDialogPosition(views::Widget* widget, @@ -105,15 +105,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
@ -106,9 +106,9 @@ index 3daf40d463e32..dc3712bf6dc89 100644
gfx::NativeView parent_view = gfx::NativeView parent_view =
parent ? CurrentClient()->GetDialogHostView(parent) : nullptr; parent ? CurrentClient()->GetDialogHostView(parent) : nullptr;
+ // Use with CEF windowless rendering. + // Use with CEF windowless rendering.
+ gfx::AcceleratedWidget parent_widget = + gfx::AcceleratedWidget parent_widget = parent ?
+ parent ? gfx::kNullAcceleratedWidget : + CurrentClient()->GetModalDialogHost(parent)->GetAcceleratedWidget() :
+ CurrentClient()->GetModalDialogHost(parent)->GetAcceleratedWidget(); + gfx::kNullAcceleratedWidget;
views::Widget* widget = views::Widget* widget =
- views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view); - views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view);
+ views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view, + views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view,