summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_unittest.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-03 23:07:35 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-03 23:07:35 +0000
commit052212838598dff1ae487e654016da0771b9d975 (patch)
tree21bbec60dec8c7e316a0e99ea9f387ba2e99075e /chrome/browser/autocomplete/autocomplete_unittest.cc
parent3828a755146e0102b934281129fdd6425ca19a0f (diff)
downloadchromium_src-052212838598dff1ae487e654016da0771b9d975.zip
chromium_src-052212838598dff1ae487e654016da0771b9d975.tar.gz
chromium_src-052212838598dff1ae487e654016da0771b9d975.tar.bz2
Fix crash due to AutocompletePopup trying to draw the old results when they were no longer available.I introduced this regression when moving |result_| to the AutocompleteController; the specific problem was the "result_.CopyFrom(latest_result_);" line I added when handling the synchronous messages being available. This was done so the popup could get at the new results to update the edit with them.Instead, go back to the old method (of not updating the results until the first coalesced update came in), and pass the appropriate result set as a Details<> in the notification, so the popup can get at it without having to know how the controller works under-the-hood.BUG=11742
Review URL: http://codereview.chromium.org/119116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_unittest.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete_unittest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc
index e7fdd4c..500d79d3 100644
--- a/chrome/browser/autocomplete/autocomplete_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_unittest.cc
@@ -162,7 +162,7 @@ void AutocompleteProviderTest::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
if (controller_->done()) {
- result_.CopyFrom(controller_->result());
+ result_.CopyFrom(*(Details<const AutocompleteResult>(details).ptr()));
MessageLoop::current()->Quit();
}
}