mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-11 09:08:06 +01:00
f7aa98fe69
- Building on Windows now requires the Windows 10.0.10586 SDK. - Remove CefParseCSSColor which was implemented using Blink code in the browser process. This is longer advisable now that the Oilpan GC is enabled. - Avoid potential renderer process crashes by disabling script actions on the CefV8Context passed to CefRenderProcessHandler::OnContextReleased.
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
diff --git spellcheck_factory.cc spellcheck_factory.cc
|
|
index 3fd085b..b2705bf 100644
|
|
--- spellcheck_factory.cc
|
|
+++ spellcheck_factory.cc
|
|
@@ -16,6 +16,13 @@
|
|
#include "content/public/browser/render_process_host.h"
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
|
|
+namespace {
|
|
+
|
|
+static base::LazyInstance<SpellcheckServiceFactory>::Leaky
|
|
+ g_spellcheck_service_factory = LAZY_INSTANCE_INITIALIZER;
|
|
+
|
|
+} // namespace
|
|
+
|
|
// static
|
|
SpellcheckService* SpellcheckServiceFactory::GetForContext(
|
|
content::BrowserContext* context) {
|
|
@@ -38,7 +45,7 @@ SpellcheckService* SpellcheckServiceFactory::GetForRenderProcessId(
|
|
|
|
// static
|
|
SpellcheckServiceFactory* SpellcheckServiceFactory::GetInstance() {
|
|
- return base::Singleton<SpellcheckServiceFactory>::get();
|
|
+ return g_spellcheck_service_factory.Pointer();
|
|
}
|
|
|
|
SpellcheckServiceFactory::SpellcheckServiceFactory()
|
|
diff --git spellcheck_factory.h spellcheck_factory.h
|
|
index e8eb9f7..48126000 100644
|
|
--- spellcheck_factory.h
|
|
+++ spellcheck_factory.h
|
|
@@ -7,7 +7,7 @@
|
|
|
|
#include "base/gtest_prod_util.h"
|
|
#include "base/macros.h"
|
|
-#include "base/memory/singleton.h"
|
|
+#include "base/lazy_instance.h"
|
|
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
|
|
|
|
class SpellcheckService;
|
|
@@ -26,7 +26,7 @@ class SpellcheckServiceFactory : public BrowserContextKeyedServiceFactory {
|
|
static SpellcheckServiceFactory* GetInstance();
|
|
|
|
private:
|
|
- friend struct base::DefaultSingletonTraits<SpellcheckServiceFactory>;
|
|
+ friend struct base::DefaultLazyInstanceTraits<SpellcheckServiceFactory>;
|
|
|
|
SpellcheckServiceFactory();
|
|
~SpellcheckServiceFactory() override;
|