Changeset 289567 in webkit


Ignore:
Timestamp:
Feb 10, 2022, 12:23:37 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Crash in in WebCore::CSSStyleSheet::didMutateRules
https://bugs.webkit.org/show_bug.cgi?id=236450

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-10
Reviewed by Antti Koivisto.

Replace the raw pointer rule in RuleMutationScope with a RefPtr so it can be accessible
for the scope.

  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):

  • css/CSSStyleSheet.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r289553 r289567  
     12022-02-10  Gabriel Nava Marino  <gnavamarino@apple.com>
     2
     3        Crash in in WebCore::CSSStyleSheet::didMutateRules
     4        https://bugs.webkit.org/show_bug.cgi?id=236450
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Replace the raw pointer rule in RuleMutationScope with a RefPtr so it can be accessible
     9        for the scope.
     10
     11        * css/CSSStyleSheet.cpp:
     12        (WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
     13        * css/CSSStyleSheet.h:
     14
    1152022-02-10  Tim Nguyen  <ntim@apple.com>
    216
  • trunk/Source/WebCore/css/CSSStyleSheet.cpp

    r288069 r289567  
    419419{
    420420    if (m_styleSheet)
    421         m_styleSheet->didMutateRules(m_mutationType, m_contentsWereClonedForMutation, m_insertedKeyframesRule, m_modifiedKeyframesRuleName);
    422 }
    423 
    424 }
     421        m_styleSheet->didMutateRules(m_mutationType, m_contentsWereClonedForMutation, m_insertedKeyframesRule.get(), m_modifiedKeyframesRuleName);
     422}
     423
     424}
  • trunk/Source/WebCore/css/CSSStyleSheet.h

    r287707 r289567  
    110110        RuleMutationType m_mutationType;
    111111        WhetherContentsWereClonedForMutation m_contentsWereClonedForMutation;
    112         StyleRuleKeyframes* m_insertedKeyframesRule;
     112        RefPtr<StyleRuleKeyframes> m_insertedKeyframesRule;
    113113        String m_modifiedKeyframesRuleName;
    114114    };
Note: See TracChangeset for help on using the changeset viewer.