diff options
author | motek@chromium.org <motek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 20:49:44 +0000 |
---|---|---|
committer | motek@chromium.org <motek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 20:49:44 +0000 |
commit | 366c07dfbd9211fa225a98a01e5247558e7a0b50 (patch) | |
tree | 47af2f3b6f947022533e623b64520e4153aa8016 /ceee | |
parent | 0917cf354c488db47f16145285b9e8c4ddb5384d (diff) | |
download | chromium_src-366c07dfbd9211fa225a98a01e5247558e7a0b50.zip chromium_src-366c07dfbd9211fa225a98a01e5247558e7a0b50.tar.gz chromium_src-366c07dfbd9211fa225a98a01e5247558e7a0b50.tar.bz2 |
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
Diffstat (limited to 'ceee')
-rw-r--r-- | ceee/ie/broker/tab_api_module.cc | 8 | ||||
-rw-r--r-- | ceee/ie/plugin/bho/browser_helper_object.cc | 5 | ||||
-rw-r--r-- | ceee/ie/plugin/bho/executor.cc | 2 |
3 files changed, 10 insertions, 5 deletions
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; } |