<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:caitp&#64;igalia.com" title="Caitlin Potter (:caitp) &lt;caitp&#64;igalia.com&gt;"> <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>
               &nbsp;
           </td>
           <td>caitp&#64;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&#64;igalia.com" title="Caitlin Potter (:caitp) &lt;caitp&#64;igalia.com&gt;"> <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">&gt; If you run this program in Chrome Canary, you can see V8's behavior here
&gt; w.r.t the specification. It looks like the eval does indeed perform `has` on
&gt; the thing inside the with scope.
&gt; 
&gt; ```
&gt; function foo() {
&gt;     let p2 = new Proxy({}, {
&gt;         has(t, p) {
&gt;             console.log(p)
&gt;             return Reflect.has(t, p);
&gt;         }
&gt;     });
&gt;     with (p2) {
&gt;         eval(&quot;Reflect.has(p2, 'bar'); { function baz() { };  }&quot;);
&gt;     }
&gt; }
&gt; foo();
&gt; ```
&gt; 
&gt; I'm not sure if V8 is correct here, but we should verify the correct
&gt; behavior and try to get that landed. V8 will have the following output:
&gt; 
&gt; ```
&gt; eval
&gt; Reflect
&gt; p2
&gt; bar
&gt; baz
&gt; ```</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>