Changeset 178232 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Jan 9, 2015, 6:44:56 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r178224 r178232 1 2015-01-09 Michael Saboff <[email protected]> 2 3 Breakpoint doesn't fire in this HTML5 game 4 https://bugs.webkit.org/show_bug.cgi?id=140269 5 6 Reviewed by Mark Lam. 7 8 When parsing a single line cached function, use the lineStartOffset of the 9 location where we found the cached function instead of the cached lineStartOffset. 10 The cache location's lineStartOffset has not been adjusted for any possible 11 containing functions. 12 13 This change is not needed for multi-line cached functions. Consider the 14 single line source: 15 16 function outer(){function inner1(){doStuff();}; (function inner2() {doMoreStuff()})()} 17 18 The first parser pass, we parse and cache inner1() and inner2() with a lineStartOffset 19 of 0. Later when we parse outer() and find inner1() in the cache, SourceCode start 20 character is at outer()'s outermost open brace. That is what we should use for 21 lineStartOffset for inner1(). When done parsing inner1() we set the parsing token 22 to the saved location for inner1(), including the lineStartOffset of 0. We need 23 to use the value of lineStartOffset before we started parsing inner1(). That is 24 what the fix does. When we parse inner2() the lineStartOffset will be correct. 25 26 For a multi-line function, the close brace is guaranteed to be on a different line 27 than the open brace. Hence, its lineStartOffset will not change with the change of 28 the SourceCode start character 29 30 * parser/Parser.cpp: 31 (JSC::Parser<LexerType>::parseFunctionInfo): 32 1 33 2015-01-09 Joseph Pecoraro <[email protected]> 2 34
Note:
See TracChangeset
for help on using the changeset viewer.