summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-01 21:06:11 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-01 21:06:11 +0000
commitf3afdbaa8f38c7fe1ec6a35499840594344d7872 (patch)
tree0818e2a40d2ec6456611cb7195e1399e2539699f
parent627d64404a7aae386c314770c423624396e7d1b9 (diff)
downloadchromium_src-f3afdbaa8f38c7fe1ec6a35499840594344d7872.zip
chromium_src-f3afdbaa8f38c7fe1ec6a35499840594344d7872.tar.gz
chromium_src-f3afdbaa8f38c7fe1ec6a35499840594344d7872.tar.bz2
Merge 37433 - 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 TBR=viettrungluu@chromium.org, shess@chromium.org Review URL: http://codereview.chromium.org/555203 git-svn-id: svn://svn.chromium.org/chrome/branches/307/src@37741 0039d316-1c4b-4281-b951-d872f2087c98
-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;
}