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

Changeset 271451 in webkit


Ignore:
Timestamp:
Jan 13, 2021, 1:04:12 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Null check selector.argumentList()
https://bugs.webkit.org/show_bug.cgi?id=220392

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-13
Reviewed by Wenson Hsieh.

Source/WebCore:

Null check selector.argumentList().

Test: highlight/highlight-crash.html

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):

LayoutTests:

Add test that triggers the relevant code path.

  • highlight/highlight-crash-expected.txt: Added.
  • highlight/highlight-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r271446 r271451  
     12021-01-13  Rob Buis  <rbuis@igalia.com>
     2
     3        Null check selector.argumentList()
     4        https://bugs.webkit.org/show_bug.cgi?id=220392
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        Add test that triggers the relevant code path.
     9
     10        * highlight/highlight-crash-expected.txt: Added.
     11        * highlight/highlight-crash.html: Added.
     12
    1132021-01-13  Antti Koivisto  <antti@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r271447 r271451  
     12021-01-13  Rob Buis  <rbuis@igalia.com>
     2
     3        Null check selector.argumentList()
     4        https://bugs.webkit.org/show_bug.cgi?id=220392
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        Null check selector.argumentList().
     9
     10        Test: highlight/highlight-crash.html
     11
     12        * css/SelectorChecker.cpp:
     13        (WebCore::SelectorChecker::checkOne const):
     14
    1152021-01-13  Ziran Sun  <zsun@igalia.com>
    216
  • trunk/Source/WebCore/css/SelectorChecker.cpp

    r267783 r271451  
    11441144            if (checkingContext.pseudoId == PseudoId::None)
    11451145                return true;
    1146             if (checkingContext.pseudoId != PseudoId::Highlight)
     1146            if (checkingContext.pseudoId != PseudoId::Highlight || !selector.argumentList())
    11471147                return false;
    11481148            return selector.argumentList()->first() == checkingContext.nameForHightlightPseudoElement;
Note: See TracChangeset for help on using the changeset viewer.