[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andersca at apple.com andersca at apple.com
Wed Dec 22 14:46:42 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f5f7cdf79cdefea7f5ca6b760febd435625cbee4
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 19 23:40:58 2010 +0000

    Fix MiniBrowser crashes during startup and shutdown
    https://bugs.webkit.org/show_bug.cgi?id=47954
    
    Reviewed by Sam Weinig.
    
    * UIProcess/WebContext.cpp:
    (WebKit::WebContext::sharedProcessContext):
    Initialize the main thread.
    
    (WebKit::WebContext::create):
    Ditto.
    
    (WebKit::WebContext::WebContext):
    Add the language observer here so we know that it will always be set up.
    
    (WebKit::WebContext::ensureWebProcess):
    Remove code.
    
    * UIProcess/WebContext.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70109 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 8051f89..37e884d 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,28 @@
 
         Reviewed by Sam Weinig.
 
+        Fix MiniBrowser crashes during startup and shutdown
+        https://bugs.webkit.org/show_bug.cgi?id=47954
+
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::sharedProcessContext):
+        Initialize the main thread.
+        
+        (WebKit::WebContext::create):
+        Ditto.
+
+        (WebKit::WebContext::WebContext):
+        Add the language observer here so we know that it will always be set up.
+
+        (WebKit::WebContext::ensureWebProcess):
+        Remove code.
+
+        * UIProcess/WebContext.h:
+
+2010-10-19  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
         Coalesce plug-in drawing
         https://bugs.webkit.org/show_bug.cgi?id=47939
 
diff --git a/WebKit2/UIProcess/WebContext.cpp b/WebKit2/UIProcess/WebContext.cpp
index 52a205f..1a3f047 100644
--- a/WebKit2/UIProcess/WebContext.cpp
+++ b/WebKit2/UIProcess/WebContext.cpp
@@ -61,6 +61,7 @@ static WTF::RefCountedLeakCounter webContextCounter("WebContext");
 
 WebContext* WebContext::sharedProcessContext()
 {
+    WTF::initializeMainThread();
     RunLoop::initializeMainRunLoop();
     static WebContext* context = adoptRef(new WebContext(ProcessModelSharedSecondaryProcess, String())).leakRef();
     return context;
@@ -75,6 +76,7 @@ WebContext* WebContext::sharedThreadContext()
 
 PassRefPtr<WebContext> WebContext::create(const String& injectedBundlePath)
 {
+    WTF::initializeMainThread();
     RunLoop::initializeMainRunLoop();
     return adoptRef(new WebContext(ProcessModelSecondaryProcess, injectedBundlePath));
 }
@@ -88,7 +90,7 @@ WebContext::WebContext(ProcessModel processModel, const String& injectedBundlePa
     , m_shouldPaintNativeControls(true)
 #endif
 {
-    RunLoop::initializeMainRunLoop();
+    addLanguageChangeObserver(this, languageChanged);
 
     m_preferences = WebPreferences::shared();
     m_preferences->addContext(this);
@@ -124,11 +126,17 @@ void WebContext::initializeHistoryClient(const WKContextHistoryClient* client)
     m_process->send(Messages::WebProcess::SetShouldTrackVisitedLinks(m_historyClient.shouldTrackVisitedLinks()), 0);
 }
 
-static void languageChanged(void* context)
+void WebContext::languageChanged(void* context)
 {
-    WebProcessProxy* process = static_cast<WebContext*>(context)->process();
-    if (process)
-        process->send(Messages::WebProcess::LanguageChanged(defaultLanguage()), 0);
+    static_cast<WebContext*>(context)->languageChanged();
+}
+
+void WebContext::languageChanged()
+{
+    if (!hasValidProcess())
+        return;
+
+    m_process->send(Messages::WebProcess::LanguageChanged(defaultLanguage()), 0);
 }
 
 void WebContext::ensureWebProcess()
@@ -159,10 +167,7 @@ void WebContext::ensureWebProcess()
 
     parameters.shouldTrackVisitedLinks = m_historyClient.shouldTrackVisitedLinks();
     parameters.cacheModel = m_cacheModel;
-
     parameters.languageCode = defaultLanguage();
-    addLanguageChangeObserver(this, languageChanged);
-
     parameters.applicationCacheDirectory = applicationCacheDirectory();
 
     copyToVector(m_schemesToRegisterAsEmptyDocument, parameters.urlSchemesRegistererdAsEmptyDocument);
diff --git a/WebKit2/UIProcess/WebContext.h b/WebKit2/UIProcess/WebContext.h
index 314eb20..6834703 100644
--- a/WebKit2/UIProcess/WebContext.h
+++ b/WebKit2/UIProcess/WebContext.h
@@ -127,6 +127,9 @@ private:
     bool hasValidProcess() const { return m_process && m_process->isValid(); }
     void platformInitializeWebProcess(WebProcessCreationParameters&);
 
+    static void languageChanged(void* context);
+    void languageChanged();
+
     ProcessModel m_processModel;
     
     // FIXME: In the future, this should be one or more WebProcessProxies.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list