Changeset 39942 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jan 15, 2009, 1:15:24 PM (16 years ago)
Author:
[email protected]
Message:

Bug 23225: REGRESSION: Assertion failure in reparseInPlace() (m_sourceElements) at sfgate.com
<https://bugs.webkit.org/show_bug.cgi?id=23225> <rdar://problem/6487432>

Reviewed by Geoff Garen

Character position for open and closing brace was incorrectly referencing m_position to
record their position in a source document, however this is unsafe as BOMs may lead to
m_position being an arbitrary position from the real position of the current character.

Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r39931 r39942  
     12009-01-15  Oliver Hunt  <[email protected]>
     2
     3        Reviewed by Geoff Garen.
     4
     5        Bug 23225: REGRESSION: Assertion failure in reparseInPlace() (m_sourceElements) at sfgate.com
     6        <https://bugs.webkit.org/show_bug.cgi?id=23225> <rdar://problem/6487432>
     7
     8        Character position for open and closing brace was incorrectly referencing m_position to
     9        record their position in a source document, however this is unsafe as BOMs may lead to
     10        m_position being an arbitrary position from the real position of the current character.
     11
     12        * parser/Lexer.cpp:
     13        (JSC::Lexer::matchPunctuator):
     14
    1152009-01-14  David Kilzer  <[email protected]>
    216
  • trunk/JavaScriptCore/parser/Lexer.cpp

    r39554 r39942  
    759759            return static_cast<int>(c1);
    760760        case '{':
    761             charPos = m_position - 4;
     761            charPos = m_currentOffset;
    762762            shift(1);
    763763            return OPENBRACE;
    764764        case '}':
    765             charPos = m_position - 4;
     765            charPos = m_currentOffset;
    766766            shift(1);
    767767            return CLOSEBRACE;
Note: See TracChangeset for help on using the changeset viewer.