Title: [280643] trunk/Source/WebCore
- Revision
- 280643
- Author
- an...@apple.com
- Date
- 2021-08-04 11:02:20 -0700 (Wed, 04 Aug 2021)
Log 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:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (280642 => 280643)
--- trunk/Source/WebCore/ChangeLog 2021-08-04 18:01:55 UTC (rev 280642)
+++ trunk/Source/WebCore/ChangeLog 2021-08-04 18:02:20 UTC (rev 280643)
@@ -1,5 +1,17 @@
2021-08-04 Antti Koivisto <an...@apple.com>
+ 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:
+
+2021-08-04 Antti Koivisto <an...@apple.com>
+
Reduce Vector<> wasted capacity in some RuleSet code
https://bugs.webkit.org/show_bug.cgi?id=224160
<rdar://problem/76369555>
Modified: trunk/Source/WebCore/style/RuleFeature.h (280642 => 280643)
--- trunk/Source/WebCore/style/RuleFeature.h 2021-08-04 18:01:55 UTC (rev 280642)
+++ trunk/Source/WebCore/style/RuleFeature.h 2021-08-04 18:02:20 UTC (rev 280643)
@@ -25,7 +25,6 @@
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
-#include <wtf/SystemMalloc.h>
#include <wtf/text/AtomString.h>
#include <wtf/text/AtomStringHash.h>
@@ -40,13 +39,6 @@
enum class MatchElement : uint8_t { Subject, Parent, Ancestor, DirectSibling, IndirectSibling, AnySibling, ParentSibling, AncestorSibling, Host };
constexpr unsigned matchElementCount = static_cast<unsigned>(MatchElement::Host) + 1;
-#if HAVE(PROBABILISTIC_GUARD_MALLOC)
-// Help finding rdar://77450900
-using RuleMalloc = ProbabilisticGuardMalloc;
-#else
-using RuleMalloc = FastMalloc;
-#endif
-
struct RuleFeature {
RuleFeature(const RuleData&, std::optional<MatchElement> = std::nullopt);
@@ -66,7 +58,7 @@
const CSSSelector* invalidationSelector { nullptr };
};
-using RuleFeatureVector = Vector<RuleFeature, 0, CrashOnOverflow, 16, RuleMalloc>;
+using RuleFeatureVector = Vector<RuleFeature>;
struct RuleFeatureSet {
void add(const RuleFeatureSet&);
Modified: trunk/Source/WebCore/style/RuleSet.h (280642 => 280643)
--- trunk/Source/WebCore/style/RuleSet.h 2021-08-04 18:01:55 UTC (rev 280642)
+++ trunk/Source/WebCore/style/RuleSet.h 2021-08-04 18:02:20 UTC (rev 280643)
@@ -67,7 +67,7 @@
~RuleSet();
- typedef Vector<RuleData, 1, CrashOnOverflow, 16, RuleMalloc> RuleDataVector;
+ typedef Vector<RuleData, 1> RuleDataVector;
typedef HashMap<AtomString, std::unique_ptr<RuleDataVector>> AtomRuleMap;
struct DynamicMediaQueryRules {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes