mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 15:17:29 +09:00
Issue #2672 - Part 4: Prevent db access while rebuilding is underway.
This commit is contained in:
parent
032b0ae0d8
commit
d69e2a3779
1 changed files with 2 additions and 3 deletions
|
|
@ -1577,6 +1577,7 @@ nsCookieService::CloseDBStates()
|
||||||
CleanupDefaultDBConnection();
|
CleanupDefaultDBConnection();
|
||||||
|
|
||||||
mDefaultDBState = nullptr;
|
mDefaultDBState = nullptr;
|
||||||
|
mInitializedDBConn = false;
|
||||||
mInitializedDBStates = false;
|
mInitializedDBStates = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1614,8 +1615,6 @@ nsCookieService::CleanupDefaultDBConnection()
|
||||||
mDefaultDBState->updateListener = nullptr;
|
mDefaultDBState->updateListener = nullptr;
|
||||||
mDefaultDBState->removeListener = nullptr;
|
mDefaultDBState->removeListener = nullptr;
|
||||||
mDefaultDBState->closeListener = nullptr;
|
mDefaultDBState->closeListener = nullptr;
|
||||||
|
|
||||||
mInitializedDBConn = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1764,7 +1763,7 @@ nsCookieService::RebuildCorruptDB(DBState* aDBState)
|
||||||
os->NotifyObservers(nullptr, "cookie-db-rebuilding", nullptr);
|
os->NotifyObservers(nullptr, "cookie-db-rebuilding", nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
gCookieService->InitDBConn();
|
gCookieService->InitDBConnInternal();
|
||||||
|
|
||||||
// Enumerate the hash, and add cookies to the params array.
|
// Enumerate the hash, and add cookies to the params array.
|
||||||
mozIStorageAsyncStatement* stmt = gCookieService->mDefaultDBState->stmtInsert;
|
mozIStorageAsyncStatement* stmt = gCookieService->mDefaultDBState->stmtInsert;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue