Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterClasses.js

Issue 5636077285015552: Issue 656 - Replace some __proto__ with Object.create (Closed)
Patch Set: Created June 23, 2014, 8:46 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/elemHide.js ('k') | lib/filterStorage.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterClasses.js
===================================================================
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -63,17 +63,17 @@ Filter.prototype =
return this.text;
}
};
/**
* Cache for known filters, maps string representation to filter objects.
* @type Object
*/
-Filter.knownFilters = {__proto__: null};
+Filter.knownFilters = Object.create(null);
/**
* Regular expression that element hiding filters should match
* @type RegExp
*/
Filter.elemhideRegExp = /^([^\/\*\|\@"!]*?)#(\@)?(?:([\w\-]+|\*)((?:\([\w\-]+(?:[$^*]?=[^\(\)"]*)?\))*)|#([^{}]+))$/;
/**
* Regular expression that RegExp filters specified as RegExps should match
@@ -361,17 +361,17 @@ ActiveFilter.prototype =
}
else
{
include = true;
hasIncludes = true;
}
if (!domains)
- domains = {__proto__: null};
+ domains = Object.create(null);
domains[domain] = include;
}
domains[""] = !hasIncludes;
}
this.domainSource = null;
}
« no previous file with comments | « lib/elemHide.js ('k') | lib/filterStorage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld