Wrapping regex's with proxies isn't working

Claude Pache claude.pache at gmail.com
Thu Nov 10 16:34:22 UTC 2016


> Le 10 nov. 2016 à 15:50, Isiah Meadows <isiahmeadows at gmail.com> a écrit :
> 
> This could be resolved by checking the underlying non-proxy object and using that one's internal slots instead, in each language-level method that checks that.
> 

Such semantics could make impossible to write impermeable proxies for some objects, e.g.

```js
let s = new Set
let sProxy = new Proxy(s, { /* .... */ })
Set.prototype.add.call(sProxy, "foo") // will add "foo" to `s`, even if you were careful enough to intercept `sProxy.add("foo")`
Set.prototype.has.call(sProxy, "bar") // will reveal whether "bar" is in `s`
```

—Claude
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20161110/1b7a63d2/attachment-0001.html>


More information about the es-discuss mailing list