Changeset 196339 in webkit


Ignore:
Timestamp:
Feb 9, 2016 2:58:18 PM (8 years ago)
Author:
n_wang@apple.com
Message:

[iOS Simulator] accessibility/text-marker/text-marker-range-stale-node-crash.html crashing
https://bugs.webkit.org/show_bug.cgi?id=154039

Reviewed by Chris Fleizach.

We are accessing the derefed node in the CharacterOffset object, we should create an empty
CharacterOffset object if the node is not in use.

It's covered by the test accessibility/text-marker/text-marker-range-stale-node-crash.html.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityTextMarker characterOffset]):
(-[WebAccessibilityTextMarker isIgnored]):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r196335 r196339  
     12016-02-09  Nan Wang  <n_wang@apple.com>
     2
     3        [iOS Simulator] accessibility/text-marker/text-marker-range-stale-node-crash.html crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=154039
     5
     6        Reviewed by Chris Fleizach.
     7
     8        We are accessing the derefed node in the CharacterOffset object, we should create an empty
     9        CharacterOffset object if the node is not in use.
     10
     11        It's covered by the test accessibility/text-marker/text-marker-range-stale-node-crash.html.
     12
     13        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
     14        (-[WebAccessibilityTextMarker characterOffset]):
     15        (-[WebAccessibilityTextMarker isIgnored]):
     16
    1172016-02-09  Myles C. Maxfield  <mmaxfield@apple.com>
    218
  • trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

    r195405 r196339  
    220220- (CharacterOffset)characterOffset
    221221{
    222     if (_textMarkerData.ignored)
    223         return CharacterOffset();
    224     return CharacterOffset(_textMarkerData.node, _textMarkerData.characterStartIndex, _textMarkerData.characterOffset);
     222    return _cache->characterOffsetForTextMarkerData(_textMarkerData);
    225223}
    226224
Note: See TracChangeset for help on using the changeset viewer.