Index: lib/elemHide.js |
=================================================================== |
--- a/lib/elemHide.js |
+++ b/lib/elemHide.js |
@@ -28,35 +28,35 @@ let {ElemHideException} = require("filte |
let {FilterNotifier} = require("filterNotifier"); |
let {AboutHandler} = require("elemHideHitRegistration"); |
let {TimeLine} = require("timeline"); |
/** |
* Lookup table, filters by their associated key |
* @type Object |
*/ |
-let filterByKey = {__proto__: null}; |
+let filterByKey = Object.create(null); |
/** |
* Lookup table, keys of the filters by filter text |
* @type Object |
*/ |
-let keyByFilter = {__proto__: null}; |
+let keyByFilter = Object.create(null); |
/** |
* Lookup table, keys are known element hiding exceptions |
* @type Object |
*/ |
-let knownExceptions = {__proto__: null}; |
+let knownExceptions = Object.create(null); |
/** |
* Lookup table, lists of element hiding exceptions by selector |
* @type Object |
*/ |
-let exceptions = {__proto__: null}; |
+let exceptions = Object.create(null); |
/** |
* Currently applied stylesheet URL |
* @type nsIURI |
*/ |
let styleURL = null; |
/** |
@@ -103,20 +103,20 @@ let ElemHide = exports.ElemHide = |
TimeLine.leave("ElemHide.init() done"); |
}, |
/** |
* Removes all known filters |
*/ |
clear: function() |
{ |
- filterByKey = {__proto__: null}; |
- keyByFilter = {__proto__: null}; |
- knownExceptions = {__proto__: null}; |
- exceptions = {__proto__: null}; |
+ filterByKey = Object.create(null); |
+ keyByFilter = Object.create(null); |
+ knownExceptions = Object.create(null); |
+ exceptions = Object.create(null); |
ElemHide.isDirty = false; |
ElemHide.unapply(); |
}, |
/** |
* Add a new element hiding filter |
* @param {ElemHideFilter} filter |
*/ |
@@ -300,29 +300,29 @@ let ElemHide = exports.ElemHide = |
TimeLine.leave("ElemHide.apply() done", "ElemHideWrite"); |
}, |
_generateCSSContent: function() |
{ |
// Grouping selectors by domains |
TimeLine.log("start grouping selectors"); |
- let domains = {__proto__: null}; |
+ let domains = Object.create(null); |
let hasFilters = false; |
for (let key in filterByKey) |
{ |
let filter = filterByKey[key]; |
let domain = filter.selectorDomain || ""; |
let list; |
if (domain in domains) |
list = domains[domain]; |
else |
{ |
- list = {__proto__: null}; |
+ list = Object.create(null); |
domains[domain] = list; |
} |
list[filter.selector] = key; |
hasFilters = true; |
} |
TimeLine.log("done grouping selectors"); |
if (!hasFilters) |