WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
130271
REGRESSION(
r165385
): [WebTextIterator currentRange] crashes
https://bugs.webkit.org/show_bug.cgi?id=130271
Summary
REGRESSION(r165385): [WebTextIterator currentRange] crashes
Ryosuke Niwa
Reported
2014-03-14 16:38:24 PDT
After
http://trac.webkit.org/changeset/165385
, TextIterator::range no longer checked the nullity of m_positionNode. As a result, [WebTextIterator currentRange] which simply calls TextIterator::range crashes. Since applications that embed WebKit don't necessarily check atEnd before calling [WebTextIterator currentRange] we need to keep the null check there.
Attachments
Fixes the crash
(2.38 KB, patch)
2014-03-14 16:41 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Reverted the erroneous jsc change.
(1.64 KB, patch)
2014-03-14 16:42 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2014-03-14 16:41:55 PDT
Created
attachment 226776
[details]
Fixes the crash
Ryosuke Niwa
Comment 2
2014-03-14 16:42:38 PDT
Created
attachment 226777
[details]
Reverted the erroneous jsc change.
WebKit Commit Bot
Comment 3
2014-03-14 16:55:59 PDT
Comment on
attachment 226777
[details]
Reverted the erroneous jsc change. Clearing flags on attachment: 226777 Committed
r165664
: <
http://trac.webkit.org/changeset/165664
>
WebKit Commit Bot
Comment 4
2014-03-14 16:56:02 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 5
2014-03-15 14:27:17 PDT
Comment on
attachment 226777
[details]
Reverted the erroneous jsc change. View in context:
https://bugs.webkit.org/attachment.cgi?id=226777&action=review
> Source/WebKit/mac/ChangeLog:12 > + Preserve the old public API behavior by checking atEnd in [WebTextIterator currentRange].
Was the old public API behavior returning nil? I think that it might have returned a range, rather than nil, before. So this might not be a sufficient fix. What about the other methods of WebTextIterator?
Ryosuke Niwa
Comment 6
2014-03-16 19:27:51 PDT
Comment on
attachment 226777
[details]
Reverted the erroneous jsc change. View in context:
https://bugs.webkit.org/attachment.cgi?id=226777&action=review
>> Source/WebKit/mac/ChangeLog:12 >> + Preserve the old public API behavior by checking atEnd in [WebTextIterator currentRange]. > > Was the old public API behavior returning nil? I think that it might have returned a range, rather than nil, before. So this might not be a sufficient fix. > > What about the other methods of WebTextIterator?
The old TextIterator::range returned 0 when m_positionNode was null:
http://trac.webkit.org/browser/trunk/Source/WebCore/editing/TextIterator.cpp?rev=165384#L1101
I don't think other methods have the same issue.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug