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

Unified Diff: lib/filterClasses.js

Issue 29339071: Issue 3873 - Replace object literals using __proto__ with Object.create(null) (Closed)
Patch Set: Created March 24, 2016, 5:26 p.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 | « no previous file | test/filterClasses.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
@@ -383,7 +383,8 @@
if (list.length == 1 && list[0][0] != "~")
{
// Fast track for the common one-domain scenario
- domains = {__proto__: null, "": false};
+ domains = Object.create(null);
+ domains[""] = false;
if (this.ignoreTrailingDot)
list[0] = list[0].replace(/\.+$/, "");
domains[list[0]] = true;
« no previous file with comments | « no previous file | test/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld