[Webkit-unassigned] [Bug 152304] [JSC] fix error message for eval/arguments CoverInitializedName in strict code
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 15 13:35:31 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=152304
--- Comment #10 from Caitlin Potter (:caitp) <caitp at igalia.com> ---
Comment on attachment 267380
--> https://bugs.webkit.org/attachment.cgi?id=267380
Patch (smaller/broken)
View in context: https://bugs.webkit.org/attachment.cgi?id=267380&action=review
self-review:
> Source/JavaScriptCore/parser/Parser.cpp:2892
> + if (classifier.indicatesPossiblePattern() && (pattern && !match(EQUAL)))
This fixes the case `({ eval = 0 } = {})`, but the `for({index=0; index+=1;} index++<=10; index*2;) { arr.add(""+index);};` Sputnik test fails as well, since it's n'either a valid pattern nor a valid expression. Probably the thing to do is avoid unnecessary re-parsing in this case, and just update the expected error to be the unexpected semicolon, and avoid re-parsing as an expression.
This probably means replacing all of the `if (kind == DestructureToExpressions) return 0;` bits with a proper error message, and most likely fixing a bunch of layout tests. Doing this means the simpler fix in code should work just fine.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151215/dc738b4e/attachment.html>
More information about the webkit-unassigned
mailing list