Private symbols auto-unwrapping proxies (was: Security Demands Simplicity (was: Private Slots))

Tom Van Cutsem tomvc.be at gmail.com
Wed Jan 23 00:41:15 PST 2013


2013/1/23 Tom Van Cutsem <tomvc.be at gmail.com>

> Looking back at the code for an identity-preserving membrane <
> http://wiki.ecmascript.org/doku.php?id=harmony:proxies#an_identity-preserving_membrane>
> I think this membrane actually properly unwraps the |this| value before
> forwarding.
>

The relevant line of code here is (starting at line 30):

const callTrap(...dryArgs) {
  return asDry(wet.apply(asWet(this), dryArgs.map(asWet)));
}

Note the "asWet(this)" conversion.

(there's similar code a couple of lines below that for the reverse
direction)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130123/1278f3cb/attachment.html>


More information about the es-discuss mailing list