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

Changeset 267706 in webkit


Ignore:
Timestamp:
Sep 28, 2020, 11:14:23 AM (6 years ago)
Author:
Darin Adler
Message:

REGRESSION (r267329): Crash due to null-dereference of frame pointer in DOMSelection::rangeCount
https://bugs.webkit.org/show_bug.cgi?id=217053

Reviewed by Sam Weinig.

Later as a follow-up it would be nice to add a test case, but not obvious how to
make a simple one quickly.

  • page/DOMSelection.cpp:

(WebCore::DOMSelection::rangeCount const): Fixed the null check.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r267701 r267706  
     12020-09-28  Darin Adler  <darin@apple.com>
     2
     3        REGRESSION (r267329): Crash due to null-dereference of frame pointer in DOMSelection::rangeCount
     4        https://bugs.webkit.org/show_bug.cgi?id=217053
     5
     6        Reviewed by Sam Weinig.
     7
     8        Later as a follow-up it would be nice to add a test case, but not obvious how to
     9        make a simple one quickly.
     10
     11        * page/DOMSelection.cpp:
     12        (WebCore::DOMSelection::rangeCount const): Fixed the null check.
     13
    1142020-09-28  Aditya Keerthi  <akeerthi@apple.com>
    215
  • trunk/Source/WebCore/page/DOMSelection.cpp

    r267362 r267706  
    189189{
    190190    auto frame = this->frame();
    191     if (frame->settings().liveRangeSelectionEnabled())
    192         return frame && frame->selection().isInDocumentTree();
     191    if (frame && frame->settings().liveRangeSelectionEnabled())
     192        return frame->selection().isInDocumentTree();
    193193    return !frame || frame->selection().isNone() ? 0 : 1;
    194194}
Note: See TracChangeset for help on using the changeset viewer.