diff options
Diffstat (limited to 'toolkit')
29 files changed, 272 insertions, 340 deletions
diff --git a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp b/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp deleted file mode 100644 index 7f3b8cd08..000000000 --- a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/* 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 "DiskSpaceWatcher.h" -#include "nsIObserverService.h" -#include "nsXULAppAPI.h" -#include "mozilla/Hal.h" -#include "mozilla/ModuleUtils.h" -#include "mozilla/Preferences.h" -#include "mozilla/ClearOnShutdown.h" -#include "mozilla/Services.h" - -#define NS_DISKSPACEWATCHER_CID \ - { 0xab218518, 0xf197, 0x4fb4, { 0x8b, 0x0f, 0x8b, 0xb3, 0x4d, 0xf2, 0x4b, 0xf4 } } - -using namespace mozilla; - -StaticRefPtr<DiskSpaceWatcher> gDiskSpaceWatcher; - -NS_IMPL_ISUPPORTS(DiskSpaceWatcher, nsIDiskSpaceWatcher, nsIObserver) - -uint64_t DiskSpaceWatcher::sFreeSpace = 0; -bool DiskSpaceWatcher::sIsDiskFull = false; - -DiskSpaceWatcher::DiskSpaceWatcher() -{ - MOZ_ASSERT(NS_IsMainThread()); - MOZ_ASSERT(!gDiskSpaceWatcher); -} - -DiskSpaceWatcher::~DiskSpaceWatcher() -{ - MOZ_ASSERT(!gDiskSpaceWatcher); -} - -already_AddRefed<DiskSpaceWatcher> -DiskSpaceWatcher::FactoryCreate() -{ - if (!XRE_IsParentProcess()) { - return nullptr; - } - - MOZ_ASSERT(NS_IsMainThread()); - - if (!Preferences::GetBool("disk_space_watcher.enabled", false)) { - return nullptr; - } - - if (!gDiskSpaceWatcher) { - gDiskSpaceWatcher = new DiskSpaceWatcher(); - ClearOnShutdown(&gDiskSpaceWatcher); - } - - RefPtr<DiskSpaceWatcher> service = gDiskSpaceWatcher.get(); - return service.forget(); -} - -NS_IMETHODIMP -DiskSpaceWatcher::Observe(nsISupports* aSubject, const char* aTopic, - const char16_t* aData) -{ - MOZ_ASSERT(NS_IsMainThread()); - - if (!strcmp(aTopic, "profile-after-change")) { - nsCOMPtr<nsIObserverService> observerService = - mozilla::services::GetObserverService(); - observerService->AddObserver(this, "profile-before-change", false); - mozilla::hal::StartDiskSpaceWatcher(); - return NS_OK; - } - - if (!strcmp(aTopic, "profile-before-change")) { - nsCOMPtr<nsIObserverService> observerService = - mozilla::services::GetObserverService(); - observerService->RemoveObserver(this, "profile-before-change"); - mozilla::hal::StopDiskSpaceWatcher(); - return NS_OK; - } - - MOZ_ASSERT(false, "DiskSpaceWatcher got unexpected topic!"); - return NS_ERROR_UNEXPECTED; -} - -NS_IMETHODIMP DiskSpaceWatcher::GetIsDiskFull(bool* aIsDiskFull) -{ - *aIsDiskFull = sIsDiskFull; - return NS_OK; -} - -// GetFreeSpace is a macro on windows, and that messes up with the c++ -// compiler. -#ifdef XP_WIN -#undef GetFreeSpace -#endif -NS_IMETHODIMP DiskSpaceWatcher::GetFreeSpace(uint64_t* aFreeSpace) -{ - *aFreeSpace = sFreeSpace; - return NS_OK; -} - -// static -void DiskSpaceWatcher::UpdateState(bool aIsDiskFull, uint64_t aFreeSpace) -{ - MOZ_ASSERT(NS_IsMainThread()); - if (!gDiskSpaceWatcher) { - return; - } - - nsCOMPtr<nsIObserverService> observerService = - mozilla::services::GetObserverService(); - - sIsDiskFull = aIsDiskFull; - sFreeSpace = aFreeSpace; - - if (!observerService) { - return; - } - - const char16_t stateFull[] = { 'f', 'u', 'l', 'l', 0 }; - const char16_t stateFree[] = { 'f', 'r', 'e', 'e', 0 }; - - nsCOMPtr<nsISupports> subject; - CallQueryInterface(gDiskSpaceWatcher.get(), getter_AddRefs(subject)); - MOZ_ASSERT(subject); - observerService->NotifyObservers(subject, - DISKSPACEWATCHER_OBSERVER_TOPIC, - sIsDiskFull ? stateFull : stateFree); - return; -} - -NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(DiskSpaceWatcher, - DiskSpaceWatcher::FactoryCreate) - -NS_DEFINE_NAMED_CID(NS_DISKSPACEWATCHER_CID); - -static const mozilla::Module::CIDEntry kDiskSpaceWatcherCIDs[] = { - { &kNS_DISKSPACEWATCHER_CID, false, nullptr, DiskSpaceWatcherConstructor }, - { nullptr } -}; - -static const mozilla::Module::ContractIDEntry kDiskSpaceWatcherContracts[] = { - { "@mozilla.org/toolkit/disk-space-watcher;1", &kNS_DISKSPACEWATCHER_CID }, - { nullptr } -}; - -static const mozilla::Module::CategoryEntry kDiskSpaceWatcherCategories[] = { - { nullptr } -}; - -static const mozilla::Module kDiskSpaceWatcherModule = { - mozilla::Module::kVersion, - kDiskSpaceWatcherCIDs, - kDiskSpaceWatcherContracts, - kDiskSpaceWatcherCategories -}; - -NSMODULE_DEFN(DiskSpaceWatcherModule) = &kDiskSpaceWatcherModule; diff --git a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h b/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h deleted file mode 100644 index 6559af3cd..000000000 --- a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h +++ /dev/null @@ -1,32 +0,0 @@ -/* 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 __DISKSPACEWATCHER_H__ - -#include "nsIDiskSpaceWatcher.h" -#include "nsIObserver.h" -#include "nsCOMPtr.h" - -class DiskSpaceWatcher final : public nsIDiskSpaceWatcher, - public nsIObserver -{ -public: - NS_DECL_ISUPPORTS - NS_DECL_NSIDISKSPACEWATCHER - NS_DECL_NSIOBSERVER - - static already_AddRefed<DiskSpaceWatcher> - FactoryCreate(); - - static void UpdateState(bool aIsDiskFull, uint64_t aFreeSpace); - -private: - DiskSpaceWatcher(); - ~DiskSpaceWatcher(); - - static uint64_t sFreeSpace; - static bool sIsDiskFull; -}; - -#endif // __DISKSPACEWATCHER_H__ diff --git a/toolkit/components/diskspacewatcher/moz.build b/toolkit/components/diskspacewatcher/moz.build deleted file mode 100644 index 168af46a6..000000000 --- a/toolkit/components/diskspacewatcher/moz.build +++ /dev/null @@ -1,23 +0,0 @@ -# -*- 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/. - -XPIDL_SOURCES += [ - 'nsIDiskSpaceWatcher.idl', -] - -EXPORTS += [ - 'DiskSpaceWatcher.h' -] - -XPIDL_MODULE = 'diskspacewatcher' - -SOURCES = [ - 'DiskSpaceWatcher.cpp', -] - -include('/ipc/chromium/chromium-config.mozbuild') - -FINAL_LIBRARY = 'xul' diff --git a/toolkit/components/diskspacewatcher/nsIDiskSpaceWatcher.idl b/toolkit/components/diskspacewatcher/nsIDiskSpaceWatcher.idl deleted file mode 100644 index a9c60ca9f..000000000 --- a/toolkit/components/diskspacewatcher/nsIDiskSpaceWatcher.idl +++ /dev/null @@ -1,25 +0,0 @@ -/* 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 "nsISupports.idl" - -%{ C++ -#ifdef XP_WIN -#undef GetFreeSpace -#endif -%} - -[scriptable, uuid(3aceba74-2ed5-4e99-8fe4-06e90e2b8ef0)] -interface nsIDiskSpaceWatcher : nsISupports -{ - readonly attribute bool isDiskFull; // True if we are low on disk space. - readonly attribute unsigned long long freeSpace; // The free space currently available. -}; - -%{ C++ -#define DISKSPACEWATCHER_CONTRACTID "@mozilla.org/toolkit/disk-space-watcher;1" - -// The data for this notification will be either 'free' or 'full'. -#define DISKSPACEWATCHER_OBSERVER_TOPIC "disk-space-watcher" -%} diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build index 3f17bfb6d..d9dae12d1 100644 --- a/toolkit/components/moz.build +++ b/toolkit/components/moz.build @@ -24,7 +24,6 @@ DIRS += [ 'contextualidentity', 'cookie', 'crashmonitor', - 'diskspacewatcher', 'downloads', 'exthelper', 'filewatcher', diff --git a/toolkit/components/osfile/modules/osfile_unix_back.jsm b/toolkit/components/osfile/modules/osfile_unix_back.jsm index bf5c66b8d..7c2c6f28d 100644 --- a/toolkit/components/osfile/modules/osfile_unix_back.jsm +++ b/toolkit/components/osfile/modules/osfile_unix_back.jsm @@ -585,10 +585,18 @@ } else if (Const._STAT_VER != undefined) { const ver = Const._STAT_VER; let xstat_name, lxstat_name, fxstat_name; - // Linux, all widths - xstat_name = "__xstat"; - lxstat_name = "__lxstat"; - fxstat_name = "__fxstat"; + if (OS.Constants.Sys.Name == "SunOS") { + // Solaris + xstat_name = "_xstat"; + lxstat_name = "_lxstat"; + fxstat_name = "_fxstat"; + } else { + + // Linux, all widths + xstat_name = "__xstat"; + lxstat_name = "__lxstat"; + fxstat_name = "__fxstat"; + } let Stat = {}; libc.declareLazyFFI(Stat, "xstat", diff --git a/toolkit/components/terminator/nsTerminator.cpp b/toolkit/components/terminator/nsTerminator.cpp index 91e872821..9f6a90b57 100644 --- a/toolkit/components/terminator/nsTerminator.cpp +++ b/toolkit/components/terminator/nsTerminator.cpp @@ -30,7 +30,7 @@ #include "nsIObserverService.h" #include "nsIPrefService.h" -#if defined(XP_WIN) +#ifdef XP_WIN #include <windows.h> #else #include <unistd.h> @@ -385,7 +385,11 @@ nsTerminator::StartWatchdog() } UniquePtr<Options> options(new Options()); +#ifdef XP_SOLARIS const PRIntervalTime ticksDuration = PR_MillisecondsToInterval(1000); +#else + const PRIntervalTime ticksDuration = 1000; +#endif options->crashAfterTicks = crashAfterMS / ticksDuration; DebugOnly<PRThread*> watchdogThread = CreateSystemThread(RunWatchdog, diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index 06470f966..5c889c18f 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -278,6 +278,18 @@ var snapshotFormatters = { ? data.windowLayerManagerType : "BasicLayers (" + strings.GetStringFromName("mainThreadNoOMTC") + ")"; addRow("features", "compositing", compositor); + + let acceleratedWindows = data.numAcceleratedWindows + "/" + data.numTotalWindows; + if (data.windowLayerManagerType) { + acceleratedWindows += " " + data.windowLayerManagerType; + } + if (data.windowLayerManagerRemote) { + acceleratedWindows += " (OMTC)"; + } + if (data.numAcceleratedWindowsMessage) { + acceleratedWindows += " " + localizedMsg(data.numAcceleratedWindowsMessage); + } + addRow("features", "acceleratedWindows", acceleratedWindows); delete data.windowLayerManagerRemote; delete data.windowLayerManagerType; delete data.numTotalWindows; diff --git a/toolkit/content/gmp-sources/eme-adobe.json b/toolkit/content/gmp-sources/eme-adobe.json deleted file mode 100644 index 3bd808be8..000000000 --- a/toolkit/content/gmp-sources/eme-adobe.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "vendors": { - "gmp-eme-adobe": { - "platforms": { - "WINNT_x86-msvc-x64": { - "alias": "WINNT_x86-msvc" - }, - "WINNT_x86-msvc": { - "fileUrl": "https://cdmdownload.adobe.com/firefox/win/x86/primetime_gmp_win_x86_gmc_40673.zip", - "hashValue": "8aad35fc13814b0f1daacddb0d599eedd685287d5afddc97c2f740c8aea270636ccd75b1d1a57364b84e8eb1b23c9f1c126c057d95f3d8217b331dc4b1d5340f", - "filesize": 3694349 - }, - "WINNT_x86_64-msvc-x64": { - "alias": "WINNT_x86_64-msvc" - }, - "WINNT_x86-msvc-x86": { - "alias": "WINNT_x86-msvc" - }, - "WINNT_x86_64-msvc": { - "fileUrl": "https://cdmdownload.adobe.com/firefox/win/x64/primetime_gmp_win_x64_gmc_40673.zip", - "hashValue": "bd1e1a370c5f9dadc247c9f00dd203fab1a75ff3afed8439a0a0bfcc7e1767d0da68497140cbe48daa70e2535dde5f220dd7b344619cecd830a6b685efb9d5a0", - "filesize": 4853103 - } - }, - "version": "17" - } - }, - "hashFunction": "sha512", - "name": "CDM-17", - "schema_version": 1000 -} diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn index 5bf6440be..5a940679b 100644 --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -127,6 +127,5 @@ toolkit.jar: content/global/macWindowMenu.js #endif content/global/svg/svgBindings.xml (/layout/svg/resources/content/svgBindings.xml) - content/global/gmp-sources/eme-adobe.json (gmp-sources/eme-adobe.json) content/global/gmp-sources/openh264.json (gmp-sources/openh264.json) content/global/gmp-sources/widevinecdm.json (gmp-sources/widevinecdm.json) diff --git a/toolkit/fonts/README.txt b/toolkit/fonts/README.txt new file mode 100644 index 000000000..bf5cb7e6e --- /dev/null +++ b/toolkit/fonts/README.txt @@ -0,0 +1,9 @@ +Twemoji Mozilla +================ + +The upstream repository of Twemoji Mozilla can be found at + + https://github.com/mozilla/twemoji-colr + +Please refer commit history for the current version of the font. +This file purposely omits the version, so there is no need to update it here. diff --git a/toolkit/fonts/TwemojiMozilla.ttf b/toolkit/fonts/TwemojiMozilla.ttf Binary files differnew file mode 100644 index 000000000..d79250cb0 --- /dev/null +++ b/toolkit/fonts/TwemojiMozilla.ttf diff --git a/toolkit/fonts/moz.build b/toolkit/fonts/moz.build new file mode 100644 index 000000000..fb6a9b24c --- /dev/null +++ b/toolkit/fonts/moz.build @@ -0,0 +1,8 @@ +# -*- Mode: python; c-basic-offset: 4; 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/. + +if CONFIG['OS_ARCH'] in ('WINNT', 'Linux'): + FINAL_TARGET_FILES.fonts += ['TwemojiMozilla.ttf'] diff --git a/toolkit/library/StaticXULComponentsEnd/StaticXULComponentsEnd.cpp b/toolkit/library/StaticXULComponentsEnd/StaticXULComponentsEnd.cpp index 28fd9d484..8b5b1f4cb 100644 --- a/toolkit/library/StaticXULComponentsEnd/StaticXULComponentsEnd.cpp +++ b/toolkit/library/StaticXULComponentsEnd/StaticXULComponentsEnd.cpp @@ -10,4 +10,7 @@ # undef NSMODULE_SECTION # define NSMODULE_SECTION __declspec(allocate(".kPStaticModules$Z"), dllexport) #endif -NSMODULE_DEFN(end_kPStaticModules) = nullptr; +/* This could be null, but this needs a dummy value to ensure it actually ends + * up in the same section as other NSMODULE_DEFNs, instead of being moved to a + * separate readonly section. */ +NSMODULE_DEFN(end_kPStaticModules) = (mozilla::Module*)&NSMODULE_NAME(end_kPStaticModules); diff --git a/toolkit/library/StaticXULComponentsStart.cpp b/toolkit/library/StaticXULComponentsStart.cpp index 1738aa810..d2e9a8828 100644 --- a/toolkit/library/StaticXULComponentsStart.cpp +++ b/toolkit/library/StaticXULComponentsStart.cpp @@ -1,3 +1,6 @@ #include "mozilla/Module.h" -NSMODULE_DEFN(start_kPStaticModules) = nullptr; +/* This could be null, but this needs a dummy value to ensure it actually ends + * up in the same section as other NSMODULE_DEFNs, instead of being moved to a + * separate readonly section. */ +NSMODULE_DEFN(start_kPStaticModules) = (mozilla::Module*)&NSMODULE_NAME(start_kPStaticModules); diff --git a/toolkit/library/libxul.mk b/toolkit/library/libxul.mk index 9e7e8beee..80f934e60 100644 --- a/toolkit/library/libxul.mk +++ b/toolkit/library/libxul.mk @@ -16,10 +16,10 @@ EXTRA_DEPS += symverscript endif endif -# Generate GDB pretty printer-autoload files only on Linux. OSX's GDB is +# Generate GDB pretty printer-autoload files on Linux and Solaris. OSX's GDB is # too old to support Python pretty-printers; if this changes, we could make # this 'ifdef GNU_CC'. -ifeq (Linux,$(OS_ARCH)) +ifeq (,$(filter-out SunOS Linux,$(OS_ARCH))) # Create a GDB Python auto-load file alongside the libxul shared library in # the build directory. PP_TARGETS += LIBXUL_AUTOLOAD @@ -27,6 +27,10 @@ LIBXUL_AUTOLOAD = $(topsrcdir)/toolkit/library/libxul.so-gdb.py.in LIBXUL_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(topsrcdir)) endif +ifeq ($(OS_ARCH),SunOS) +OS_LDFLAGS += -Wl,-z,defs +endif + # BFD ld doesn't create multiple PT_LOADs as usual when an unknown section # exists. Using an implicit linker script to make it fold that section in # .data.rel.ro makes it create multiple PT_LOADs. That implicit linker @@ -50,6 +54,6 @@ endif LOCAL_CHECKS = test "$$($(get_first_and_last) | xargs echo)" != "start_kPStaticModules_NSModule end_kPStaticModules_NSModule" && echo "NSModules are not ordered appropriately" && exit 1 || exit 0 -ifeq (Linux,$(OS_ARCH)) +ifeq (,$(filter-out SunOS Linux,$(OS_ARCH))) LOCAL_CHECKS += ; test "$$($(TOOLCHAIN_PREFIX)readelf -l $1 | awk '$1 == "LOAD" { t += 1 } END { print t }')" -le 1 && echo "Only one PT_LOAD segment" && exit 1 || exit 0 endif diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build index ba7fb5032..ebba07b4a 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build @@ -24,12 +24,7 @@ def Libxul(name): DELAYLOAD_DLLS += [ 'comdlg32.dll', - 'dbghelp.dll', 'netapi32.dll', - 'PowrProf.dll', - 'psapi.dll', - 'rasapi32.dll', - 'rasdlg.dll', 'secur32.dll', 'wininet.dll', 'winspool.drv' @@ -63,11 +58,6 @@ def Libxul(name): if CONFIG['MOZ_NEEDS_LIBATOMIC']: OS_LIBS += ['atomic'] - # This option should go away in bug 1290972, but we need to wait until - # Rust 1.12 has been released. - if CONFIG['MOZ_RUST'] and CONFIG['OS_ARCH'] == 'Darwin': - LDFLAGS += ['-Wl,-no_compact_unwind'] - Libxul('xul') SDK_LIBRARY = True @@ -241,7 +231,7 @@ OS_LIBS += CONFIG['ICONV_LIBS'] if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'): OS_LIBS += CONFIG['TK_LIBS'] -if CONFIG['OS_ARCH'] == 'OpenBSD': +if CONFIG['MOZ_SNDIO']: OS_LIBS += [ 'sndio', ] @@ -270,6 +260,13 @@ if CONFIG['MOZ_ENABLE_STARTUP_NOTIFICATION']: if CONFIG['MOZ_ENABLE_LIBPROXY']: OS_LIBS += CONFIG['MOZ_LIBPROXY_LIBS'] +if CONFIG['OS_ARCH'] == 'SunOS': + OS_LIBS += [ + 'elf', + 'demangle', + 'sendfile', + ] + if CONFIG['OS_ARCH'] == 'FreeBSD': OS_LIBS += [ 'util', diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.properties b/toolkit/locales/en-US/chrome/global/aboutSupport.properties index be9ce5f33..e780bfb67 100644 --- a/toolkit/locales/en-US/chrome/global/aboutSupport.properties +++ b/toolkit/locales/en-US/chrome/global/aboutSupport.properties @@ -27,6 +27,12 @@ crashesTimeDays=#1 day ago;#1 days ago # #1 number of pending crash reports pendingReports=All Crash Reports (including #1 pending crash in the given time range);All Crash Reports (including #1 pending crashes in the given time range) +# LOCALIZATION NOTE: This can be localized with a more generic term, like +# "Graphics-accelerated Windows". It describes a number of windows, e.g.: +# "GPU Accelerated Windows: 2/2 (Direct3D 9)" +# "GPU Accelerated Windows: 0/2" +acceleratedWindows = GPU Accelerated Windows + # LOCALIZATION NOTE (rawDataCopied) Text displayed in a mobile "Toast" to user when the # raw data is successfully copied to the clipboard via button press. rawDataCopied=Raw data copied to clipboard diff --git a/toolkit/moz.build b/toolkit/moz.build index 397444828..b02d122cd 100644 --- a/toolkit/moz.build +++ b/toolkit/moz.build @@ -19,6 +19,9 @@ DIRS += [ 'themes', ] +if CONFIG['MOZ_BUNDLED_FONTS']: + DIRS += ['fonts'] + if CONFIG['MOZ_JETPACK']: DIRS += ['jetpack'] diff --git a/toolkit/mozapps/extensions/GMPUtils.jsm b/toolkit/mozapps/extensions/GMPUtils.jsm index a199b4d86..814ae4914 100644 --- a/toolkit/mozapps/extensions/GMPUtils.jsm +++ b/toolkit/mozapps/extensions/GMPUtils.jsm @@ -7,8 +7,7 @@ const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu, manager: Cm} = Components; -this.EXPORTED_SYMBOLS = [ "EME_ADOBE_ID", - "GMP_PLUGIN_IDS", +this.EXPORTED_SYMBOLS = [ "GMP_PLUGIN_IDS", "GMPPrefs", "GMPUtils", "OPEN_H264_ID", @@ -20,9 +19,8 @@ Cu.import("resource://gre/modules/AppConstants.jsm"); // GMP IDs const OPEN_H264_ID = "gmp-gmpopenh264"; -const EME_ADOBE_ID = "gmp-eme-adobe"; const WIDEVINE_ID = "gmp-widevinecdm"; -const GMP_PLUGIN_IDS = [ OPEN_H264_ID, EME_ADOBE_ID, WIDEVINE_ID ]; +const GMP_PLUGIN_IDS = [ OPEN_H264_ID, WIDEVINE_ID ]; var GMPPluginUnsupportedReason = { NOT_WINDOWS: 1, @@ -72,10 +70,7 @@ this.GMPUtils = { if (this._isPluginForceSupported(aPlugin)) { return true; } - if (aPlugin.id == EME_ADOBE_ID) { - // Windows Vista and later only supported by Adobe EME. - return AppConstants.isPlatformAndVersionAtLeast("win", "6"); - } else if (aPlugin.id == WIDEVINE_ID) { + if (aPlugin.id == WIDEVINE_ID) { // The Widevine plugin is available for Windows versions Vista and later, // Mac OSX, and Linux. return AppConstants.isPlatformAndVersionAtLeast("win", "6") || diff --git a/toolkit/mozapps/extensions/internal/GMPProvider.jsm b/toolkit/mozapps/extensions/internal/GMPProvider.jsm index 131db7249..2ebde08bb 100644 --- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm +++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm @@ -49,22 +49,11 @@ const GMP_PLUGINS = [ homepageURL: "http://www.openh264.org/", optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul" }, -/* - { - id: EME_ADOBE_ID, - name: "eme-adobe_name", - description: "eme-adobe_description", - licenseURL: "http://help.adobe.com/en_US/primetime/drm/HTML5_CDM_EULA/index.html", - homepageURL: "http://help.adobe.com/en_US/primetime/drm/HTML5_CDM", - optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul", - isEME: true - }, -*/ { id: WIDEVINE_ID, - name: "widevine_description", + name: "widevine_name", // Describe the purpose of both CDMs in the same way. - description: "eme-adobe_description", + description: "widevine_description2", licenseURL: "https://www.google.com/policies/privacy/", homepageURL: "https://www.widevine.com/", optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul", diff --git a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm index f98dd2a94..c6324da0a 100644 --- a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm +++ b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm @@ -7,9 +7,6 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components; const LOCAL_EME_SOURCES = [{ - "id": "gmp-eme-adobe", - "src": "chrome://global/content/gmp-sources/eme-adobe.json" -}, { "id": "gmp-gmpopenh264", "src": "chrome://global/content/gmp-sources/openh264.json" }, { diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 99a121da4..600ec2ff5 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -220,6 +220,7 @@ const COMPATIBLE_BY_DEFAULT_TYPES = { }; const MSG_JAR_FLUSH = "AddonJarFlush"; +const MSG_MESSAGE_MANAGER_CACHES_FLUSH = "AddonMessageManagerCachesFlush"; var gGlobalScope = this; @@ -1199,13 +1200,16 @@ function buildJarURI(aJarfile, aPath) { */ function flushJarCache(aJarFile) { Services.obs.notifyObservers(aJarFile, "flush-cache-entry", null); - Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageBroadcaster) - .broadcastAsyncMessage(MSG_JAR_FLUSH, aJarFile.path); + Services.mm.broadcastAsyncMessage(MSG_JAR_FLUSH, aJarFile.path); } -function flushStartupCache() { +function flushChromeCaches() { // Init this, so it will get the notification. Services.obs.notifyObservers(null, "startupcache-invalidate", null); + // Flush message manager cached scripts + Services.obs.notifyObservers(null, "message-manager-flush-caches", null); + // Also dispatch this event to child processes + Services.mm.broadcastAsyncMessage(MSG_MESSAGE_MANAGER_CACHES_FLUSH, null); } /** @@ -2129,7 +2133,7 @@ this.XPIProvider = { } if (flushCaches) { - flushStartupCache(); + Services.obs.notifyObservers(null, "startupcache-invalidate", null); // UI displayed early in startup (like the compatibility UI) may have // caused us to cache parts of the skin or locale in memory. These must // be flushed to allow extension provided skins and locales to take full @@ -2665,7 +2669,7 @@ this.XPIProvider = { existingAddon, "uninstall", uninstallReason, { newVersion: newVersion }); this.unloadBootstrapScope(existingAddonID); - flushStartupCache(); + flushChromeCaches(); } } catch (e) { @@ -2939,7 +2943,7 @@ this.XPIProvider = { // If the new add-on is bootstrapped and active then call its install method if (newDBAddon.active && newDBAddon.bootstrap) { // Startup cache must be flushed before calling the bootstrap script - flushStartupCache(); + flushChromeCaches(); let installReason = Services.vc.compare(aOldAddon.version, newDBAddon.version) < 0 ? BOOTSTRAP_REASONS.ADDON_UPGRADE : @@ -3344,7 +3348,7 @@ this.XPIProvider = { // If the new add-on is bootstrapped then we must flush the caches // before calling the new bootstrap script if (newDBAddon.bootstrap) - flushStartupCache(); + flushChromeCaches(); } if (!newDBAddon.bootstrap) @@ -4746,7 +4750,7 @@ this.XPIProvider = { this.callBootstrapMethod(aAddon, file, "uninstall", BOOTSTRAP_REASONS.ADDON_UNINSTALL); this.unloadBootstrapScope(aAddon.id); - flushStartupCache(); + flushChromeCaches(); } aAddon._installLocation.uninstallAddon(aAddon.id); XPIDatabase.removeAddonMetadata(aAddon); @@ -5876,7 +5880,7 @@ AddonInstall.prototype = { "uninstall", reason, { newVersion: this.addon.version }); XPIProvider.unloadBootstrapScope(this.existingAddon.id); - flushStartupCache(); + flushChromeCaches(); } if (!isUpgrade && this.existingAddon.active) { diff --git a/toolkit/mozapps/installer/packager-uxp.mk b/toolkit/mozapps/installer/packager-uxp.mk new file mode 100644 index 000000000..3125c04f1 --- /dev/null +++ b/toolkit/mozapps/installer/packager-uxp.mk @@ -0,0 +1,27 @@ +# 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/. + +# We need to include the mozilla packaging routines because we are +# very much still dependent on them +include $(MOZILLA_DIR)/toolkit/mozapps/installer/packager.mk + +# This is currently only used on Windows, Linux, and Solaris +# on other platforms such as Mac will fall back to the orginal +# mozilla packaging +make-archive: +ifeq (,$(filter SunOS Linux WINNT,$(OS_ARCH))) + $(MAKE) make-package +else + $(MAKE) stage-package make-buildinfo-file + @echo 'Compressing...' +ifeq (WINNT,$(OS_ARCH)) + cd $(DIST); $(CYGWIN_WRAPPER) 7z a -t7z -m0=lzma2 -mx=9 -aoa -bb3 $(PKG_BASENAME).7z $(MOZ_PKG_DIR) +else + # Other platforms such as Linux need the Package routine to spawn a pre-complete file + # Windows does not require this because it is dependent on generating the NSIS + # Installer which has its own call to generate the precomplete file + cd $(DIST)/$(MOZ_PKG_DIR); $(CREATE_PRECOMPLETE_CMD) + cd $(DIST); XZ_OPT=-9e $(TAR) cfJv $(PKG_BASENAME).tar.xz $(MOZ_PKG_DIR) +endif +endif diff --git a/toolkit/mozapps/installer/windows/nsis/common.nsh b/toolkit/mozapps/installer/windows/nsis/common.nsh index 36e228797..57a25df9d 100755 --- a/toolkit/mozapps/installer/windows/nsis/common.nsh +++ b/toolkit/mozapps/installer/windows/nsis/common.nsh @@ -5577,21 +5577,6 @@ StrCpy $INSTDIR "$R9" !endif - ; If the user doesn't have write access to the installation directory set - ; the installation directory to a subdirectory of the All Users application - ; directory and if the user can't write to that location set the installation - ; directory to a subdirectory of the users local application directory - ; (e.g. non-roaming). - ${CanWriteToInstallDir} $R9 - StrCmp "$R9" "false" +1 finish_check_install_dir - - SetShellVarContext all ; Set SHCTX to All Users - StrCpy $INSTDIR "$APPDATA\${BrandFullName}\" - ${CanWriteToInstallDir} $R9 - StrCmp "$R9" "false" +2 +1 - StrCpy $INSTDIR "$LOCALAPPDATA\${BrandFullName}\" - - finish_check_install_dir: IfFileExists "$INSTDIR" +3 +1 Pop $R9 Return diff --git a/toolkit/mozapps/update/common/updatedefines.h b/toolkit/mozapps/update/common/updatedefines.h index 5790cf996..871755246 100644 --- a/toolkit/mozapps/update/common/updatedefines.h +++ b/toolkit/mozapps/update/common/updatedefines.h @@ -96,7 +96,11 @@ static inline int mywcsprintf(WCHAR* dest, size_t count, const WCHAR* fmt, ...) # include <sys/wait.h> # include <unistd.h> +#ifdef XP_SOLARIS +# include <sys/stat.h> +#else # include <fts.h> +#endif # include <dirent.h> #ifdef XP_MACOSX diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp index 8025deaaf..f5f71935d 100644 --- a/toolkit/mozapps/update/updater/updater.cpp +++ b/toolkit/mozapps/update/updater/updater.cpp @@ -3648,6 +3648,88 @@ int add_dir_entries(const NS_tchar *dirpath, ActionList *list) return rv; } +#elif defined(XP_SOLARIS) +int add_dir_entries(const NS_tchar *dirpath, ActionList *list) +{ + int rv = OK; + NS_tchar foundpath[MAXPATHLEN]; + struct { + dirent dent_buffer; + char chars[MAXNAMLEN]; + } ent_buf; + struct dirent* ent; + mozilla::UniquePtr<NS_tchar[]> searchpath(get_full_path(dirpath)); + + DIR* dir = opendir(searchpath.get()); + if (!dir) { + LOG(("add_dir_entries error on opendir: " LOG_S ", err: %d", searchpath.get(), + errno)); + return UNEXPECTED_FILE_OPERATION_ERROR; + } + + while (readdir_r(dir, (dirent *)&ent_buf, &ent) == 0 && ent) { + if ((strcmp(ent->d_name, ".") == 0) || + (strcmp(ent->d_name, "..") == 0)) + continue; + + NS_tsnprintf(foundpath, sizeof(foundpath)/sizeof(foundpath[0]), + NS_T("%s%s"), searchpath.get(), ent->d_name); + struct stat64 st_buf; + int test = stat64(foundpath, &st_buf); + if (test) { + closedir(dir); + return UNEXPECTED_FILE_OPERATION_ERROR; + } + if (S_ISDIR(st_buf.st_mode)) { + NS_tsnprintf(foundpath, sizeof(foundpath)/sizeof(foundpath[0]), + NS_T("%s/"), foundpath); + // Recurse into the directory. + rv = add_dir_entries(foundpath, list); + if (rv) { + LOG(("add_dir_entries error: " LOG_S ", err: %d", foundpath, rv)); + closedir(dir); + return rv; + } + } else { + // Add the file to be removed to the ActionList. + NS_tchar *quotedpath = get_quoted_path(get_relative_path(foundpath)); + if (!quotedpath) { + closedir(dir); + return PARSE_ERROR; + } + + Action *action = new RemoveFile(); + rv = action->Parse(quotedpath); + if (rv) { + LOG(("add_dir_entries Parse error on recurse: " LOG_S ", err: %d", + quotedpath, rv)); + closedir(dir); + return rv; + } + + list->Append(action); + } + } + closedir(dir); + + // Add the directory to be removed to the ActionList. + NS_tchar *quotedpath = get_quoted_path(get_relative_path(dirpath)); + if (!quotedpath) + return PARSE_ERROR; + + Action *action = new RemoveDir(); + rv = action->Parse(quotedpath); + if (rv) { + LOG(("add_dir_entries Parse error on close: " LOG_S ", err: %d", + quotedpath, rv)); + } + else { + list->Append(action); + } + + return rv; +} + #else int add_dir_entries(const NS_tchar *dirpath, ActionList *list) diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild index da4e7cd85..6a745e51e 100644 --- a/toolkit/toolkit.mozbuild +++ b/toolkit/toolkit.mozbuild @@ -4,6 +4,13 @@ # 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/. +if CONFIG['MOZ_MAILNEWS']: + DIRS += [ + '/ldap', + '/db/mork', + '/mailnews', + ] + DIRS += [ # Depends on NSS and NSPR '/security/certverifier', diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp index 454882c1b..660af4522 100644 --- a/toolkit/xre/nsSigHandlers.cpp +++ b/toolkit/xre/nsSigHandlers.cpp @@ -32,6 +32,11 @@ #endif #endif +#ifdef XP_SOLARIS +#include <sys/resource.h> +#include <ucontext.h> +#endif + static const char* gProgname = "huh?"; // Note: some tests manipulate this value. @@ -193,6 +198,32 @@ static void fpehandler(int signum, siginfo_t *si, void *context) *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */ #endif #endif +#ifdef XP_SOLARIS + ucontext_t *uc = (ucontext_t *)context; + +#if defined(__i386) + uint32_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[0]; + *cw |= FPU_EXCEPTION_MASK; + + uint32_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[1]; + *sw &= ~FPU_STATUS_FLAGS; + + /* address of the instruction that caused the exception */ + uint32_t *ip = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[3]; + uc->uc_mcontext.gregs[REG_PC] = *ip; +#endif +#if defined(__amd64__) + uint16_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.cw; + *cw |= FPU_EXCEPTION_MASK; + + uint16_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.sw; + *sw &= ~FPU_STATUS_FLAGS; + + uint32_t *mxcsr = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr; + *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */ + *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */ +#endif +#endif } #endif @@ -255,6 +286,31 @@ void InstallSignalHandlers(const char *aProgname) } #endif +#ifdef XP_SOLARIS +#define NOFILES 512 + + // Boost Solaris file descriptors + { + struct rlimit rl; + + if (getrlimit(RLIMIT_NOFILE, &rl) == 0) + + if (rl.rlim_cur < NOFILES) { + rl.rlim_cur = NOFILES; + + if (setrlimit(RLIMIT_NOFILE, &rl) < 0) { + perror("setrlimit(RLIMIT_NOFILE)"); + fprintf(stderr, "Cannot exceed hard limit for open files"); + } +#if defined(DEBUG) + if (getrlimit(RLIMIT_NOFILE, &rl) == 0) + printf("File descriptors set to %d\n", rl.rlim_cur); +#endif //DEBUG + } + } +#endif //XP_SOLARIS + + #if defined(MOZ_WIDGET_GTK) && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6)) const char *assertString = PR_GetEnv("XPCOM_DEBUG_BREAK"); if (assertString && |