[Webkit-unassigned] [Bug 163208] [ES6]. Implement Annex B.3.3 function hoisting rules for eval

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 4 13:25:35 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=163208

Caitlin Potter (:caitp) <caitp at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |caitp at igalia.com

--- Comment #63 from Caitlin Potter (:caitp) <caitp at igalia.com> ---
(In reply to Saam Barati from comment #46)
> 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
> ```

I believe this is correct, per https://tc39.github.io/ecma262/#sec-object-environment-records-hasbinding-n and https://tc39.github.io/ecma262/#sec-object-environment-records-getbindingvalue-n-s

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170404/ab954741/attachment.html>


More information about the webkit-unassigned mailing list