[Webkit-unassigned] [Bug 210317] New: The rhs in `ReadModifyResolveNode` should be evaluated before throwing an exception if the lhs is read-only

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 9 20:22:47 PDT 2020


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

            Bug ID: 210317
           Summary: The rhs in `ReadModifyResolveNode` should be evaluated
                    before throwing an exception if the lhs is read-only
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: drousso at apple.com

```
(function() {
    let count = 0;

    const x = 42;
    try {
        x += (() => ++count)();
    } catch { }

    if (count !== 1)
        throw new Error(`expected 1 but got ${count}`);
})();
```

See NOTE 2 on <https://tc39.es/proposal-logical-assignment/#sec-assignment-operators-runtime-semantics-evaluation>.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200410/068e05f6/attachment.htm>


More information about the webkit-unassigned mailing list