| Index: chrome/browser/autocomplete/autocomplete_edit.cc
|
| diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
|
| index 6c971b8243805dcc17ac28307c5952d3da988527..ce015310d0767ba65ed206be674e90844f80f3fb 100644
|
| --- a/chrome/browser/autocomplete/autocomplete_edit.cc
|
| +++ b/chrome/browser/autocomplete/autocomplete_edit.cc
|
| @@ -1028,25 +1028,32 @@ bool AutocompleteEditModel::DoInstant(const AutocompleteMatch& match,
|
| if (!instant)
|
| return false;
|
|
|
| + // It's possible the tab strip does not have an active tab contents, for
|
| + // instance if the tab has been closed or on return from a sleep state
|
| + // (http://crbug.com/105689)
|
| TabContentsWrapper* tab = controller_->GetTabContentsWrapper();
|
| -
|
| if (!tab)
|
| return false;
|
|
|
| if (user_input_in_progress() && popup_->IsOpen()) {
|
| return instant->Update(tab, match, view_->GetText(), UseVerbatimInstant(),
|
| suggested_text);
|
| - } else {
|
| - instant->Hide();
|
| - return false;
|
| }
|
| +
|
| + instant->Hide();
|
| + return false;
|
| }
|
|
|
| void AutocompleteEditModel::DoPrerender(const AutocompleteMatch& match) {
|
| // Do not prerender if the destination URL is the same as the current URL.
|
| if (match.destination_url == PermanentURL())
|
| return;
|
| + // It's possible the tab strip does not have an active tab contents, for
|
| + // instance if the tab has been closed or on return from a sleep state
|
| + // (http://crbug.com/105689)
|
| TabContentsWrapper* tab = controller_->GetTabContentsWrapper();
|
| + if (!tab)
|
| + return;
|
| prerender::PrerenderManager* prerender_manager =
|
| prerender::PrerenderManagerFactory::GetForProfile(tab->profile());
|
| if (prerender_manager) {
|
|
|