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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.