From 8a35083b8f96ca69ebc519d031c9fc31f5ef745f Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 20 Jan 2015 21:59:59 +0000 Subject: [PATCH] Fix crash when spell checking with custom CefRequestContext (issue #1497). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1974 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef/browser/browser_main.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libcef/browser/browser_main.cc b/libcef/browser/browser_main.cc index 6a8be8db9..fbadf3349 100644 --- a/libcef/browser/browser_main.cc +++ b/libcef/browser/browser_main.cc @@ -154,6 +154,8 @@ void CefBrowserMainParts::PreMainMessageLoopRun() { } } + // Spell checking support and possibly other subsystems retrieve the + // PrefService associated with a BrowserContext via UserPrefs::Get(). user_prefs::UserPrefs::Set(browser_context(), pref_service()); } @@ -184,6 +186,10 @@ void CefBrowserMainParts::PostDestroyThreads() { } void CefBrowserMainParts::AddBrowserContext(CefBrowserContext* context) { + // Spell checking support and possibly other subsystems retrieve the + // PrefService associated with a BrowserContext via UserPrefs::Get(). + user_prefs::UserPrefs::Set(context, pref_service()); + browser_contexts_.push_back(context); }