diff options
| author | Konstantin Tokarev <annulen@yandex.ru> | 2016-08-25 19:20:41 +0300 |
|---|---|---|
| committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:30:55 +0000 |
| commit | 6882a04fb36642862b11efe514251d32070c3d65 (patch) | |
| tree | b7959826000b061fd5ccc7512035c7478742f7b0 /Source/WebKit2/NetworkProcess/EntryPoint | |
| parent | ab6df191029eeeb0b0f16f127d553265659f739e (diff) | |
| download | qtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz | |
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/NetworkProcess/EntryPoint')
| -rw-r--r-- | Source/WebKit2/NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist | 34 | ||||
| -rw-r--r-- | Source/WebKit2/NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm | 43 | ||||
| -rw-r--r-- | Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist | 45 | ||||
| -rw-r--r-- | Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist | 50 | ||||
| -rw-r--r-- | Source/WebKit2/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp (renamed from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm) | 33 |
5 files changed, 15 insertions, 190 deletions
diff --git a/Source/WebKit2/NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist b/Source/WebKit2/NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist deleted file mode 100644 index 45905e5a6..000000000 --- a/Source/WebKit2/NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleGetInfoString</key> - <string>${BUNDLE_VERSION}, Copyright 2003-2013 Apple Inc.</string> - <key>CFBundleIdentifier</key> - <string>com.apple.WebKit.${PRODUCT_NAME}</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>${SHORT_VERSION_STRING}</string> - <key>CFBundleVersion</key> - <string>${BUNDLE_VERSION}</string> - <key>LSFileQuarantineEnabled</key> - <true/> - <key>LSMinimumSystemVersion</key> - <string>${MACOSX_DEPLOYMENT_TARGET}</string> - <key>LSUIElement</key> - <true/> - <key>NSPrincipalClass</key> - <string>NSApplication</string> - <key>CFBundleIconFile</key> - <string>${APP_ICON}</string> - <key>WebKitEntryPoint</key> - <string>NetworkProcessMain</string> -</dict> -</plist> diff --git a/Source/WebKit2/NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm b/Source/WebKit2/NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm deleted file mode 100644 index 87b9e4000..000000000 --- a/Source/WebKit2/NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2012 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" - -#if ENABLE(NETWORK_PROCESS) - -#import "ChildProcessEntryPoint.h" -#import "NetworkProcess.h" -#import "WKBase.h" - -using namespace WebKit; - -extern "C" WK_EXPORT int NetworkProcessMain(int argc, char** argv); - -int NetworkProcessMain(int argc, char** argv) -{ - return ChildProcessMain<NetworkProcess, ChildProcessMainDelegate>(argc, argv); -} - -#endif // ENABLE(NETWORK_PROCESS) diff --git a/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist b/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist deleted file mode 100644 index c73c3d3bb..000000000 --- a/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleGetInfoString</key> - <string>${BUNDLE_VERSION}, Copyright 2003-2013 Apple Inc.</string> - <key>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIdentifier</key> - <string>com.apple.WebKit.Networking.Development</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundlePackageType</key> - <string>XPC!</string> - <key>CFBundleShortVersionString</key> - <string>${SHORT_VERSION_STRING}</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>${BUNDLE_VERSION}</string> - <key>LSFileQuarantineEnabled</key> - <true/> - <key>NSPrincipalClass</key> - <string>NSApplication</string> - <key>WebKitEntryPoint</key> - <string>NetworkServiceInitializer</string> - <key>LSUIElement</key> - <true/> - <key>XPCService</key> - <dict> - <key>ServiceType</key> - <string>Application</string> - <key>JoinExistingSession</key> - <true/> - <key>RunLoopType</key> - <string>NSRunLoop</string> - <key>_MultipleInstances</key> - <true/> - </dict> -</dict> -</plist> diff --git a/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist b/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist deleted file mode 100644 index ac5e4e522..000000000 --- a/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleGetInfoString</key> - <string>${BUNDLE_VERSION}, Copyright 2003-2013 Apple Inc.</string> - <key>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIdentifier</key> - <string>com.apple.WebKit.Networking</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundlePackageType</key> - <string>XPC!</string> - <key>CFBundleShortVersionString</key> - <string>${SHORT_VERSION_STRING}</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>${BUNDLE_VERSION}</string> - <key>LSFileQuarantineEnabled</key> - <true/> - <key>NSPrincipalClass</key> - <string>NSApplication</string> - <key>WebKitEntryPoint</key> - <string>NetworkServiceInitializer</string> - <key>LSUIElement</key> - <true/> - <key>XPCService</key> - <dict> - <key>ServiceType</key> - <string>Application</string> - <key>JoinExistingSession</key> - <true/> - <key>RunLoopType</key> - <string>NSRunLoop</string> - <key>_MultipleInstances</key> - <true/> - <key>EnvironmentVariables</key> - <dict> - <key>DYLD_INSERT_LIBRARIES</key> - <string>$(WEBKIT2_FRAMEWORKS_DIR)/WebKit2.framework/NetworkProcess.app/Contents/MacOS/SecItemShim.dylib</string> - </dict> - </dict> -</dict> -</plist> diff --git a/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm b/Source/WebKit2/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp index 1c6ab641a..b282e16a3 100644 --- a/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm +++ b/Source/WebKit2/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 2014 Igalia S.L. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,26 +23,23 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#import "config.h" +#include "NetworkProcessMainUnix.h" -#if HAVE(XPC) - -#import "EnvironmentUtilities.h" -#import "NetworkProcess.h" -#import "WKBase.h" -#import "XPCServiceEntryPoint.h" +#include <cstdlib> using namespace WebKit; -extern "C" WK_EXPORT void NetworkServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage); - -void NetworkServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage) +int main(int argc, char** argv) { - // Remove the SecItemShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by - // the this process don't try to insert the shim and crash. - EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib"); - - XPCServiceInitializer<NetworkProcess, XPCServiceInitializerDelegate>(connection, initializerMessage); + // Disable SSLv3 very early because it is practically impossible to safely + // use setenv() when multiple threads are running, as another thread calling + // getenv() could cause a crash, and many functions use getenv() internally. + // This workaround will stop working if glib-networking switches away from + // GnuTLS or simply stops parsing this variable. We intentionally do not + // overwrite this priority string if it's already set by the user. + // https://bugzilla.gnome.org/show_bug.cgi?id=738633 + // WARNING: This needs to be KEPT IN SYNC with WebProcessMain.cpp. + setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:%LATEST_RECORD_VERSION:!VERS-SSL3.0:!ARCFOUR-128", 0); + + return NetworkProcessMainUnix(argc, argv); } - -#endif // HAVE(XPC) |
