mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-03 12:37:36 +01:00
Remove CefForceShutdown and make failure to call CefShutdown a DCHECK instead (issue #1932)
This commit is contained in:
parent
44a7cb8901
commit
aa6a352050
@ -47,18 +47,15 @@ namespace {
|
|||||||
|
|
||||||
CefContext* g_context = NULL;
|
CefContext* g_context = NULL;
|
||||||
|
|
||||||
// Force shutdown when the process terminates if a context currently exists and
|
#if DCHECK_IS_ON()
|
||||||
// CefShutdown() has not been explicitly called.
|
// When the process terminates check if CefShutdown() has been called.
|
||||||
class CefForceShutdown {
|
class CefShutdownChecker {
|
||||||
public:
|
public:
|
||||||
~CefForceShutdown() {
|
~CefShutdownChecker() {
|
||||||
if (g_context) {
|
DCHECK(!g_context) << "CefShutdown was not called";
|
||||||
g_context->Shutdown();
|
|
||||||
delete g_context;
|
|
||||||
g_context = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} g_force_shutdown;
|
} g_shutdown_checker;
|
||||||
|
#endif // DCHECK_IS_ON()
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
#if defined(ARCH_CPU_X86_64)
|
#if defined(ARCH_CPU_X86_64)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user