Replace NOTREACHED() with DCHECK(false) (fixes #3500)

Restores the old behavior of assertion in Debug build only.
This commit is contained in:
Marshall Greenblatt
2023-05-08 18:19:38 +03:00
parent c05ff2847d
commit 0b98db28bb
88 changed files with 390 additions and 390 deletions

View File

@@ -94,7 +94,7 @@ class ResolveHostHelper : public network::ResolveHostClientBase {
CefRefPtr<CefRequestContext> CefRequestContext::GetGlobalContext() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return nullptr;
}
@@ -109,7 +109,7 @@ CefRefPtr<CefRequestContext> CefRequestContext::CreateContext(
CefRefPtr<CefRequestContextHandler> handler) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return nullptr;
}
@@ -126,7 +126,7 @@ CefRefPtr<CefRequestContext> CefRequestContext::CreateContext(
CefRefPtr<CefRequestContextHandler> handler) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return nullptr;
}
@@ -183,12 +183,12 @@ CefRequestContextImpl::GetOrCreateForRequestContext(
bool CefRequestContextImpl::VerifyBrowserContext() const {
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}
if (!browser_context() || !browser_context()->IsInitialized()) {
NOTREACHED() << "Uninitialized context";
DCHECK(false) << "Uninitialized context";
return false;
}