Open Bug 1321616 Opened 8 years ago Updated 2 years ago

Calling Function constructor with single line comments in parameters part throws SyntaxError

Categories

(Core :: JavaScript: Standard Library, defect, P5)

defect

Tracking

()

Tracking Status
firefox53 --- affected

People

(Reporter: anba, Unassigned)

References

(Blocks 1 open bug)

Details

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.
Priority: -- → P5
Blocks: test262
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.