From 4dbecb330146bff53d9dfddbfeb2de72679e1573 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 8 May 2023 18:22:46 +0300 Subject: [PATCH] Replace NOTREACHED() with DCHECK(false) (fixes #3500) Restores the old behavior of assertion in Debug build only. --- libcef/browser/alloy/alloy_browser_context.cc | 10 +- .../browser/alloy/alloy_browser_host_impl.cc | 42 +++--- .../alloy/browser_platform_delegate_alloy.cc | 2 +- .../alloy/chrome_browser_process_alloy.cc | 70 +++++----- libcef/browser/alloy/chrome_profile_alloy.cc | 28 ++-- .../alloy_constrained_window_views_client.cc | 4 +- .../alloy_web_contents_dialog_helper.cc | 6 +- libcef/browser/browser_frame.cc | 2 +- libcef/browser/browser_host_base.cc | 2 +- libcef/browser/browser_host_create.cc | 12 +- libcef/browser/browser_info_manager.cc | 2 +- libcef/browser/browser_platform_delegate.cc | 72 +++++----- .../browser_platform_delegate_create.cc | 2 +- .../browser_platform_delegate_chrome.cc | 4 +- libcef/browser/context.cc | 20 +-- libcef/browser/devtools/devtools_frontend.cc | 2 +- libcef/browser/download_manager_delegate.cc | 2 +- libcef/browser/extension_impl.cc | 4 +- .../extensions/extension_host_delegate.cc | 10 +- libcef/browser/extensions/extension_system.cc | 6 +- .../extensions/extensions_api_client.cc | 2 +- .../extensions/extensions_browser_client.cc | 6 +- .../extensions/value_store/cef_value_store.cc | 6 +- libcef/browser/file_dialog_manager.cc | 2 +- libcef/browser/frame_host_impl.cc | 6 +- .../browser/global_preference_manager_impl.cc | 2 +- libcef/browser/image_impl.cc | 4 +- libcef/browser/main_runner.cc | 4 +- .../browser/media_router/media_router_impl.cc | 2 +- libcef/browser/menu_model_impl.cc | 4 +- .../browser_platform_delegate_native_aura.cc | 2 +- .../browser_platform_delegate_native_linux.cc | 2 +- .../browser_platform_delegate_native_mac.mm | 2 +- .../browser_platform_delegate_native_win.cc | 4 +- libcef/browser/native/cursor_util_aura.cc | 2 +- libcef/browser/net/chrome_scheme_handler.cc | 4 +- libcef/browser/net/crlset_file_util_impl.cc | 2 +- libcef/browser/net/internal_scheme_handler.cc | 8 +- .../net_service/browser_urlrequest_impl.cc | 2 +- .../net_service/stream_reader_url_loader.cc | 4 +- libcef/browser/origin_whitelist_impl.cc | 10 +- libcef/browser/osr/motion_event_osr.cc | 2 +- .../osr/render_widget_host_view_osr.cc | 10 +- .../touch_selection_controller_client_osr.cc | 14 +- libcef/browser/path_util_impl.cc | 2 +- libcef/browser/permission_prompt.cc | 2 +- libcef/browser/prefs/pref_helper.cc | 2 +- libcef/browser/prefs/pref_registrar.cc | 2 +- libcef/browser/prefs/renderer_prefs.cc | 2 +- libcef/browser/process_util_impl.cc | 4 +- libcef/browser/request_context_impl.cc | 10 +- libcef/browser/scheme_impl.cc | 4 +- libcef/browser/server_impl.cc | 16 +-- libcef/browser/simple_menu_model_impl.cc | 2 +- libcef/browser/thread_util.h | 16 +-- libcef/browser/trace_impl.cc | 8 +- libcef/browser/xml_reader_impl.cc | 2 +- libcef/browser/zip_reader_impl.cc | 4 +- .../common/cef_crash_report_upload_thread.cc | 2 +- libcef/common/command_line_impl.cc | 4 +- libcef/common/drag_data_impl.cc | 10 +- libcef/common/file_util_impl.cc | 2 +- libcef/common/request_impl.cc | 22 +-- libcef/common/resource_util.cc | 4 +- libcef/common/response_impl.cc | 8 +- libcef/common/task_runner_impl.cc | 2 +- libcef/common/thread_impl.cc | 6 +- libcef/common/urlrequest_impl.cc | 6 +- libcef/common/value_base.h | 6 +- libcef/common/values_impl.cc | 2 +- libcef/common/waitable_event_impl.cc | 2 +- libcef/renderer/browser_impl.cc | 2 +- libcef/renderer/dom_document_impl.cc | 2 +- libcef/renderer/dom_node_impl.cc | 20 +-- libcef/renderer/frame_impl.cc | 4 +- libcef/renderer/render_manager.cc | 4 +- libcef/renderer/thread_util.h | 16 +-- libcef/renderer/v8_impl.cc | 130 +++++++++--------- libcef_dll/base/cef_callback_internal.cc | 2 +- libcef_dll/cpptoc/base_ref_counted_cpptoc.cc | 2 +- libcef_dll/cpptoc/base_scoped_cpptoc.cc | 4 +- libcef_dll/ctocpp/base_ref_counted_ctocpp.cc | 2 +- libcef_dll/ctocpp/base_scoped_ctocpp.cc | 4 +- libcef_dll/sandbox/sandbox_win.cc | 4 +- libcef_dll/wrapper/cef_xml_object.cc | 2 +- libcef_dll/wrapper/libcef_dll_wrapper2.cc | 4 +- tools/make_cpptoc_impl.py | 8 +- tools/make_ctocpp_impl.py | 8 +- 88 files changed, 389 insertions(+), 389 deletions(-) diff --git a/libcef/browser/alloy/alloy_browser_context.cc b/libcef/browser/alloy/alloy_browser_context.cc index ca4ccd05a..bad79d272 100644 --- a/libcef/browser/alloy/alloy_browser_context.cc +++ b/libcef/browser/alloy/alloy_browser_context.cc @@ -440,30 +440,30 @@ ProfileKey* AlloyBrowserContext::GetProfileKey() const { policy::SchemaRegistryService* AlloyBrowserContext::GetPolicySchemaRegistryService() { - NOTREACHED(); + DCHECK(false); return nullptr; } policy::UserCloudPolicyManager* AlloyBrowserContext::GetUserCloudPolicyManager() { - NOTREACHED(); + DCHECK(false); return nullptr; } policy::ProfilePolicyConnector* AlloyBrowserContext::GetProfilePolicyConnector() { - NOTREACHED(); + DCHECK(false); return nullptr; } const policy::ProfilePolicyConnector* AlloyBrowserContext::GetProfilePolicyConnector() const { - NOTREACHED(); + DCHECK(false); return nullptr; } bool AlloyBrowserContext::IsNewProfile() const { - NOTREACHED(); + DCHECK(false); return false; } diff --git a/libcef/browser/alloy/alloy_browser_host_impl.cc b/libcef/browser/alloy/alloy_browser_host_impl.cc index a6720dee8..095d73c45 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.cc +++ b/libcef/browser/alloy/alloy_browser_host_impl.cc @@ -296,7 +296,7 @@ void AlloyBrowserHostImpl::CloseBrowser(bool force_close) { bool AlloyBrowserHostImpl::TryCloseBrowser() { if (!CEF_CURRENTLY_ON_UIT()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return false; } @@ -333,7 +333,7 @@ CefWindowHandle AlloyBrowserHostImpl::GetOpenerWindowHandle() { double AlloyBrowserHostImpl::GetZoomLevel() { // Verify that this method is being called on the UI thread. if (!CEF_CURRENTLY_ON_UIT()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return 0; } @@ -416,7 +416,7 @@ void AlloyBrowserHostImpl::CloseDevTools() { bool AlloyBrowserHostImpl::HasDevTools() { if (!CEF_CURRENTLY_ON_UIT()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return false; } @@ -481,7 +481,7 @@ void AlloyBrowserHostImpl::WasResized() { void AlloyBrowserHostImpl::WasHidden(bool hidden) { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -498,7 +498,7 @@ void AlloyBrowserHostImpl::WasHidden(bool hidden) { void AlloyBrowserHostImpl::NotifyScreenInfoChanged() { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -516,7 +516,7 @@ void AlloyBrowserHostImpl::NotifyScreenInfoChanged() { void AlloyBrowserHostImpl::Invalidate(PaintElementType type) { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -533,7 +533,7 @@ void AlloyBrowserHostImpl::Invalidate(PaintElementType type) { void AlloyBrowserHostImpl::SendExternalBeginFrame() { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -551,7 +551,7 @@ void AlloyBrowserHostImpl::SendExternalBeginFrame() { void AlloyBrowserHostImpl::SendTouchEvent(const CefTouchEvent& event) { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -582,7 +582,7 @@ void AlloyBrowserHostImpl::SendCaptureLostEvent() { int AlloyBrowserHostImpl::GetWindowlessFrameRate() { // Verify that this method is being called on the UI thread. if (!CEF_CURRENTLY_ON_UIT()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return 0; } @@ -795,7 +795,7 @@ void AlloyBrowserHostImpl::ImeSetComposition( const CefRange& replacement_range, const CefRange& selection_range) { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -817,7 +817,7 @@ void AlloyBrowserHostImpl::ImeCommitText(const CefString& text, const CefRange& replacement_range, int relative_cursor_pos) { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -836,7 +836,7 @@ void AlloyBrowserHostImpl::ImeCommitText(const CefString& text, void AlloyBrowserHostImpl::ImeFinishComposingText(bool keep_selection) { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -854,7 +854,7 @@ void AlloyBrowserHostImpl::ImeFinishComposingText(bool keep_selection) { void AlloyBrowserHostImpl::ImeCancelComposition() { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -875,7 +875,7 @@ void AlloyBrowserHostImpl::DragTargetDragEnter( const CefMouseEvent& event, CefBrowserHost::DragOperationsMask allowed_ops) { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -887,7 +887,7 @@ void AlloyBrowserHostImpl::DragTargetDragEnter( } if (!drag_data.get()) { - NOTREACHED(); + DCHECK(false); return; } @@ -900,7 +900,7 @@ void AlloyBrowserHostImpl::DragTargetDragOver( const CefMouseEvent& event, CefBrowserHost::DragOperationsMask allowed_ops) { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -918,7 +918,7 @@ void AlloyBrowserHostImpl::DragTargetDragOver( void AlloyBrowserHostImpl::DragTargetDragLeave() { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -936,7 +936,7 @@ void AlloyBrowserHostImpl::DragTargetDragLeave() { void AlloyBrowserHostImpl::DragTargetDrop(const CefMouseEvent& event) { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -953,7 +953,7 @@ void AlloyBrowserHostImpl::DragTargetDrop(const CefMouseEvent& event) { void AlloyBrowserHostImpl::DragSourceSystemDragEnded() { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -974,7 +974,7 @@ void AlloyBrowserHostImpl::DragSourceEndedAt( int y, CefBrowserHost::DragOperationsMask op) { if (!IsWindowless()) { - NOTREACHED() << "Window rendering is not disabled"; + DCHECK(false) << "Window rendering is not disabled"; return; } @@ -1004,7 +1004,7 @@ void AlloyBrowserHostImpl::SetAudioMuted(bool mute) { bool AlloyBrowserHostImpl::IsAudioMuted() { if (!CEF_CURRENTLY_ON_UIT()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return false; } if (!web_contents()) { diff --git a/libcef/browser/alloy/browser_platform_delegate_alloy.cc b/libcef/browser/alloy/browser_platform_delegate_alloy.cc index 2a8b43b1b..0d9f8cb3b 100644 --- a/libcef/browser/alloy/browser_platform_delegate_alloy.cc +++ b/libcef/browser/alloy/browser_platform_delegate_alloy.cc @@ -219,7 +219,7 @@ void CefBrowserPlatformDelegateAlloy::CreateExtensionHost( extension, web_contents_, url, host_type); // Load will be triggered by ProcessManager::CreateBackgroundHost. } else { - NOTREACHED() << " Unsupported extension host type: " << host_type; + DCHECK(false) << " Unsupported extension host type: " << host_type; } } diff --git a/libcef/browser/alloy/chrome_browser_process_alloy.cc b/libcef/browser/alloy/chrome_browser_process_alloy.cc index 4b72f91c8..04ab730a1 100644 --- a/libcef/browser/alloy/chrome_browser_process_alloy.cc +++ b/libcef/browser/alloy/chrome_browser_process_alloy.cc @@ -136,27 +136,27 @@ void ChromeBrowserProcessAlloy::CleanupOnUIThread() { } void ChromeBrowserProcessAlloy::EndSession() { - NOTREACHED(); + DCHECK(false); } void ChromeBrowserProcessAlloy::FlushLocalStateAndReply( base::OnceClosure reply) { - NOTREACHED(); + DCHECK(false); } device::GeolocationManager* ChromeBrowserProcessAlloy::geolocation_manager() { - NOTREACHED(); + DCHECK(false); return nullptr; } metrics_services_manager::MetricsServicesManager* ChromeBrowserProcessAlloy::GetMetricsServicesManager() { - NOTREACHED(); + DCHECK(false); return nullptr; } metrics::MetricsService* ChromeBrowserProcessAlloy::metrics_service() { - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -168,7 +168,7 @@ ChromeBrowserProcessAlloy::system_network_context_manager() { network::NetworkQualityTracker* ChromeBrowserProcessAlloy::network_quality_tracker() { - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -197,17 +197,17 @@ PrefService* ChromeBrowserProcessAlloy::local_state() { scoped_refptr ChromeBrowserProcessAlloy::shared_url_loader_factory() { - NOTREACHED(); + DCHECK(false); return nullptr; } variations::VariationsService* ChromeBrowserProcessAlloy::variations_service() { - NOTREACHED(); + DCHECK(false); return nullptr; } BrowserProcessPlatformPart* ChromeBrowserProcessAlloy::platform_part() { - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -218,19 +218,19 @@ ChromeBrowserProcessAlloy::extension_event_router_forwarder() { } NotificationUIManager* ChromeBrowserProcessAlloy::notification_ui_manager() { - NOTREACHED(); + DCHECK(false); return nullptr; } NotificationPlatformBridge* ChromeBrowserProcessAlloy::notification_platform_bridge() { - NOTREACHED(); + DCHECK(false); return nullptr; } void ChromeBrowserProcessAlloy::SetGeolocationManager( std::unique_ptr geolocation_manager) { - NOTREACHED(); + DCHECK(false); } policy::ChromeBrowserPolicyConnector* @@ -247,25 +247,25 @@ policy::PolicyService* ChromeBrowserProcessAlloy::policy_service() { } IconManager* ChromeBrowserProcessAlloy::icon_manager() { - NOTREACHED(); + DCHECK(false); return nullptr; } GpuModeManager* ChromeBrowserProcessAlloy::gpu_mode_manager() { - NOTREACHED(); + DCHECK(false); return nullptr; } void ChromeBrowserProcessAlloy::CreateDevToolsProtocolHandler() { - NOTREACHED(); + DCHECK(false); } void ChromeBrowserProcessAlloy::CreateDevToolsAutoOpener() { - NOTREACHED(); + DCHECK(false); } bool ChromeBrowserProcessAlloy::IsShuttingDown() { - NOTREACHED(); + DCHECK(false); return false; } @@ -294,7 +294,7 @@ ChromeBrowserProcessAlloy::background_printing_manager() { IntranetRedirectDetector* ChromeBrowserProcessAlloy::intranet_redirect_detector() { - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -309,29 +309,29 @@ void ChromeBrowserProcessAlloy::SetApplicationLocale( } DownloadStatusUpdater* ChromeBrowserProcessAlloy::download_status_updater() { - NOTREACHED(); + DCHECK(false); return nullptr; } DownloadRequestLimiter* ChromeBrowserProcessAlloy::download_request_limiter() { - NOTREACHED(); + DCHECK(false); return nullptr; } #if BUILDFLAG(ENABLE_BACKGROUND_MODE) BackgroundModeManager* ChromeBrowserProcessAlloy::background_mode_manager() { - NOTREACHED(); + DCHECK(false); return nullptr; } void ChromeBrowserProcessAlloy::set_background_mode_manager_for_test( std::unique_ptr manager) { - NOTREACHED(); + DCHECK(false); } #endif StatusTray* ChromeBrowserProcessAlloy::status_tray() { - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -342,12 +342,12 @@ ChromeBrowserProcessAlloy::safe_browsing_service() { subresource_filter::RulesetService* ChromeBrowserProcessAlloy::subresource_filter_ruleset_service() { - NOTREACHED(); + DCHECK(false); return nullptr; } StartupData* ChromeBrowserProcessAlloy::startup_data() { - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -379,55 +379,55 @@ ChromeBrowserProcessAlloy::component_updater() { MediaFileSystemRegistry* ChromeBrowserProcessAlloy::media_file_system_registry() { - NOTREACHED(); + DCHECK(false); return nullptr; } WebRtcLogUploader* ChromeBrowserProcessAlloy::webrtc_log_uploader() { - NOTREACHED(); + DCHECK(false); return nullptr; } network_time::NetworkTimeTracker* ChromeBrowserProcessAlloy::network_time_tracker() { - NOTREACHED(); + DCHECK(false); return nullptr; } gcm::GCMDriver* ChromeBrowserProcessAlloy::gcm_driver() { - NOTREACHED(); + DCHECK(false); return nullptr; } resource_coordinator::TabManager* ChromeBrowserProcessAlloy::GetTabManager() { - NOTREACHED(); + DCHECK(false); return nullptr; } resource_coordinator::ResourceCoordinatorParts* ChromeBrowserProcessAlloy::resource_coordinator_parts() { - NOTREACHED(); + DCHECK(false); return nullptr; } BuildState* ChromeBrowserProcessAlloy::GetBuildState() { - NOTREACHED(); + DCHECK(false); return nullptr; } SerialPolicyAllowedPorts* ChromeBrowserProcessAlloy::serial_policy_allowed_ports() { - NOTREACHED(); + DCHECK(false); return nullptr; } HidPolicyAllowedDevices* ChromeBrowserProcessAlloy::hid_policy_allowed_devices() { - NOTREACHED(); + DCHECK(false); return nullptr; } HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() { - NOTREACHED(); + DCHECK(false); return nullptr; } diff --git a/libcef/browser/alloy/chrome_profile_alloy.cc b/libcef/browser/alloy/chrome_profile_alloy.cc index 7e5b3c0d0..5615c5627 100644 --- a/libcef/browser/alloy/chrome_profile_alloy.cc +++ b/libcef/browser/alloy/chrome_profile_alloy.cc @@ -54,7 +54,7 @@ bool ChromeProfileAlloy::IsOffTheRecord() const { } const Profile::OTRProfileID& ChromeProfileAlloy::GetOTRProfileID() const { - NOTREACHED(); + DCHECK(false); static base::NoDestructor otr_profile_id( Profile::OTRProfileID::PrimaryID()); return *otr_profile_id; @@ -68,19 +68,19 @@ variations::VariationsClient* ChromeProfileAlloy::GetVariationsClient() { } scoped_refptr ChromeProfileAlloy::GetIOTaskRunner() { - NOTREACHED(); + DCHECK(false); return scoped_refptr(); } std::string ChromeProfileAlloy::GetProfileUserName() const { - NOTREACHED(); + DCHECK(false); return std::string(); } Profile* ChromeProfileAlloy::GetOffTheRecordProfile( const Profile::OTRProfileID& otr_profile_id, bool create_if_needed) { - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -89,7 +89,7 @@ std::vector ChromeProfileAlloy::GetAllOffTheRecordProfiles() { } void ChromeProfileAlloy::DestroyOffTheRecordProfile(Profile* otr_profile) { - NOTREACHED(); + DCHECK(false); } bool ChromeProfileAlloy::HasOffTheRecordProfile( @@ -115,17 +115,17 @@ bool ChromeProfileAlloy::IsChild() const { ExtensionSpecialStoragePolicy* ChromeProfileAlloy::GetExtensionSpecialStoragePolicy() { - NOTREACHED(); + DCHECK(false); return nullptr; } bool ChromeProfileAlloy::IsSameOrParent(Profile* profile) { - NOTREACHED(); + DCHECK(false); return false; } base::Time ChromeProfileAlloy::GetStartTime() const { - NOTREACHED(); + DCHECK(false); return base::Time(); } @@ -139,30 +139,30 @@ void ChromeProfileAlloy::set_last_selected_directory( } GURL ChromeProfileAlloy::GetHomePage() { - NOTREACHED(); + DCHECK(false); return GURL(); } bool ChromeProfileAlloy::WasCreatedByVersionOrLater( const std::string& version) { - NOTREACHED(); + DCHECK(false); return false; } base::Time ChromeProfileAlloy::GetCreationTime() const { - NOTREACHED(); + DCHECK(false); return base::Time(); } void ChromeProfileAlloy::SetCreationTimeForTesting(base::Time creation_time) { - NOTREACHED(); + DCHECK(false); } void ChromeProfileAlloy::RecordPrimaryMainFrameNavigation() { - NOTREACHED(); + DCHECK(false); } bool ChromeProfileAlloy::IsSignedIn() { - NOTREACHED(); + DCHECK(false); return false; } diff --git a/libcef/browser/alloy/dialogs/alloy_constrained_window_views_client.cc b/libcef/browser/alloy/dialogs/alloy_constrained_window_views_client.cc index 0b0d371cb..a45782cbf 100644 --- a/libcef/browser/alloy/dialogs/alloy_constrained_window_views_client.cc +++ b/libcef/browser/alloy/dialogs/alloy_constrained_window_views_client.cc @@ -29,7 +29,7 @@ class AlloyConstrainedWindowViewsClient if (auto browser = GetPreferredBrowser(parent)) { return browser->platform_delegate()->GetWebContentsModalDialogHost(); } - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -73,4 +73,4 @@ class AlloyConstrainedWindowViewsClient std::unique_ptr CreateAlloyConstrainedWindowViewsClient() { return std::make_unique(); -} \ No newline at end of file +} diff --git a/libcef/browser/alloy/dialogs/alloy_web_contents_dialog_helper.cc b/libcef/browser/alloy/dialogs/alloy_web_contents_dialog_helper.cc index 402ce1725..c90b784ce 100644 --- a/libcef/browser/alloy/dialogs/alloy_web_contents_dialog_helper.cc +++ b/libcef/browser/alloy/dialogs/alloy_web_contents_dialog_helper.cc @@ -33,7 +33,7 @@ bool AlloyWebContentsDialogHelper::IsWebContentsVisible( } else if (auto native_view = web_contents->GetNativeView()) { return platform_util::IsVisible(native_view); } - NOTREACHED(); + DCHECK(false); return false; } @@ -51,7 +51,7 @@ gfx::NativeView AlloyWebContentsDialogHelper::GetHostView() const { if (auto widget = browser_delegate_->GetWindowWidget()) { return widget->GetNativeView(); } - NOTREACHED(); + DCHECK(false); return gfx::NativeView(); } @@ -66,7 +66,7 @@ gfx::AcceleratedWidget AlloyWebContentsDialogHelper::GetHostWidget() const { return parent_widget; } #endif // defined(USE_AURA) - NOTREACHED(); + DCHECK(false); return gfx::kNullAcceleratedWidget; } diff --git a/libcef/browser/browser_frame.cc b/libcef/browser/browser_frame.cc index 91897f657..35ee61cd5 100644 --- a/libcef/browser/browser_frame.cc +++ b/libcef/browser/browser_frame.cc @@ -77,6 +77,6 @@ CefRefPtr CefBrowserFrame::GetFrameHost( return browser->browser_info()->GetFrameForHost(rfh, nullptr, prefer_speculative); } - NOTREACHED(); + DCHECK(false); return nullptr; } diff --git a/libcef/browser/browser_host_base.cc b/libcef/browser/browser_host_base.cc index 990be9722..974a18412 100644 --- a/libcef/browser/browser_host_base.cc +++ b/libcef/browser/browser_host_base.cc @@ -493,7 +493,7 @@ void CefBrowserHostBase::GetNavigationEntries( CefRefPtr CefBrowserHostBase::GetVisibleNavigationEntry() { if (!CEF_CURRENTLY_ON_UIT()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return nullptr; } diff --git a/libcef/browser/browser_host_create.cc b/libcef/browser/browser_host_create.cc index ac09edfab..1ea8288d4 100644 --- a/libcef/browser/browser_host_create.cc +++ b/libcef/browser/browser_host_create.cc @@ -53,20 +53,20 @@ bool CefBrowserHost::CreateBrowser( CefRefPtr request_context) { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return false; } // Verify that the settings structure is a valid size. if (settings.size != sizeof(cef_browser_settings_t)) { - NOTREACHED() << "invalid CefBrowserSettings structure size"; + DCHECK(false) << "invalid CefBrowserSettings structure size"; return false; } // Verify windowless rendering requirements. if (windowInfo.windowless_rendering_enabled && !client->GetRenderHandler().get()) { - NOTREACHED() << "CefRenderHandler implementation is required"; + DCHECK(false) << "CefRenderHandler implementation is required"; return false; } @@ -110,13 +110,13 @@ CefRefPtr CefBrowserHost::CreateBrowserSync( CefRefPtr request_context) { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return nullptr; } // Verify that the settings structure is a valid size. if (settings.size != sizeof(cef_browser_settings_t)) { - NOTREACHED() << "invalid CefBrowserSettings structure size"; + DCHECK(false) << "invalid CefBrowserSettings structure size"; return nullptr; } @@ -134,7 +134,7 @@ CefRefPtr CefBrowserHost::CreateBrowserSync( // Verify windowless rendering requirements. if (windowInfo.windowless_rendering_enabled && !client->GetRenderHandler().get()) { - NOTREACHED() << "CefRenderHandler implementation is required"; + DCHECK(false) << "CefRenderHandler implementation is required"; return nullptr; } diff --git a/libcef/browser/browser_info_manager.cc b/libcef/browser/browser_info_manager.cc index c832288c0..7f0c9df4f 100644 --- a/libcef/browser/browser_info_manager.cc +++ b/libcef/browser/browser_info_manager.cc @@ -358,7 +358,7 @@ void CefBrowserInfoManager::RemoveBrowserInfo( } } - NOTREACHED(); + DCHECK(false); } void CefBrowserInfoManager::DestroyAllBrowsers() { diff --git a/libcef/browser/browser_platform_delegate.cc b/libcef/browser/browser_platform_delegate.cc index e503ef7b0..ea58a74d4 100644 --- a/libcef/browser/browser_platform_delegate.cc +++ b/libcef/browser/browser_platform_delegate.cc @@ -20,14 +20,14 @@ CefBrowserPlatformDelegate::~CefBrowserPlatformDelegate() { content::WebContents* CefBrowserPlatformDelegate::CreateWebContents( CefBrowserCreateParams& create_params, bool& own_web_contents) { - NOTREACHED(); + DCHECK(false); return nullptr; } void CefBrowserPlatformDelegate::CreateViewForWebContents( content::WebContentsView** view, content::RenderViewHostDelegateView** delegate_view) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::WebContentsCreated( @@ -48,7 +48,7 @@ void CefBrowserPlatformDelegate::AddNewContents( const blink::mojom::WindowFeatures& window_features, bool user_gesture, bool* was_blocked) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::WebContentsDestroyed( @@ -87,12 +87,12 @@ void CefBrowserPlatformDelegate::CreateExtensionHost( const extensions::Extension* extension, const GURL& url, extensions::mojom::ViewType host_type) { - NOTREACHED(); + DCHECK(false); } extensions::ExtensionHost* CefBrowserPlatformDelegate::GetExtensionHost() const { - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -109,32 +109,32 @@ void CefBrowserPlatformDelegate::BrowserDestroyed(CefBrowserHostBase* browser) { } bool CefBrowserPlatformDelegate::CreateHostWindow() { - NOTREACHED(); + DCHECK(false); return true; } void CefBrowserPlatformDelegate::CloseHostWindow() { - NOTREACHED(); + DCHECK(false); } CefWindowHandle CefBrowserPlatformDelegate::GetHostWindowHandle() const { - NOTREACHED(); + DCHECK(false); return kNullWindowHandle; } views::Widget* CefBrowserPlatformDelegate::GetWindowWidget() const { - NOTREACHED(); + DCHECK(false); return nullptr; } CefRefPtr CefBrowserPlatformDelegate::GetBrowserView() const { - NOTREACHED(); + DCHECK(false); return nullptr; } web_modal::WebContentsModalDialogHost* CefBrowserPlatformDelegate::GetWebContentsModalDialogHost() const { - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -150,12 +150,12 @@ void CefBrowserPlatformDelegate::PopupBrowserCreated( bool is_devtools) {} SkColor CefBrowserPlatformDelegate::GetBackgroundColor() const { - NOTREACHED(); + DCHECK(false); return SkColor(); } void CefBrowserPlatformDelegate::WasResized() { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::SendKeyEvent(const CefKeyEvent& event) { @@ -200,7 +200,7 @@ void CefBrowserPlatformDelegate::SizeTo(int width, int height) {} gfx::Point CefBrowserPlatformDelegate::GetScreenPoint( const gfx::Point& view, bool want_dip_coords) const { - NOTREACHED(); + DCHECK(false); return gfx::Point(); } @@ -210,7 +210,7 @@ void CefBrowserPlatformDelegate::ViewText(const std::string& text) { bool CefBrowserPlatformDelegate::HandleKeyboardEvent( const content::NativeWebKeyboardEvent& event) { - NOTREACHED(); + DCHECK(false); return false; } @@ -227,7 +227,7 @@ bool CefBrowserPlatformDelegate::IsNeverComposited( CefEventHandle CefBrowserPlatformDelegate::GetEventHandle( const content::NativeWebKeyboardEvent& event) const { - NOTREACHED(); + DCHECK(false); return kNullEventHandle; } @@ -256,28 +256,28 @@ bool CefBrowserPlatformDelegate::HasExternalParent() const { } void CefBrowserPlatformDelegate::WasHidden(bool hidden) { - NOTREACHED(); + DCHECK(false); } bool CefBrowserPlatformDelegate::IsHidden() const { - NOTREACHED(); + DCHECK(false); return false; } void CefBrowserPlatformDelegate::NotifyScreenInfoChanged() { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::Invalidate(cef_paint_element_type_t type) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::SendExternalBeginFrame() { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::SetWindowlessFrameRate(int frame_rate) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::ImeSetComposition( @@ -285,43 +285,43 @@ void CefBrowserPlatformDelegate::ImeSetComposition( const std::vector& underlines, const CefRange& replacement_range, const CefRange& selection_range) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::ImeCommitText( const CefString& text, const CefRange& replacement_range, int relative_cursor_pos) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::ImeFinishComposingText(bool keep_selection) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::ImeCancelComposition() { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::DragTargetDragEnter( CefRefPtr drag_data, const CefMouseEvent& event, cef_drag_operations_mask_t allowed_ops) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::DragTargetDragOver( const CefMouseEvent& event, cef_drag_operations_mask_t allowed_ops) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::DragTargetDragLeave() { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::DragTargetDrop(const CefMouseEvent& event) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::StartDragging( @@ -331,33 +331,33 @@ void CefBrowserPlatformDelegate::StartDragging( const gfx::Vector2d& image_offset, const blink::mojom::DragEventSourceInfo& event_info, content::RenderWidgetHostImpl* source_rwh) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::UpdateDragCursor( ui::mojom::DragOperation operation) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::DragSourceEndedAt( int x, int y, cef_drag_operations_mask_t op) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::DragSourceSystemDragEnded() { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::AccessibilityEventReceived( const content::AXEventNotificationDetails& eventData) { - NOTREACHED(); + DCHECK(false); } void CefBrowserPlatformDelegate::AccessibilityLocationChangesReceived( const std::vector& locData) { - NOTREACHED(); + DCHECK(false); } gfx::Point CefBrowserPlatformDelegate::GetDialogPosition( diff --git a/libcef/browser/browser_platform_delegate_create.cc b/libcef/browser/browser_platform_delegate_create.cc index 291b1563a..5e09068ba 100644 --- a/libcef/browser/browser_platform_delegate_create.cc +++ b/libcef/browser/browser_platform_delegate_create.cc @@ -138,6 +138,6 @@ std::unique_ptr CefBrowserPlatformDelegate::Create( return std::move(native_delegate); } - NOTREACHED(); + DCHECK(false); return nullptr; } diff --git a/libcef/browser/chrome/browser_platform_delegate_chrome.cc b/libcef/browser/chrome/browser_platform_delegate_chrome.cc index e53eb4eef..83b8de009 100644 --- a/libcef/browser/chrome/browser_platform_delegate_chrome.cc +++ b/libcef/browser/chrome/browser_platform_delegate_chrome.cc @@ -56,7 +56,7 @@ CefBrowserPlatformDelegateChrome::GetWebContentsModalDialogHost() const { ChromeWebModalDialogManagerDelegate* manager = chrome_browser_; return manager->GetWebContentsModalDialogHost(); } - NOTREACHED(); + DCHECK(false); return nullptr; } @@ -143,6 +143,6 @@ gfx::NativeWindow CefBrowserPlatformDelegateChrome::GetNativeWindow() const { if (chrome_browser_ && chrome_browser_->window()) { return chrome_browser_->window()->GetNativeWindow(); } - NOTREACHED(); + DCHECK(false); return gfx::NativeWindow(); } diff --git a/libcef/browser/context.cc b/libcef/browser/context.cc index a9907219b..22a2d83c7 100644 --- a/libcef/browser/context.cc +++ b/libcef/browser/context.cc @@ -299,7 +299,7 @@ bool CefInitialize(const CefMainArgs& args, } if (settings.size != sizeof(cef_settings_t)) { - NOTREACHED() << "invalid CefSettings structure size"; + DCHECK(false) << "invalid CefSettings structure size"; return false; } @@ -314,13 +314,13 @@ bool CefInitialize(const CefMainArgs& args, void CefShutdown() { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return; } // Must always be called on the same thread as Initialize. if (!g_context->OnInitThread()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return; } @@ -335,13 +335,13 @@ void CefShutdown() { void CefDoMessageLoopWork() { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return; } // Must always be called on the same thread as Initialize. if (!g_context->OnInitThread()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return; } @@ -352,13 +352,13 @@ void CefDoMessageLoopWork() { void CefRunMessageLoop() { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return; } // Must always be called on the same thread as Initialize. if (!g_context->OnInitThread()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return; } @@ -368,13 +368,13 @@ void CefRunMessageLoop() { void CefQuitMessageLoop() { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return; } // Must always be called on the same thread as Initialize. if (!g_context->OnInitThread()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return; } @@ -403,7 +403,7 @@ int CefRunMainWithPreferredStackSize(mainPtr main, int argc, char* argv[]) { void CefSetOSModalLoop(bool osModalLoop) { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return; } diff --git a/libcef/browser/devtools/devtools_frontend.cc b/libcef/browser/devtools/devtools_frontend.cc index b778fad7e..ab4633ef2 100644 --- a/libcef/browser/devtools/devtools_frontend.cc +++ b/libcef/browser/devtools/devtools_frontend.cc @@ -227,7 +227,7 @@ class CefDevToolsFrontend::NetworkResourceLoader bindings_->loaders_.erase(bindings_->loaders_.find(this)); } - void OnRetry(base::OnceClosure start_retry) override { NOTREACHED(); } + void OnRetry(base::OnceClosure start_retry) override { DCHECK(false); } const int stream_id_; CefDevToolsFrontend* const bindings_; diff --git a/libcef/browser/download_manager_delegate.cc b/libcef/browser/download_manager_delegate.cc index dc684232d..8543061c1 100644 --- a/libcef/browser/download_manager_delegate.cc +++ b/libcef/browser/download_manager_delegate.cc @@ -94,7 +94,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { base::FilePath dir_path = suggested_path.DirName(); if (!base::DirectoryExists(dir_path) && !base::CreateDirectory(dir_path)) { - NOTREACHED() << "failed to create the download directory"; + DCHECK(false) << "failed to create the download directory"; suggested_path.clear(); } } diff --git a/libcef/browser/extension_impl.cc b/libcef/browser/extension_impl.cc index d1ef91ae5..756f29a4c 100644 --- a/libcef/browser/extension_impl.cc +++ b/libcef/browser/extension_impl.cc @@ -54,7 +54,7 @@ CefRefPtr CefExtensionImpl::GetHandler() { CefRefPtr CefExtensionImpl::GetLoaderContext() { if (!CEF_CURRENTLY_ON_UIT()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return nullptr; } @@ -63,7 +63,7 @@ CefRefPtr CefExtensionImpl::GetLoaderContext() { bool CefExtensionImpl::IsLoaded() { if (!CEF_CURRENTLY_ON_UIT()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return false; } diff --git a/libcef/browser/extensions/extension_host_delegate.cc b/libcef/browser/extensions/extension_host_delegate.cc index 6fadbb943..6720ea23a 100644 --- a/libcef/browser/extensions/extension_host_delegate.cc +++ b/libcef/browser/extensions/extension_host_delegate.cc @@ -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 diff --git a/libcef/browser/extensions/extension_system.cc b/libcef/browser/extensions/extension_system.cc index 605493f5d..c4492c5fc 100644 --- a/libcef/browser/extensions/extension_system.cc +++ b/libcef/browser/extensions/extension_system.cc @@ -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; } diff --git a/libcef/browser/extensions/extensions_api_client.cc b/libcef/browser/extensions/extensions_api_client.cc index 1d385ca91..ec6d95fa9 100644 --- a/libcef/browser/extensions/extensions_api_client.cc +++ b/libcef/browser/extensions/extensions_api_client.cc @@ -28,7 +28,7 @@ CefExtensionsAPIClient::CefExtensionsAPIClient() {} AppViewGuestDelegate* CefExtensionsAPIClient::CreateAppViewGuestDelegate() const { // TODO(extensions): Implement to support Apps. - NOTREACHED(); + DCHECK(false); return nullptr; } diff --git a/libcef/browser/extensions/extensions_browser_client.cc b/libcef/browser/extensions/extensions_browser_client.cc index 0f76a2ac4..caedae191 100644 --- a/libcef/browser/extensions/extensions_browser_client.cc +++ b/libcef/browser/extensions/extensions_browser_client.cc @@ -246,7 +246,7 @@ ProcessManagerDelegate* CefExtensionsBrowserClient::GetProcessManagerDelegate() std::unique_ptr CefExtensionsBrowserClient::CreateExtensionHostDelegate() { // CEF does not use the ExtensionHost constructor that calls this method. - NOTREACHED(); + DCHECK(false); return std::unique_ptr(); } @@ -353,7 +353,7 @@ std::unique_ptr 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; } diff --git a/libcef/browser/extensions/value_store/cef_value_store.cc b/libcef/browser/extensions/value_store/cef_value_store.cc index ee1153b16..0609d6166 100644 --- a/libcef/browser/extensions/value_store/cef_value_store.cc +++ b/libcef/browser/extensions/value_store/cef_value_store.cc @@ -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& 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; } diff --git a/libcef/browser/file_dialog_manager.cc b/libcef/browser/file_dialog_manager.cc index 6b6535683..13b2b30a0 100644 --- a/libcef/browser/file_dialog_manager.cc +++ b/libcef/browser/file_dialog_manager.cc @@ -491,7 +491,7 @@ CefFileDialogManager::MaybeRunDelegate( mode = FILE_DIALOG_SAVE; break; default: - NOTREACHED(); + DCHECK(false); break; } diff --git a/libcef/browser/frame_host_impl.cc b/libcef/browser/frame_host_impl.cc index 6c7d68c20..0614bbc7f 100644 --- a/libcef/browser/frame_host_impl.cc +++ b/libcef/browser/frame_host_impl.cc @@ -227,12 +227,12 @@ CefRefPtr CefFrameHostImpl::GetBrowser() { } CefRefPtr CefFrameHostImpl::GetV8Context() { - NOTREACHED() << "GetV8Context cannot be called from the browser process"; + DCHECK(false) << "GetV8Context cannot be called from the browser process"; return nullptr; } void CefFrameHostImpl::VisitDOM(CefRefPtr visitor) { - NOTREACHED() << "VisitDOM cannot be called from the browser process"; + DCHECK(false) << "VisitDOM cannot be called from the browser process"; } CefRefPtr CefFrameHostImpl::CreateURLRequest( @@ -243,7 +243,7 @@ CefRefPtr CefFrameHostImpl::CreateURLRequest( } if (!CefTaskRunnerImpl::GetCurrentTaskRunner()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return nullptr; } diff --git a/libcef/browser/global_preference_manager_impl.cc b/libcef/browser/global_preference_manager_impl.cc index 8a58aba6b..4259b16d8 100644 --- a/libcef/browser/global_preference_manager_impl.cc +++ b/libcef/browser/global_preference_manager_impl.cc @@ -46,7 +46,7 @@ CefRefPtr CefPreferenceManager::GetGlobalPreferenceManager() { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return nullptr; } diff --git a/libcef/browser/image_impl.cc b/libcef/browser/image_impl.cc index 20a3cd0e1..2a91c8f7f 100644 --- a/libcef/browser/image_impl.cc +++ b/libcef/browser/image_impl.cc @@ -26,7 +26,7 @@ SkColorType GetSkColorType(cef_color_type_t color_type) { break; } - NOTREACHED(); + DCHECK(false); return kUnknown_SkColorType; } @@ -42,7 +42,7 @@ SkAlphaType GetSkAlphaType(cef_alpha_type_t alpha_type) { break; } - NOTREACHED(); + DCHECK(false); return kUnknown_SkAlphaType; } diff --git a/libcef/browser/main_runner.cc b/libcef/browser/main_runner.cc index 2b3485b2e..824e2b24f 100644 --- a/libcef/browser/main_runner.cc +++ b/libcef/browser/main_runner.cc @@ -230,12 +230,12 @@ bool CefMainRunner::Initialize(CefSettings* settings, const int exit_code = ContentMainInitialize(args, windows_sandbox_info, &settings->no_sandbox); if (exit_code >= 0) { - NOTREACHED() << "ContentMainInitialize failed"; + DCHECK(false) << "ContentMainInitialize failed"; return false; } if (!ContentMainRun(initialized, std::move(context_initialized))) { - NOTREACHED() << "ContentMainRun failed"; + DCHECK(false) << "ContentMainRun failed"; return false; } diff --git a/libcef/browser/media_router/media_router_impl.cc b/libcef/browser/media_router/media_router_impl.cc index 4955fc767..af3287057 100644 --- a/libcef/browser/media_router/media_router_impl.cc +++ b/libcef/browser/media_router/media_router_impl.cc @@ -130,7 +130,7 @@ class CefRegistrationImpl : public CefRegistration, case blink::mojom::PresentationConnectionState::TERMINATED: return CEF_MRCS_TERMINATED; } - NOTREACHED(); + DCHECK(false); return CEF_MRCS_UNKNOWN; } diff --git a/libcef/browser/menu_model_impl.cc b/libcef/browser/menu_model_impl.cc index f1f3433ed..07d331873 100644 --- a/libcef/browser/menu_model_impl.cc +++ b/libcef/browser/menu_model_impl.cc @@ -54,7 +54,7 @@ class CefSimpleMenuModel : public ui::MenuModel { case MENUITEMTYPE_SUBMENU: return TYPE_SUBMENU; default: - NOTREACHED(); + DCHECK(false); return TYPE_COMMAND; } } @@ -1109,7 +1109,7 @@ void CefMenuModelImpl::OnMenuClosed() { bool CefMenuModelImpl::VerifyContext() { if (base::PlatformThread::CurrentId() != supported_thread_id_) { // This object should only be accessed from the thread that created it. - NOTREACHED(); + DCHECK(false); return false; } diff --git a/libcef/browser/native/browser_platform_delegate_native_aura.cc b/libcef/browser/native/browser_platform_delegate_native_aura.cc index 81d3862d9..9e9e37f0d 100644 --- a/libcef/browser/native/browser_platform_delegate_native_aura.cc +++ b/libcef/browser/native/browser_platform_delegate_native_aura.cc @@ -161,7 +161,7 @@ ui::MouseEvent CefBrowserPlatformDelegateNativeAura::TranslateUiClickEvent( changed_button_flags |= ui::EF_RIGHT_MOUSE_BUTTON; break; default: - NOTREACHED(); + DCHECK(false); } ui::MouseEvent result(event_type, location, root_location, time_stamp, flags, diff --git a/libcef/browser/native/browser_platform_delegate_native_linux.cc b/libcef/browser/native/browser_platform_delegate_native_linux.cc index 50e7a950c..fb22d77a4 100644 --- a/libcef/browser/native/browser_platform_delegate_native_linux.cc +++ b/libcef/browser/native/browser_platform_delegate_native_linux.cc @@ -276,7 +276,7 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeLinux::TranslateUiKeyEvent( type = ui::ET_KEY_RELEASED; break; default: - NOTREACHED(); + DCHECK(false); } #if BUILDFLAG(OZONE_PLATFORM_X11) diff --git a/libcef/browser/native/browser_platform_delegate_native_mac.mm b/libcef/browser/native/browser_platform_delegate_native_mac.mm index 8f1a8ddd3..7bf765718 100644 --- a/libcef/browser/native/browser_platform_delegate_native_mac.mm +++ b/libcef/browser/native/browser_platform_delegate_native_mac.mm @@ -563,7 +563,7 @@ CefBrowserPlatformDelegateNativeMac::TranslateWebClickEvent( result.button = blink::WebMouseEvent::Button::kRight; break; default: - NOTREACHED(); + DCHECK(false); } result.click_count = clickCount; diff --git a/libcef/browser/native/browser_platform_delegate_native_win.cc b/libcef/browser/native/browser_platform_delegate_native_win.cc index b76cb862a..da50f506c 100644 --- a/libcef/browser/native/browser_platform_delegate_native_win.cc +++ b/libcef/browser/native/browser_platform_delegate_native_win.cc @@ -466,7 +466,7 @@ bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent( msg.message = event.is_system_key ? WM_SYSCHAR : WM_CHAR; break; default: - NOTREACHED(); + DCHECK(false); return false; } @@ -521,7 +521,7 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeWin::TranslateUiKeyEvent( type = ui::ET_KEY_RELEASED; break; default: - NOTREACHED(); + DCHECK(false); } ui::DomKey dom_key = diff --git a/libcef/browser/native/cursor_util_aura.cc b/libcef/browser/native/cursor_util_aura.cc index ef3fc6b21..172c09c23 100644 --- a/libcef/browser/native/cursor_util_aura.cc +++ b/libcef/browser/native/cursor_util_aura.cc @@ -70,7 +70,7 @@ display::Display::Rotation OrientationAngleToRotation( if (orientation_angle == 270) { return display::Display::ROTATE_90; } - NOTREACHED(); + DCHECK(false); return display::Display::ROTATE_0; } diff --git a/libcef/browser/net/chrome_scheme_handler.cc b/libcef/browser/net/chrome_scheme_handler.cc index a54aa8126..8aab53ff7 100644 --- a/libcef/browser/net/chrome_scheme_handler.cc +++ b/libcef/browser/net/chrome_scheme_handler.cc @@ -363,7 +363,7 @@ bool OnLicenseUI(std::string* mime_type, std::string* output) { ui::ResourceBundle::GetSharedInstance().LoadDataResourceString( IDR_CEF_LICENSE_TXT); if (piece.empty()) { - NOTREACHED() << "Failed to load license txt resource."; + DCHECK(false) << "Failed to load license txt resource."; return false; } @@ -381,7 +381,7 @@ bool OnVersionUI(Profile* profile, ui::ResourceBundle::GetSharedInstance().LoadDataResourceString( IDR_CEF_VERSION_HTML); if (tmpl.empty()) { - NOTREACHED() << "Failed to load version html resource."; + DCHECK(false) << "Failed to load version html resource."; return false; } diff --git a/libcef/browser/net/crlset_file_util_impl.cc b/libcef/browser/net/crlset_file_util_impl.cc index fecd791af..44c29fd52 100644 --- a/libcef/browser/net/crlset_file_util_impl.cc +++ b/libcef/browser/net/crlset_file_util_impl.cc @@ -38,7 +38,7 @@ void LoadFromDisk(const base::FilePath& path) { void CefLoadCRLSetsFile(const CefString& path) { if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return; } diff --git a/libcef/browser/net/internal_scheme_handler.cc b/libcef/browser/net/internal_scheme_handler.cc index 707147b27..fece6466f 100644 --- a/libcef/browser/net/internal_scheme_handler.cc +++ b/libcef/browser/net/internal_scheme_handler.cc @@ -50,7 +50,7 @@ std::string GetMimeType(const std::string& filename) { return "application/font-woff2"; } - NOTREACHED() << "No known mime type for file: " << filename.c_str(); + DCHECK(false) << "No known mime type for file: " << filename.c_str(); return "text/plain"; } @@ -80,7 +80,7 @@ class RedirectHandler : public CefResourceHandler { int bytes_to_read, int& bytes_read, CefRefPtr callback) override { - NOTREACHED(); + DCHECK(false); return false; } @@ -177,8 +177,8 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory { ui::ResourceBundle::GetSharedInstance().LoadDataResourceString( action.resource_id); if (str.empty()) { - NOTREACHED() << "Failed to load internal resource for id: " - << action.resource_id << " URL: " << url.spec().c_str(); + DCHECK(false) << "Failed to load internal resource for id: " + << action.resource_id << " URL: " << url.spec().c_str(); return nullptr; } action.bytes = diff --git a/libcef/browser/net_service/browser_urlrequest_impl.cc b/libcef/browser/net_service/browser_urlrequest_impl.cc index 962c442e9..8719db25d 100644 --- a/libcef/browser/net_service/browser_urlrequest_impl.cc +++ b/libcef/browser/net_service/browser_urlrequest_impl.cc @@ -695,7 +695,7 @@ void CefBrowserURLRequest::Cancel() { bool CefBrowserURLRequest::VerifyContext() { if (!context_->CalledOnValidThread()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return false; } diff --git a/libcef/browser/net_service/stream_reader_url_loader.cc b/libcef/browser/net_service/stream_reader_url_loader.cc index 71168336b..28daf95b1 100644 --- a/libcef/browser/net_service/stream_reader_url_loader.cc +++ b/libcef/browser/net_service/stream_reader_url_loader.cc @@ -553,7 +553,7 @@ void StreamReaderURLLoader::FollowRedirect( const net::HttpRequestHeaders& modified_headers, const net::HttpRequestHeaders& modified_cors_exempt_headers, const absl::optional& new_url) { - NOTREACHED(); + DCHECK(false); } void StreamReaderURLLoader::SetPriority(net::RequestPriority priority, @@ -852,4 +852,4 @@ bool StreamReaderURLLoader::byte_range_valid() const { return byte_range_.IsValid() && byte_range_.first_byte_position() >= 0; } -} // namespace net_service \ No newline at end of file +} // namespace net_service diff --git a/libcef/browser/origin_whitelist_impl.cc b/libcef/browser/origin_whitelist_impl.cc index 0b98c4c71..b2ff3d606 100644 --- a/libcef/browser/origin_whitelist_impl.cc +++ b/libcef/browser/origin_whitelist_impl.cc @@ -214,14 +214,14 @@ bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin, bool allow_target_subdomains) { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED(); + DCHECK(false); return false; } std::string source_url = source_origin; GURL gurl = GURL(source_url); if (gurl.is_empty() || !gurl.is_valid()) { - NOTREACHED() << "Invalid source_origin URL: " << source_url; + DCHECK(false) << "Invalid source_origin URL: " << source_url; return false; } @@ -245,14 +245,14 @@ bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin, bool allow_target_subdomains) { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED(); + DCHECK(false); return false; } std::string source_url = source_origin; GURL gurl = GURL(source_url); if (gurl.is_empty() || !gurl.is_valid()) { - NOTREACHED() << "Invalid source_origin URL: " << source_url; + DCHECK(false) << "Invalid source_origin URL: " << source_url; return false; } @@ -273,7 +273,7 @@ bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin, bool CefClearCrossOriginWhitelist() { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED(); + DCHECK(false); return false; } diff --git a/libcef/browser/osr/motion_event_osr.cc b/libcef/browser/osr/motion_event_osr.cc index 69d4b80ac..1f83e84b2 100644 --- a/libcef/browser/osr/motion_event_osr.cc +++ b/libcef/browser/osr/motion_event_osr.cc @@ -26,7 +26,7 @@ ui::MotionEvent::ToolType CefPointerTypeToMotionEventToolType( case CEF_POINTER_TYPE_UNKNOWN: return ui::MotionEvent::ToolType::UNKNOWN; } - NOTREACHED(); + DCHECK(false); return ui::MotionEvent::ToolType::UNKNOWN; } diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index a76b6a97c..e6f0c0417 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -175,7 +175,7 @@ ui::ImeTextSpan::UnderlineStyle GetImeUnderlineStyle( return ui::ImeTextSpan::UnderlineStyle::kNone; } - NOTREACHED(); + DCHECK(false); return ui::ImeTextSpan::UnderlineStyle::kSolid; } @@ -489,7 +489,7 @@ CefRenderWidgetHostViewOSR::GetDisplayFeature() { void CefRenderWidgetHostViewOSR::SetDisplayFeatureForTesting( const content::DisplayFeature* display_feature) { - NOTREACHED(); + DCHECK(false); } blink::mojom::PointerLockResult CefRenderWidgetHostViewOSR::LockMouse( @@ -905,7 +905,7 @@ void CefRenderWidgetHostViewOSR::NotifyHostAndDelegateOnWasShown( blink::mojom::RecordContentToVisibleTimeRequestPtr visible_time_request) { // We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this // method should not be called. - NOTREACHED(); + DCHECK(false); } void CefRenderWidgetHostViewOSR:: @@ -914,14 +914,14 @@ void CefRenderWidgetHostViewOSR:: visible_time_request) { // We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this // method should not be called. - NOTREACHED(); + DCHECK(false); } void CefRenderWidgetHostViewOSR:: CancelSuccessfulPresentationTimeRequestForHostAndDelegate() { // We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this // method should not be called. - NOTREACHED(); + DCHECK(false); } std::unique_ptr diff --git a/libcef/browser/osr/touch_selection_controller_client_osr.cc b/libcef/browser/osr/touch_selection_controller_client_osr.cc index 3b9bb059b..4e470af2c 100644 --- a/libcef/browser/osr/touch_selection_controller_client_osr.cc +++ b/libcef/browser/osr/touch_selection_controller_client_osr.cc @@ -315,16 +315,16 @@ bool CefTouchSelectionControllerClientOSR::SupportsAnimation() const { bool CefTouchSelectionControllerClientOSR::InternalClient::SupportsAnimation() const { - NOTREACHED(); + DCHECK(false); return false; } void CefTouchSelectionControllerClientOSR::SetNeedsAnimate() { - NOTREACHED(); + DCHECK(false); } void CefTouchSelectionControllerClientOSR::InternalClient::SetNeedsAnimate() { - NOTREACHED(); + DCHECK(false); } void CefTouchSelectionControllerClientOSR::MoveCaret( @@ -405,7 +405,7 @@ void CefTouchSelectionControllerClientOSR::OnSelectionEvent( void CefTouchSelectionControllerClientOSR::InternalClient::OnSelectionEvent( ui::SelectionEventType event) { - NOTREACHED(); + DCHECK(false); } void CefTouchSelectionControllerClientOSR::OnDragUpdate( @@ -415,7 +415,7 @@ void CefTouchSelectionControllerClientOSR::OnDragUpdate( void CefTouchSelectionControllerClientOSR::InternalClient::OnDragUpdate( const ui::TouchSelectionDraggable::Type type, const gfx::PointF& position) { - NOTREACHED(); + DCHECK(false); } std::unique_ptr @@ -427,12 +427,12 @@ void CefTouchSelectionControllerClientOSR::DidScroll() {} std::unique_ptr CefTouchSelectionControllerClientOSR::InternalClient::CreateDrawable() { - NOTREACHED(); + DCHECK(false); return nullptr; } void CefTouchSelectionControllerClientOSR::InternalClient::DidScroll() { - NOTREACHED(); + DCHECK(false); } bool CefTouchSelectionControllerClientOSR::IsCommandIdEnabled( diff --git a/libcef/browser/path_util_impl.cc b/libcef/browser/path_util_impl.cc index 2b0089053..0d26a46f8 100644 --- a/libcef/browser/path_util_impl.cc +++ b/libcef/browser/path_util_impl.cc @@ -43,7 +43,7 @@ bool CefGetPath(PathKey key, CefString& path) { pref_key = chrome::DIR_RESOURCES; break; default: - NOTREACHED() << "invalid argument"; + DCHECK(false) << "invalid argument"; return false; } diff --git a/libcef/browser/permission_prompt.cc b/libcef/browser/permission_prompt.cc index 784aab65c..9303a43f0 100644 --- a/libcef/browser/permission_prompt.cc +++ b/libcef/browser/permission_prompt.cc @@ -225,7 +225,7 @@ cef_permission_request_types_t GetCefRequestType( return CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT; } - NOTREACHED(); + DCHECK(false); return CEF_PERMISSION_TYPE_NONE; } diff --git a/libcef/browser/prefs/pref_helper.cc b/libcef/browser/prefs/pref_helper.cc index 3acb9c5e3..99aa693e1 100644 --- a/libcef/browser/prefs/pref_helper.cc +++ b/libcef/browser/prefs/pref_helper.cc @@ -35,7 +35,7 @@ const char* GetTypeString(base::Value::Type type) { return "LIST"; } - NOTREACHED(); + DCHECK(false); return "UNKNOWN"; } diff --git a/libcef/browser/prefs/pref_registrar.cc b/libcef/browser/prefs/pref_registrar.cc index 70e3044a0..3eb47ba3a 100644 --- a/libcef/browser/prefs/pref_registrar.cc +++ b/libcef/browser/prefs/pref_registrar.cc @@ -74,7 +74,7 @@ class CefPreferenceRegistrarImpl : public CefPreferenceRegistrar { } else if (impl_value.type() == base::Value::Type::LIST) { registry_->RegisterListPref(name, std::move(impl_value)); } else { - NOTREACHED(); + DCHECK(false); } } diff --git a/libcef/browser/prefs/renderer_prefs.cc b/libcef/browser/prefs/renderer_prefs.cc index 2411c4859..7de15ac36 100644 --- a/libcef/browser/prefs/renderer_prefs.cc +++ b/libcef/browser/prefs/renderer_prefs.cc @@ -196,7 +196,7 @@ blink::mojom::PreferredColorScheme ToBlinkPreferredColorScheme( return blink::mojom::PreferredColorScheme::kLight; } - NOTREACHED(); + DCHECK(false); } // From chrome/browser/chrome_content_browser_client.cc diff --git a/libcef/browser/process_util_impl.cc b/libcef/browser/process_util_impl.cc index 31a5fe8d0..6e09c00fd 100644 --- a/libcef/browser/process_util_impl.cc +++ b/libcef/browser/process_util_impl.cc @@ -12,12 +12,12 @@ bool CefLaunchProcess(CefRefPtr command_line) { if (!command_line.get()) { - NOTREACHED() << "invalid parameter"; + DCHECK(false) << "invalid parameter"; return false; } if (!content::CurrentlyOnProcessLauncherTaskRunner()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return false; } diff --git a/libcef/browser/request_context_impl.cc b/libcef/browser/request_context_impl.cc index 72d107963..e3540ab27 100644 --- a/libcef/browser/request_context_impl.cc +++ b/libcef/browser/request_context_impl.cc @@ -94,7 +94,7 @@ class ResolveHostHelper : public network::ResolveHostClientBase { CefRefPtr 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::CreateContext( CefRefPtr 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::CreateContext( CefRefPtr 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; } diff --git a/libcef/browser/scheme_impl.cc b/libcef/browser/scheme_impl.cc index f5423c059..3ac0c95e9 100644 --- a/libcef/browser/scheme_impl.cc +++ b/libcef/browser/scheme_impl.cc @@ -13,7 +13,7 @@ bool CefRegisterSchemeHandlerFactory( CefRefPtr factory) { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return false; } @@ -24,7 +24,7 @@ bool CefRegisterSchemeHandlerFactory( bool CefClearSchemeHandlerFactories() { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return false; } diff --git a/libcef/browser/server_impl.cc b/libcef/browser/server_impl.cc index a9faff45f..c6054a596 100644 --- a/libcef/browser/server_impl.cc +++ b/libcef/browser/server_impl.cc @@ -25,16 +25,16 @@ #define CEF_CURRENTLY_ON_HT() CurrentlyOnHandlerThread() #define CEF_REQUIRE_HT() DCHECK(CEF_CURRENTLY_ON_HT()) -#define CEF_REQUIRE_HT_RETURN(var) \ - if (!CEF_CURRENTLY_ON_HT()) { \ - NOTREACHED() << "called on invalid thread"; \ - return var; \ +#define CEF_REQUIRE_HT_RETURN(var) \ + if (!CEF_CURRENTLY_ON_HT()) { \ + DCHECK(false) << "called on invalid thread"; \ + return var; \ } -#define CEF_REQUIRE_HT_RETURN_VOID() \ - if (!CEF_CURRENTLY_ON_HT()) { \ - NOTREACHED() << "called on invalid thread"; \ - return; \ +#define CEF_REQUIRE_HT_RETURN_VOID() \ + if (!CEF_CURRENTLY_ON_HT()) { \ + DCHECK(false) << "called on invalid thread"; \ + return; \ } #define CEF_POST_TASK_HT(task) task_runner_->PostTask(FROM_HERE, task); diff --git a/libcef/browser/simple_menu_model_impl.cc b/libcef/browser/simple_menu_model_impl.cc index 917082add..82de3982f 100644 --- a/libcef/browser/simple_menu_model_impl.cc +++ b/libcef/browser/simple_menu_model_impl.cc @@ -540,7 +540,7 @@ bool CefSimpleMenuModelImpl::SetFontListAt(int index, bool CefSimpleMenuModelImpl::VerifyContext() { if (base::PlatformThread::CurrentId() != supported_thread_id_) { // This object should only be accessed from the thread that created it. - NOTREACHED(); + DCHECK(false); return false; } diff --git a/libcef/browser/thread_util.h b/libcef/browser/thread_util.h index f6651b784..11eaf8222 100644 --- a/libcef/browser/thread_util.h +++ b/libcef/browser/thread_util.h @@ -25,18 +25,18 @@ #define CEF_REQUIRE_UIT() CEF_REQUIRE(CEF_UIT) #define CEF_REQUIRE_IOT() CEF_REQUIRE(CEF_IOT) -#define CEF_REQUIRE_RETURN(id, var) \ - if (!CEF_CURRENTLY_ON(id)) { \ - NOTREACHED() << "called on invalid thread"; \ - return var; \ +#define CEF_REQUIRE_RETURN(id, var) \ + if (!CEF_CURRENTLY_ON(id)) { \ + DCHECK(false) << "called on invalid thread"; \ + return var; \ } #define CEF_REQUIRE_UIT_RETURN(var) CEF_REQUIRE_RETURN(CEF_UIT, var) #define CEF_REQUIRE_IOT_RETURN(var) CEF_REQUIRE_RETURN(CEF_IOT, var) -#define CEF_REQUIRE_RETURN_VOID(id) \ - if (!CEF_CURRENTLY_ON(id)) { \ - NOTREACHED() << "called on invalid thread"; \ - return; \ +#define CEF_REQUIRE_RETURN_VOID(id) \ + if (!CEF_CURRENTLY_ON(id)) { \ + DCHECK(false) << "called on invalid thread"; \ + return; \ } #define CEF_REQUIRE_UIT_RETURN_VOID() CEF_REQUIRE_RETURN_VOID(CEF_UIT) #define CEF_REQUIRE_IOT_RETURN_VOID() CEF_REQUIRE_RETURN_VOID(CEF_IOT) diff --git a/libcef/browser/trace_impl.cc b/libcef/browser/trace_impl.cc index 8e7dc3728..52fd1fa02 100644 --- a/libcef/browser/trace_impl.cc +++ b/libcef/browser/trace_impl.cc @@ -12,12 +12,12 @@ bool CefBeginTracing(const CefString& categories, CefRefPtr callback) { if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return false; } if (!CEF_CURRENTLY_ON_UIT()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return false; } @@ -32,12 +32,12 @@ bool CefBeginTracing(const CefString& categories, bool CefEndTracing(const CefString& tracing_file, CefRefPtr callback) { if (!CONTEXT_STATE_VALID()) { - NOTREACHED() << "context not valid"; + DCHECK(false) << "context not valid"; return false; } if (!CEF_CURRENTLY_ON_UIT()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return false; } diff --git a/libcef/browser/xml_reader_impl.cc b/libcef/browser/xml_reader_impl.cc index 84455bf4e..3e3006161 100644 --- a/libcef/browser/xml_reader_impl.cc +++ b/libcef/browser/xml_reader_impl.cc @@ -486,7 +486,7 @@ void CefXmlReaderImpl::AppendError(const CefString& error_str) { bool CefXmlReaderImpl::VerifyContext() { if (base::PlatformThread::CurrentId() != supported_thread_id_) { // This object should only be accessed from the thread that created it. - NOTREACHED(); + DCHECK(false); return false; } diff --git a/libcef/browser/zip_reader_impl.cc b/libcef/browser/zip_reader_impl.cc index 74643c6ce..e265e9feb 100644 --- a/libcef/browser/zip_reader_impl.cc +++ b/libcef/browser/zip_reader_impl.cc @@ -58,7 +58,7 @@ OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)) { whence = SEEK_SET; break; default: - NOTREACHED(); + DCHECK(false); return -1; } return reader->Seek(offset, whence); @@ -295,7 +295,7 @@ bool CefZipReaderImpl::GetFileInfo() { bool CefZipReaderImpl::VerifyContext() { if (base::PlatformThread::CurrentId() != supported_thread_id_) { // This object should only be accessed from the thread that created it. - NOTREACHED(); + DCHECK(false); return false; } diff --git a/libcef/common/cef_crash_report_upload_thread.cc b/libcef/common/cef_crash_report_upload_thread.cc index 086771621..1557ada35 100644 --- a/libcef/common/cef_crash_report_upload_thread.cc +++ b/libcef/common/cef_crash_report_upload_thread.cc @@ -100,7 +100,7 @@ void CefCrashReportUploadThread::ProcessPendingReport( return; case CrashReportDatabase::kCannotRequestUpload: - NOTREACHED(); + DCHECK(false); return; } diff --git a/libcef/common/command_line_impl.cc b/libcef/common/command_line_impl.cc index 6c7db788a..64ed280c3 100644 --- a/libcef/common/command_line_impl.cc +++ b/libcef/common/command_line_impl.cc @@ -37,7 +37,7 @@ void CefCommandLineImpl::InitFromArgv(int argc, const char* const* argv) { CEF_VALUE_VERIFY_RETURN_VOID(true); mutable_value()->InitFromArgv(argc, argv); #else - NOTREACHED() << "method not supported on this platform"; + DCHECK(false) << "method not supported on this platform"; #endif } @@ -47,7 +47,7 @@ void CefCommandLineImpl::InitFromString(const CefString& command_line) { const std::wstring& str16 = command_line; mutable_value()->ParseFromString(str16); #else - NOTREACHED() << "method not supported on this platform"; + DCHECK(false) << "method not supported on this platform"; #endif } diff --git a/libcef/common/drag_data_impl.cc b/libcef/common/drag_data_impl.cc index 49ea0e1d7..cfb18fa90 100644 --- a/libcef/common/drag_data_impl.cc +++ b/libcef/common/drag_data_impl.cc @@ -8,10 +8,10 @@ #include "libcef/browser/stream_impl.h" #include "libcef/common/drag_data_impl.h" -#define CHECK_READONLY_RETURN_VOID() \ - if (read_only_) { \ - NOTREACHED() << "object is read only"; \ - return; \ +#define CHECK_READONLY_RETURN_VOID() \ + if (read_only_) { \ + DCHECK(false) << "object is read only"; \ + return; \ } CefDragDataImpl::CefDragDataImpl(const content::DropData& data) @@ -214,4 +214,4 @@ CefPoint CefDragDataImpl::GetImageHotspot() { bool CefDragDataImpl::HasImage() { base::AutoLock lock_scope(lock_); return image_ ? true : false; -} \ No newline at end of file +} diff --git a/libcef/common/file_util_impl.cc b/libcef/common/file_util_impl.cc index e27609ae2..48387babc 100644 --- a/libcef/common/file_util_impl.cc +++ b/libcef/common/file_util_impl.cc @@ -15,7 +15,7 @@ namespace { bool AllowFileIO() { if (CefCurrentlyOn(TID_UI) || CefCurrentlyOn(TID_IO)) { - NOTREACHED() << "file IO is not allowed on the current thread"; + DCHECK(false) << "file IO is not allowed on the current thread"; return false; } return true; diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index c2dcfb173..d9b2026ce 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -158,16 +158,16 @@ void GetHeaderMap(const CefRequest::HeaderMap& source, } // namespace -#define CHECK_READONLY_RETURN(val) \ - if (read_only_) { \ - NOTREACHED() << "object is read only"; \ - return val; \ +#define CHECK_READONLY_RETURN(val) \ + if (read_only_) { \ + DCHECK(false) << "object is read only"; \ + return val; \ } -#define CHECK_READONLY_RETURN_VOID() \ - if (read_only_) { \ - NOTREACHED() << "object is read only"; \ - return; \ +#define CHECK_READONLY_RETURN_VOID() \ + if (read_only_) { \ + DCHECK(false) << "object is read only"; \ + return; \ } #define SETBOOLFLAG(obj, flags, method, FLAG) \ @@ -752,7 +752,7 @@ CefRequestImpl::NetReferrerPolicyToBlinkReferrerPolicy( case REFERRER_POLICY_NO_REFERRER: return network::mojom::ReferrerPolicy::kNever; } - NOTREACHED(); + DCHECK(false); return network::mojom::ReferrerPolicy::kDefault; } @@ -779,7 +779,7 @@ cef_referrer_policy_t CefRequestImpl::BlinkReferrerPolicyToNetReferrerPolicy( case network::mojom::ReferrerPolicy::kDefault: return REFERRER_POLICY_DEFAULT; } - NOTREACHED(); + DCHECK(false); return REFERRER_POLICY_DEFAULT; } @@ -1179,7 +1179,7 @@ void CefPostDataElementImpl::Get(network::ResourceRequestBody& body) const { body.AppendFileRange(path, 0, std::numeric_limits::max(), base::Time()); } else { - NOTREACHED(); + DCHECK(false); } } diff --git a/libcef/common/resource_util.cc b/libcef/common/resource_util.cc index 88941b17e..616b8fd56 100644 --- a/libcef/common/resource_util.cc +++ b/libcef/common/resource_util.cc @@ -113,7 +113,7 @@ base::FilePath GetUserDataPath(CefSettings* settings, return result; } - NOTREACHED(); + DCHECK(false); return result; } @@ -130,7 +130,7 @@ bool DownloadPathIsDangerous(const base::FilePath& download_path) { base::FilePath desktop_dir; if (!base::PathService::Get(base::DIR_USER_DESKTOP, &desktop_dir)) { - NOTREACHED(); + DCHECK(false); return false; } return (download_path == desktop_dir); diff --git a/libcef/common/response_impl.cc b/libcef/common/response_impl.cc index 29e622702..2127045e6 100644 --- a/libcef/common/response_impl.cc +++ b/libcef/common/response_impl.cc @@ -18,10 +18,10 @@ #include "third_party/blink/public/platform/web_url.h" #include "third_party/blink/public/platform/web_url_response.h" -#define CHECK_READONLY_RETURN_VOID() \ - if (read_only_) { \ - NOTREACHED() << "object is read only"; \ - return; \ +#define CHECK_READONLY_RETURN_VOID() \ + if (read_only_) { \ + DCHECK(false) << "object is read only"; \ + return; \ } // CefResponse ---------------------------------------------------------------- diff --git a/libcef/common/task_runner_impl.cc b/libcef/common/task_runner_impl.cc index fe5b260d3..39590e97f 100644 --- a/libcef/common/task_runner_impl.cc +++ b/libcef/common/task_runner_impl.cc @@ -104,7 +104,7 @@ CefTaskRunnerImpl::GetCurrentTaskRunner() { } else if (current_id == BrowserThread::IO) { return content::GetIOThreadTaskRunner({}); } else { - NOTREACHED(); + DCHECK(false); } } diff --git a/libcef/common/thread_impl.cc b/libcef/common/thread_impl.cc index 7c4a09466..b08a64716 100644 --- a/libcef/common/thread_impl.cc +++ b/libcef/common/thread_impl.cc @@ -29,7 +29,7 @@ CefRefPtr CefThread::CreateThread( bool stoppable, cef_com_init_mode_t com_init_mode) { if (!CefTaskRunnerImpl::GetCurrentTaskRunner()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return nullptr; } @@ -130,7 +130,7 @@ void CefThreadImpl::Stop() { return; } if (!owner_task_runner_->RunsTasksInCurrentSequence()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return; } @@ -144,7 +144,7 @@ bool CefThreadImpl::IsRunning() { return false; } if (!owner_task_runner_->RunsTasksInCurrentSequence()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return false; } diff --git a/libcef/common/urlrequest_impl.cc b/libcef/common/urlrequest_impl.cc index 986889756..7311559ea 100644 --- a/libcef/common/urlrequest_impl.cc +++ b/libcef/common/urlrequest_impl.cc @@ -18,12 +18,12 @@ CefRefPtr CefURLRequest::Create( CefRefPtr client, CefRefPtr request_context) { if (!request.get() || !client.get()) { - NOTREACHED() << "called with invalid parameters"; + DCHECK(false) << "called with invalid parameters"; return nullptr; } if (!CefTaskRunnerImpl::GetCurrentTaskRunner()) { - NOTREACHED() << "called on invalid thread"; + DCHECK(false) << "called on invalid thread"; return nullptr; } @@ -37,7 +37,7 @@ CefRefPtr CefURLRequest::Create( } return nullptr; } else { - NOTREACHED() << "called in unsupported process"; + DCHECK(false) << "called in unsupported process"; return nullptr; } } diff --git a/libcef/common/value_base.h b/libcef/common/value_base.h index ce50ba51c..6db69963e 100644 --- a/libcef/common/value_base.h +++ b/libcef/common/value_base.h @@ -84,7 +84,7 @@ class CefValueController inline bool VerifyThread() { if (!thread_safe() && !on_correct_thread()) { // This object should only be accessed from the thread that created it. - NOTREACHED() << "object accessed from incorrect thread."; + DCHECK(false) << "object accessed from incorrect thread."; return false; } return true; @@ -349,7 +349,7 @@ class CefValueBase : public CefType, public CefValueController::Object { inline bool VerifyAttached() const { if (detached()) { // This object should not be accessed after being detached. - NOTREACHED() << "object accessed after being detached."; + DCHECK(false) << "object accessed after being detached."; return false; } return true; @@ -397,7 +397,7 @@ class CefValueBase : public CefType, public CefValueController::Object { if (read_only() && modify) { // This object cannot be modified. - NOTREACHED() << "mutation attempted on read-only object."; + DCHECK(false) << "mutation attempted on read-only object."; return false; } diff --git a/libcef/common/values_impl.cc b/libcef/common/values_impl.cc index a90fd96cf..d9a2169be 100644 --- a/libcef/common/values_impl.cc +++ b/libcef/common/values_impl.cc @@ -296,7 +296,7 @@ CefValueType CefValueImpl::GetType() { case base::Value::Type::STRING: return VTYPE_STRING; default: - NOTREACHED(); + DCHECK(false); break; } } diff --git a/libcef/common/waitable_event_impl.cc b/libcef/common/waitable_event_impl.cc index 49f0ed0e2..3e9745b0a 100644 --- a/libcef/common/waitable_event_impl.cc +++ b/libcef/common/waitable_event_impl.cc @@ -13,7 +13,7 @@ namespace { bool AllowWait() { if (CefCurrentlyOn(TID_UI) || CefCurrentlyOn(TID_IO)) { - NOTREACHED() << "waiting is not allowed on the current thread"; + DCHECK(false) << "waiting is not allowed on the current thread"; return false; } return true; diff --git a/libcef/renderer/browser_impl.cc b/libcef/renderer/browser_impl.cc index 32628c454..1626c0115 100644 --- a/libcef/renderer/browser_impl.cc +++ b/libcef/renderer/browser_impl.cc @@ -53,7 +53,7 @@ bool CefBrowserImpl::IsValid() { } CefRefPtr CefBrowserImpl::GetHost() { - NOTREACHED() << "GetHost cannot be called from the render process"; + DCHECK(false) << "GetHost cannot be called from the render process"; return nullptr; } diff --git a/libcef/renderer/dom_document_impl.cc b/libcef/renderer/dom_document_impl.cc index 223462da5..09cc213ca 100644 --- a/libcef/renderer/dom_document_impl.cc +++ b/libcef/renderer/dom_document_impl.cc @@ -271,7 +271,7 @@ void CefDOMDocumentImpl::Detach() { bool CefDOMDocumentImpl::VerifyContext() { if (!CEF_CURRENTLY_ON_RT() || frame_ == nullptr) { - NOTREACHED(); + DCHECK(false); return false; } return true; diff --git a/libcef/renderer/dom_node_impl.cc b/libcef/renderer/dom_node_impl.cc index 8ae90c084..83425e547 100644 --- a/libcef/renderer/dom_node_impl.cc +++ b/libcef/renderer/dom_node_impl.cc @@ -293,7 +293,7 @@ CefString CefDOMNodeImpl::GetElementTagName() { } if (!node_.IsElementNode()) { - NOTREACHED(); + DCHECK(false); return str; } @@ -312,7 +312,7 @@ bool CefDOMNodeImpl::HasElementAttributes() { } if (!node_.IsElementNode()) { - NOTREACHED(); + DCHECK(false); return false; } @@ -326,7 +326,7 @@ bool CefDOMNodeImpl::HasElementAttribute(const CefString& attrName) { } if (!node_.IsElementNode()) { - NOTREACHED(); + DCHECK(false); return false; } @@ -341,7 +341,7 @@ CefString CefDOMNodeImpl::GetElementAttribute(const CefString& attrName) { } if (!node_.IsElementNode()) { - NOTREACHED(); + DCHECK(false); return str; } @@ -361,7 +361,7 @@ void CefDOMNodeImpl::GetElementAttributes(AttributeMap& attrMap) { } if (!node_.IsElementNode()) { - NOTREACHED(); + DCHECK(false); return; } @@ -385,7 +385,7 @@ bool CefDOMNodeImpl::SetElementAttribute(const CefString& attrName, } if (!node_.IsElementNode()) { - NOTREACHED(); + DCHECK(false); return false; } @@ -402,7 +402,7 @@ CefString CefDOMNodeImpl::GetElementInnerText() { } if (!node_.IsElementNode()) { - NOTREACHED(); + DCHECK(false); return str; } @@ -422,7 +422,7 @@ CefRect CefDOMNodeImpl::GetElementBounds() { } if (!node_.IsElementNode()) { - NOTREACHED(); + DCHECK(false); return rect; } @@ -440,14 +440,14 @@ void CefDOMNodeImpl::Detach() { bool CefDOMNodeImpl::VerifyContext() { if (!document_.get()) { - NOTREACHED(); + DCHECK(false); return false; } if (!document_->VerifyContext()) { return false; } if (node_.IsNull()) { - NOTREACHED(); + DCHECK(false); return false; } return true; diff --git a/libcef/renderer/frame_impl.cc b/libcef/renderer/frame_impl.cc index 7ca1b8431..cb37ab38e 100644 --- a/libcef/renderer/frame_impl.cc +++ b/libcef/renderer/frame_impl.cc @@ -105,7 +105,7 @@ void CefFrameImpl::SelectAll() { } void CefFrameImpl::ViewSource() { - NOTREACHED() << "ViewSource cannot be called from the renderer process"; + DCHECK(false) << "ViewSource cannot be called from the renderer process"; } void CefFrameImpl::GetSource(CefRefPtr visitor) { @@ -258,7 +258,7 @@ void CefFrameImpl::VisitDOM(CefRefPtr visitor) { CefRefPtr CefFrameImpl::CreateURLRequest( CefRefPtr request, CefRefPtr client) { - NOTREACHED() << "CreateURLRequest cannot be called from the render process"; + DCHECK(false) << "CreateURLRequest cannot be called from the render process"; return nullptr; } diff --git a/libcef/renderer/render_manager.cc b/libcef/renderer/render_manager.cc index 77e2c59d7..771d75e18 100644 --- a/libcef/renderer/render_manager.cc +++ b/libcef/renderer/render_manager.cc @@ -375,7 +375,7 @@ void CefRenderManager::OnBrowserDestroyed(CefBrowserImpl* browser) { } // No browser was found in the map. - NOTREACHED(); + DCHECK(false); } CefGuestView* CefRenderManager::GetGuestViewForView(blink::WebView* view) { @@ -398,7 +398,7 @@ void CefRenderManager::OnGuestViewDestroyed(CefGuestView* guest_view) { } // No guest view was found in the map. - NOTREACHED(); + DCHECK(false); } // Enable deprecation warnings on Windows. See http://crbug.com/585142. diff --git a/libcef/renderer/thread_util.h b/libcef/renderer/thread_util.h index 768a3b36c..d293cd304 100644 --- a/libcef/renderer/thread_util.h +++ b/libcef/renderer/thread_util.h @@ -16,16 +16,16 @@ #define CEF_REQUIRE_RT() DCHECK(CEF_CURRENTLY_ON_RT()) -#define CEF_REQUIRE_RT_RETURN(var) \ - if (!CEF_CURRENTLY_ON_RT()) { \ - NOTREACHED() << "called on invalid thread"; \ - return var; \ +#define CEF_REQUIRE_RT_RETURN(var) \ + if (!CEF_CURRENTLY_ON_RT()) { \ + DCHECK(false) << "called on invalid thread"; \ + return var; \ } -#define CEF_REQUIRE_RT_RETURN_VOID() \ - if (!CEF_CURRENTLY_ON_RT()) { \ - NOTREACHED() << "called on invalid thread"; \ - return; \ +#define CEF_REQUIRE_RT_RETURN_VOID() \ + if (!CEF_CURRENTLY_ON_RT()) { \ + DCHECK(false) << "called on invalid thread"; \ + return; \ } #define CEF_RENDER_TASK_RUNNER() \ diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index b79839ded..e4d8146f8 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -228,7 +228,7 @@ class V8TrackObject : public CefTrackNode { int AdjustExternallyAllocatedMemory(int change_in_bytes) { int new_value = external_memory_ + change_in_bytes; if (new_value < 0) { - NOTREACHED() << "External memory usage cannot be less than 0 bytes"; + DCHECK(false) << "External memory usage cannot be less than 0 bytes"; change_in_bytes = -(external_memory_); new_value = 0; } @@ -861,26 +861,26 @@ bool CefRegisterExtension(const CefString& extension_name, // Helper macros #define CEF_V8_HAS_ISOLATE() (!!CefV8IsolateManager::Get()) -#define CEF_V8_REQUIRE_ISOLATE_RETURN(var) \ - if (!CEF_V8_HAS_ISOLATE()) { \ - NOTREACHED() << "V8 isolate is not valid"; \ - return var; \ +#define CEF_V8_REQUIRE_ISOLATE_RETURN(var) \ + if (!CEF_V8_HAS_ISOLATE()) { \ + DCHECK(false) << "V8 isolate is not valid"; \ + return var; \ } #define CEF_V8_CURRENTLY_ON_MLT() \ (!handle_.get() || handle_->BelongsToCurrentThread()) -#define CEF_V8_REQUIRE_MLT_RETURN(var) \ - CEF_V8_REQUIRE_ISOLATE_RETURN(var); \ - if (!CEF_V8_CURRENTLY_ON_MLT()) { \ - NOTREACHED() << "called on incorrect thread"; \ - return var; \ +#define CEF_V8_REQUIRE_MLT_RETURN(var) \ + CEF_V8_REQUIRE_ISOLATE_RETURN(var); \ + if (!CEF_V8_CURRENTLY_ON_MLT()) { \ + DCHECK(false) << "called on incorrect thread"; \ + return var; \ } #define CEF_V8_HANDLE_IS_VALID() (handle_.get() && handle_->IsValid()) #define CEF_V8_REQUIRE_VALID_HANDLE_RETURN(ret) \ CEF_V8_REQUIRE_MLT_RETURN(ret); \ if (!CEF_V8_HANDLE_IS_VALID()) { \ - NOTREACHED() << "V8 handle is not valid"; \ + DCHECK(false) << "V8 handle is not valid"; \ return ret; \ } @@ -888,11 +888,11 @@ bool CefRegisterExtension(const CefString& extension_name, (CEF_V8_HAS_ISOLATE() && CEF_V8_CURRENTLY_ON_MLT() && \ CEF_V8_HANDLE_IS_VALID()) -#define CEF_V8_REQUIRE_OBJECT_RETURN(ret) \ - CEF_V8_REQUIRE_VALID_HANDLE_RETURN(ret); \ - if (type_ != TYPE_OBJECT) { \ - NOTREACHED() << "V8 value is not an object"; \ - return ret; \ +#define CEF_V8_REQUIRE_OBJECT_RETURN(ret) \ + CEF_V8_REQUIRE_VALID_HANDLE_RETURN(ret); \ + if (type_ != TYPE_OBJECT) { \ + DCHECK(false) << "V8 value is not an object"; \ + return ret; \ } // CefV8HandleBase @@ -1087,7 +1087,7 @@ bool CefV8ContextImpl::Eval(const CefString& code, } if (code.empty()) { - NOTREACHED() << "invalid input parameter"; + DCHECK(false) << "invalid input parameter"; return false; } @@ -1115,7 +1115,7 @@ bool CefV8ContextImpl::Eval(const CefString& code, return true; } - NOTREACHED(); + DCHECK(false); return false; } @@ -1330,7 +1330,7 @@ CefRefPtr CefV8Value::CreateObject( v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return nullptr; } @@ -1350,7 +1350,7 @@ CefRefPtr CefV8Value::CreateObject( v8::MaybeLocal maybe_object = tmpl->NewInstance(context); if (!maybe_object.ToLocal(&obj)) { - NOTREACHED() << "Failed to create V8 Object with interceptor"; + DCHECK(false) << "Failed to create V8 Object with interceptor"; return nullptr; } } else { @@ -1381,7 +1381,7 @@ CefRefPtr CefV8Value::CreateArray(int length) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return nullptr; } @@ -1411,7 +1411,7 @@ CefRefPtr CefV8Value::CreateArrayBuffer( v8::HandleScope handle_scope(isolate); v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return nullptr; } @@ -1453,7 +1453,7 @@ CefRefPtr CefV8Value::CreateFunction( CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr); if (!handler.get()) { - NOTREACHED() << "invalid parameter"; + DCHECK(false) << "invalid parameter"; return nullptr; } @@ -1462,7 +1462,7 @@ CefRefPtr CefV8Value::CreateFunction( v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return nullptr; } @@ -1477,7 +1477,7 @@ CefRefPtr CefV8Value::CreateFunction( v8::MaybeLocal maybe_func = tmpl->GetFunction(context); v8::Local func; if (!maybe_func.ToLocal(&func)) { - NOTREACHED() << "failed to create V8 function"; + DCHECK(false) << "failed to create V8 function"; return nullptr; } @@ -1506,7 +1506,7 @@ CefRefPtr CefV8Value::CreatePromise() { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return nullptr; } @@ -1672,7 +1672,7 @@ v8::Local CefV8ValueImpl::GetV8Value(bool should_persist) { break; } - NOTREACHED() << "Invalid type for CefV8ValueImpl"; + DCHECK(false) << "Invalid type for CefV8ValueImpl"; return v8::Local(); } @@ -1867,7 +1867,7 @@ bool CefV8ValueImpl::IsUserCreated() { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } @@ -1918,7 +1918,7 @@ bool CefV8ValueImpl::HasValue(const CefString& key) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } @@ -1931,7 +1931,7 @@ bool CefV8ValueImpl::HasValue(int index) { CEF_V8_REQUIRE_OBJECT_RETURN(false); if (index < 0) { - NOTREACHED() << "invalid input parameter"; + DCHECK(false) << "invalid input parameter"; return false; } @@ -1940,7 +1940,7 @@ bool CefV8ValueImpl::HasValue(int index) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } @@ -1957,7 +1957,7 @@ bool CefV8ValueImpl::DeleteValue(const CefString& key) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } @@ -1974,7 +1974,7 @@ bool CefV8ValueImpl::DeleteValue(int index) { CEF_V8_REQUIRE_OBJECT_RETURN(false); if (index < 0) { - NOTREACHED() << "invalid input parameter"; + DCHECK(false) << "invalid input parameter"; return false; } @@ -1983,7 +1983,7 @@ bool CefV8ValueImpl::DeleteValue(int index) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } @@ -2004,7 +2004,7 @@ CefRefPtr CefV8ValueImpl::GetValue(const CefString& key) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return nullptr; } @@ -2025,7 +2025,7 @@ CefRefPtr CefV8ValueImpl::GetValue(int index) { CEF_V8_REQUIRE_OBJECT_RETURN(nullptr); if (index < 0) { - NOTREACHED() << "invalid input parameter"; + DCHECK(false) << "invalid input parameter"; return nullptr; } @@ -2034,7 +2034,7 @@ CefRefPtr CefV8ValueImpl::GetValue(int index) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return nullptr; } @@ -2063,7 +2063,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key, v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } @@ -2087,7 +2087,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key, return (!HasCaught(context, try_catch) && set.FromJust()); } } else { - NOTREACHED() << "invalid input parameter"; + DCHECK(false) << "invalid input parameter"; return false; } } @@ -2096,7 +2096,7 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr value) { CEF_V8_REQUIRE_OBJECT_RETURN(false); if (index < 0) { - NOTREACHED() << "invalid input parameter"; + DCHECK(false) << "invalid input parameter"; return false; } @@ -2107,7 +2107,7 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr value) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } @@ -2119,7 +2119,7 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr value) { v8::Maybe set = obj->Set(context, index, impl->GetV8Value(true)); return (!HasCaught(context, try_catch) && set.FromJust()); } else { - NOTREACHED() << "invalid input parameter"; + DCHECK(false) << "invalid input parameter"; return false; } } @@ -2134,7 +2134,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key, v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } @@ -2176,7 +2176,7 @@ bool CefV8ValueImpl::GetKeys(std::vector& keys) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } @@ -2204,7 +2204,7 @@ bool CefV8ValueImpl::SetUserData(CefRefPtr user_data) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } @@ -2228,7 +2228,7 @@ CefRefPtr CefV8ValueImpl::GetUserData() { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return nullptr; } @@ -2251,7 +2251,7 @@ int CefV8ValueImpl::GetExternallyAllocatedMemory() { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return 0; } @@ -2274,7 +2274,7 @@ int CefV8ValueImpl::AdjustExternallyAllocatedMemory(int change_in_bytes) { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return 0; } @@ -2297,13 +2297,13 @@ int CefV8ValueImpl::GetArrayLength() { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return 0; } v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsArray()) { - NOTREACHED() << "V8 value is not an array"; + DCHECK(false) << "V8 value is not an array"; return 0; } @@ -2321,13 +2321,13 @@ CefV8ValueImpl::GetArrayBufferReleaseCallback() { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return nullptr; } v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsArrayBuffer()) { - NOTREACHED() << "V8 value is not an array buffer"; + DCHECK(false) << "V8 value is not an array buffer"; return nullptr; } @@ -2349,13 +2349,13 @@ bool CefV8ValueImpl::NeuterArrayBuffer() { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return false; } v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsArrayBuffer()) { - NOTREACHED() << "V8 value is not an array buffer"; + DCHECK(false) << "V8 value is not an array buffer"; return false; } v8::Local obj = value->ToObject(context).ToLocalChecked(); @@ -2377,13 +2377,13 @@ CefString CefV8ValueImpl::GetFunctionName() { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return rv; } v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsFunction()) { - NOTREACHED() << "V8 value is not a function"; + DCHECK(false) << "V8 value is not a function"; return rv; } @@ -2402,13 +2402,13 @@ CefRefPtr CefV8ValueImpl::GetFunctionHandler() { v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { - NOTREACHED() << "not currently in a V8 context"; + DCHECK(false) << "not currently in a V8 context"; return nullptr; } v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsFunction()) { - NOTREACHED() << "V8 value is not a function"; + DCHECK(false) << "V8 value is not a function"; return nullptr; } @@ -2439,16 +2439,16 @@ CefRefPtr CefV8ValueImpl::ExecuteFunctionWithContext( v8::HandleScope handle_scope(isolate); v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsFunction()) { - NOTREACHED() << "V8 value is not a function"; + DCHECK(false) << "V8 value is not a function"; return nullptr; } if (context.get() && !context->IsValid()) { - NOTREACHED() << "invalid V8 context parameter"; + DCHECK(false) << "invalid V8 context parameter"; return nullptr; } if (object.get() && (!object->IsValid() || !object->IsObject())) { - NOTREACHED() << "invalid V8 object parameter"; + DCHECK(false) << "invalid V8 object parameter"; return nullptr; } @@ -2456,7 +2456,7 @@ CefRefPtr CefV8ValueImpl::ExecuteFunctionWithContext( if (argc > 0) { for (int i = 0; i < argc; ++i) { if (!arguments[i].get() || !arguments[i]->IsValid()) { - NOTREACHED() << "invalid V8 arguments parameter"; + DCHECK(false) << "invalid V8 arguments parameter"; return nullptr; } } @@ -2523,12 +2523,12 @@ bool CefV8ValueImpl::ResolvePromise(CefRefPtr arg) { v8::HandleScope handle_scope(isolate); v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsPromise()) { - NOTREACHED() << "V8 value is not a Promise"; + DCHECK(false) << "V8 value is not a Promise"; return false; } if (arg.get() && !arg->IsValid()) { - NOTREACHED() << "invalid V8 arg parameter"; + DCHECK(false) << "invalid V8 arg parameter"; return false; } @@ -2562,7 +2562,7 @@ bool CefV8ValueImpl::RejectPromise(const CefString& errorMsg) { v8::HandleScope handle_scope(isolate); v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsPromise()) { - NOTREACHED() << "V8 value is not a Promise"; + DCHECK(false) << "V8 value is not a Promise"; return false; } diff --git a/libcef_dll/base/cef_callback_internal.cc b/libcef_dll/base/cef_callback_internal.cc index 5651187f0..ae2a4742c 100644 --- a/libcef_dll/base/cef_callback_internal.cc +++ b/libcef_dll/base/cef_callback_internal.cc @@ -20,7 +20,7 @@ bool QueryCancellationTraitsForNonCancellables( case BindStateBase::MAYBE_VALID: return true; } - NOTREACHED(); + DCHECK(false); return false; } diff --git a/libcef_dll/cpptoc/base_ref_counted_cpptoc.cc b/libcef_dll/cpptoc/base_ref_counted_cpptoc.cc index 78d7e95ab..4dae84c3a 100644 --- a/libcef_dll/cpptoc/base_ref_counted_cpptoc.cc +++ b/libcef_dll/cpptoc/base_ref_counted_cpptoc.cc @@ -12,7 +12,7 @@ CefRefPtr CefCppToCRefCounted< CefBaseRefCounted, cef_base_ref_counted_t>::UnwrapDerived(CefWrapperType type, cef_base_ref_counted_t* s) { - NOTREACHED(); + DCHECK(false); return nullptr; } diff --git a/libcef_dll/cpptoc/base_scoped_cpptoc.cc b/libcef_dll/cpptoc/base_scoped_cpptoc.cc index 02387ca80..9fa8c479f 100644 --- a/libcef_dll/cpptoc/base_scoped_cpptoc.cc +++ b/libcef_dll/cpptoc/base_scoped_cpptoc.cc @@ -10,7 +10,7 @@ template <> CefOwnPtr CefCppToCScoped:: UnwrapDerivedOwn(CefWrapperType type, cef_base_scoped_t* s) { - NOTREACHED(); + DCHECK(false); return CefOwnPtr(); } @@ -18,7 +18,7 @@ template <> CefRawPtr CefCppToCScoped:: UnwrapDerivedRaw(CefWrapperType type, cef_base_scoped_t* s) { - NOTREACHED(); + DCHECK(false); return nullptr; } diff --git a/libcef_dll/ctocpp/base_ref_counted_ctocpp.cc b/libcef_dll/ctocpp/base_ref_counted_ctocpp.cc index 4b14e3fd7..a5c14d194 100644 --- a/libcef_dll/ctocpp/base_ref_counted_ctocpp.cc +++ b/libcef_dll/ctocpp/base_ref_counted_ctocpp.cc @@ -12,7 +12,7 @@ cef_base_ref_counted_t* CefCToCppRefCounted< CefBaseRefCounted, cef_base_ref_counted_t>::UnwrapDerived(CefWrapperType type, CefBaseRefCounted* c) { - NOTREACHED(); + DCHECK(false); return NULL; } diff --git a/libcef_dll/ctocpp/base_scoped_ctocpp.cc b/libcef_dll/ctocpp/base_scoped_ctocpp.cc index 40accb5a7..35b1624fd 100644 --- a/libcef_dll/ctocpp/base_scoped_ctocpp.cc +++ b/libcef_dll/ctocpp/base_scoped_ctocpp.cc @@ -10,7 +10,7 @@ template <> cef_base_scoped_t* CefCToCppScoped:: UnwrapDerivedOwn(CefWrapperType type, CefOwnPtr c) { - NOTREACHED(); + DCHECK(false); return NULL; } @@ -18,7 +18,7 @@ template <> cef_base_scoped_t* CefCToCppScoped:: UnwrapDerivedRaw(CefWrapperType type, CefRawPtr c) { - NOTREACHED(); + DCHECK(false); return NULL; } diff --git a/libcef_dll/sandbox/sandbox_win.cc b/libcef_dll/sandbox/sandbox_win.cc index bb5c77c54..52ef04ed2 100644 --- a/libcef_dll/sandbox/sandbox_win.cc +++ b/libcef_dll/sandbox/sandbox_win.cc @@ -45,12 +45,12 @@ void cef_sandbox_info_destroy(void* sandbox_info) { // Avoid bringing in partition_alloc dependencies. namespace partition_alloc { bool ReleaseReservation() { - NOTREACHED(); + DCHECK(false); return false; } void TerminateBecauseOutOfMemory(size_t size) { - NOTREACHED(); + DCHECK(false); } } // namespace partition_alloc diff --git a/libcef_dll/wrapper/cef_xml_object.cc b/libcef_dll/wrapper/cef_xml_object.cc index 3cdccfb37..71d4f204f 100644 --- a/libcef_dll/wrapper/cef_xml_object.cc +++ b/libcef_dll/wrapper/cef_xml_object.cc @@ -107,7 +107,7 @@ class CefXmlObjectLoader { cur_object->GetName() != reader->GetQualifiedName()) { // Open tag without close tag or close tag without open tag should // never occur (the parser catches this error). - NOTREACHED(); + DCHECK(false); std::stringstream ss; ss << "Mismatched end tag for " << std::string(cur_object->GetName()) << ", line " diff --git a/libcef_dll/wrapper/libcef_dll_wrapper2.cc b/libcef_dll/wrapper/libcef_dll_wrapper2.cc index 2eef0ada8..4e6c48a12 100644 --- a/libcef_dll/wrapper/libcef_dll_wrapper2.cc +++ b/libcef_dll/wrapper/libcef_dll_wrapper2.cc @@ -22,7 +22,7 @@ int CefRunWinMainWithPreferredStackSize(wWinMainPtr wWinMain, const char* api_hash = cef_api_hash(0); if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) { // The libcef API hash does not match the current header API hash. - NOTREACHED(); + DCHECK(false); return 0; } @@ -36,7 +36,7 @@ int CefRunMainWithPreferredStackSize(mainPtr main, int argc, char* argv[]) { const char* api_hash = cef_api_hash(0); if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) { // The libcef API hash does not match the current header API hash. - NOTREACHED(); + DCHECK(false); return 0; } diff --git a/tools/make_cpptoc_impl.py b/tools/make_cpptoc_impl.py index 969245115..fa2e9dca9 100644 --- a/tools/make_cpptoc_impl.py +++ b/tools/make_cpptoc_impl.py @@ -122,7 +122,7 @@ def make_cpptoc_function_impl_new(cls, name, func, defined_names, base_scoped): if arg_type == 'struct_byref_const' or arg_type == 'struct_byref': result +=\ '\n if (!template_util::has_valid_size('+arg_name+')) {'\ - '\n NOTREACHED() << "invalid '+arg_name+'->[base.]size";'\ + '\n DCHECK(false) << "invalid '+arg_name+'->[base.]size";'\ '\n return'+retval_default+';'\ '\n }' elif arg_type == 'simple_vec_byref' or arg_type == 'bool_vec_byref' or \ @@ -654,18 +654,18 @@ def make_cpptoc_class_impl(header, clsname, impl): if base_scoped: const += 'template<> CefOwnPtr<'+clsname+'> '+parent_sig+'::UnwrapDerivedOwn(CefWrapperType type, '+capiname+'* s) {\n' + \ unwrapderived[0] + \ - ' NOTREACHED() << "Unexpected class type: " << type;\n'+ \ + ' DCHECK(false) << "Unexpected class type: " << type;\n'+ \ ' return CefOwnPtr<'+clsname+'>();\n'+ \ '}\n\n' + \ 'template<> CefRawPtr<'+clsname+'> '+parent_sig+'::UnwrapDerivedRaw(CefWrapperType type, '+capiname+'* s) {\n' + \ unwrapderived[1] + \ - ' NOTREACHED() << "Unexpected class type: " << type;\n'+ \ + ' DCHECK(false) << "Unexpected class type: " << type;\n'+ \ ' return nullptr;\n'+ \ '}\n\n' else: const += 'template<> CefRefPtr<'+clsname+'> '+parent_sig+'::UnwrapDerived(CefWrapperType type, '+capiname+'* s) {\n' + \ unwrapderived + \ - ' NOTREACHED() << "Unexpected class type: " << type;\n'+ \ + ' DCHECK(false) << "Unexpected class type: " << type;\n'+ \ ' return nullptr;\n'+ \ '}\n\n' diff --git a/tools/make_ctocpp_impl.py b/tools/make_ctocpp_impl.py index d17d3ec1b..9674fd969 100644 --- a/tools/make_ctocpp_impl.py +++ b/tools/make_ctocpp_impl.py @@ -88,7 +88,7 @@ def make_ctocpp_function_impl_new(clsname, name, func, base_scoped): result += '\n const char* api_hash = cef_api_hash(0);'\ '\n if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) {'\ '\n // The libcef API hash does not match the current header API hash.'\ - '\n NOTREACHED();'\ + '\n DCHECK(false);'\ '\n return'+retval_default+';'\ '\n }\n' @@ -649,18 +649,18 @@ def make_ctocpp_class_impl(header, clsname, impl): if base_scoped: const += 'template<> '+capiname+'* '+parent_sig+'::UnwrapDerivedOwn(CefWrapperType type, CefOwnPtr<'+clsname+'> c) {\n'+ \ unwrapderived[0] + \ - ' NOTREACHED() << "Unexpected class type: " << type;\n'+ \ + ' DCHECK(false) << "Unexpected class type: " << type;\n'+ \ ' return nullptr;\n'+ \ '}\n\n' + \ 'template<> '+capiname+'* '+parent_sig+'::UnwrapDerivedRaw(CefWrapperType type, CefRawPtr<'+clsname+'> c) {\n'+ \ unwrapderived[1] + \ - ' NOTREACHED() << "Unexpected class type: " << type;\n'+ \ + ' DCHECK(false) << "Unexpected class type: " << type;\n'+ \ ' return nullptr;\n'+ \ '}\n\n' else: const += 'template<> '+capiname+'* '+parent_sig+'::UnwrapDerived(CefWrapperType type, '+clsname+'* c) {\n'+ \ unwrapderived + \ - ' NOTREACHED() << "Unexpected class type: " << type;\n'+ \ + ' DCHECK(false) << "Unexpected class type: " << type;\n'+ \ ' return nullptr;\n'+ \ '}\n\n'