⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 203518 in webkit


Ignore:
Timestamp:
Jul 21, 2016, 12:41:47 PM (10 years ago)
Author:
rniwa@webkit.org
Message:

Crash accessing null renderer inside WebCore::DeleteSelectionCommand::doApply
​https://bugs.webkit.org/show_bug.cgi?id=160011

Reviewed by Chris Dumez.

Add a null pointer check for renderer() call.

Unfortunately no new tests since we don't have a reproduction.

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::doApply):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r203517 r203518  
     12016-07-21  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Crash accessing null renderer inside WebCore::DeleteSelectionCommand::doApply
     4        https://bugs.webkit.org/show_bug.cgi?id=160011
     5
     6        Reviewed by Chris Dumez.
     7
     8        Add a null pointer check for renderer() call.
     9
     10        Unfortunately no new tests since we don't have a reproduction.
     11
     12        * editing/DeleteSelectionCommand.cpp:
     13        (WebCore::DeleteSelectionCommand::doApply):
     14
    1152016-07-21  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp

    r203337 r203518  
    865865        if (is<Text>(node)) {
    866866            Text& textNode = downcast<Text>(*node);
    867             if (textNode.length())
     867            if (textNode.length() && textNode.renderer())
    868868                shouldRebalaceWhiteSpace = textNode.renderer()->style().textSecurity() == TSNONE;
    869869        }       
Note: See TracChangeset for help on using the changeset viewer.