Title: [196339] trunk/Source/WebCore
Revision
196339
Author
n_w...@apple.com
Date
2016-02-09 14:58:18 -0800 (Tue, 09 Feb 2016)

Log 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]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (196338 => 196339)


--- trunk/Source/WebCore/ChangeLog	2016-02-09 22:54:17 UTC (rev 196338)
+++ trunk/Source/WebCore/ChangeLog	2016-02-09 22:58:18 UTC (rev 196339)
@@ -1,3 +1,19 @@
+2016-02-09  Nan Wang  <n_w...@apple.com>
+
+        [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]):
+
 2016-02-09  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Unreviewed build fix after r196322

Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (196338 => 196339)


--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2016-02-09 22:54:17 UTC (rev 196338)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2016-02-09 22:58:18 UTC (rev 196339)
@@ -219,9 +219,7 @@
 
 - (CharacterOffset)characterOffset
 {
-    if (_textMarkerData.ignored)
-        return CharacterOffset();
-    return CharacterOffset(_textMarkerData.node, _textMarkerData.characterStartIndex, _textMarkerData.characterOffset);
+    return _cache->characterOffsetForTextMarkerData(_textMarkerData);
 }
 
 - (BOOL)isIgnored
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to