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:22:46 +03:00
parent 153b1862fa
commit 4dbecb3301
88 changed files with 389 additions and 389 deletions

View File

@@ -26,7 +26,7 @@ void CefExtensionHostDelegate::OnMainFrameCreatedForBackgroundPage(
content::JavaScriptDialogManager*
CefExtensionHostDelegate::GetJavaScriptDialogManager() {
// Never routed here from AlloyBrowserHostImpl.
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -46,7 +46,7 @@ void CefExtensionHostDelegate::ProcessMediaAccessRequest(
content::MediaResponseCallback callback,
const Extension* extension) {
// Never routed here from AlloyBrowserHostImpl.
NOTREACHED();
DCHECK(false);
}
bool CefExtensionHostDelegate::CheckMediaAccessPermission(
@@ -55,18 +55,18 @@ bool CefExtensionHostDelegate::CheckMediaAccessPermission(
blink::mojom::MediaStreamType type,
const Extension* extension) {
// Never routed here from AlloyBrowserHostImpl.
NOTREACHED();
DCHECK(false);
return false;
}
content::PictureInPictureResult CefExtensionHostDelegate::EnterPictureInPicture(
content::WebContents* web_contents) {
NOTREACHED();
DCHECK(false);
return content::PictureInPictureResult::kNotSupported;
}
void CefExtensionHostDelegate::ExitPictureInPicture() {
NOTREACHED();
DCHECK(false);
}
} // namespace extensions

View File

@@ -500,20 +500,20 @@ void CefExtensionSystem::InstallUpdate(
const base::FilePath& temp_dir,
bool install_immediately,
InstallUpdateCallback install_update_callback) {
NOTREACHED();
DCHECK(false);
base::DeletePathRecursively(temp_dir);
}
void CefExtensionSystem::PerformActionBasedOnOmahaAttributes(
const std::string& extension_id,
const base::Value& attributes) {
NOTREACHED();
DCHECK(false);
}
bool CefExtensionSystem::FinishDelayedInstallationIfReady(
const std::string& extension_id,
bool install_immediately) {
NOTREACHED();
DCHECK(false);
return false;
}

View File

@@ -28,7 +28,7 @@ CefExtensionsAPIClient::CefExtensionsAPIClient() {}
AppViewGuestDelegate* CefExtensionsAPIClient::CreateAppViewGuestDelegate()
const {
// TODO(extensions): Implement to support Apps.
NOTREACHED();
DCHECK(false);
return nullptr;
}

View File

@@ -246,7 +246,7 @@ ProcessManagerDelegate* CefExtensionsBrowserClient::GetProcessManagerDelegate()
std::unique_ptr<ExtensionHostDelegate>
CefExtensionsBrowserClient::CreateExtensionHostDelegate() {
// CEF does not use the ExtensionHost constructor that calls this method.
NOTREACHED();
DCHECK(false);
return std::unique_ptr<ExtensionHostDelegate>();
}
@@ -353,7 +353,7 @@ std::unique_ptr<RuntimeAPIDelegate>
CefExtensionsBrowserClient::CreateRuntimeAPIDelegate(
content::BrowserContext* context) const {
// TODO(extensions): Implement to support Apps.
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -378,7 +378,7 @@ void CefExtensionsBrowserClient::BroadcastEventToRenderers(
ExtensionCache* CefExtensionsBrowserClient::GetExtensionCache() {
// Only used by Chrome via ExtensionService.
NOTREACHED();
DCHECK(false);
return nullptr;
}

View File

@@ -34,19 +34,19 @@ void CefValueStore::set_status_code(StatusCode status_code) {
size_t CefValueStore::GetBytesInUse(const std::string& key) {
// Let SettingsStorageQuotaEnforcer implement this.
NOTREACHED() << "Not implemented";
DCHECK(false) << "Not implemented";
return 0;
}
size_t CefValueStore::GetBytesInUse(const std::vector<std::string>& keys) {
// Let SettingsStorageQuotaEnforcer implement this.
NOTREACHED() << "Not implemented";
DCHECK(false) << "Not implemented";
return 0;
}
size_t CefValueStore::GetBytesInUse() {
// Let SettingsStorageQuotaEnforcer implement this.
NOTREACHED() << "Not implemented";
DCHECK(false) << "Not implemented";
return 0;
}