From 366c07dfbd9211fa225a98a01e5247558e7a0b50 Mon Sep 17 00:00:00 2001 From: "motek@chromium.org" Date: Tue, 14 Dec 2010 20:49:44 +0000 Subject: These DCHECKs are sort-of expected in a fast startup sequence. They are still errors, but DCHECKs make use of automated testing tools against the debug build virtually impossible. This will be followed-up. BUG=66863 BUG=66864 TEST=none Review URL: http://codereview.chromium.org/5751001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69170 0039d316-1c4b-4281-b951-d872f2087c98 --- ceee/ie/broker/tab_api_module.cc | 8 +++++--- ceee/ie/plugin/bho/browser_helper_object.cc | 5 ++++- ceee/ie/plugin/bho/executor.cc | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'ceee') diff --git a/ceee/ie/broker/tab_api_module.cc b/ceee/ie/broker/tab_api_module.cc index 7e933e1..f1fbba4 100644 --- a/ceee/ie/broker/tab_api_module.cc +++ b/ceee/ie/broker/tab_api_module.cc @@ -969,10 +969,12 @@ void CreateTab::Execute(const ListValue& args, int request_id) { long flags = selected ? navOpenInNewTab : navOpenInBackgroundTab; HRESULT hr = executor->Navigate(base::win::ScopedBstr(url_wstring.c_str()), flags, base::win::ScopedBstr(L"_blank")); - // We can DCHECK here because navigating to a new tab shouldn't fail as - // described in the comment at the bottom of CeeeExecutor::Navigate(). - DCHECK(SUCCEEDED(hr)) << "Failed to create tab. " << com::LogHr(hr); if (FAILED(hr)) { + // Log the error without DCHECKING There are legit reasons for Navigate + // to fail, as explained in comments in CeeeExecutor::Navigate. + // TODO(motek@chromium.org) See why exactly we fail here in some + // integration tests. + LOG(ERROR) << "Failed to create tab. " << com::LogHr(hr); result->PostError("Internal error while trying to create tab."); return; } diff --git a/ceee/ie/plugin/bho/browser_helper_object.cc b/ceee/ie/plugin/bho/browser_helper_object.cc index dc4bac2..93dc812 100644 --- a/ceee/ie/plugin/bho/browser_helper_object.cc +++ b/ceee/ie/plugin/bho/browser_helper_object.cc @@ -1482,7 +1482,10 @@ HRESULT BrowserHelperObject::InsertCode(BSTR code, BSTR file, BOOL all_frames, } else if (web_browser_ != NULL) { ScopedFrameEventHandlerPtr handler; HRESULT hr = GetBrowserHandler(web_browser_, handler.Receive()); - DCHECK(SUCCEEDED(hr) && handler != NULL) << com::LogHr(hr); + LOG_IF(ERROR, FAILED(hr) || handler == NULL) << + "GetBrowserHandler fails in InsertCode: " << com::LogHr(hr); + if (FAILED(hr)) + return hr; if (handler != NULL) { hr = handler->InsertCode(code, file, type); diff --git a/ceee/ie/plugin/bho/executor.cc b/ceee/ie/plugin/bho/executor.cc index f8dd815..00571d4 100644 --- a/ceee/ie/plugin/bho/executor.cc +++ b/ceee/ie/plugin/bho/executor.cc @@ -880,7 +880,7 @@ STDMETHODIMP CeeeExecutor::InsertCode(BSTR code, BSTR file, BOOL all_frames, hr = frame_handler_host->InsertCode(code, file, all_frames, type); if (FAILED(hr)) { - NOTREACHED() << "Failed to insert code. " << com::LogHr(hr); + LOG(ERROR) << "Failed to insert code. " << com::LogHr(hr); return hr; } -- cgit v1.1