diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-30 16:56:29 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-30 16:56:29 +0000 |
commit | 546f0ae7f4f31d6d73d245dd7675c19279b8265d (patch) | |
tree | 89306681e0133ae0e265fcaa8ca4a5b955354dbf | |
parent | 75697e9d71c5765068cdaba5c27fb8be93597466 (diff) | |
download | chromium_src-546f0ae7f4f31d6d73d245dd7675c19279b8265d.zip chromium_src-546f0ae7f4f31d6d73d245dd7675c19279b8265d.tar.gz chromium_src-546f0ae7f4f31d6d73d245dd7675c19279b8265d.tar.bz2 |
Fix NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED.
For NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED the source is a RenderWidgetHost, and there are no details. Fix all the places that do the wrong thing.
BUG=94653
TEST=no DCHECK when closing a tab while a file picker is up
Review URL: http://codereview.chromium.org/7799009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98830 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/file_select_helper.cc | 4 | ||||
-rw-r--r-- | chrome/browser/tab_contents/popup_menu_helper_mac.mm | 3 | ||||
-rw-r--r-- | content/browser/tab_contents/interstitial_page.cc | 5 |
3 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc index 832ed1c..391d1318 100644 --- a/chrome/browser/file_select_helper.cc +++ b/chrome/browser/file_select_helper.cc @@ -247,7 +247,7 @@ void FileSelectHelper::RunFileChooser( notification_registrar_.RemoveAll(); notification_registrar_.Add( this, content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, - Source<RenderViewHost>(render_view_host)); + Source<RenderWidgetHost>(render_view_host)); if (!select_file_dialog_.get()) select_file_dialog_ = SelectFileDialog::Create(this); @@ -300,7 +300,7 @@ void FileSelectHelper::Observe(int type, const NotificationSource& source, const NotificationDetails& details) { DCHECK(type == content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED); - DCHECK(Details<RenderViewHost>(details).ptr() == render_view_host_); + DCHECK(Source<RenderWidgetHost>(source).ptr() == render_view_host_); render_view_host_ = NULL; } diff --git a/chrome/browser/tab_contents/popup_menu_helper_mac.mm b/chrome/browser/tab_contents/popup_menu_helper_mac.mm index d38d10b..4b47f2f 100644 --- a/chrome/browser/tab_contents/popup_menu_helper_mac.mm +++ b/chrome/browser/tab_contents/popup_menu_helper_mac.mm @@ -80,8 +80,7 @@ void PopupMenuHelper::Observe( const NotificationSource& source, const NotificationDetails& details) { DCHECK(type == content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED); - RenderViewHost* rvh = Source<RenderViewHost>(source).ptr(); - DCHECK_EQ(render_view_host_, rvh); + DCHECK(Source<RenderWidgetHost>(source).ptr() == render_view_host_); render_view_host_ = NULL; } diff --git a/content/browser/tab_contents/interstitial_page.cc b/content/browser/tab_contents/interstitial_page.cc index 48bbb44..3e801c7 100644 --- a/content/browser/tab_contents/interstitial_page.cc +++ b/content/browser/tab_contents/interstitial_page.cc @@ -281,8 +281,9 @@ void InterstitialPage::Observe(int type, case content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED: if (action_taken_ == NO_ACTION) { // The RenderViewHost is being destroyed (as part of the tab being - // closed), make sure we clear the blocked requests. - RenderViewHost* rvh = Source<RenderViewHost>(source).ptr(); + // closed); make sure we clear the blocked requests. + RenderViewHost* rvh = static_cast<RenderViewHost*>( + Source<RenderWidgetHost>(source).ptr()); DCHECK(rvh->process()->id() == original_child_id_ && rvh->routing_id() == original_rvh_id_); TakeActionOnResourceDispatcher(CANCEL); |