Closed Bug 1673440 Opened 4 years ago Closed 4 years ago

Report actual illegal character

Categories

(Core :: JavaScript Engine, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Right now we just report "illegal character" in the tokenizer. We can improve this include the actual unicode code point. This also gives you an opportunity of some messing with you by including ZERO WIDTH SPACE.

> eval("var x =\u{200B}")
SyntaxError: illegal character U+200B
> eval("var x = @")
SyntaxError: illegal character U+0040
Assignee: nobody → evilpies
Blocks: jserror
Attachment #9183956 - Attachment description: Bug 1673440 - Update devtools evaluationResult test after illegal error message change → Bug 1673440 - Update devtools evaluationResult test after illegal character error message change
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/5a0e794b51bf
Report actual illegal character when parsing JS. r=arai
https://hg.mozilla.org/integration/autoland/rev/c4448be58fcb
Update devtools evaluationResult test after illegal character error message change r=nchevobbe

I didn't update a jsapi-test that checked the illegal character message.

Flags: needinfo?(evilpies)
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/e14ca19d32ba
Report actual illegal character when parsing JS. r=arai
https://hg.mozilla.org/integration/autoland/rev/5362c99dfe66
Update devtools evaluationResult test after illegal character error message change r=nchevobbe
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: