From 74bb6d6e74fb1542fa92c53cdc4e246f881c75c5 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 9 Mar 2009 13:23:07 +0000 Subject: [PATCH] - Add #ifdef _DEBUG around the DebugObjCt DCHECK() calls to avoid compile errors in release build (Fix by: vridosh, Issue #1). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@20 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef_dll/libcef_dll.cc | 2 ++ libcef_dll/wrapper/libcef_dll_wrapper.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libcef_dll/libcef_dll.cc b/libcef_dll/libcef_dll.cc index 7c5125881..6f1aa1559 100644 --- a/libcef_dll/libcef_dll.cc +++ b/libcef_dll/libcef_dll.cc @@ -30,6 +30,7 @@ CEF_EXPORT void cef_shutdown() { CefShutdown(); +#ifdef _DEBUG // Check that all wrapper objects have been destroyed DCHECK(CefBrowserCppToC::DebugObjCt == 0); DCHECK(CefRequestCppToC::DebugObjCt == 0); @@ -40,6 +41,7 @@ CEF_EXPORT void cef_shutdown() DCHECK(CefVariantCppToC::DebugObjCt == 0); DCHECK(CefHandlerCToCpp::DebugObjCt == 0); DCHECK(CefJSHandlerCToCpp::DebugObjCt == 0); +#endif // _DEBUG } CEF_EXPORT void cef_do_message_loop_work() diff --git a/libcef_dll/wrapper/libcef_dll_wrapper.cc b/libcef_dll/wrapper/libcef_dll_wrapper.cc index 991e2bdfd..186cc035b 100644 --- a/libcef_dll/wrapper/libcef_dll_wrapper.cc +++ b/libcef_dll/wrapper/libcef_dll_wrapper.cc @@ -25,6 +25,7 @@ void CefShutdown() { cef_shutdown(); +#ifdef _DEBUG // Check that all wrapper objects have been destroyed DCHECK(CefHandlerCppToC::DebugObjCt == 0); DCHECK(CefJSHandlerCppToC::DebugObjCt == 0); @@ -35,6 +36,7 @@ void CefShutdown() DCHECK(CefStreamReaderCToCpp::DebugObjCt == 0); DCHECK(CefStreamWriterCToCpp::DebugObjCt == 0); DCHECK(CefVariantCToCpp::DebugObjCt == 0); +#endif // _DEBUG } void CefDoMessageLoopWork()