Index: chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc |
diff --git a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc |
index fc5275f224f37bb50e7f8be00abf2afa5c3ac54d..b65986ea0e8048c92289bf94f923e7e02b90c685 100644 |
--- a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc |
+++ b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc |
@@ -82,6 +82,9 @@ bool ConstrainedWebDialogDelegateBase::closed_via_webui() const { |
} |
void ConstrainedWebDialogDelegateBase::ReleaseWebContentsOnDialogClose() { |
+ // Remove reference to |this| in the WebContent since the lifetime of the |
+ // WebContent may exceed the one of this object. |
+ ConstrainedWebDialogUI::ClearConstrainedDelegate(web_contents_.get()); |
Avi (use Gerrit)
2017/04/04 14:49:46
This doesn't look right.
// If called, on dialo
arthursonzogni
2017/04/04 15:17:52
I can't. [See the answer above].
Clearing the poin
Lei Zhang
2017/04/06 09:12:54
Please double check my work:
Starting from PrintP
|
release_contents_on_close_ = true; |
} |