Improving Function.prototype.bind

Mark S. Miller erights at
Fri Jan 6 11:35:42 PST 2012

On Fri, Jan 6, 2012 at 10:02 AM, Andrea Giammarchi <
andrea.giammarchi at> wrote:

>  1. everyone can WeakMap = function () {}; anywhere
>> Again, no they can't because all whitelisted global variables are
>> unassignable.
> it's a var WeakMap in the global scope ... still talking about your shim,
> probably I am missing some dependency?

It's easy to miss. "WeakMap" appears as a whitelisted global at

place all these whitelisted globals on the sharedImports object as
as redefine the property as non-writable non-configurable on the global

freeze sharedImports and all objects reachable from it by transitive
prototype and reflective property traversal.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list