Use less memory when compiling content extensions
[WebKit-https.git] / Source / WebCore / contentextensions / CombinedURLFilters.cpp
index 453b636c6bac82c55228dd0fbcf0871fe337d14b..25eeddc05730f34d519e31fe6b2c817960e33b87 100644 (file)
@@ -52,6 +52,11 @@ CombinedURLFilters::~CombinedURLFilters()
 {
 }
 
+void CombinedURLFilters::clear()
+{
+    m_prefixTreeRoot = std::make_unique<PrefixTreeVertex>();
+}
+
 void CombinedURLFilters::addPattern(uint64_t actionId, const Vector<Term>& pattern)
 {
     ASSERT_WITH_MESSAGE(!pattern.isEmpty(), "The parser should have excluded empty patterns before reaching CombinedURLFilters.");