Changeset 70109 in webkit
- Timestamp:
- Oct 19, 2010 4:40:58 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70098 r70109 1 2010-10-19 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Fix MiniBrowser crashes during startup and shutdown 6 https://bugs.webkit.org/show_bug.cgi?id=47954 7 8 * UIProcess/WebContext.cpp: 9 (WebKit::WebContext::sharedProcessContext): 10 Initialize the main thread. 11 12 (WebKit::WebContext::create): 13 Ditto. 14 15 (WebKit::WebContext::WebContext): 16 Add the language observer here so we know that it will always be set up. 17 18 (WebKit::WebContext::ensureWebProcess): 19 Remove code. 20 21 * UIProcess/WebContext.h: 22 1 23 2010-10-19 Anders Carlsson <andersca@apple.com> 2 24 -
trunk/WebKit2/UIProcess/WebContext.cpp
r70095 r70109 62 62 WebContext* WebContext::sharedProcessContext() 63 63 { 64 WTF::initializeMainThread(); 64 65 RunLoop::initializeMainRunLoop(); 65 66 static WebContext* context = adoptRef(new WebContext(ProcessModelSharedSecondaryProcess, String())).leakRef(); … … 76 77 PassRefPtr<WebContext> WebContext::create(const String& injectedBundlePath) 77 78 { 79 WTF::initializeMainThread(); 78 80 RunLoop::initializeMainRunLoop(); 79 81 return adoptRef(new WebContext(ProcessModelSecondaryProcess, injectedBundlePath)); … … 89 91 #endif 90 92 { 91 RunLoop::initializeMainRunLoop();93 addLanguageChangeObserver(this, languageChanged); 92 94 93 95 m_preferences = WebPreferences::shared(); … … 125 127 } 126 128 127 static void languageChanged(void* context) 128 { 129 WebProcessProxy* process = static_cast<WebContext*>(context)->process(); 130 if (process) 131 process->send(Messages::WebProcess::LanguageChanged(defaultLanguage()), 0); 129 void WebContext::languageChanged(void* context) 130 { 131 static_cast<WebContext*>(context)->languageChanged(); 132 } 133 134 void WebContext::languageChanged() 135 { 136 if (!hasValidProcess()) 137 return; 138 139 m_process->send(Messages::WebProcess::LanguageChanged(defaultLanguage()), 0); 132 140 } 133 141 … … 160 168 parameters.shouldTrackVisitedLinks = m_historyClient.shouldTrackVisitedLinks(); 161 169 parameters.cacheModel = m_cacheModel; 162 163 170 parameters.languageCode = defaultLanguage(); 164 addLanguageChangeObserver(this, languageChanged);165 166 171 parameters.applicationCacheDirectory = applicationCacheDirectory(); 167 172 -
trunk/WebKit2/UIProcess/WebContext.h
r69661 r70109 128 128 void platformInitializeWebProcess(WebProcessCreationParameters&); 129 129 130 static void languageChanged(void* context); 131 void languageChanged(); 132 130 133 ProcessModel m_processModel; 131 134
Note: See TracChangeset
for help on using the changeset viewer.