https://bugzilla.wikimedia.org/show_bug.cgi?id=53241

C. Scott Ananian <canan...@wikimedia.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |canan...@wikimedia.org

--- Comment #5 from C. Scott Ananian <canan...@wikimedia.org> ---
The standard thunk is something like:

function Map() { this.store = Object.create(null); }
Map.prototype.get = function( k ) { return this.store['$'+k]; }
Map.prototype.set = function( k, v ) { this.store['$'+k] = v; }

...but we should be a little careful not to go overboard here.  In many cases
we know that '__proto__' cannot be a possible key.  In other case we are doing
queries only (for example, to determine whether a tag name is a member of a
specific set), and Object.create(null).__proto__===null, so that's perfectly
safe as well.

So, sure we should use safer maps where needed, but it probably doesn't have to
be a hugely-invasive patch set.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to