<html>
<head>
<base href="https://bugs.webkit.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:caitp@igalia.com" title="Caitlin Potter (:caitp) <caitp@igalia.com>"> <span class="fn">Caitlin Potter (:caitp)</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6]. Implement Annex B.3.3 function hoisting rules for eval"
href="https://bugs.webkit.org/show_bug.cgi?id=163208">bug 163208</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>caitp@igalia.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6]. Implement Annex B.3.3 function hoisting rules for eval"
href="https://bugs.webkit.org/show_bug.cgi?id=163208#c63">Comment # 63</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6]. Implement Annex B.3.3 function hoisting rules for eval"
href="https://bugs.webkit.org/show_bug.cgi?id=163208">bug 163208</a>
from <span class="vcard"><a class="email" href="mailto:caitp@igalia.com" title="Caitlin Potter (:caitp) <caitp@igalia.com>"> <span class="fn">Caitlin Potter (:caitp)</span></a>
</span></b>
<pre>(In reply to Saam Barati from <a href="show_bug.cgi?id=163208#c46">comment #46</a>)
<span class="quote">> If you run this program in Chrome Canary, you can see V8's behavior here
> w.r.t the specification. It looks like the eval does indeed perform `has` on
> the thing inside the with scope.
>
> ```
> function foo() {
> let p2 = new Proxy({}, {
> has(t, p) {
> console.log(p)
> return Reflect.has(t, p);
> }
> });
> with (p2) {
> eval("Reflect.has(p2, 'bar'); { function baz() { }; }");
> }
> }
> foo();
> ```
>
> I'm not sure if V8 is correct here, but we should verify the correct
> behavior and try to get that landed. V8 will have the following output:
>
> ```
> eval
> Reflect
> p2
> bar
> baz
> ```</span >
I believe this is correct, per <a href="https://tc39.github.io/ecma262/#sec-object-environment-records-hasbinding-n">https://tc39.github.io/ecma262/#sec-object-environment-records-hasbinding-n</a> and <a href="https://tc39.github.io/ecma262/#sec-object-environment-records-getbindingvalue-n-s">https://tc39.github.io/ecma262/#sec-object-environment-records-getbindingvalue-n-s</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>