[webkit-reviews] review denied: [Bug 4920] Non-BMP characters in
JavaScript identifiers : [Attachment 17414] Sorry ggaren,
I am in your lexer fixing your bugz
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 26 11:39:35 PST 2007
Geoffrey Garen <ggaren at apple.com> has denied 's request for review:
Bug 4920: Non-BMP characters in JavaScript identifiers
http://bugs.webkit.org/show_bug.cgi?id=4920
Attachment 17414: Sorry ggaren, I am in your lexer fixing your bugz
http://bugs.webkit.org/attachment.cgi?id=17414&action=edit
------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
If you reach the end of the input stream before reading next1, next1 is set to
-1. Calling U16_GET_SUPPLEMENTARY on -1 is not valid because "The result is
undefined if the input values are not lead and trail surrogates."
Calling U16_IS_SURROGATE_LEAD on current is also not valid because
U16_IS_SURROGATE_LEAD assumes that "c is a surrogate code point."
You need to check U16_IS_LEAD(current) and U16_IS_TRAIL(next1) before calling
isIdentStart() or isIdentPart().
You should also add 2 test cases: one for when next1 is -1 and bad things
happen, and one for when current seems like a lead surrogate even though it is
not a surrogate code point and bad things happen.
More information about the webkit-reviews
mailing list