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

Unified Diff: chrome/browser/dom_ui/new_tab_ui.cc

Issue 42566: Fixes crash in new tab page when searching from a field other than the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_ui.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_ui.cc (revision 12208)
+++ chrome/browser/dom_ui/new_tab_ui.cc (working copy)
@@ -544,10 +544,6 @@
TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, std::wstring());
if (url.is_valid()) {
- // Load the URL.
- dom_ui_->web_contents()->OpenURL(url, GURL(), CURRENT_TAB,
- PageTransition::LINK);
-
// Record the user action
std::vector<const TemplateURL*> urls =
template_url_model_->GetTemplateURLs();
@@ -572,6 +568,12 @@
item_number++;
}
+
+ // Load the URL.
+ dom_ui_->web_contents()->OpenURL(url, GURL(), CURRENT_TAB,
+ PageTransition::LINK);
+ // We've been deleted.
+ return;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698