Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: chrome/browser/extensions/extension_tabs_module.cc

Issue 9320016: Fix crash in CreateTabFunction::RunImpl(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/tabs/basics/crud2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tabs_module.cc
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index f737d37cff16fb875b593f9c50bf7b21826b7e6c..62e6c18be2dcf10e0a3a56f53b933a08ddfc398d 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -961,6 +961,9 @@ bool CreateTabFunction::RunImpl() {
params.tabstrip_add_types = add_types;
browser::Navigate(&params);
+ // The tab may have been created in a different window, so make sure we look
+ // at the right tab strip.
+ tab_strip = params.browser->tabstrip_model();
int new_index = tab_strip->GetIndexOfTabContents(params.target_contents);
if (opener)
tab_strip->SetOpenerOfTabContentsAt(new_index, opener);
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/tabs/basics/crud2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698