- 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
This commit is contained in:
Marshall Greenblatt 2009-03-09 13:23:07 +00:00
parent 08a19d5384
commit 74bb6d6e74
2 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,7 @@ CEF_EXPORT void cef_shutdown()
{ {
CefShutdown(); CefShutdown();
#ifdef _DEBUG
// Check that all wrapper objects have been destroyed // Check that all wrapper objects have been destroyed
DCHECK(CefBrowserCppToC::DebugObjCt == 0); DCHECK(CefBrowserCppToC::DebugObjCt == 0);
DCHECK(CefRequestCppToC::DebugObjCt == 0); DCHECK(CefRequestCppToC::DebugObjCt == 0);
@ -40,6 +41,7 @@ CEF_EXPORT void cef_shutdown()
DCHECK(CefVariantCppToC::DebugObjCt == 0); DCHECK(CefVariantCppToC::DebugObjCt == 0);
DCHECK(CefHandlerCToCpp::DebugObjCt == 0); DCHECK(CefHandlerCToCpp::DebugObjCt == 0);
DCHECK(CefJSHandlerCToCpp::DebugObjCt == 0); DCHECK(CefJSHandlerCToCpp::DebugObjCt == 0);
#endif // _DEBUG
} }
CEF_EXPORT void cef_do_message_loop_work() CEF_EXPORT void cef_do_message_loop_work()

View File

@ -25,6 +25,7 @@ void CefShutdown()
{ {
cef_shutdown(); cef_shutdown();
#ifdef _DEBUG
// Check that all wrapper objects have been destroyed // Check that all wrapper objects have been destroyed
DCHECK(CefHandlerCppToC::DebugObjCt == 0); DCHECK(CefHandlerCppToC::DebugObjCt == 0);
DCHECK(CefJSHandlerCppToC::DebugObjCt == 0); DCHECK(CefJSHandlerCppToC::DebugObjCt == 0);
@ -35,6 +36,7 @@ void CefShutdown()
DCHECK(CefStreamReaderCToCpp::DebugObjCt == 0); DCHECK(CefStreamReaderCToCpp::DebugObjCt == 0);
DCHECK(CefStreamWriterCToCpp::DebugObjCt == 0); DCHECK(CefStreamWriterCToCpp::DebugObjCt == 0);
DCHECK(CefVariantCToCpp::DebugObjCt == 0); DCHECK(CefVariantCToCpp::DebugObjCt == 0);
#endif // _DEBUG
} }
void CefDoMessageLoopWork() void CefDoMessageLoopWork()