Backed out changeset 0210af232008 (bug 1425600) for xpcshell failures on test_pluginInfoURL.js
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Tue, 30 Jan 2018 05:34:58 +0200
changeset 748777 47bb6da4b0d1800b1496910660b1a2155350b155
parent 748776 0210af232008cb3f2be29900792d02d88b0dcbf6
child 748778 ced1881a5daa06c9a001619c4e818b86320d4caa
push id97228
push usersfraser@mozilla.com
push dateTue, 30 Jan 2018 10:21:04 +0000
bugs1425600
milestone60.0a1
backs out0210af232008cb3f2be29900792d02d88b0dcbf6
Backed out changeset 0210af232008 (bug 1425600) for xpcshell failures on test_pluginInfoURL.js
toolkit/mozapps/extensions/nsBlocklistService.js
--- a/toolkit/mozapps/extensions/nsBlocklistService.js
+++ b/toolkit/mozapps/extensions/nsBlocklistService.js
@@ -1106,39 +1106,32 @@ Blocklist.prototype = {
     if (!appVersion && !gApp.version)
       return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
 
     if (!appVersion)
       appVersion = gApp.version;
     if (!toolkitVersion)
       toolkitVersion = gApp.platformVersion;
 
-    const pluginProperties = {
-      description: plugin.description,
-      filename: plugin.filename,
-      name: plugin.name,
-    };
-    const pluginVersion = plugin.version;
-
     for (var blockEntry of pluginEntries) {
       var matchFailed = false;
       for (var name in blockEntry.matches) {
-        let pluginProperty = pluginProperties[name];
-        if (typeof(pluginProperty) !== "string" ||
-            !blockEntry.matches[name].test(pluginProperty)) {
+        if (!(name in plugin) ||
+            typeof(plugin[name]) != "string" ||
+            !blockEntry.matches[name].test(plugin[name])) {
           matchFailed = true;
           break;
         }
       }
 
       if (matchFailed)
         continue;
 
       for (let blockEntryVersion of blockEntry.versions) {
-        if (blockEntryVersion.includesItem(pluginVersion, appVersion,
+        if (blockEntryVersion.includesItem(plugin.version, appVersion,
                                            toolkitVersion)) {
           return {entry: blockEntry, version: blockEntryVersion};
         }
       }
     }
 
     return null;
   },