Bug 23509

Summary: Crash at -[WebCoreAXObject doAXNextSentenceEndTextMarkerForTextMarker:]
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Macintosh   
OS: OS X 10.5   
Attachments:
Description Flags
patch to stop a crasher
bdakin: review+
new patch based on review darin: review+

Description chris fleizach 2009-01-23 14:40:33 PST
WebKit can crash at this position when startOfLine returns null
Comment 1 chris fleizach 2009-01-23 14:42:01 PST
Created attachment 26984 [details]
patch to stop a crasher
Comment 2 chris fleizach 2009-01-23 14:42:56 PST
no good steps to reproduce listed in the bug, but the backtrace is pretty clear as to what's happening. as a result, i could not devise a layout test to that elicited the crash
Comment 3 chris fleizach 2009-01-23 15:03:44 PST
http://trac.webkit.org/changeset/40191
Comment 4 Darin Adler 2009-01-23 16:12:35 PST
Comment on attachment 26984 [details]
patch to stop a crasher

Seems to me that makeRange should probably return 0 if passed null positions. And plainText already handles the case where the range is 0. So I would suggest fixing this in the makeRange function rather than in the AccessibilityObject class.
Comment 5 chris fleizach 2009-01-23 16:23:47 PST
Created attachment 26987 [details]
new patch based on review
Comment 6 chris fleizach 2009-01-23 16:24:12 PST
updated patch based on Darin's review
Comment 7 chris fleizach 2009-01-23 16:24:48 PST
Darin, is this what you had in mind

(In reply to comment #4)
> (From update of attachment 26984 [details] [review])
> Seems to me that makeRange should probably return 0 if passed null positions.
> And plainText already handles the case where the range is 0. So I would suggest
> fixing this in the makeRange function rather than in the AccessibilityObject
> class.
> 

Comment 8 Darin Adler 2009-01-23 17:18:02 PST
Comment on attachment 26987 [details]
new patch based on review

r=me
Comment 9 chris fleizach 2009-01-23 17:21:52 PST
http://trac.webkit.org/changeset/40202