⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 201583 in webkit


Ignore:
Timestamp:
Jun 1, 2016, 6:09:55 PM (10 years ago)
Author:
Chris Dumez
Message:

[iOS] Regression(r200972): Crash under WebKit::WebPage::selectTextWithGranularityAtPoint()
https://bugs.webkit.org/show_bug.cgi?id=158284
<rdar://problem/26573954>

Reviewed by Ryosuke Niwa.

range can be null but r200972 started dereferencing it without null
check. This patch adds a null check for range and uses the pre-r200972
code path if range is null.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::selectTextWithGranularityAtPoint):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r201575 r201583  
     12016-06-01  Chris Dumez  <cdumez@apple.com>
     2
     3        [iOS] Regression(r200972): Crash under WebKit::WebPage::selectTextWithGranularityAtPoint()
     4        https://bugs.webkit.org/show_bug.cgi?id=158284
     5        <rdar://problem/26573954>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        range can be null but r200972 started dereferencing it without null
     10        check. This patch adds a null check for range and uses the pre-r200972
     11        code path if range is null.
     12
     13        * WebProcess/WebPage/ios/WebPageIOS.mm:
     14        (WebKit::WebPage::selectTextWithGranularityAtPoint):
     15
    1162016-06-01  Brady Eidson  <beidson@apple.com>
    217
  • trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

    r201519 r201583  
    18761876        m_blockSelectionDesiredSize.setHeight(blockSelectionStartHeight);
    18771877        m_currentBlockSelection = nullptr;
    1878         auto* renderer = range->startContainer().renderer();
    1879         if (renderer->style().preserveNewline())
     1878        auto* renderer = range ? range->startContainer().renderer() : nullptr;
     1879        if (renderer && renderer->style().preserveNewline())
    18801880            m_blockRectForTextSelection = renderer->absoluteBoundingBoxRect(true);
    18811881        else {
Note: See TracChangeset for help on using the changeset viewer.