From d69e2a3779841bbe7c02bf691e331e64070f36b1 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sun, 22 Dec 2024 16:58:11 +0100 Subject: [PATCH] Issue #2672 - Part 4: Prevent db access while rebuilding is underway. --- netwerk/cookie/nsCookieService.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp index 7d1ad7d536..4f6476bba8 100644 --- a/netwerk/cookie/nsCookieService.cpp +++ b/netwerk/cookie/nsCookieService.cpp @@ -1577,6 +1577,7 @@ nsCookieService::CloseDBStates() CleanupDefaultDBConnection(); mDefaultDBState = nullptr; + mInitializedDBConn = false; mInitializedDBStates = false; } @@ -1614,8 +1615,6 @@ nsCookieService::CleanupDefaultDBConnection() mDefaultDBState->updateListener = nullptr; mDefaultDBState->removeListener = nullptr; mDefaultDBState->closeListener = nullptr; - - mInitializedDBConn = false; } void @@ -1764,7 +1763,7 @@ nsCookieService::RebuildCorruptDB(DBState* aDBState) os->NotifyObservers(nullptr, "cookie-db-rebuilding", nullptr); } - gCookieService->InitDBConn(); + gCookieService->InitDBConnInternal(); // Enumerate the hash, and add cookies to the params array. mozIStorageAsyncStatement* stmt = gCookieService->mDefaultDBState->stmtInsert;