mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-04-13 10:22:07 +02:00
Windows: Fix AtExitManager assertions on shutdown when running with multi-threaded message loop (issue #1680)
This commit is contained in:
parent
269aaa2c3c
commit
2a658c414b
@ -422,6 +422,9 @@ void CefContext::FinishShutdownOnUIThread(
|
|||||||
if (trace_subscriber_.get())
|
if (trace_subscriber_.get())
|
||||||
trace_subscriber_.reset(NULL);
|
trace_subscriber_.reset(NULL);
|
||||||
|
|
||||||
|
if (component_updater_.get())
|
||||||
|
component_updater_.reset(NULL);
|
||||||
|
|
||||||
if (uithread_shutdown_event)
|
if (uithread_shutdown_event)
|
||||||
uithread_shutdown_event->Signal();
|
uithread_shutdown_event->Signal();
|
||||||
}
|
}
|
||||||
|
@ -136,6 +136,13 @@ patches = [
|
|||||||
'name': 'spellcheck_137',
|
'name': 'spellcheck_137',
|
||||||
'path': '../chrome/browser/spellchecker/',
|
'path': '../chrome/browser/spellchecker/',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# Fix AtExitManager assertion on PrefWatcherFactory destruction during
|
||||||
|
# Windows multi-threaded message loop shutdown.
|
||||||
|
# https://bitbucket.org/chromiumembedded/cef/issues/1680
|
||||||
|
'name': 'prefs_tab_helper_1680',
|
||||||
|
'path': '../chrome/browser/ui/prefs/',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
# Make URLRequest::set_is_pending() public so that it can be called from
|
# Make URLRequest::set_is_pending() public so that it can be called from
|
||||||
# CefRequestInterceptor::MaybeInterceptResponse().
|
# CefRequestInterceptor::MaybeInterceptResponse().
|
||||||
|
47
patch/patches/prefs_tab_helper_1680.patch
Normal file
47
patch/patches/prefs_tab_helper_1680.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
diff --git prefs_tab_helper.cc prefs_tab_helper.cc
|
||||||
|
index 5cb2d6e..b0c8689 100644
|
||||||
|
--- prefs_tab_helper.cc
|
||||||
|
+++ prefs_tab_helper.cc
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
#include <set>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
-#include "base/memory/singleton.h"
|
||||||
|
+#include "base/lazy_instance.h"
|
||||||
|
#include "base/prefs/overlay_user_pref_store.h"
|
||||||
|
#include "base/prefs/pref_change_registrar.h"
|
||||||
|
#include "base/prefs/pref_service.h"
|
||||||
|
@@ -413,12 +413,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||||
|
GetInstance()->GetServiceForBrowserContext(profile, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
- static PrefWatcherFactory* GetInstance() {
|
||||||
|
- return base::Singleton<PrefWatcherFactory>::get();
|
||||||
|
- }
|
||||||
|
+ static PrefWatcherFactory* GetInstance();
|
||||||
|
|
||||||
|
private:
|
||||||
|
- friend struct base::DefaultSingletonTraits<PrefWatcherFactory>;
|
||||||
|
+ friend struct base::DefaultLazyInstanceTraits<PrefWatcherFactory>;
|
||||||
|
|
||||||
|
PrefWatcherFactory() : BrowserContextKeyedServiceFactory(
|
||||||
|
"PrefWatcher",
|
||||||
|
@@ -439,6 +437,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
+namespace {
|
||||||
|
+
|
||||||
|
+base::LazyInstance<PrefWatcherFactory>::Leaky g_pref_watcher_factory =
|
||||||
|
+ LAZY_INSTANCE_INITIALIZER;
|
||||||
|
+
|
||||||
|
+} // namespace
|
||||||
|
+
|
||||||
|
+// static
|
||||||
|
+PrefWatcherFactory* PrefWatcherFactory::GetInstance() {
|
||||||
|
+ return g_pref_watcher_factory.Pointer();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
// static
|
||||||
|
PrefWatcher* PrefWatcher::Get(Profile* profile) {
|
||||||
|
return PrefWatcherFactory::GetForProfile(profile);
|
Loading…
x
Reference in New Issue
Block a user