summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/gtk/find_bar_gtk.cc2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc4
2 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc
index c1d4fa0..d789943 100644
--- a/chrome/browser/gtk/find_bar_gtk.cc
+++ b/chrome/browser/gtk/find_bar_gtk.cc
@@ -306,7 +306,7 @@ void FindBarGtk::UpdateUIForFindResult(const FindNotificationDetails& result,
// repopulate the Find box with what was passed in.
std::string search_string(gtk_entry_get_text(GTK_ENTRY(text_entry_)));
if (search_string.empty() && !text_entry_utf8.empty()) {
- gtk_entry_set_text(GTK_ENTRY(text_entry_), text_entry_utf8.c_str());
+ SetFindText(find_text);
gtk_entry_select_region(GTK_ENTRY(text_entry_), 0, -1);
}
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index a5eefc5..9b5098f 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1507,6 +1507,10 @@ void TabContents::OnFindReply(int request_id,
const gfx::Rect& selection_rect,
int active_match_ordinal,
bool final_update) {
+ // Ignore responses for requests that have been aborted.
+ if (find_op_aborted_)
+ return;
+
// Ignore responses for requests other than the one we have most recently
// issued. That way we won't act on stale results when the user has
// already typed in another query.