RESOLVED FIXED 195127
The parser is failing to record the token location of new in new.target.
https://bugs.webkit.org/show_bug.cgi?id=195127
Summary The parser is failing to record the token location of new in new.target.
Mark Lam
Reported 2019-02-27 16:08:23 PST
Attachments
proposed patch. (3.64 KB, patch)
2019-02-27 16:17 PST, Mark Lam
ysuzuki: review+
proposed patch. (4.31 KB, patch)
2019-02-27 18:37 PST, Mark Lam
ysuzuki: review+
Mark Lam
Comment 1 2019-02-27 16:17:59 PST
Created attachment 363152 [details] proposed patch.
Yusuke Suzuki
Comment 2 2019-02-27 17:09:43 PST
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`?
Mark Lam
Comment 3 2019-02-27 18:37:11 PST
Created attachment 363177 [details] proposed patch. Updated with feedback from Yusuke and Saam. Let's try this on the EWS first.
Yusuke Suzuki
Comment 4 2019-02-27 20:58:03 PST
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?
Mark Lam
Comment 5 2019-02-27 22:36:27 PST
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.
Mark Lam
Comment 6 2019-02-27 22:45:02 PST
Note You need to log in before you can comment on or make changes to this bug.