Changeset 212737 in webkit


Ignore:
Timestamp:
Feb 21, 2017 12:06:48 PM (7 years ago)
Author:
Antti Koivisto
Message:

REGRESSION(r207669): Crash after mutating selector text
https://bugs.webkit.org/show_bug.cgi?id=168655
<rdar://problem/30632111>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: fast/css/selector-text-mutation-crash.html

  • style/StyleScope.cpp:

(WebCore::Style::Scope::scheduleUpdate):

Clear the style resolver immediately if style sheet content changes. The resolver may
have data structures that point to the old sheet contents.

The resolver would get wiped anyway when the scheduled update actually occurs.

LayoutTests:

  • fast/css/selector-text-mutation-crash-expected.txt: Added.
  • fast/css/selector-text-mutation-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r212736 r212737  
     12017-02-21  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION(r207669): Crash after mutating selector text
     4        https://bugs.webkit.org/show_bug.cgi?id=168655
     5        <rdar://problem/30632111>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * fast/css/selector-text-mutation-crash-expected.txt: Added.
     10        * fast/css/selector-text-mutation-crash.html: Added.
     11
    1122017-02-21  Jiewen Tan  <jiewen_tan@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r212736 r212737  
     12017-02-21  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION(r207669): Crash after mutating selector text
     4        https://bugs.webkit.org/show_bug.cgi?id=168655
     5        <rdar://problem/30632111>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Test: fast/css/selector-text-mutation-crash.html
     10
     11        * style/StyleScope.cpp:
     12        (WebCore::Style::Scope::scheduleUpdate):
     13
     14        Clear the style resolver immediately if style sheet content changes. The resolver may
     15        have data structures that point to the old sheet contents.
     16
     17        The resolver would get wiped anyway when the scheduled update actually occurs.
     18
    1192017-02-21  Jiewen Tan  <jiewen_tan@apple.com>
    220
  • trunk/Source/WebCore/style/StyleScope.cpp

    r212614 r212737  
    522522void Scope::scheduleUpdate(UpdateType update)
    523523{
     524    if (update == UpdateType::ContentsOrInterpretation)
     525        clearResolver();
     526
    524527    if (!m_pendingUpdate || *m_pendingUpdate < update) {
    525528        m_pendingUpdate = update;
Note: See TracChangeset for help on using the changeset viewer.