force-single-process
authorAlberto Garcia <berto@igalia.com>
Wed, 9 Oct 2019 09:22:19 +0000 (10:22 +0100)
committerAlberto Garcia <berto@igalia.com>
Wed, 9 Oct 2019 09:22:19 +0000 (10:22 +0100)
===================================================================

Gbp-Pq: Name force-single-process.patch

Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp

index ae9e61383f87db87117ae30c993be1230cd2a1b3..2411d88c8d58bb05d88bc47465222633f1b9a711 100644 (file)
@@ -348,8 +348,16 @@ ALLOW_DEPRECATED_DECLARATIONS_END
         configuration.setLocalStorageDirectory(FileSystem::stringFromFileSystemRepresentation(priv->localStorageDirectory.data()));
 
     const char* useSingleWebProcess = getenv("WEBKIT_USE_SINGLE_WEB_PROCESS");
-    if (useSingleWebProcess && strcmp(useSingleWebProcess, "0"))
-        configuration.setUsesSingleWebProcess(true);
+    if (useSingleWebProcess) {
+        if (strcmp(useSingleWebProcess, "0")) {
+            configuration.setUsesSingleWebProcess(true);
+        }
+    } else {
+        const char* prgname = g_get_prgname();
+        if (!g_strcmp0(prgname, "geary")) {
+            configuration.setUsesSingleWebProcess(true);
+        }
+    }
     priv->processPool = WebProcessPool::create(configuration);
 
     if (!priv->websiteDataManager)