Open Bug 1321616 Opened 3 years ago Updated Last year
Calling Function constructor with single line comments in parameters part throws Syntax
Test case: --- Function("//", ""); Function("<!--", ""); --- Expected: No SyntaxError Actual: Throws SyntaxError
bug 1317400 should fix this issue, because the toString revision proposal adds a newline terminator at the end of the parameters list.
Depends on: 1317400
The two issues in comment #0 have been fixed, but `Function("-->", "")` still throws a SyntaxError (*). (*) Also reproducible in Chakra, JSC, V8.
You need to log in before you can comment on or make changes to this bug.