summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 20:14:24 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-28 20:14:24 +0000
commit24ab41d8fdf2a2b9ac676cc963f8c4309e1cda6d (patch)
tree66b5f6a38dbc7a68988998eaf3ab261615ea6f64 /chrome/browser/extensions
parent854f656404fdd2aa9158d3168d36a75ac343aca8 (diff)
downloadchromium_src-24ab41d8fdf2a2b9ac676cc963f8c4309e1cda6d.zip
chromium_src-24ab41d8fdf2a2b9ac676cc963f8c4309e1cda6d.tar.gz
chromium_src-24ab41d8fdf2a2b9ac676cc963f8c4309e1cda6d.tar.bz2
Fix extension remove tab crasher.
BUG=30592 TEST=See bug (includes test extension). Try also on other platforms. See further posted notes. Review URL: http://codereview.chromium.org/554087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index a006a68..7b9aef0 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -721,7 +721,12 @@ bool RemoveTabFunction::RunImpl() {
return false;
}
- browser->CloseTabContents(contents);
+ // Close the tab in this convoluted way, since there's a chance that the tab
+ // is being dragged, or we're in some other nested event loop. This code path
+ // should ensure that the tab is safely closed under such circumstances,
+ // whereas |Browser::CloseTabContents()| does not.
+ RenderViewHost* render_view_host = contents->render_view_host();
+ render_view_host->delegate()->Close(render_view_host);
return true;
}