Summary: | JavaScript parser violates ECMA automatic semicolon insertion rule | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kent Hansen <kent.hansen> | ||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | oliver | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Kent Hansen
2010-07-08 02:51:44 PDT
This isn't automatic semicolon insertion for the usual reasons eg. { if (0) } will fail to parse. The parse success is due to the lexer automatically inserting a semicolon to the end of a script if it has not seen a line terminator when it reaches the end. I'm no sure what the specific reason for it is. Created attachment 60976 [details]
Patch
Comment on attachment 60976 [details]
Patch
What’s the chance that some real world WebKit-only content depends on the broken behavior?
(In reply to comment #3) > (From update of attachment 60976 [details]) > What’s the chance that some real world WebKit-only content depends on the broken behavior? Fairly low -- no other browser does this, and it depends on having the incorrect code as the very last thing in the file (eg. no trailing new lines or other syntax) |