[Webkit-unassigned] [Bug 177218] New: test262: test262/harness/assert-throws-early-referenceerror.js test failure

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 19 19:46:57 PDT 2017


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

            Bug ID: 177218
           Summary: test262:
                    test262/harness/assert-throws-early-referenceerror.js
                    test failure
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joepeck at webkit.org
                CC: joepeck at webkit.org, keith_miller at apple.com,
                    sbarati at apple.com, utatane.tea at gmail.com

test262: test262/harness/assert-throws-early-referenceerror.js test failure

This is used by only a few tests. These tests look for "Early Errors" that are ReferenceErrors, not SyntaxErrors. And they must be thrown early (approximately parse time not evaluation).

For example, each of these would throw a ReferenceError without even executing the function:

    Function("1=1;")
    Function("function f() { 1=1; }")

The only cases of Early Error ReferenceErrors:
https://tc39.github.io/ecma262/#sec-update-expressions-static-semantics-early-errors
https://tc39.github.io/ecma262/#sec-assignment-operators-static-semantics-early-errors

And `Function(...)` is a case where early errors are reported. See step 19:
https://tc39.github.io/ecma262/#sec-createdynamicfunction

> ...
> 17. Let body be the result of parsing bodyText, interpreted as UTF-16 encoded Unicode text as described in 6.1.4, using goal as the goal symbol. Throw a SyntaxError exception if the parse fails.
> 18. Let strict be ContainsUseStrict of body.
> 19. If any static semantics errors are detected for parameters or body, throw a SyntaxError or a ReferenceError exception, depending on the type of the error. If strict is true, the Early Error rules for UniqueFormalParameters:FormalParameters are applied. Parsing and early error detection may be interweaved in an implementation-dependent manner.
> ...

-- 
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/20170920/a01a9aba/attachment-0001.html>


More information about the webkit-unassigned mailing list