[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 13:42:02 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e0dbff2ce07f51f4c926d21520c0a80ea5004907
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 23 18:59:30 2010 +0000
Add PluginProcessMain files
https://bugs.webkit.org/show_bug.cgi?id=46379
Reviewed by Sam Weinig.
* PluginProcess/PluginProcessMain.h: Added.
* PluginProcess/mac/PluginProcessMainMac.mm: Added.
* WebKit2.xcodeproj/project.pbxproj:
Add PluginProcessMain files. Remove PluginProcess.messages.in from the target so it
won't be installed in the WebKit2.framework bundle.
* WebProcess/WebKitMain.cpp:
(WebKitMain):
Call PluginProcessMain if the process type is ProcessLauncher::PluginProcess.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 055a029..8515223 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,24 @@
Reviewed by Sam Weinig.
+ Add PluginProcessMain files
+ https://bugs.webkit.org/show_bug.cgi?id=46379
+
+ * PluginProcess/PluginProcessMain.h: Added.
+ * PluginProcess/mac/PluginProcessMainMac.mm: Added.
+
+ * WebKit2.xcodeproj/project.pbxproj:
+ Add PluginProcessMain files. Remove PluginProcess.messages.in from the target so it
+ won't be installed in the WebKit2.framework bundle.
+
+ * WebProcess/WebKitMain.cpp:
+ (WebKitMain):
+ Call PluginProcessMain if the process type is ProcessLauncher::PluginProcess.
+
+2010-09-23 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
Add PluginProcessProxy class
https://bugs.webkit.org/show_bug.cgi?id=46377
diff --git a/WebKit2/PluginProcess/PluginProcessMain.h b/WebKit2/PluginProcess/PluginProcessMain.h
new file mode 100644
index 0000000..3b3f38c
--- /dev/null
+++ b/WebKit2/PluginProcess/PluginProcessMain.h
@@ -0,0 +1,41 @@
+/*
+ * 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 PluginProcessMain_h
+#define PluginProcessMain_h
+
+#if ENABLE(PLUGIN_PROCESS)
+
+namespace WebKit {
+
+class CommandLine;
+
+int PluginProcessMain(const CommandLine&);
+
+} // namespace WebKit
+
+#endif // ENABLE(PLUGIN_PROCESS)
+
+#endif // PluginProcessMain_h
diff --git a/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm b/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm
new file mode 100644
index 0000000..bcb4000
--- /dev/null
+++ b/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ */
+
+#if ENABLE(PLUGIN_PROCESS)
+
+#include "PluginProcessMain.h"
+
+#include "CommandLine.h"
+#include "RunLoop.h"
+#include <runtime/InitializeThreading.h>
+#include <servers/bootstrap.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
+
+// FIXME: We should be doing this another way.
+extern "C" kern_return_t bootstrap_look_up2(mach_port_t, const name_t, mach_port_t*, pid_t, uint64_t);
+
+#define SHOW_CRASH_REPORTER 1
+
+namespace WebKit {
+
+// FIXME: There is much code here that is duplicated in WebProcessMainMac.mm, we should add a shared base class where
+// we can put everything.
+
+int PluginProcessMain(const CommandLine& commandLine)
+{
+ String serviceName = commandLine["servicename"];
+ if (serviceName.isEmpty())
+ return EXIT_FAILURE;
+
+ // Get the server port.
+ mach_port_t serverPort;
+ kern_return_t kr = bootstrap_look_up2(bootstrap_port, serviceName.utf8().data(), &serverPort, 0, 0);
+ if (kr) {
+ printf("bootstrap_look_up2 result: %x", kr);
+ return EXIT_FAILURE;
+ }
+
+#if !SHOW_CRASH_REPORTER
+ // Installs signal handlers that exit on a crash so that CrashReporter does not show up.
+ signal(SIGILL, _exit);
+ signal(SIGFPE, _exit);
+ signal(SIGBUS, _exit);
+ signal(SIGSEGV, _exit);
+#endif
+
+ JSC::initializeThreading();
+ WTF::initializeMainThread();
+ RunLoop::initializeMainRunLoop();
+
+ // FIXME: Actually Initialize the plug-in host process.
+
+ [NSApplication sharedApplication];
+
+ RunLoop::run();
+
+ return 0;
+}
+
+}
+
+#endif // ENABLE(PLUGIN_PROCESS)
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 59cbfb4..c4a14b6 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -46,10 +46,11 @@
0FB659A61208B9EE0044816C /* DrawingAreaBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB659A51208B9EE0044816C /* DrawingAreaBase.cpp */; };
1A0EC603124A9F2C007EF4A5 /* PluginProcessManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0EC601124A9F2C007EF4A5 /* PluginProcessManager.h */; };
1A0EC604124A9F2C007EF4A5 /* PluginProcessManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A0EC602124A9F2C007EF4A5 /* PluginProcessManager.cpp */; };
- 1A0EC6B2124BBD36007EF4A5 /* PluginProcess.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 1A0EC6B1124BBD36007EF4A5 /* PluginProcess.messages.in */; };
1A0EC6C0124BBD9B007EF4A5 /* PluginProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0EC6BE124BBD9B007EF4A5 /* PluginProcessMessages.h */; };
1A0EC75E124BC7B2007EF4A5 /* PluginProcessProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0EC75C124BC7B2007EF4A5 /* PluginProcessProxy.h */; };
1A0EC75F124BC7B2007EF4A5 /* PluginProcessProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A0EC75D124BC7B2007EF4A5 /* PluginProcessProxy.cpp */; };
+ 1A0EC7FB124BD3B6007EF4A5 /* PluginProcessMain.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0EC7FA124BD3B6007EF4A5 /* PluginProcessMain.h */; };
+ 1A0EC803124BD41E007EF4A5 /* PluginProcessMainMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A0EC802124BD41E007EF4A5 /* PluginProcessMainMac.mm */; };
1A0F29CB120B37160053D1B9 /* VisitedLinkTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A0F29C9120B37160053D1B9 /* VisitedLinkTable.cpp */; };
1A0F29CC120B37160053D1B9 /* VisitedLinkTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0F29CA120B37160053D1B9 /* VisitedLinkTable.h */; };
1A0F29E3120B44420053D1B9 /* VisitedLinkProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A0F29E1120B44420053D1B9 /* VisitedLinkProvider.cpp */; };
@@ -448,6 +449,8 @@
1A0EC6BE124BBD9B007EF4A5 /* PluginProcessMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginProcessMessages.h; path = /Users/andersca/Build/Debug/DerivedSources/WebKit2/PluginProcessMessages.h; sourceTree = "<absolute>"; };
1A0EC75C124BC7B2007EF4A5 /* PluginProcessProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcessProxy.h; sourceTree = "<group>"; };
1A0EC75D124BC7B2007EF4A5 /* PluginProcessProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProcessProxy.cpp; sourceTree = "<group>"; };
+ 1A0EC7FA124BD3B6007EF4A5 /* PluginProcessMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcessMain.h; sourceTree = "<group>"; };
+ 1A0EC802124BD41E007EF4A5 /* PluginProcessMainMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginProcessMainMac.mm; sourceTree = "<group>"; };
1A0F29C9120B37160053D1B9 /* VisitedLinkTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkTable.cpp; sourceTree = "<group>"; };
1A0F29CA120B37160053D1B9 /* VisitedLinkTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinkTable.h; sourceTree = "<group>"; };
1A0F29E1120B44420053D1B9 /* VisitedLinkProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkProvider.cpp; sourceTree = "<group>"; };
@@ -898,11 +901,21 @@
1A0EC6B0124BBD36007EF4A5 /* PluginProcess */ = {
isa = PBXGroup;
children = (
+ 1A0EC7FD124BD402007EF4A5 /* mac */,
1A0EC6B1124BBD36007EF4A5 /* PluginProcess.messages.in */,
+ 1A0EC7FA124BD3B6007EF4A5 /* PluginProcessMain.h */,
);
path = PluginProcess;
sourceTree = "<group>";
};
+ 1A0EC7FD124BD402007EF4A5 /* mac */ = {
+ isa = PBXGroup;
+ children = (
+ 1A0EC802124BD41E007EF4A5 /* PluginProcessMainMac.mm */,
+ );
+ path = mac;
+ sourceTree = "<group>";
+ };
1A4F9769100E7B6600637A18 /* Configurations */ = {
isa = PBXGroup;
children = (
@@ -1755,6 +1768,7 @@
1A0EC603124A9F2C007EF4A5 /* PluginProcessManager.h in Headers */,
1A0EC6C0124BBD9B007EF4A5 /* PluginProcessMessages.h in Headers */,
1A0EC75E124BC7B2007EF4A5 /* PluginProcessProxy.h in Headers */,
+ 1A0EC7FB124BD3B6007EF4A5 /* PluginProcessMain.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1839,7 +1853,6 @@
buildActionMask = 2147483647;
files = (
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
- 1A0EC6B2124BBD36007EF4A5 /* PluginProcess.messages.in in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2029,6 +2042,7 @@
C0CE72A01247E71D00BC0EC4 /* WebPageMessageReceiver.cpp in Sources */,
1A0EC604124A9F2C007EF4A5 /* PluginProcessManager.cpp in Sources */,
1A0EC75F124BC7B2007EF4A5 /* PluginProcessProxy.cpp in Sources */,
+ 1A0EC803124BD41E007EF4A5 /* PluginProcessMainMac.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit2/WebProcess/WebKitMain.cpp b/WebKit2/WebProcess/WebKitMain.cpp
index 953d13f..6938d4d 100644
--- a/WebKit2/WebProcess/WebKitMain.cpp
+++ b/WebKit2/WebProcess/WebKitMain.cpp
@@ -25,6 +25,7 @@
#include "CommandLine.h"
+#include "PluginProcessMain.h"
#include "ProcessLauncher.h"
#include "WebProcessMain.h"
#include <wtf/text/CString.h>
@@ -45,8 +46,11 @@ static int WebKitMain(const CommandLine& commandLine)
case ProcessLauncher::WebProcess:
return WebProcessMain(commandLine);
case ProcessLauncher::PluginProcess:
- // FIXME: Handle this.
+#if ENABLE(PLUGIN_PROCESS)
+ return PluginProcessMain(commandLine);
+#else
break;
+#endif
}
return EXIT_FAILURE;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list