[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
Fri Feb 10 19:27:09 PST 2017


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

Saam Barati <sbarati at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #301177|review?                     |review-
              Flags|                            |

--- Comment #43 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 301177
  --> https://bugs.webkit.org/attachment.cgi?id=301177
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=301177&action=review

I think your code may be wrong for `with` scope.
Consider this example:

```
function foo() {
    let o = {f: 20};
    with (o) {
        eval("{ function f(){} }");
    }
    assert(o.f === 20);
}
foo()
```

I think your code will fail the assertion. Please let me know if I'm wrong and misreading your code.
I'm pretty sure the spec says that we should not bind to `f` unless `f` is a var, and in this case, it's
not a var.

> Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:832
> +    bool result = true;

I think this should start as false.

-- 
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/20170211/ff1b5807/attachment.html>


More information about the webkit-unassigned mailing list