diff options
author | robertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 19:33:26 +0000 |
---|---|---|
committer | robertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 19:33:26 +0000 |
commit | d97a5648e02296e7865d3626945494a17e003497 (patch) | |
tree | 36cbe3f0e110172aee0237035dd361e767b5d310 /chrome/browser/automation | |
parent | 23e89da3611459a25b6402226123fe43313f7b1d (diff) | |
download | chromium_src-d97a5648e02296e7865d3626945494a17e003497.zip chromium_src-d97a5648e02296e7865d3626945494a17e003497.tar.gz chromium_src-d97a5648e02296e7865d3626945494a17e003497.tar.bz2 |
Remove DCHECK() in FindInPageNotificationObserver::Observe that gets triggered when FindInPage automation messages come in too quickly.
BUG=Multiple AutomationMsg_Find messages sent rapidly to Chrome (without waiting for the synchronous responses) will trigger this DCHECK().
TEST=Send many AutomationMsg_Find messages very quickly without waiting for responses. Ensure no DCHECKing.
Review URL: http://codereview.chromium.org/155644
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 36e348d..ed4fd46 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -634,13 +634,14 @@ class FindInPageNotificationObserver : public NotificationObserver { if (find_details->active_match_ordinal() > -1) active_match_ordinal_ = find_details->active_match_ordinal(); if (find_details->final_update()) { - DCHECK(reply_message_ != NULL); - - AutomationMsg_FindInPage::WriteReplyParams(reply_message_, - active_match_ordinal_, find_details->number_of_matches()); - - automation_->Send(reply_message_); - reply_message_ = NULL; + if (reply_message_ != NULL) { + AutomationMsg_FindInPage::WriteReplyParams(reply_message_, + active_match_ordinal_, find_details->number_of_matches()); + automation_->Send(reply_message_); + reply_message_ = NULL; + } else { + DLOG(WARNING) << "Multiple final Find messages observed."; + } } else { DLOG(INFO) << "Ignoring, since we only care about the final message"; } |