Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Unified Diff: ui/views/widget/native_widget_mac.mm

Issue 2375903002: Emit OnNativeWidgetDestroying() before clearing the NSWindowDelegate. (Closed)
Patch Set: Add comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/cocoa/bridged_native_widget.mm ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_mac.mm
diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm
index b1e67e8c5da32d7b029525e910ca24ec9524f40e..40ce9b943eb3ccb8833d131372bc1e057bb0eed6 100644
--- a/ui/views/widget/native_widget_mac.mm
+++ b/ui/views/widget/native_widget_mac.mm
@@ -106,6 +106,7 @@ NSInteger StyleMaskForParams(const Widget::InitParams& params) {
// is still a valid pointer, then reset it.
if (bridge_) {
delegate_->OnNativeWidgetDestroying();
+ [GetNativeWindow() setDelegate:nil];
bridge_.reset();
}
delegate_->OnNativeWidgetDestroyed();
« no previous file with comments | « ui/views/cocoa/bridged_native_widget.mm ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698