summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-04-20 10:56:49 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-04-20 10:56:49 -0500
commit9bf43033f3210dbd154cec9595847aae6ece0020 (patch)
tree63c63925d7a6cf2ccbab217183c68cf2d89e5593 /components
parent960b7eb6fea2a84a2c3f4a38c5b2c152002f2fb3 (diff)
downloadaura-central-9bf43033f3210dbd154cec9595847aae6ece0020.tar.gz
Revert "Issue %3015 - Part 3: Remove GMP code from addons, crash handler and tests."
This reverts commit 1699dbe78bf43eaa5ef4c593f075dfdc59c02b15.
Diffstat (limited to 'components')
-rw-r--r--components/addons/content/extensions.js19
-rw-r--r--components/addons/content/extensions.xml6
-rw-r--r--components/addons/locale/extensions.properties4
-rw-r--r--components/crashes/CrashManager.jsm3
-rw-r--r--components/crashes/CrashService.js3
-rw-r--r--components/crashes/nsICrashService.idl1
6 files changed, 34 insertions, 2 deletions
diff --git a/components/addons/content/extensions.js b/components/addons/content/extensions.js
index 11c853524..fe84bc460 100644
--- a/components/addons/content/extensions.js
+++ b/components/addons/content/extensions.js
@@ -1014,7 +1014,7 @@ var gViewController = {
cmd_showItemPreferences: {
isEnabled: function cmd_showItemPreferences_isEnabled(aAddon) {
if (!aAddon ||
- !aAddon.isActive ||
+ (!aAddon.isActive && !aAddon.isGMPlugin) ||
!aAddon.optionsURL) {
return false;
}
@@ -2753,7 +2753,15 @@ var gDetailView = {
var fullDesc = document.getElementById("detail-fulldesc");
if (aAddon.fullDescription) {
- fullDesc.textContent = aAddon.fullDescription;
+ // The following is part of an awful hack to include the licenses for GMP
+ // plugins without having bug 624602 fixed yet, and intentionally ignores
+ // localisation.
+ if (aAddon.isGMPlugin) {
+ fullDesc.innerHTML = aAddon.fullDescription;
+ } else {
+ fullDesc.textContent = aAddon.fullDescription;
+ }
+
fullDesc.hidden = false;
} else {
fullDesc.hidden = true;
@@ -3028,6 +3036,13 @@ var gDetailView = {
errorLink.value = gStrings.ext.GetStringFromName("details.notification.vulnerableNoUpdate.link");
errorLink.href = this._addon.blocklistURL;
errorLink.hidden = false;
+ } else if (this._addon.isGMPlugin && !this._addon.isInstalled &&
+ this._addon.isActive) {
+ this.node.setAttribute("notification", "warning");
+ let warning = document.getElementById("detail-warning");
+ warning.textContent =
+ gStrings.ext.formatStringFromName("details.notification.gmpPending",
+ [this._addon.name], 1);
} else {
this.node.removeAttribute("notification");
}
diff --git a/components/addons/content/extensions.xml b/components/addons/content/extensions.xml
index 9ea6a50df..f862b0f7e 100644
--- a/components/addons/content/extensions.xml
+++ b/components/addons/content/extensions.xml
@@ -1328,6 +1328,12 @@
this._errorLink.value = gStrings.ext.GetStringFromName("notification.vulnerableNoUpdate.link");
this._errorLink.href = this.mAddon.blocklistURL;
this._errorLink.hidden = false;
+ } else if (this.mAddon.isGMPlugin && !this.mAddon.isInstalled &&
+ this.mAddon.isActive) {
+ this.setAttribute("notification", "warning");
+ this._warning.textContent =
+ gStrings.ext.formatStringFromName("notification.gmpPending",
+ [this.mAddon.name], 1);
} else {
this.removeAttribute("notification");
}
diff --git a/components/addons/locale/extensions.properties b/components/addons/locale/extensions.properties
index 43ab02a47..c5de4f0c0 100644
--- a/components/addons/locale/extensions.properties
+++ b/components/addons/locale/extensions.properties
@@ -57,6 +57,8 @@ notification.downloadError.retry.tooltip=Try downloading this add-on again
notification.installError=There was an error installing %1$S.
notification.installError.retry=Try again
notification.installError.retry.tooltip=Try downloading and installing this add-on again
+#LOCALIZATION NOTE (notification.gmpPending) %1$S is the add-on name.
+notification.gmpPending=%1$S will be installed shortly.
#LOCALIZATION NOTE (contributionAmount2) %S is the currency amount recommended for contributions
contributionAmount2=Suggested Contribution: %S
@@ -98,6 +100,8 @@ details.notification.install=%1$S will be installed after you restart %2$S.
details.notification.uninstall=%1$S will be uninstalled after you restart %2$S.
#LOCALIZATION NOTE (details.notification.upgrade) %1$S is the add-on name, %2$S is brand name
details.notification.upgrade=%1$S will be updated after you restart %2$S.
+#LOCALIZATION NOTE (details.notification.gmpPending) %1$S is the add-on name
+details.notification.gmpPending=%1$S will be installed shortly.
installFromFile.dialogTitle=Select add-on to install
installFromFile.filterName=Add-ons
diff --git a/components/crashes/CrashManager.jsm b/components/crashes/CrashManager.jsm
index 199b9185a..537ab328d 100644
--- a/components/crashes/CrashManager.jsm
+++ b/components/crashes/CrashManager.jsm
@@ -128,6 +128,9 @@ this.CrashManager.prototype = Object.freeze({
// A crash in a plugin process.
PROCESS_TYPE_PLUGIN: "plugin",
+ // A crash in a Gecko media plugin process.
+ PROCESS_TYPE_GMPLUGIN: "gmplugin",
+
// A crash in the GPU process.
PROCESS_TYPE_GPU: "gpu",
diff --git a/components/crashes/CrashService.js b/components/crashes/CrashService.js
index ef955676c..56f8b69e7 100644
--- a/components/crashes/CrashService.js
+++ b/components/crashes/CrashService.js
@@ -34,6 +34,9 @@ CrashService.prototype = Object.freeze({
case Ci.nsICrashService.PROCESS_TYPE_PLUGIN:
processType = Services.crashmanager.PROCESS_TYPE_PLUGIN;
break;
+ case Ci.nsICrashService.PROCESS_TYPE_GMPLUGIN:
+ processType = Services.crashmanager.PROCESS_TYPE_GMPLUGIN;
+ break;
case Ci.nsICrashService.PROCESS_TYPE_GPU:
processType = Services.crashmanager.PROCESS_TYPE_GPU;
break;
diff --git a/components/crashes/nsICrashService.idl b/components/crashes/nsICrashService.idl
index d3ce8c19d..57a412804 100644
--- a/components/crashes/nsICrashService.idl
+++ b/components/crashes/nsICrashService.idl
@@ -22,6 +22,7 @@ interface nsICrashService : nsISupports
const long PROCESS_TYPE_MAIN = 0;
const long PROCESS_TYPE_CONTENT = 1;
const long PROCESS_TYPE_PLUGIN = 2;
+ const long PROCESS_TYPE_GMPLUGIN = 3;
const long PROCESS_TYPE_GPU = 4;
const long CRASH_TYPE_CRASH = 0;