summaryrefslogtreecommitdiffstats
path: root/storage/mozStorageConnection.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /storage/mozStorageConnection.cpp
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/mozStorageConnection.cpp')
-rw-r--r--storage/mozStorageConnection.cpp39
1 files changed, 26 insertions, 13 deletions
diff --git a/storage/mozStorageConnection.cpp b/storage/mozStorageConnection.cpp
index e10458a68b..5dd2c9223e 100644
--- a/storage/mozStorageConnection.cpp
+++ b/storage/mozStorageConnection.cpp
@@ -1155,19 +1155,20 @@ nsresult Connection::initialize(nsIFileURL* aFileURL) {
bool hasKey = false;
bool hasDirectoryLockId = false;
- MOZ_ALWAYS_TRUE(URLParams::Parse(
- query, [&hasKey, &hasDirectoryLockId](const nsAString& aName,
- const nsAString& aValue) {
- if (aName.EqualsLiteral("key")) {
- hasKey = true;
- return true;
- }
- if (aName.EqualsLiteral("directoryLockId")) {
- hasDirectoryLockId = true;
- return true;
- }
- return true;
- }));
+ MOZ_ALWAYS_TRUE(
+ URLParams::Parse(query, true,
+ [&hasKey, &hasDirectoryLockId](const nsAString& aName,
+ const nsAString& aValue) {
+ if (aName.EqualsLiteral("key")) {
+ hasKey = true;
+ return true;
+ }
+ if (aName.EqualsLiteral("directoryLockId")) {
+ hasDirectoryLockId = true;
+ return true;
+ }
+ return true;
+ }));
bool exclusive = StaticPrefs::storage_sqlite_exclusiveLock_enabled();
@@ -2469,6 +2470,18 @@ Connection::GetVariableLimit(int32_t* _limit) {
}
NS_IMETHODIMP
+Connection::SetVariableLimit(int32_t limit) {
+ if (!connectionReady()) {
+ return NS_ERROR_NOT_INITIALIZED;
+ }
+ int oldLimit = ::sqlite3_limit(mDBConn, SQLITE_LIMIT_VARIABLE_NUMBER, limit);
+ if (oldLimit < 0) {
+ return NS_ERROR_UNEXPECTED;
+ }
+ return NS_OK;
+}
+
+NS_IMETHODIMP
Connection::BeginTransaction() {
if (!connectionReady()) {
return NS_ERROR_NOT_INITIALIZED;