Bug 243596 - [JSC] The JSONP parser for the fast path should be more idiomatic
Summary: [JSC] The JSONP parser for the fast path should be more idiomatic
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-08-05 10:59 PDT by Yijia Huang
Modified: 2022-08-12 11:00 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yijia Huang 2022-08-05 10:59:07 PDT
JOSNP is a super legacy feature. And the current JSONP parser for the fast path doesn't lines up with JSONP idioms.

Patterns should not trigger JSONP fast path:
* "const" and "let"
* "var foo", "x.foo =", and "x["foo"] ="

Reasonable Patterns for JSONP fast path:
* "foo(<JSON>)", "x.foo(<JSON>)", and "x["foo"](<JSON>)"
* One expression statement that ends with a call
Comment 1 Radar WebKit Bug Importer 2022-08-12 11:00:20 PDT
<rdar://problem/98577379>