summaryrefslogtreecommitdiffstats
path: root/storage/mozStorageConnection.cpp
diff options
context:
space:
mode:
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;