WebKit Bugzilla
Attachment 361820 Details for
Bug 194551
: [WPE][GTK] Merge WebProcessPoolWPE.cpp and WebProcessPoolGtk.cpp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194551-20190212144818.patch (text/plain), 15.80 KB, created by
Michael Catanzaro
on 2019-02-12 12:48:19 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Michael Catanzaro
Created:
2019-02-12 12:48:19 PST
Size:
15.80 KB
patch
obsolete
>Subversion Revision: 241304 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index fca2de30ac1e71e47e6ef786bea2293234b368aa..7cb91ca38ecef42885e582093aed5401d9fba496 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,21 @@ >+2019-02-12 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ [WPE][GTK] Merge WebProcessPoolWPE.cpp and WebProcessPoolGtk.cpp >+ https://bugs.webkit.org/show_bug.cgi?id=194551 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * SourcesGTK.txt: >+ * SourcesWPE.txt: >+ * UIProcess/glib/WebProcessPoolGLib.cpp: Renamed from Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp. >+ (WebKit::initializeRemoteInspectorServer): >+ (WebKit::memoryPressureMonitorDisabled): >+ (WebKit::WebProcessPool::platformInitialize): >+ (WebKit::WebProcessPool::platformInitializeWebProcess): >+ (WebKit::WebProcessPool::platformInvalidateContext): >+ (WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions): >+ * UIProcess/wpe/WebProcessPoolWPE.cpp: Removed. >+ > 2019-02-12 Michael Catanzaro <mcatanzaro@igalia.com> > > [WPE][GTK] Unsafe g_unsetenv() use in WebProcessPool::platformInitialize >diff --git a/Source/WebKit/SourcesGTK.txt b/Source/WebKit/SourcesGTK.txt >index 4829a9ff27237c4a49431cc344e9530d1a244f31..90d890eea7bfe7bf84d4fdf6b26dfefb30fd69fe 100644 >--- a/Source/WebKit/SourcesGTK.txt >+++ b/Source/WebKit/SourcesGTK.txt >@@ -229,6 +229,7 @@ UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp > UIProcess/cairo/BackingStoreCairo.cpp @no-unify > > UIProcess/glib/RemoteInspectorClient.cpp >+UIProcess/glib/WebProcessPoolGLib.cpp > UIProcess/glib/WebProcessProxyGLib.cpp > > UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp >@@ -255,7 +256,6 @@ UIProcess/gtk/WebPageProxyGtk.cpp @no-unify > UIProcess/gtk/WebPasteboardProxyGtk.cpp > UIProcess/gtk/WebPopupMenuProxyGtk.cpp > UIProcess/gtk/WebPreferencesGtk.cpp >-UIProcess/gtk/WebProcessPoolGtk.cpp @no-unify > > UIProcess/soup/WebCookieManagerProxySoup.cpp > UIProcess/soup/WebProcessPoolSoup.cpp >diff --git a/Source/WebKit/SourcesWPE.txt b/Source/WebKit/SourcesWPE.txt >index 5ce95833b6041261105d85481b41d099e2dbf26d..765c69d519df2998b2851beb607f3c5931885930 100644 >--- a/Source/WebKit/SourcesWPE.txt >+++ b/Source/WebKit/SourcesWPE.txt >@@ -179,6 +179,7 @@ UIProcess/Automation/cairo/WebAutomationSessionCairo.cpp > > UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp > >+UIProcess/glib/WebProcessPoolGLib.cpp > UIProcess/glib/WebProcessProxyGLib.cpp > > UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >@@ -208,7 +209,6 @@ UIProcess/wpe/WebInspectorProxyWPE.cpp > UIProcess/wpe/WebPageProxyWPE.cpp > UIProcess/wpe/WebPasteboardProxyWPE.cpp > UIProcess/wpe/WebPreferencesWPE.cpp >-UIProcess/wpe/WebProcessPoolWPE.cpp > > WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp @no-unify > WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMDocument.cpp @no-unify >diff --git a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..c38bcf5f7bbf5287935700a8d32be8153e684bd6 >--- /dev/null >+++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp >@@ -0,0 +1,121 @@ >+/* >+ * Copyright (C) 2010 Apple Inc. All rights reserved. >+ * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved. >+ * Copyright (C) 2012 Samsung Electronics Ltd. All Rights Reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "WebProcessPool.h" >+ >+#include "APIProcessPoolConfiguration.h" >+#include "Logging.h" >+#include "WebCookieManagerProxy.h" >+#include "WebMemoryPressureHandler.h" >+#include "WebProcessCreationParameters.h" >+#include "WebProcessMessages.h" >+#include <JavaScriptCore/RemoteInspectorServer.h> >+#include <WebCore/GStreamerCommon.h> >+#include <WebCore/NotImplemented.h> >+#include <WebCore/SchemeRegistry.h> >+#include <wtf/FileSystem.h> >+#include <wtf/glib/GUniquePtr.h> >+#include <wtf/text/CString.h> >+ >+namespace WebKit { >+ >+#if ENABLE(REMOTE_INSPECTOR) >+static void initializeRemoteInspectorServer(const char* address) >+{ >+ if (Inspector::RemoteInspectorServer::singleton().isRunning()) >+ return; >+ >+ if (!address[0]) >+ return; >+ >+ GUniquePtr<char> inspectorAddress(g_strdup(address)); >+ char* portPtr = g_strrstr(inspectorAddress.get(), ":"); >+ if (!portPtr) >+ return; >+ >+ *portPtr = '\0'; >+ portPtr++; >+ guint64 port = g_ascii_strtoull(portPtr, nullptr, 10); >+ if (!port) >+ return; >+ >+ Inspector::RemoteInspectorServer::singleton().start(inspectorAddress.get(), port); >+} >+#endif >+ >+static bool memoryPressureMonitorDisabled() >+{ >+ static const char* disableMemoryPressureMonitor = getenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR"); >+ return disableMemoryPressureMonitor && !strcmp(disableMemoryPressureMonitor, "1"); >+} >+ >+void WebProcessPool::platformInitialize() >+{ >+#if ENABLE(REMOTE_INSPECTOR) >+ if (const char* address = g_getenv("WEBKIT_INSPECTOR_SERVER")) >+ initializeRemoteInspectorServer(address); >+#endif >+ >+#if PLATFORM(GTK) >+ // To enable this for WPE, we need WebMemoryPressureHandler to lose the >+ // hard dependency on ViewSnapshotStore. >+ if (!memoryPressureMonitorDisabled()) >+ installMemoryPressureHandler(); >+#endif >+} >+ >+void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters) >+{ >+ parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModel::DocumentViewer; >+ parameters.proxySettings = m_networkProxySettings; >+ >+#if PLATFORM(GTK) >+ // This is misnamed. It can only be used to disable complex text. >+ parameters.shouldAlwaysUseComplexTextCodePath = true; >+ const char* forceComplexText = getenv("WEBKIT_FORCE_COMPLEX_TEXT"); >+ if (forceComplexText && !strcmp(forceComplexText, "0")) >+ parameters.shouldAlwaysUseComplexTextCodePath = m_alwaysUsesComplexTextCodePath; >+#endif >+ >+ if (memoryPressureMonitorDisabled()) >+ parameters.shouldSuppressMemoryPressureHandler = true; >+ >+#if USE(GSTREAMER) >+ parameters.gstreamerOptions = WebCore::extractGStreamerOptionsFromCommandLine(); >+#endif >+} >+ >+void WebProcessPool::platformInvalidateContext() >+{ >+} >+ >+void WebProcessPool::platformResolvePathsForSandboxExtensions() >+{ >+} >+ >+} // namespace WebKit >diff --git a/Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp b/Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp >deleted file mode 100644 >index a3b0dec173bcb882b1a5625fd5b71e85ac1b31de..0000000000000000000000000000000000000000 >--- a/Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp >+++ /dev/null >@@ -1,114 +0,0 @@ >-/* >- * Copyright (C) 2010 Apple Inc. All rights reserved. >- * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved. >- * Copyright (C) 2012 Samsung Electronics Ltd. All Rights Reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "WebProcessPool.h" >- >-#include "APIProcessPoolConfiguration.h" >-#include "Logging.h" >-#include "WebCookieManagerProxy.h" >-#include "WebMemoryPressureHandler.h" >-#include "WebProcessCreationParameters.h" >-#include "WebProcessMessages.h" >-#include <JavaScriptCore/RemoteInspectorServer.h> >-#include <WebCore/GStreamerCommon.h> >-#include <WebCore/NotImplemented.h> >-#include <WebCore/SchemeRegistry.h> >-#include <wtf/FileSystem.h> >-#include <wtf/glib/GUniquePtr.h> >-#include <wtf/text/CString.h> >- >-namespace WebKit { >- >-#if ENABLE(REMOTE_INSPECTOR) >-static void initializeRemoteInspectorServer(const char* address) >-{ >- if (Inspector::RemoteInspectorServer::singleton().isRunning()) >- return; >- >- if (!address[0]) >- return; >- >- GUniquePtr<char> inspectorAddress(g_strdup(address)); >- char* portPtr = g_strrstr(inspectorAddress.get(), ":"); >- if (!portPtr) >- return; >- >- *portPtr = '\0'; >- portPtr++; >- guint64 port = g_ascii_strtoull(portPtr, nullptr, 10); >- if (!port) >- return; >- >- Inspector::RemoteInspectorServer::singleton().start(inspectorAddress.get(), port); >-} >-#endif >- >-static bool memoryPressureMonitorDisabled() >-{ >- static const char* disableMemoryPressureMonitor = getenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR"); >- return disableMemoryPressureMonitor && !strcmp(disableMemoryPressureMonitor, "1"); >-} >- >-void WebProcessPool::platformInitialize() >-{ >-#if ENABLE(REMOTE_INSPECTOR) >- if (const char* address = g_getenv("WEBKIT_INSPECTOR_SERVER")) >- initializeRemoteInspectorServer(address); >-#endif >- >- if (!memoryPressureMonitorDisabled()) >- installMemoryPressureHandler(); >-} >- >-void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters) >-{ >- parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModel::DocumentViewer; >- parameters.proxySettings = m_networkProxySettings; >- >- parameters.shouldAlwaysUseComplexTextCodePath = true; >- const char* forceComplexText = getenv("WEBKIT_FORCE_COMPLEX_TEXT"); >- if (forceComplexText && !strcmp(forceComplexText, "0")) >- parameters.shouldAlwaysUseComplexTextCodePath = m_alwaysUsesComplexTextCodePath; >- >- if (memoryPressureMonitorDisabled()) >- parameters.shouldSuppressMemoryPressureHandler = true; >- >-#if USE(GSTREAMER) >- parameters.gstreamerOptions = WebCore::extractGStreamerOptionsFromCommandLine(); >-#endif >-} >- >-void WebProcessPool::platformInvalidateContext() >-{ >-} >- >-void WebProcessPool::platformResolvePathsForSandboxExtensions() >-{ >-} >- >-} // namespace WebKit >diff --git a/Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp b/Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp >deleted file mode 100644 >index 1d9e2f83e1431f7fe5e8f0b841e9edd54b2bfb4b..0000000000000000000000000000000000000000 >--- a/Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp >+++ /dev/null >@@ -1,107 +0,0 @@ >-/* >- * Copyright (C) 2010 Apple Inc. All rights reserved. >- * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved. >- * Copyright (C) 2012 Samsung Electronics Ltd. All Rights Reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "WebProcessPool.h" >- >-#include "APIProcessPoolConfiguration.h" >-#include "Logging.h" >-#include "NetworkProcessMessages.h" >-#include "WebCookieManagerProxy.h" >-#include "WebProcessCreationParameters.h" >-#include "WebProcessMessages.h" >-#include <WebCore/NotImplemented.h> >-#include <WebCore/SchemeRegistry.h> >-#include <cstdlib> >-#include <wtf/FileSystem.h> >- >-#if ENABLE(REMOTE_INSPECTOR) >-#include <JavaScriptCore/RemoteInspectorServer.h> >-#include <wtf/glib/GUniquePtr.h> >-#endif >- >-#if USE(GSTREAMER) >-#include <WebCore/GStreamerCommon.h> >-#endif >- >-namespace WebKit { >- >-#if ENABLE(REMOTE_INSPECTOR) >-static void initializeRemoteInspectorServer(const char* address) >-{ >- if (Inspector::RemoteInspectorServer::singleton().isRunning()) >- return; >- >- if (!address[0]) >- return; >- >- GUniquePtr<char> inspectorAddress(g_strdup(address)); >- char* portPtr = g_strrstr(inspectorAddress.get(), ":"); >- if (!portPtr) >- return; >- >- *portPtr = '\0'; >- portPtr++; >- guint64 port = g_ascii_strtoull(portPtr, nullptr, 10); >- if (!port) >- return; >- >- Inspector::RemoteInspectorServer::singleton().start(inspectorAddress.get(), port); >-} >-#endif >- >-void WebProcessPool::platformInitialize() >-{ >-#if ENABLE(REMOTE_INSPECTOR) >- if (const char* address = g_getenv("WEBKIT_INSPECTOR_SERVER")) >- initializeRemoteInspectorServer(address); >-#endif >-} >- >-void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters) >-{ >- parameters.memoryCacheDisabled = m_memoryCacheDisabled || cacheModel() == CacheModel::DocumentViewer; >- >- const char* disableMemoryPressureMonitor = getenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR"); >- if (disableMemoryPressureMonitor && !strcmp(disableMemoryPressureMonitor, "1")) >- parameters.shouldSuppressMemoryPressureHandler = true; >- >-#if USE(GSTREAMER) >- parameters.gstreamerOptions = WebCore::extractGStreamerOptionsFromCommandLine(); >-#endif >-} >- >-void WebProcessPool::platformInvalidateContext() >-{ >- notImplemented(); >-} >- >-void WebProcessPool::platformResolvePathsForSandboxExtensions() >-{ >-} >- >-} // namespace WebKit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
cgarcia
:
review+
cgarcia
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194551
: 361820