summaryrefslogtreecommitdiffstats
path: root/storage/mozStorageService.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-05-06 10:28:50 -0400
committerMoonchild <moonchild@palemoon.org>2020-05-20 13:47:24 +0000
commit938e6204efb8f47f8426aeb114c41d333e696d1a (patch)
tree545b2550f60981e31e5212f1ffd60ad88974fe71 /storage/mozStorageService.cpp
parent16aaa21930e316a8fb870a2b300b4c1f0899fb10 (diff)
downloadUXP-938e6204efb8f47f8426aeb114c41d333e696d1a.tar
UXP-938e6204efb8f47f8426aeb114c41d333e696d1a.tar.gz
UXP-938e6204efb8f47f8426aeb114c41d333e696d1a.tar.lz
UXP-938e6204efb8f47f8426aeb114c41d333e696d1a.tar.xz
UXP-938e6204efb8f47f8426aeb114c41d333e696d1a.zip
Issue #21 - Remove TelemertyVFS
This reverts m-c Bug 668378 and completely removes Telemetry SQLite IO. As a bonus this fixes a potential crash in newer SQLite versions without the need for updating this useless telemetry shim.
Diffstat (limited to 'storage/mozStorageService.cpp')
-rw-r--r--storage/mozStorageService.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp
index 8c6f65232..56c10a4d0 100644
--- a/storage/mozStorageService.cpp
+++ b/storage/mozStorageService.cpp
@@ -253,7 +253,6 @@ int32_t Service::sDefaultPageSize = PREF_TS_PAGESIZE_DEFAULT;
Service::Service()
: mMutex("Service::mMutex")
-, mSqliteVFS(nullptr)
, mRegistrationMutex("Service::mRegistrationMutex")
, mConnections()
{
@@ -264,13 +263,9 @@ Service::~Service()
mozilla::UnregisterWeakMemoryReporter(this);
mozilla::UnregisterStorageSQLiteDistinguishedAmount();
- int rc = sqlite3_vfs_unregister(mSqliteVFS);
- if (rc != SQLITE_OK)
- NS_WARNING("Failed to unregister sqlite vfs wrapper.");
-
// Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
// there is nothing actionable we can do in that case.
- rc = ::sqlite3_shutdown();
+ int rc = ::sqlite3_shutdown();
if (rc != SQLITE_OK)
NS_WARNING("sqlite3 did not shutdown cleanly.");
@@ -278,8 +273,6 @@ Service::~Service()
NS_ASSERTION(shutdownObserved, "Shutdown was not observed!");
gService = nullptr;
- delete mSqliteVFS;
- mSqliteVFS = nullptr;
}
void
@@ -372,8 +365,6 @@ Service::shutdown()
NS_IF_RELEASE(sXPConnect);
}
-sqlite3_vfs *ConstructTelemetryVFS();
-
#ifdef MOZ_STORAGE_MEMORY
namespace {
@@ -481,15 +472,6 @@ Service::initialize()
if (rc != SQLITE_OK)
return convertResultCode(rc);
- mSqliteVFS = ConstructTelemetryVFS();
- if (mSqliteVFS) {
- rc = sqlite3_vfs_register(mSqliteVFS, 1);
- if (rc != SQLITE_OK)
- return convertResultCode(rc);
- } else {
- NS_WARNING("Failed to register telemetry VFS");
- }
-
// Register for xpcom-shutdown so we can cleanup after ourselves. The
// observer service can only be used on the main thread.
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();