Diff
Modified: trunk/Source/WebKit2/CMakeLists.txt (125362 => 125363)
--- trunk/Source/WebKit2/CMakeLists.txt 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/CMakeLists.txt 2012-08-12 06:09:16 UTC (rev 125363)
@@ -340,7 +340,6 @@
UIProcess/InspectorServer/WebSocketServerConnection.cpp
UIProcess/Launcher/ProcessLauncher.cpp
- UIProcess/Launcher/ThreadLauncher.cpp
UIProcess/Notifications/NotificationPermissionRequest.cpp
UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp
Modified: trunk/Source/WebKit2/ChangeLog (125362 => 125363)
--- trunk/Source/WebKit2/ChangeLog 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/ChangeLog 2012-08-12 06:09:16 UTC (rev 125363)
@@ -1,5 +1,48 @@
2012-08-11 Sam Weinig <[email protected]>
+ [WK2] Get rid of ProcessModelSharedSecondaryThread
+ https://bugs.webkit.org/show_bug.cgi?id=93652
+
+ Reviewed by Dan Bernstein.
+
+ The threaded model for WebKit2 has been broken a long time and its continued existence in
+ the code only serves to confuse. It's time to say good bye to it.
+
+ * UIProcess/API/C/WKContext.cpp:
+ * UIProcess/API/C/WKContextPrivate.h:
+ Remove WKContextGetSharedThreadContext().
+
+ * UIProcess/ProcessModel.h:
+ Remove ProcessModelSharedSecondaryThread from the ProcessModel enum.
+
+ * UIProcess/WebContext.cpp:
+ * UIProcess/WebContext.h:
+ Remove WebContext::sharedThreadContext().
+
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::~WebProcessProxy):
+ (WebKit::WebProcessProxy::connect):
+ (WebKit::WebProcessProxy::isLaunching):
+ * UIProcess/WebProcessProxy.h:
+ Remove the ThreadLauncher member and stop deriving from ThreadLauncher::Client.
+
+ * UIProcess/Launcher/ThreadLauncher.cpp: Removed.
+ * UIProcess/Launcher/ThreadLauncher.h: Removed.
+ * UIProcess/Launcher/efl/ThreadLauncherEfl.cpp: Removed.
+ * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp: Removed.
+ * UIProcess/Launcher/mac/ThreadLauncherMac.mm: Removed.
+ * UIProcess/Launcher/qt/ThreadLauncherQt.cpp: Removed.
+ * UIProcess/Launcher/win/ThreadLauncherWin.cpp: Removed.
+ * WebKit2.xcodeproj/project.pbxproj:
+ * win/WebKit2.vcproj:
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * PlatformEfl.cmake:
+ * Target.pri:
+ Remove ThreadLauncher files.
+
+2012-08-11 Sam Weinig <[email protected]>
+
Enable XPC Service based WebProcess with runtime flag
https://bugs.webkit.org/show_bug.cgi?id=93773
Modified: trunk/Source/WebKit2/GNUmakefile.list.am (125362 => 125363)
--- trunk/Source/WebKit2/GNUmakefile.list.am 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/GNUmakefile.list.am 2012-08-12 06:09:16 UTC (rev 125363)
@@ -772,11 +772,8 @@
Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.h \
Source/WebKit2/UIProcess/gtk/WebPreferencesGtk.cpp \
Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp \
- Source/WebKit2/UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp \
Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp \
Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h \
- Source/WebKit2/UIProcess/Launcher/ThreadLauncher.cpp \
- Source/WebKit2/UIProcess/Launcher/ThreadLauncher.h \
Source/WebKit2/UIProcess/Notifications/NotificationPermissionRequest.cpp \
Source/WebKit2/UIProcess/Notifications/NotificationPermissionRequest.h \
Source/WebKit2/UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp \
Modified: trunk/Source/WebKit2/PlatformEfl.cmake (125362 => 125363)
--- trunk/Source/WebKit2/PlatformEfl.cmake 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/PlatformEfl.cmake 2012-08-12 06:09:16 UTC (rev 125363)
@@ -83,7 +83,6 @@
UIProcess/soup/WebSoupRequestManagerProxy.cpp
UIProcess/Launcher/efl/ProcessLauncherEfl.cpp
- UIProcess/Launcher/efl/ThreadLauncherEfl.cpp
UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
Modified: trunk/Source/WebKit2/Target.pri (125362 => 125363)
--- trunk/Source/WebKit2/Target.pri 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/Target.pri 2012-08-12 06:09:16 UTC (rev 125363)
@@ -205,7 +205,6 @@
UIProcess/GeolocationPermissionRequestManagerProxy.h \
UIProcess/GeolocationPermissionRequestProxy.h \
UIProcess/Launcher/ProcessLauncher.h \
- UIProcess/Launcher/ThreadLauncher.h \
UIProcess/Notifications/NotificationPermissionRequest.h \
UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h \
UIProcess/Notifications/WebNotification.h \
@@ -542,9 +541,7 @@
UIProcess/GeolocationPermissionRequestManagerProxy.cpp \
UIProcess/GeolocationPermissionRequestProxy.cpp \
UIProcess/Launcher/ProcessLauncher.cpp \
- UIProcess/Launcher/ThreadLauncher.cpp \
UIProcess/Launcher/qt/ProcessLauncherQt.cpp \
- UIProcess/Launcher/qt/ThreadLauncherQt.cpp \
UIProcess/Notifications/NotificationPermissionRequest.cpp \
UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp \
UIProcess/Notifications/WebNotification.cpp \
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp 2012-08-12 06:09:16 UTC (rev 125363)
@@ -61,11 +61,6 @@
return toAPI(context.release().leakRef());
}
-WKContextRef WKContextGetSharedThreadContext()
-{
- return toAPI(WebContext::sharedThreadContext());
-}
-
void WKContextSetInjectedBundleClient(WKContextRef contextRef, const WKContextInjectedBundleClient* wkClient)
{
toImpl(contextRef)->initializeInjectedBundleClient(wkClient);
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContextPrivate.h (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/API/C/WKContextPrivate.h 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContextPrivate.h 2012-08-12 06:09:16 UTC (rev 125363)
@@ -42,8 +42,6 @@
WK_EXPORT void WKContextGetGlobalStatistics(WKContextStatistics* statistics);
-WK_EXPORT WKContextRef WKContextGetSharedThreadContext();
-
WK_EXPORT void WKContextSetAdditionalPluginsDirectory(WKContextRef context, WKStringRef pluginsDirectory);
WK_EXPORT void WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef context, WKStringRef urlScheme);
Deleted: trunk/Source/WebKit2/UIProcess/Launcher/ThreadLauncher.cpp (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/Launcher/ThreadLauncher.cpp 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/Launcher/ThreadLauncher.cpp 2012-08-12 06:09:16 UTC (rev 125363)
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-#include "config.h"
-#include "ThreadLauncher.h"
-
-#include <WebCore/RunLoop.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-ThreadLauncher::ThreadLauncher(Client* client)
- : m_client(client)
-{
- launchThread();
-}
-
-void ThreadLauncher::launchThread()
-{
- m_isLaunching = true;
-
- CoreIPC::Connection::Identifier connectionIdentifier = createWebThread();
-
- // We've finished launching the thread, message back to the main run loop.
- RunLoop::main()->dispatch(bind(&ThreadLauncher::didFinishLaunchingThread, this, connectionIdentifier));
-}
-
-void ThreadLauncher::didFinishLaunchingThread(CoreIPC::Connection::Identifier identifier)
-{
- m_isLaunching = false;
-
- if (!m_client) {
- // FIXME: Dispose of the connection identifier.
- return;
- }
-
- m_client->didFinishLaunching(this, identifier);
-}
-
-void ThreadLauncher::invalidate()
-{
- m_client = 0;
-}
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit2/UIProcess/Launcher/ThreadLauncher.h (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/Launcher/ThreadLauncher.h 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/Launcher/ThreadLauncher.h 2012-08-12 06:09:16 UTC (rev 125363)
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-#ifndef ThreadLauncher_h
-#define ThreadLauncher_h
-
-#include "Connection.h"
-#include "PlatformProcessIdentifier.h"
-#include <wtf/RefPtr.h>
-#include <wtf/Threading.h>
-
-#if PLATFORM(QT)
-QT_BEGIN_NAMESPACE
-class QLocalSocket;
-QT_END_NAMESPACE
-#endif
-
-namespace WebKit {
-
-class ThreadLauncher : public ThreadSafeRefCounted<ThreadLauncher> {
-public:
- class Client {
- public:
- virtual ~Client() { }
- virtual void didFinishLaunching(ThreadLauncher*, CoreIPC::Connection::Identifier) = 0;
- };
-
- static PassRefPtr<ThreadLauncher> create(Client* client)
- {
- return adoptRef(new ThreadLauncher(client));
- }
-
- bool isLaunching() const { return m_isLaunching; }
-
- void invalidate();
-
-private:
- explicit ThreadLauncher(Client*);
-
- void launchThread();
- void didFinishLaunchingThread(CoreIPC::Connection::Identifier);
-
- static CoreIPC::Connection::Identifier createWebThread();
-
- bool m_isLaunching;
- Client* m_client;
-};
-
-} // namespace WebKit
-
-#endif // ThreadLauncher_h
Deleted: trunk/Source/WebKit2/UIProcess/Launcher/efl/ThreadLauncherEfl.cpp (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/Launcher/efl/ThreadLauncherEfl.cpp 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/Launcher/efl/ThreadLauncherEfl.cpp 2012-08-12 06:09:16 UTC (rev 125363)
@@ -1,33 +0,0 @@
-/*
- Copyright (C) 2012 Samsung Electronics
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-#include "ThreadLauncher.h"
-
-#include <WebCore/NotImplemented.h>
-
-namespace WebKit {
-
-CoreIPC::Connection::Identifier ThreadLauncher::createWebThread()
-{
- notImplemented();
- return -1;
-}
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit2/UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp 2012-08-12 06:09:16 UTC (rev 125363)
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Portions Copyright (c) 2010 Motorola Mobility, 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.
- */
-
-#include "config.h"
-#include "ThreadLauncher.h"
-
-#include <WebCore/NotImplemented.h>
-
-namespace WebKit {
-
-CoreIPC::Connection::Identifier ThreadLauncher::createWebThread()
-{
- notImplemented();
- return -1;
-}
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit2/UIProcess/Launcher/mac/ThreadLauncherMac.mm (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ThreadLauncherMac.mm 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ThreadLauncherMac.mm 2012-08-12 06:09:16 UTC (rev 125363)
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2010 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 "ThreadLauncher.h"
-
-#import "WebProcess.h"
-#import "WebSystemInterface.h"
-#import <runtime/InitializeThreading.h>
-#import <WebCore/RunLoop.h>
-#import <wtf/MainThread.h>
-#import <wtf/Threading.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-static void webThreadBody(void* context)
-{
- mach_port_t serverPort = static_cast<mach_port_t>(reinterpret_cast<uintptr_t>(context));
-
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- InitWebCoreSystemInterface();
- JSC::initializeThreading();
- WTF::initializeMainThread();
-
- WebProcess::shared().initialize(CoreIPC::Connection::Identifier(serverPort), RunLoop::current());
-
- [pool drain];
-
- RunLoop::current()->run();
-}
-
-CoreIPC::Connection::Identifier ThreadLauncher::createWebThread()
-{
- // Create the service port.
- mach_port_t listeningPort;
- mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
-
- // Insert a send right so we can send to it.
- mach_port_insert_right(mach_task_self(), listeningPort, listeningPort, MACH_MSG_TYPE_MAKE_SEND);
-
- if (!createThread(webThreadBody, reinterpret_cast<void*>(listeningPort), "WebKit2: WebThread")) {
- mach_port_destroy(mach_task_self(), listeningPort);
- return CoreIPC::Connection::Identifier();
- }
-
- return CoreIPC::Connection::Identifier(listeningPort);
-}
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit2/UIProcess/Launcher/qt/ThreadLauncherQt.cpp (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/Launcher/qt/ThreadLauncherQt.cpp 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/Launcher/qt/ThreadLauncherQt.cpp 2012-08-12 06:09:16 UTC (rev 125363)
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- *
- * 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 "ThreadLauncher.h"
-
-#include "WebProcess.h"
-#include <WebCore/RunLoop.h>
-#include <runtime/InitializeThreading.h>
-#include <wtf/MainThread.h>
-#include <wtf/Threading.h>
-
-#include <QDebug>
-#include <QFile>
-#include <QLocalServer>
-#include <QProcess>
-
-#include <QtCore/qglobal.h>
-
-#include <sys/resource.h>
-#include <unistd.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-static void webThreadBody(void* /* context */)
-{
- // Initialization
- JSC::initializeThreading();
- WTF::initializeMainThread();
-
- // FIXME: We do not support threaded mode for now.
-
- WebProcess::shared().initialize(-1, RunLoop::current());
- RunLoop::run();
-}
-
-CoreIPC::Connection::Identifier ThreadLauncher::createWebThread()
-{
- srandom(time(0));
- int connectionIdentifier = random();
-
- if (!createThread(webThreadBody, reinterpret_cast<void*>(connectionIdentifier), "WebKit2: WebThread")) {
- qWarning() << "failed starting thread";
- return 0;
- }
-
- return connectionIdentifier;
-}
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit2/UIProcess/Launcher/win/ThreadLauncherWin.cpp (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/Launcher/win/ThreadLauncherWin.cpp 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/Launcher/win/ThreadLauncherWin.cpp 2012-08-12 06:09:16 UTC (rev 125363)
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-#include "config.h"
-#include "ThreadLauncher.h"
-
-#include "WebProcess.h"
-#include <WebCore/RunLoop.h>
-#include <runtime/InitializeThreading.h>
-#include <wtf/MainThread.h>
-#include <wtf/Threading.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-static void webThreadBody(void* context)
-{
- HANDLE clientIdentifier = reinterpret_cast<HANDLE>(context);
-
- // Initialization
- JSC::initializeThreading();
- WTF::initializeMainThread();
-
- WebProcess::shared().initialize(clientIdentifier, RunLoop::current());
- RunLoop::run();
-}
-
-CoreIPC::Connection::Identifier ThreadLauncher::createWebThread()
-{
- // First, create the server and client identifiers.
- HANDLE serverIdentifier, clientIdentifier;
- if (!CoreIPC::Connection::createServerAndClientIdentifiers(serverIdentifier, clientIdentifier)) {
- // FIXME: What should we do here?
- ASSERT_NOT_REACHED();
- }
-
- if (!createThread(webThreadBody, reinterpret_cast<void*>(clientIdentifier), "WebKit2: WebThread")) {
- ::CloseHandle(serverIdentifier);
- ::CloseHandle(clientIdentifier);
- return 0;
- }
-
- return serverIdentifier;
-}
-
-} // namespace WebKit
Modified: trunk/Source/WebKit2/UIProcess/ProcessModel.h (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/ProcessModel.h 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/ProcessModel.h 2012-08-12 06:09:16 UTC (rev 125363)
@@ -30,7 +30,6 @@
enum ProcessModel {
ProcessModelSharedSecondaryProcess,
- ProcessModelSharedSecondaryThread,
ProcessModelMultipleSecondaryProcesses
};
Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/WebContext.cpp 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp 2012-08-12 06:09:16 UTC (rev 125363)
@@ -94,13 +94,6 @@
DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webContextCounter, ("WebContext"));
-WebContext* WebContext::sharedThreadContext()
-{
- RunLoop::initializeMainRunLoop();
- static WebContext* context = adoptRef(new WebContext(ProcessModelSharedSecondaryThread, String())).leakRef();
- return context;
-}
-
PassRefPtr<WebContext> WebContext::create(const String& injectedBundlePath)
{
JSC::initializeThreading();
Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/WebContext.h 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h 2012-08-12 06:09:16 UTC (rev 125363)
@@ -79,8 +79,6 @@
public:
static const Type APIType = TypeContext;
- static WebContext* sharedThreadContext();
-
static PassRefPtr<WebContext> create(const String& injectedBundlePath);
virtual ~WebContext();
Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2012-08-12 06:09:16 UTC (rev 125363)
@@ -88,39 +88,30 @@
m_processLauncher->invalidate();
m_processLauncher = 0;
}
-
- if (m_threadLauncher) {
- m_threadLauncher->invalidate();
- m_threadLauncher = 0;
- }
}
void WebProcessProxy::connect()
{
- if (m_context->processModel() == ProcessModelSharedSecondaryThread) {
- ASSERT(!m_threadLauncher);
- m_threadLauncher = ThreadLauncher::create(this);
- } else {
- ASSERT(!m_processLauncher);
+ ASSERT(!m_processLauncher);
- ProcessLauncher::LaunchOptions launchOptions;
- launchOptions.processType = ProcessLauncher::WebProcess;
+ ProcessLauncher::LaunchOptions launchOptions;
+ launchOptions.processType = ProcessLauncher::WebProcess;
#if PLATFORM(MAC)
- // We want the web process to match the architecture of the UI process.
- launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
- launchOptions.executableHeap = false;
+ // We want the web process to match the architecture of the UI process.
+ launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
+ launchOptions.executableHeap = false;
#if HAVE(XPC)
- launchOptions.useXPC = getenv("WEBKIT_USE_XPC_SERVICE_FOR_WEB_PROCESS");
+ launchOptions.useXPC = getenv("WEBKIT_USE_XPC_SERVICE_FOR_WEB_PROCESS");
#endif
#endif
#ifndef NDEBUG
- const char* webProcessCmdPrefix = getenv("WEB_PROCESS_CMD_PREFIX");
- if (webProcessCmdPrefix && *webProcessCmdPrefix)
- launchOptions.processCmdPrefix = String::fromUTF8(webProcessCmdPrefix);
+ const char* webProcessCmdPrefix = getenv("WEB_PROCESS_CMD_PREFIX");
+ if (webProcessCmdPrefix && *webProcessCmdPrefix)
+ launchOptions.processCmdPrefix = String::fromUTF8(webProcessCmdPrefix);
#endif
- m_processLauncher = ProcessLauncher::create(this, launchOptions);
- }
+
+ m_processLauncher = ProcessLauncher::create(this, launchOptions);
}
void WebProcessProxy::disconnect()
@@ -163,8 +154,6 @@
{
if (m_processLauncher)
return m_processLauncher->isLaunching();
- if (m_threadLauncher)
- return m_threadLauncher->isLaunching();
return false;
}
@@ -440,11 +429,6 @@
didFinishLaunching(connectionIdentifier);
}
-void WebProcessProxy::didFinishLaunching(ThreadLauncher*, CoreIPC::Connection::Identifier connectionIdentifier)
-{
- didFinishLaunching(connectionIdentifier);
-}
-
void WebProcessProxy::didFinishLaunching(CoreIPC::Connection::Identifier connectionIdentifier)
{
ASSERT(!m_connection);
Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.h (125362 => 125363)
--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.h 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.h 2012-08-12 06:09:16 UTC (rev 125363)
@@ -30,7 +30,6 @@
#include "PluginInfoStore.h"
#include "ProcessLauncher.h"
#include "ResponsivenessTimer.h"
-#include "ThreadLauncher.h"
#include "WebConnectionToWebProcess.h"
#include "WebPageProxy.h"
#include "WebProcessProxyMessages.h"
@@ -56,7 +55,7 @@
class WebPageGroup;
struct WebNavigationDataStore;
-class WebProcessProxy : public RefCounted<WebProcessProxy>, CoreIPC::Connection::Client, ResponsivenessTimer::Client, ProcessLauncher::Client, ThreadLauncher::Client, CoreIPC::Connection::QueueClient {
+class WebProcessProxy : public RefCounted<WebProcessProxy>, CoreIPC::Connection::Client, ResponsivenessTimer::Client, ProcessLauncher::Client, CoreIPC::Connection::QueueClient {
public:
typedef HashMap<uint64_t, RefPtr<WebFrameProxy> > WebFrameProxyMap;
typedef HashMap<uint64_t, RefPtr<WebBackForwardListItem> > WebBackForwardListItemMap;
@@ -118,7 +117,7 @@
private:
explicit WebProcessProxy(PassRefPtr<WebContext>);
- // Initializes the process or thread launcher which will begin launching the process.
+ // Initializes the process launcher which will begin launching the process.
void connect();
// Called when the web process has crashed or we know that it will terminate soon.
@@ -164,9 +163,6 @@
// ProcessLauncher::Client
virtual void didFinishLaunching(ProcessLauncher*, CoreIPC::Connection::Identifier);
- // ThreadLauncher::Client
- virtual void didFinishLaunching(ThreadLauncher*, CoreIPC::Connection::Identifier);
-
void didFinishLaunching(CoreIPC::Connection::Identifier);
// History client
@@ -188,7 +184,6 @@
Vector<std::pair<CoreIPC::Connection::OutgoingMessage, unsigned> > m_pendingMessages;
RefPtr<ProcessLauncher> m_processLauncher;
- RefPtr<ThreadLauncher> m_threadLauncher;
RefPtr<WebContext> m_context;
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (125362 => 125363)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2012-08-12 06:09:16 UTC (rev 125363)
@@ -834,9 +834,6 @@
BCEE966D112FAF57006BCC24 /* Attachment.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEE966B112FAF57006BCC24 /* Attachment.h */; };
BCF049E611FE20F600F86A58 /* WKBundleFramePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF049E411FE20F600F86A58 /* WKBundleFramePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCF049E711FE20F600F86A58 /* WKBundlePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF049E511FE20F600F86A58 /* WKBundlePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
- BCF50121123ED3B3005955AE /* ThreadLauncher.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF5011F123ED3B3005955AE /* ThreadLauncher.h */; };
- BCF50122123ED3B3005955AE /* ThreadLauncher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCF50120123ED3B3005955AE /* ThreadLauncher.cpp */; };
- BCF501B4123EF602005955AE /* ThreadLauncherMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCF501B3123EF602005955AE /* ThreadLauncherMac.mm */; };
BCF505E71243047B005955AE /* PlatformCertificateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF505E51243047B005955AE /* PlatformCertificateInfo.h */; };
BCF505E81243047B005955AE /* PlatformCertificateInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCF505E61243047B005955AE /* PlatformCertificateInfo.mm */; };
BCF50728124329AA005955AE /* WebCertificateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF50726124329AA005955AE /* WebCertificateInfo.h */; };
@@ -1908,9 +1905,6 @@
BCF049E511FE20F600F86A58 /* WKBundlePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundlePrivate.h; sourceTree = "<group>"; };
BCF04C8C11FF9B7D00F86A58 /* APIObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIObject.h; sourceTree = "<group>"; };
BCF04C8E11FF9F6E00F86A58 /* WebString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebString.h; sourceTree = "<group>"; };
- BCF5011F123ED3B3005955AE /* ThreadLauncher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadLauncher.h; sourceTree = "<group>"; };
- BCF50120123ED3B3005955AE /* ThreadLauncher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadLauncher.cpp; sourceTree = "<group>"; };
- BCF501B3123EF602005955AE /* ThreadLauncherMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ThreadLauncherMac.mm; sourceTree = "<group>"; };
BCF505E51243047B005955AE /* PlatformCertificateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformCertificateInfo.h; sourceTree = "<group>"; };
BCF505E61243047B005955AE /* PlatformCertificateInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformCertificateInfo.mm; sourceTree = "<group>"; };
BCF5068412431861005955AE /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
@@ -3161,8 +3155,6 @@
BC111B19112F5FC500337BAB /* mac */,
1AE117F511DBB30900981615 /* ProcessLauncher.cpp */,
BC1A7C571136E19C00FB7167 /* ProcessLauncher.h */,
- BCF50120123ED3B3005955AE /* ThreadLauncher.cpp */,
- BCF5011F123ED3B3005955AE /* ThreadLauncher.h */,
);
path = Launcher;
sourceTree = "<group>";
@@ -3175,7 +3167,6 @@
1A7C6CD81378950800B9C04D /* EnvironmentVariables.cpp */,
1A7C6CD91378950800B9C04D /* EnvironmentVariables.h */,
BC111B1B112F5FE600337BAB /* ProcessLauncherMac.mm */,
- BCF501B3123EF602005955AE /* ThreadLauncherMac.mm */,
);
path = mac;
sourceTree = "<group>";
@@ -3972,7 +3963,6 @@
BCBD3C3B125BFA7A00D2C29F /* StringPairVector.h in Headers */,
1AA417CB12C00CCA002BE67B /* TextChecker.h in Headers */,
1A5E4DA412D3BD3D0099A2BB /* TextCheckerState.h in Headers */,
- BCF50121123ED3B3005955AE /* ThreadLauncher.h in Headers */,
1AAF263914687C39004A1E8A /* TiledCoreAnimationDrawingArea.h in Headers */,
1AF05D8714688348008B1E81 /* TiledCoreAnimationDrawingAreaProxy.h in Headers */,
1A64245E12DE29A100CAAE2C /* UpdateInfo.h in Headers */,
@@ -4757,8 +4747,6 @@
1A24BF3A120896A600FBB059 /* SharedMemoryMac.cpp in Sources */,
5272B28A1406985D0096A5D0 /* StatisticsData.cpp in Sources */,
1AA417EF12C00D87002BE67B /* TextCheckerMac.mm in Sources */,
- BCF50122123ED3B3005955AE /* ThreadLauncher.cpp in Sources */,
- BCF501B4123EF602005955AE /* ThreadLauncherMac.mm in Sources */,
1AAF263814687C39004A1E8A /* TiledCoreAnimationDrawingArea.mm in Sources */,
1AF05D8614688348008B1E81 /* TiledCoreAnimationDrawingAreaProxy.mm in Sources */,
1A64245F12DE29A100CAAE2C /* UpdateInfo.cpp in Sources */,
Modified: trunk/Source/WebKit2/win/WebKit2.vcproj (125362 => 125363)
--- trunk/Source/WebKit2/win/WebKit2.vcproj 2012-08-12 05:56:33 UTC (rev 125362)
+++ trunk/Source/WebKit2/win/WebKit2.vcproj 2012-08-12 06:09:16 UTC (rev 125363)
@@ -3753,14 +3753,6 @@
RelativePath="..\UIProcess\Launcher\ProcessLauncher.h"
>
</File>
- <File
- RelativePath="..\UIProcess\Launcher\ThreadLauncher.cpp"
- >
- </File>
- <File
- RelativePath="..\UIProcess\Launcher\ThreadLauncher.h"
- >
- </File>
<Filter
Name="win"
>
@@ -3768,10 +3760,6 @@
RelativePath="..\UIProcess\Launcher\win\ProcessLauncherWin.cpp"
>
</File>
- <File
- RelativePath="..\UIProcess\Launcher\win\ThreadLauncherWin.cpp"
- >
- </File>
</Filter>
</Filter>
<Filter