Remove more unneeded process launching code
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Feb 2016 21:25:56 +0000 (21:25 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Feb 2016 21:25:56 +0000 (21:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154190

Reviewed by Tim Horton.

* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::getLaunchOptions): Deleted.
* UIProcess/Databases/mac/DatabaseProcessProxyMac.mm: Removed.
(WebKit::DatabaseProcessProxy::platformGetLaunchOptions): Deleted.
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getLaunchOptions): Deleted.
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::NetworkProcessProxy::platformGetLaunchOptions): Deleted.
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::pluginNeedsExecutableHeap): Deleted.
(WebKit::PluginProcessProxy::platformGetLaunchOptions): Deleted.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions): Deleted.
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::WebProcessProxy::platformGetLaunchOptions): Deleted.
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196500 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp
Source/WebKit2/UIProcess/Databases/mac/DatabaseProcessProxyMac.mm [deleted file]
Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h
Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm
Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.h
Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm
Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

index 070c814..eb8de8f 100644 (file)
@@ -1,5 +1,31 @@
 2016-02-12  Anders Carlsson  <andersca@apple.com>
 
+        Remove more unneeded process launching code
+        https://bugs.webkit.org/show_bug.cgi?id=154190
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/Databases/DatabaseProcessProxy.cpp:
+        (WebKit::DatabaseProcessProxy::getLaunchOptions): Deleted.
+        * UIProcess/Databases/mac/DatabaseProcessProxyMac.mm: Removed.
+        (WebKit::DatabaseProcessProxy::platformGetLaunchOptions): Deleted.
+        * UIProcess/Launcher/ProcessLauncher.h:
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::getLaunchOptions): Deleted.
+        * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
+        (WebKit::NetworkProcessProxy::platformGetLaunchOptions): Deleted.
+        * UIProcess/Plugins/PluginProcessProxy.h:
+        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
+        (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap): Deleted.
+        (WebKit::PluginProcessProxy::platformGetLaunchOptions): Deleted.
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::getLaunchOptions): Deleted.
+        * UIProcess/mac/WebProcessProxyMac.mm:
+        (WebKit::WebProcessProxy::platformGetLaunchOptions): Deleted.
+        * WebKit2.xcodeproj/project.pbxproj:
+
+2016-02-12  Anders Carlsson  <andersca@apple.com>
+
         Use different process types for 32-bit and 64-bit plug-ins
         https://bugs.webkit.org/show_bug.cgi?id=154186
 
index 7564303..7ed02d6 100644 (file)
@@ -68,7 +68,6 @@ void DatabaseProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& laun
 {
     launchOptions.processType = ProcessLauncher::ProcessType::Database;
     ChildProcessProxy::getLaunchOptions(launchOptions);
-    platformGetLaunchOptions(launchOptions);
 }
 
 void DatabaseProcessProxy::processWillShutDown(IPC::Connection& connection)
diff --git a/Source/WebKit2/UIProcess/Databases/mac/DatabaseProcessProxyMac.mm b/Source/WebKit2/UIProcess/Databases/mac/DatabaseProcessProxyMac.mm
deleted file mode 100644 (file)
index c41ea18..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. 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.
- */
-
-#import "config.h"
-#import "DatabaseProcessProxy.h"
-
-#if ENABLE(DATABASE_PROCESS)
-
-using namespace WebCore;
-
-namespace WebKit {
-
-void DatabaseProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions)
-{
-    launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
-    launchOptions.executableHeap = false;
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(DATABASE_PROCESS)
index b1b1197..74cc770 100644 (file)
@@ -60,16 +60,10 @@ public:
     struct LaunchOptions {
         ProcessType processType;
         HashMap<String, String> extraInitializationData;
-#if OS(DARWIN) && !PLATFORM(GTK)
-        static const cpu_type_t MatchCurrentArchitecture = 0;
-        cpu_type_t architecture;
-        bool executableHeap;
-#endif
-#if PLATFORM(EFL) || PLATFORM(GTK)
-#ifndef NDEBUG
+
+#if (PLATFORM(EFL) || PLATFORM(GTK)) && !defined(NDEBUG)
         String processCmdPrefix;
 #endif
-#endif
     };
 
     static Ref<ProcessLauncher> create(Client* client, const LaunchOptions& launchOptions)
index 51f2283..3fb4855 100644 (file)
@@ -82,7 +82,6 @@ void NetworkProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launc
 {
     launchOptions.processType = ProcessLauncher::ProcessType::Network;
     ChildProcessProxy::getLaunchOptions(launchOptions);
-    platformGetLaunchOptions(launchOptions);
 }
 
 void NetworkProcessProxy::connectionWillOpen(IPC::Connection& connection)
index b571871..b8601e8 100644 (file)
@@ -40,10 +40,4 @@ void NetworkProcessProxy::setProcessSuppressionEnabled(bool processSuppressionEn
     connection()->send(Messages::NetworkProcess::SetProcessSuppressionEnabled(processSuppressionEnabled), 0);
 }
 
-void NetworkProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions)
-{
-    launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
-    launchOptions.executableHeap = false;
-}
-
 } // namespace WebKit
index e47438d..fb7b967 100644 (file)
@@ -87,9 +87,6 @@ public:
 #if PLATFORM(COCOA)
     void setProcessSuppressionEnabled(bool);
 
-    // Returns whether the plug-in needs the heap to be marked executable.
-    static bool pluginNeedsExecutableHeap(const PluginModuleInfo&);
-
 #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 101000
     // Creates a property list in ~/Library/Preferences that contains all the MIME types supported by the plug-in.
     static bool createPropertyListFile(const PluginModuleInfo&);
index 8cb854d..bafa7d9 100644 (file)
@@ -59,22 +59,6 @@ using namespace WebCore;
 
 namespace WebKit {
     
-bool PluginProcessProxy::pluginNeedsExecutableHeap(const PluginModuleInfo& pluginInfo)
-{
-    static const bool forceNonexecutableHeapForPlugins = [[NSUserDefaults standardUserDefaults] boolForKey:@"ForceNonexecutableHeapForPlugins"];
-    if (forceNonexecutableHeapForPlugins)
-        return false;
-    
-    if (pluginInfo.bundleIdentifier == "com.apple.QuickTime Plugin.plugin")
-        return false;
-
-    // We only allow 32-bit plug-ins to have the heap marked executable.
-    if (pluginInfo.pluginArchitecture == CPU_TYPE_X86)
-        return true;
-
-    return false;
-}
-
 #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 101000
 bool PluginProcessProxy::createPropertyListFile(const PluginModuleInfo& plugin)
 {
@@ -118,8 +102,6 @@ void PluginProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions
     else
         launchOptions.processType = ProcessLauncher::ProcessType::Plugin64;
 
-    launchOptions.architecture = pluginProcessAttributes.moduleInfo.pluginArchitecture;
-    launchOptions.executableHeap = PluginProcessProxy::pluginNeedsExecutableHeap(pluginProcessAttributes.moduleInfo);
     launchOptions.extraInitializationData.add("plugin-path", pluginProcessAttributes.moduleInfo.path);
 
     if (pluginProcessAttributes.sandboxPolicy == PluginProcessSandboxPolicyUnsandboxed) {
index 27bc89f..62df9d3 100644 (file)
@@ -146,8 +146,6 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt
         }
         launchOptions.extraInitializationData.add(ASCIILiteral("OverrideLanguages"), languageString.toString());
     }
-
-    platformGetLaunchOptions(launchOptions);
 }
 
 void WebProcessProxy::connectionWillOpen(IPC::Connection& connection)
index 2f90c94..8073962 100644 (file)
@@ -40,13 +40,6 @@ bool WebProcessProxy::fullKeyboardAccessEnabled()
     return false;
 }
 
-void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions)
-{
-    // We want the web process to match the architecture of the UI process.
-    launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
-    launchOptions.executableHeap = false;
-}
-
 } // namespace WebKit
 
 #endif // PLATFORM(IOS)
index ebccb36..212623b 100644 (file)
@@ -37,13 +37,6 @@ bool WebProcessProxy::fullKeyboardAccessEnabled()
     return [WKFullKeyboardAccessWatcher fullKeyboardAccessEnabled];
 }
 
-void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions)
-{
-    // We want the web process to match the architecture of the UI process.
-    launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
-    launchOptions.executableHeap = false;
-}
-
 } // namespace WebKit
 
 #endif // PLATFORM(MAC)
index 91d7323..97a8a51 100644 (file)
                517CF0E4163A486C00C2950E /* NetworkProcessConnectionMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 517CF0E2163A486C00C2950E /* NetworkProcessConnectionMessages.h */; };
                517DD5BE180DA7D30081660B /* DatabaseProcessProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517DD5BC180DA7D30081660B /* DatabaseProcessProxy.cpp */; };
                517DD5BF180DA7D30081660B /* DatabaseProcessProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 517DD5BD180DA7D30081660B /* DatabaseProcessProxy.h */; };
-               517DD5C5180DC3E10081660B /* DatabaseProcessProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 517DD5C4180DC3E10081660B /* DatabaseProcessProxyMac.mm */; };
                51834592134532E90092B696 /* WebIconDatabaseClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51834590134532E80092B696 /* WebIconDatabaseClient.cpp */; };
                51834593134532E90092B696 /* WebIconDatabaseClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 51834591134532E80092B696 /* WebIconDatabaseClient.h */; };
                518353DA1885BF8C00D9FE44 /* IDBSerialization.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 518353D81885BF8C00D9FE44 /* IDBSerialization.cpp */; };
                517CF0E2163A486C00C2950E /* NetworkProcessConnectionMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkProcessConnectionMessages.h; sourceTree = "<group>"; };
                517DD5BC180DA7D30081660B /* DatabaseProcessProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DatabaseProcessProxy.cpp; path = Databases/DatabaseProcessProxy.cpp; sourceTree = "<group>"; };
                517DD5BD180DA7D30081660B /* DatabaseProcessProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DatabaseProcessProxy.h; path = Databases/DatabaseProcessProxy.h; sourceTree = "<group>"; };
-               517DD5C4180DC3E10081660B /* DatabaseProcessProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DatabaseProcessProxyMac.mm; path = Databases/mac/DatabaseProcessProxyMac.mm; sourceTree = "<group>"; };
                51834590134532E80092B696 /* WebIconDatabaseClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebIconDatabaseClient.cpp; sourceTree = "<group>"; };
                51834591134532E80092B696 /* WebIconDatabaseClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIconDatabaseClient.h; sourceTree = "<group>"; };
                518353D81885BF8C00D9FE44 /* IDBSerialization.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBSerialization.cpp; sourceTree = "<group>"; };
                93BDEB00171DD7AF00BFEE1B /* WKPageLoadTypesPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPageLoadTypesPrivate.h; sourceTree = "<group>"; };
                93E6A4ED1BC5DD3900F8A0E7 /* _WKHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKHitTestResult.h; sourceTree = "<group>"; };
                990D28A71C6404B000986977 /* _WKAutomationSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKAutomationSession.h; sourceTree = "<group>"; };
-               990D28AD1C65190400986977 /* _WKAutomationSession.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKAutomationSession.mm; sourceTree = "<group>"; };
                990D28A81C6404B000986977 /* _WKAutomationSessionDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKAutomationSessionDelegate.h; sourceTree = "<group>"; };
+               990D28AD1C65190400986977 /* _WKAutomationSession.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKAutomationSession.mm; sourceTree = "<group>"; };
                990D28AF1C65203900986977 /* _WKAutomationSessionInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKAutomationSessionInternal.h; sourceTree = "<group>"; };
                990D28B31C6526D400986977 /* APIAutomationSessionClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIAutomationSessionClient.h; sourceTree = "<group>"; };
                990D28B51C6526F500986977 /* WebAutomationSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAutomationSession.h; sourceTree = "<group>"; };
                517DD5BB180DA7C40081660B /* Databases */ = {
                        isa = PBXGroup;
                        children = (
-                               517DD5C3180DC3D60081660B /* mac */,
                                517DD5BC180DA7D30081660B /* DatabaseProcessProxy.cpp */,
                                517DD5BD180DA7D30081660B /* DatabaseProcessProxy.h */,
                                512A9766180E05D20039A149 /* DatabaseProcessProxy.messages.in */,
                        path = mac;
                        sourceTree = "<group>";
                };
-               517DD5C3180DC3D60081660B /* mac */ = {
-                       isa = PBXGroup;
-                       children = (
-                               517DD5C4180DC3E10081660B /* DatabaseProcessProxyMac.mm */,
-                       );
-                       name = mac;
-                       sourceTree = "<group>";
-               };
                518E8EF116B208F000E91429 /* Authentication */ = {
                        isa = PBXGroup;
                        children = (
                                51E35202180F5D1E00E53BE9 /* DatabaseProcessMac.mm in Sources */,
                                512A9760180E031D0039A149 /* DatabaseProcessMessageReceiver.cpp in Sources */,
                                517DD5BE180DA7D30081660B /* DatabaseProcessProxy.cpp in Sources */,
-                               517DD5C5180DC3E10081660B /* DatabaseProcessProxyMac.mm in Sources */,
                                512A9769180E09B80039A149 /* DatabaseProcessProxyMessageReceiver.cpp in Sources */,
                                51E35209180F5D6B00E53BE9 /* DatabaseServiceEntryPoint.mm in Sources */,
                                51E35200180F5D0F00E53BE9 /* DatabaseToWebProcessConnection.cpp in Sources */,