summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/mozapps')
-rw-r--r--toolkit/mozapps/extensions/GMPUtils.jsm11
-rw-r--r--toolkit/mozapps/extensions/internal/GMPProvider.jsm15
-rw-r--r--toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm3
-rw-r--r--toolkit/mozapps/extensions/internal/XPIProvider.jsm22
-rw-r--r--toolkit/mozapps/installer/packager-uxp.mk27
-rwxr-xr-xtoolkit/mozapps/installer/windows/nsis/common.nsh15
-rw-r--r--toolkit/mozapps/update/common/updatedefines.h4
-rw-r--r--toolkit/mozapps/update/updater/updater.cpp82
8 files changed, 131 insertions, 48 deletions
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)