Bug 60773

Summary: Web Inspector: Fix SourceJavaScriptTokenizer keyword parsing
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, commit-queue, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Suggested fix
none
[PATCH] Test added none

Alexander Pavlov (apavlov)
Reported 2011-05-13 09:08:11 PDT
SourceJavaScriptTokenizer has two issues with keyword parsing: 1. Keywords are tested as "token in this._keywords", thus "__proto__" and all methods found on a generic objects (e.g. "toString" are considered to be keywords) 2. "true}" is parsed as a single "javascript-ident", since the yych = "}"; if (yych <= 0x7F)... check always fails (JavaScript does not define comparisons of strings vs. integers the way we need).
Attachments
[PATCH] Suggested fix (4.89 KB, patch)
2011-05-13 09:40 PDT, Alexander Pavlov (apavlov)
no flags
[PATCH] Test added (6.73 KB, patch)
2011-05-16 02:39 PDT, Alexander Pavlov (apavlov)
no flags
Alexander Pavlov (apavlov)
Comment 1 2011-05-13 09:40:50 PDT
Created attachment 93467 [details] [PATCH] Suggested fix
Pavel Feldman
Comment 2 2011-05-13 11:23:55 PDT
Comment on attachment 93467 [details] [PATCH] Suggested fix Could you a test for these cases into the existing tokenizer tests? Otherwise looks good.
Alexander Pavlov (apavlov)
Comment 3 2011-05-16 02:39:08 PDT
Created attachment 93628 [details] [PATCH] Test added
WebKit Commit Bot
Comment 4 2011-05-16 03:51:21 PDT
Comment on attachment 93628 [details] [PATCH] Test added Clearing flags on attachment: 93628 Committed r86554: <http://trac.webkit.org/changeset/86554>
WebKit Commit Bot
Comment 5 2011-05-16 03:51:26 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.