diff options
Diffstat (limited to 'chrome/browser/dom_ui/html_dialog_ui.cc')
-rw-r--r-- | chrome/browser/dom_ui/html_dialog_ui.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/dom_ui/html_dialog_ui.cc b/chrome/browser/dom_ui/html_dialog_ui.cc index ab86040d..4062438 100644 --- a/chrome/browser/dom_ui/html_dialog_ui.cc +++ b/chrome/browser/dom_ui/html_dialog_ui.cc @@ -13,8 +13,14 @@ HtmlDialogUI::HtmlDialogUI(WebContents* web_contents) : DOMUI(web_contents) { } HtmlDialogUI::~HtmlDialogUI() { - // Make sure we can't get any more callbacks. - GetPropertyAccessor().DeleteProperty(web_contents()->property_bag()); + // Don't unregister our property. During the teardown of the TabContents, + // this will be deleted, but the TabContents will already be destroyed. + // + // This object is owned indirectly by the TabContents. DOMUIs can change, so + // it's scary if this DOMUI is changed out and replaced with something else, + // since the property will still point to the old delegate. But the delegate + // is itself the owner of the TabContents for a dialog so will be in scope, + // and the HTML dialogs won't swap DOMUIs anyway since they don't navigate. } // static |