WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
135281
Crashes under scanSelectionForTelephoneNumbers in Range::text() on some sites
https://bugs.webkit.org/show_bug.cgi?id=135281
Summary
Crashes under scanSelectionForTelephoneNumbers in Range::text() on some sites
Tim Horton
Reported
2014-07-24 19:58:28 PDT
Steps to Reproduce: 1. Load
http://dict.leo.org/#/search=apple&searchLoc=0&resultOrder=basic&multiwordShowSingle=on
<
rdar://problem/17803347
>
Attachments
patch
(1.48 KB, patch)
2014-07-24 20:01 PDT
,
Tim Horton
rniwa
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2014-07-24 20:01:48 PDT
Created
attachment 235493
[details]
patch
Ryosuke Niwa
Comment 2
2014-07-24 20:03:59 PDT
Comment on
attachment 235493
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=235493&action=review
> Source/WebCore/editing/Editor.cpp:3396 > RefPtr<Range> extendedRange = extendedSelection.toNormalizedRange(); > > + if (!extendedRange) {
Looks like we can move extendedRange into the if expression and then wrap the following ~8 lines of code inside the if statement instead. That way, we make exactly one call to selectedTelephoneNumberRangesChanged.
Tim Horton
Comment 3
2014-07-24 20:11:43 PDT
Comment on
attachment 235493
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=235493&action=review
>> Source/WebCore/editing/Editor.cpp:3396 >> + if (!extendedRange) { > > Looks like we can move extendedRange into the if expression and then wrap the following ~8 lines of code inside the if statement instead. > That way, we make exactly one call to selectedTelephoneNumberRangesChanged.
I'm teetering back and forth between the two options, because I prefer the early return but at the same time having two calls to selectedTelephoneNumberRangesChanged is kind of annoying. That said, there's another early return that calls selectedTelephoneNumberRangesChanged above, and I would never make this change to that one, so I think I'm going to keep it consistent. Thanks for your help and review!
Tim Horton
Comment 4
2014-07-24 20:13:00 PDT
http://trac.webkit.org/changeset/171577
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