Commit de22f921 authored by justing's avatar justing

Reviewed by mjs

        
        <rdar://problem/4760612>
        TOT REGRESSION: Repro assertion failure when forwarding draft in Range::compareBoundaryPoints
        
        No layout test possible, attributedStringFrom:(DOMNode*)...etc isn't available to DRT.
        
        * dom/Range.cpp:
        (WebCore::Range::boundaryPointsValid): compareBoundaryPoints asserts that the incoming 
        positions are non-null since most of it's callers would be in a bad state if the positions 
        were null.  boundaryPointsValid, which calls compareBoundaryPoints, is an exception.  
        Instead of removing the assert I've added nil checks in boundaryPointsValid, to keep it 
        from entering compareBoundaryPoints and hitting the assert.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 02558203
2006-10-03 Justin Garcia <justin.garcia@apple.com>
Reviewed by mjs
<rdar://problem/4760612>
TOT REGRESSION: Repro assertion failure when forwarding draft in Range::compareBoundaryPoints
No layout test possible, attributedStringFrom:(DOMNode*)...etc isn't available to DRT.
* dom/Range.cpp:
(WebCore::Range::boundaryPointsValid): compareBoundaryPoints asserts that the incoming
positions are non-null since most of it's callers would be in a bad state if the positions
were null. boundaryPointsValid, which calls compareBoundaryPoints, is an exception.
Instead of removing the assert I've added nil checks in boundaryPointsValid, to keep it
from entering compareBoundaryPoints and hitting the assert.
2006-10-03 Adele Peterson <adele@apple.com> 2006-10-03 Adele Peterson <adele@apple.com>
Reviewed by Geoff. Reviewed by Geoff.
...@@ -527,7 +527,7 @@ short Range::compareBoundaryPoints( const Position &a, const Position &b ) ...@@ -527,7 +527,7 @@ short Range::compareBoundaryPoints( const Position &a, const Position &b )
bool Range::boundaryPointsValid() const bool Range::boundaryPointsValid() const
{ {
return compareBoundaryPoints(m_startContainer.get(), m_startOffset, m_endContainer.get(), m_endOffset) <= 0; return m_startContainer && m_endContainer && compareBoundaryPoints(m_startContainer.get(), m_startOffset, m_endContainer.get(), m_endOffset) <= 0;
} }
void Range::deleteContents(ExceptionCode& ec) { void Range::deleteContents(ExceptionCode& ec) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment