Changeset 207564 in webkit


Ignore:
Timestamp:
Oct 19, 2016 1:33:23 PM (8 years ago)
Author:
n_wang@apple.com
Message:

AX: crash: com.apple.WebCore: WebCore::AccessibilityObject::findMatchingObjects + 600
https://bugs.webkit.org/show_bug.cgi?id=163682

Reviewed by Chris Fleizach.

Source/WebCore:

There's a null pointer crash when we ask for startObject->parentObjectUnignored() in
AccessibilityObject::findMatchingObject. Added a null check for the startObject to fix that.

Test: accessibility/mac/search-predicate-crash.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::findMatchingObjects):

LayoutTests:

  • accessibility/mac/search-predicate-crash-expected.txt: Added.
  • accessibility/mac/search-predicate-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r207557 r207564  
     12016-10-19  Nan Wang  <n_wang@apple.com>
     2
     3        AX: crash: com.apple.WebCore: WebCore::AccessibilityObject::findMatchingObjects + 600
     4        https://bugs.webkit.org/show_bug.cgi?id=163682
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * accessibility/mac/search-predicate-crash-expected.txt: Added.
     9        * accessibility/mac/search-predicate-crash.html: Added.
     10
    1112016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r207560 r207564  
     12016-10-19  Nan Wang  <n_wang@apple.com>
     2
     3        AX: crash: com.apple.WebCore: WebCore::AccessibilityObject::findMatchingObjects + 600
     4        https://bugs.webkit.org/show_bug.cgi?id=163682
     5
     6        Reviewed by Chris Fleizach.
     7
     8        There's a null pointer crash when we ask for startObject->parentObjectUnignored() in
     9        AccessibilityObject::findMatchingObject. Added a null check for the startObject to fix that.
     10
     11        Test: accessibility/mac/search-predicate-crash.html
     12
     13        * accessibility/AccessibilityObject.cpp:
     14        (WebCore::AccessibilityObject::findMatchingObjects):
     15
    1162016-10-19  David Kilzer  <ddkilzer@apple.com>
    217
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r207429 r207564  
    604604   
    605605    // The outer loop steps up the parent chain each time (unignored is important here because otherwise elements would be searched twice)
    606     for (AccessibilityObject* stopSearchElement = parentObjectUnignored(); startObject != stopSearchElement; startObject = startObject->parentObjectUnignored()) {
     606    for (AccessibilityObject* stopSearchElement = parentObjectUnignored(); startObject && startObject != stopSearchElement; startObject = startObject->parentObjectUnignored()) {
    607607
    608608        // Only append the children after/before the previous element, so that the search does not check elements that are
Note: See TracChangeset for help on using the changeset viewer.