summaryrefslogtreecommitdiffstats
path: root/ipc/app
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /ipc/app
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'ipc/app')
-rw-r--r--ipc/app/Makefile.in41
-rw-r--r--ipc/app/MozillaRuntimeMain.cpp19
-rw-r--r--ipc/app/MozillaRuntimeMainAndroid.cpp35
-rw-r--r--ipc/app/macbuild/Contents/Info.plist.in33
-rw-r--r--ipc/app/macbuild/Contents/PkgInfo1
-rw-r--r--ipc/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in7
-rw-r--r--ipc/app/module.ver6
-rw-r--r--ipc/app/moz.build114
-rw-r--r--ipc/app/pie/moz.build30
-rw-r--r--ipc/app/plugin-container.exe.manifest43
10 files changed, 329 insertions, 0 deletions
diff --git a/ipc/app/Makefile.in b/ipc/app/Makefile.in
new file mode 100644
index 000000000..d5593724c
--- /dev/null
+++ b/ipc/app/Makefile.in
@@ -0,0 +1,41 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ifndef MOZ_WINCONSOLE
+ifdef MOZ_DEBUG
+MOZ_WINCONSOLE = 1
+else
+MOZ_WINCONSOLE = 0
+endif
+endif
+
+# This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
+# shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
+NSDISTMODE = copy
+
+include $(topsrcdir)/config/config.mk
+
+include $(topsrcdir)/config/rules.mk
+
+ifneq ($(MOZ_WIDGET_TOOLKIT),android)
+#LIBS += ../contentproc/$(LIB_PREFIX)plugin-container.$(LIB_SUFFIX)
+endif
+
+ifeq ($(OS_ARCH),WINNT) #{
+# Note the manifest file exists in the tree, so we use the explicit filename
+# here.
+EXTRA_DEPS += plugin-container.exe.manifest
+endif #}
+
+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) #{
+
+libs::
+ $(NSINSTALL) -D $(DIST)/bin/$(PROGRAM).app
+ rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app
+ sed -e 's/%PROGRAM%/$(MOZ_CHILD_PROCESS_NAME)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Info.plist
+ sed -e 's/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
+ iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Resources/English.lproj/InfoPlist.strings
+ $(NSINSTALL) -D $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/MacOS
+ $(NSINSTALL) $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME) $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/MacOS
+endif #}
diff --git a/ipc/app/MozillaRuntimeMain.cpp b/ipc/app/MozillaRuntimeMain.cpp
new file mode 100644
index 000000000..3f977e462
--- /dev/null
+++ b/ipc/app/MozillaRuntimeMain.cpp
@@ -0,0 +1,19 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "../contentproc/plugin-container.cpp"
+
+#include "mozilla/WindowsDllBlocklist.h"
+
+int
+main(int argc, char *argv[])
+{
+#ifdef HAS_DLL_BLOCKLIST
+ DllBlocklist_Initialize();
+#endif
+
+ return content_process_main(argc, argv);
+}
diff --git a/ipc/app/MozillaRuntimeMainAndroid.cpp b/ipc/app/MozillaRuntimeMainAndroid.cpp
new file mode 100644
index 000000000..81b89eef5
--- /dev/null
+++ b/ipc/app/MozillaRuntimeMainAndroid.cpp
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: sw=4 ts=4 et :
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include <dlfcn.h>
+#include <android/log.h>
+
+int
+main(int argc, char* argv[])
+{
+ // Check for the absolute minimum number of args we need to move
+ // forward here. We expect the last arg to be the child process type.
+ if (argc < 2)
+ return 1;
+
+ void *mozloader_handle = dlopen("libmozglue.so", RTLD_LAZY);
+ if (!mozloader_handle) {
+ __android_log_print(ANDROID_LOG_ERROR, "GeckoChildLoad",
+ "Couldn't load mozloader because %s", dlerror());
+ return 1;
+ }
+
+ typedef int (*ChildProcessInit_t)(int, char**);
+ ChildProcessInit_t fChildProcessInit =
+ (ChildProcessInit_t)dlsym(mozloader_handle, "ChildProcessInit");
+ if (!fChildProcessInit) {
+ __android_log_print(ANDROID_LOG_ERROR, "GeckoChildLoad",
+ "Couldn't load cpi_t because %s", dlerror());
+ return 1;
+ }
+
+ return fChildProcessInit(argc, argv);
+}
diff --git a/ipc/app/macbuild/Contents/Info.plist.in b/ipc/app/macbuild/Contents/Info.plist.in
new file mode 100644
index 000000000..c5291160e
--- /dev/null
+++ b/ipc/app/macbuild/Contents/Info.plist.in
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>%PROGRAM%</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.mozilla.plugincontainer</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>10.5</string>
+ <key>LSMinimumSystemVersionByArchitecture</key>
+ <dict>
+ <key>i386</key>
+ <string>10.5.0</string>
+ <key>x86_64</key>
+ <string>10.6.0</string>
+ </dict>
+ <key>LSUIElement</key>
+ <string>1</string>
+ <key>NSSupportsAutomaticGraphicsSwitching</key>
+ <true/>
+</dict>
+</plist>
diff --git a/ipc/app/macbuild/Contents/PkgInfo b/ipc/app/macbuild/Contents/PkgInfo
new file mode 100644
index 000000000..bd04210fb
--- /dev/null
+++ b/ipc/app/macbuild/Contents/PkgInfo
@@ -0,0 +1 @@
+APPL???? \ No newline at end of file
diff --git a/ipc/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in b/ipc/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in
new file mode 100644
index 000000000..c07ad220d
--- /dev/null
+++ b/ipc/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in
@@ -0,0 +1,7 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/* Localized versions of Info.plist keys */
+
+CFBundleName = "%APP_NAME%";
diff --git a/ipc/app/module.ver b/ipc/app/module.ver
new file mode 100644
index 000000000..8abbd23f0
--- /dev/null
+++ b/ipc/app/module.ver
@@ -0,0 +1,6 @@
+WIN32_MODULE_COMPANYNAME=Mozilla Corporation
+WIN32_MODULE_PRODUCTVERSION=@MOZ_APP_WINVERSION@
+WIN32_MODULE_PRODUCTVERSION_STRING=@MOZ_APP_VERSION@
+WIN32_MODULE_DESCRIPTION=Plugin Container for @MOZ_APP_DISPLAYNAME@
+WIN32_MODULE_PRODUCTNAME=@MOZ_APP_DISPLAYNAME@
+WIN32_MODULE_NAME=@MOZ_APP_DISPLAYNAME@
diff --git a/ipc/app/moz.build b/ipc/app/moz.build
new file mode 100644
index 000000000..55c338cb8
--- /dev/null
+++ b/ipc/app/moz.build
@@ -0,0 +1,114 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# Any changes that affect Android need to be made in pie/moz.build as well.
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
+ Program(CONFIG['MOZ_CHILD_PROCESS_NAME'])
+ SOURCES += [
+ 'MozillaRuntimeMainAndroid.cpp',
+ ]
+
+ DIRS += ['pie']
+else:
+ GeckoProgram(CONFIG['MOZ_CHILD_PROCESS_NAME'], linkage='dependent')
+
+ SOURCES += [
+ 'MozillaRuntimeMain.cpp',
+ ]
+
+include('/ipc/chromium/chromium-config.mozbuild')
+
+LOCAL_INCLUDES += [
+ '/toolkit/xre',
+ '/xpcom/base',
+]
+
+# We link GMPLoader into plugin-container on desktop so that its code is
+# covered by the desktop DRM vendor's voucher.
+if CONFIG['OS_TARGET'] != 'Android':
+ SOURCES += [
+ '../../dom/media/gmp/GMPLoader.cpp',
+ ]
+ USE_LIBS += [
+ 'rlz',
+ ]
+
+# DELAYLOAD_DLLS in this block ensures that the DLL blocklist is functional
+if CONFIG['OS_ARCH'] == 'WINNT':
+ DELAYLOAD_DLLS += [
+ 'nss3.dll',
+ ]
+
+ if CONFIG['MOZ_SANDBOX']:
+ # For sandbox includes and the include dependencies those have
+ LOCAL_INCLUDES += [
+ '/security/sandbox/chromium',
+ '/security/sandbox/chromium-shim',
+ ]
+
+ USE_LIBS += [
+ 'sandbox_s',
+ ]
+
+ DELAYLOAD_DLLS += [
+ 'winmm.dll',
+ 'user32.dll',
+ ]
+
+ DELAYLOAD_DLLS += [
+ 'xul.dll',
+ ]
+
+if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] in ('Linux', 'Android'):
+ USE_LIBS += [
+ 'mozsandbox',
+ ]
+
+ # gcc lto likes to put the top level asm in syscall.cc in a different partition
+ # from the function using it which breaks the build. Work around that by
+ # forcing there to be only one partition.
+ if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']:
+ LDFLAGS += ['--param lto-partitions=1']
+
+if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] == 'Darwin':
+ # For sandbox includes and the include dependencies those have
+ LOCAL_INCLUDES += [
+ '/security/sandbox/chromium',
+ '/security/sandbox/chromium-shim',
+ ]
+ USE_LIBS += [
+ 'mozsandbox',
+ ]
+
+if CONFIG['_MSC_VER']:
+ # Always enter a Windows program through wmain, whether or not we're
+ # a console application.
+ WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
+
+LDFLAGS += CONFIG['MOZ_ALLOW_HEAP_EXECUTE_FLAGS']
+
+# Control the default heap size.
+# This is the heap returned by GetProcessHeap().
+# As we use the CRT heap, the default size is too large and wastes VM.
+#
+# The default heap size is 1MB on Win32.
+# The heap will grow if need be.
+#
+# Set it to 256k. See bug 127069.
+if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
+ LDFLAGS += ['/HEAP:0x40000']
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+ OS_LIBS += [
+ 'binder',
+ 'utils',
+ ]
+
+if CONFIG['GNU_CXX']:
+ CXXFLAGS += ['-Wshadow']
+
+DEFINES['MOZ_PLUGIN_CONTAINER'] = 1;
diff --git a/ipc/app/pie/moz.build b/ipc/app/pie/moz.build
new file mode 100644
index 000000000..0247b25b4
--- /dev/null
+++ b/ipc/app/pie/moz.build
@@ -0,0 +1,30 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+Program(CONFIG['MOZ_CHILD_PROCESS_NAME_PIE'])
+SOURCES += [
+ '../MozillaRuntimeMainAndroid.cpp',
+]
+
+include('/ipc/chromium/chromium-config.mozbuild')
+
+LOCAL_INCLUDES += [
+ '/toolkit/xre',
+ '/xpcom/base',
+]
+
+if CONFIG['MOZ_SANDBOX']:
+ USE_LIBS += [
+ 'mozsandbox',
+ ]
+
+ # gcc lto likes to put the top level asm in syscall.cc in a different partition
+ # from the function using it which breaks the build. Work around that by
+ # forcing there to be only one partition.
+ if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']:
+ LDFLAGS += ['--param lto-partitions=1']
+
+LDFLAGS += ['-pie']
diff --git a/ipc/app/plugin-container.exe.manifest b/ipc/app/plugin-container.exe.manifest
new file mode 100644
index 000000000..d61ddec1a
--- /dev/null
+++ b/ipc/app/plugin-container.exe.manifest
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+ version="1.0.0.0"
+ processorArchitecture="*"
+ name="plugin-container"
+ type="win32"
+/>
+<description>Firefox Runtime</description>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="*"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+</dependency>
+ <ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
+ <ms_asmv3:security>
+ <ms_asmv3:requestedPrivileges>
+ <ms_asmv3:requestedExecutionLevel level="asInvoker" uiAccess="false" />
+ </ms_asmv3:requestedPrivileges>
+ </ms_asmv3:security>
+ </ms_asmv3:trustInfo>
+ <ms_asmv3:application xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
+ <ms_asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
+ <dpiAware>True/PM</dpiAware>
+ </ms_asmv3:windowsSettings>
+ </ms_asmv3:application>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ </application>
+ </compatibility>
+</assembly>