36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
From 7798fafb53081cb22407bc4371247413146fda7b Mon Sep 17 00:00:00 2001
|
|
From: Dimi <dlee@mozilla.com>
|
|
Date: Thu, 10 Oct 2024 14:33:37 +0800
|
|
Subject: [PATCH] Init variable length prefix set in constructor. r=timhuang, a=RyanVM
|
|
|
|
---
|
|
toolkit/components/url-classifier/LookupCache.cpp | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/toolkit/components/url-classifier/LookupCache.cpp b/toolkit/components/url-classifier/LookupCache.cpp
|
|
index d0b03054f1..0931c93048 100644
|
|
--- a/toolkit/components/url-classifier/LookupCache.cpp
|
|
+++ b/toolkit/components/url-classifier/LookupCache.cpp
|
|
@@ -171,7 +171,8 @@ LookupCache::LookupCache(const nsACString& aTableName,
|
|
: mPrimed(false),
|
|
mTableName(aTableName),
|
|
mProvider(aProvider),
|
|
- mRootStoreDirectory(aRootStoreDir) {
|
|
+ mRootStoreDirectory(aRootStoreDir),
|
|
+ mVLPrefixSet(nullptr) {
|
|
UpdateRootDirHandle(mRootStoreDirectory);
|
|
}
|
|
|
|
@@ -192,6 +193,8 @@ nsresult LookupCache::Open() {
|
|
}
|
|
|
|
nsresult LookupCache::Init() {
|
|
+ MOZ_ASSERT(!mVLPrefixSet);
|
|
+
|
|
mVLPrefixSet = new VariableLengthPrefixSet();
|
|
nsresult rv = mVLPrefixSet->Init(mTableName);
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
--
|
|
2.27.0
|
|
|