Summary: | The parser is failing to record the token location of new in new.target. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||||
Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | fpizlo, keith_miller, msaboff, rmorisset, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Mark Lam
2019-02-27 16:08:23 PST
Created attachment 363152 [details]
proposed patch.
Comment on attachment 363152 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=363152&action=review r=me with suggestion. > Source/JavaScriptCore/parser/Parser.cpp:4678 > + JSTokenLocation lastNewTokenlocation; "l" in "location" seems lower case. > Source/JavaScriptCore/parser/Parser.cpp:4682 > + lastNewTokenlocation = currentLocation; Why not making this `lastNewTokenLocation = tokenLocation()` and remove `currentLocation`? Created attachment 363177 [details]
proposed patch.
Updated with feedback from Yusuke and Saam. Let's try this on the EWS first.
Comment on attachment 363177 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=363177&action=review r=me > Source/JavaScriptCore/parser/Parser.cpp:-4734 > - JSTokenLocation location(tokenLocation()); If it is not difficult, can we have a test for this? Comment on attachment 363177 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=363177&action=review Thanks for the review. >> Source/JavaScriptCore/parser/Parser.cpp:-4734 >> - JSTokenLocation location(tokenLocation()); > > If it is not difficult, can we have a test for this? I'm not sure how to check for this. So, I'll wait until we have time later to develop some infrastructure for such tests. Landed in r242193: <http://trac.webkit.org/r242193>. |