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

Changeset 280643 in webkit


Ignore:
Timestamp:
Aug 4, 2021, 11:02:20 AM (5 years ago)
Author:
Antti Koivisto
Message:

Use fast malloc for RuleData vectors
https://bugs.webkit.org/show_bug.cgi?id=228770

Reviewed by Chris Dumez.

Revert the change that enabled probabilistic guard malloc as it is not needed anymore.

  • style/RuleFeature.h:
  • style/RuleSet.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r280638 r280643  
     12021-08-04  Antti Koivisto  <antti@apple.com>
     2
     3        Use fast malloc for RuleData vectors
     4        https://bugs.webkit.org/show_bug.cgi?id=228770
     5
     6        Reviewed by Chris Dumez.
     7
     8        Revert the change that enabled probabilistic guard malloc as it is not needed anymore.
     9
     10        * style/RuleFeature.h:
     11        * style/RuleSet.h:
     12
    1132021-08-04  Antti Koivisto  <antti@apple.com>
    214
  • trunk/Source/WebCore/style/RuleFeature.h

    r279365 r280643  
    2626#include <wtf/HashMap.h>
    2727#include <wtf/HashSet.h>
    28 #include <wtf/SystemMalloc.h>
    2928#include <wtf/text/AtomString.h>
    3029#include <wtf/text/AtomStringHash.h>
     
    4039enum class MatchElement : uint8_t { Subject, Parent, Ancestor, DirectSibling, IndirectSibling, AnySibling, ParentSibling, AncestorSibling, Host };
    4140constexpr unsigned matchElementCount = static_cast<unsigned>(MatchElement::Host) + 1;
    42 
    43 #if HAVE(PROBABILISTIC_GUARD_MALLOC)
    44 // Help finding rdar://77450900
    45 using RuleMalloc = ProbabilisticGuardMalloc;
    46 #else
    47 using RuleMalloc = FastMalloc;
    48 #endif
    4941
    5042struct RuleFeature {
     
    6759};
    6860
    69 using RuleFeatureVector = Vector<RuleFeature, 0, CrashOnOverflow, 16, RuleMalloc>;
     61using RuleFeatureVector = Vector<RuleFeature>;
    7062
    7163struct RuleFeatureSet {
  • trunk/Source/WebCore/style/RuleSet.h

    r280638 r280643  
    6868    ~RuleSet();
    6969
    70     typedef Vector<RuleData, 1, CrashOnOverflow, 16, RuleMalloc> RuleDataVector;
     70    typedef Vector<RuleData, 1> RuleDataVector;
    7171    typedef HashMap<AtomString, std::unique_ptr<RuleDataVector>> AtomRuleMap;
    7272
Note: See TracChangeset for help on using the changeset viewer.