2020-01-08 12:59:18 +01:00
|
|
|
# HG changeset patch
|
|
|
|
# Parent 862430a659a4f1fcbbbbfcf1cba98eb7e31035dc
|
|
|
|
|
2019-12-18 18:50:22 +01:00
|
|
|
diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp
|
|
|
|
--- a/dom/indexedDB/ActorsParent.cpp
|
|
|
|
+++ b/dom/indexedDB/ActorsParent.cpp
|
2020-01-08 12:59:18 +01:00
|
|
|
@@ -24612,19 +24612,19 @@ nsresult ObjectStoreAddOrPutRequestOp::D
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// The "|| keyUnset" here is mostly a debugging tool. If a key isn't
|
|
|
|
// specified we should never have a collision and so it shouldn't matter
|
2019-12-18 18:50:22 +01:00
|
|
|
// if we allow overwrite or not. By not allowing overwrite we raise
|
|
|
|
// detectable errors rather than corrupting data.
|
|
|
|
DatabaseConnection::CachedStatement stmt;
|
|
|
|
- const auto& optReplaceDirective = (!mOverwrite || keyUnset)
|
|
|
|
- ? NS_LITERAL_CSTRING("")
|
|
|
|
- : NS_LITERAL_CSTRING("OR REPLACE ");
|
|
|
|
+ const auto optReplaceDirective = (!mOverwrite || keyUnset)
|
|
|
|
+ ? NS_LITERAL_CSTRING("")
|
|
|
|
+ : NS_LITERAL_CSTRING("OR REPLACE ");
|
|
|
|
rv = aConnection->GetCachedStatement(
|
|
|
|
NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective +
|
|
|
|
NS_LITERAL_CSTRING("INTO object_data "
|
2020-01-08 12:59:18 +01:00
|
|
|
"(object_store_id, key, file_ids, data) "
|
|
|
|
"VALUES (:") +
|
|
|
|
kStmtParamNameObjectStoreId + NS_LITERAL_CSTRING(", :") +
|
|
|
|
kStmtParamNameKey + NS_LITERAL_CSTRING(", :") +
|
|
|
|
kStmtParamNameFileIds + NS_LITERAL_CSTRING(", :") +
|
|
|
|
@@ -26452,19 +26452,19 @@ nsresult Cursor::OpenOp::DoIndexDatabase
|
|
|
|
MOZ_ASSERT(mCursor->mType == OpenCursorParams::TIndexOpenCursorParams);
|
|
|
|
MOZ_ASSERT(mCursor->mObjectStoreId);
|
|
|
|
MOZ_ASSERT(mCursor->mIndexId);
|
2019-12-18 18:50:22 +01:00
|
|
|
|
2020-01-08 12:59:18 +01:00
|
|
|
AUTO_PROFILER_LABEL("Cursor::OpenOp::DoIndexDatabaseWork", DOM);
|
2019-12-18 18:50:22 +01:00
|
|
|
|
|
|
|
const bool usingKeyRange = mOptionalKeyRange.isSome();
|
|
|
|
|
|
|
|
- const auto& indexTable = mCursor->mUniqueIndex
|
|
|
|
- ? NS_LITERAL_CSTRING("unique_index_data")
|
|
|
|
- : NS_LITERAL_CSTRING("index_data");
|
|
|
|
+ const auto indexTable = mCursor->mUniqueIndex
|
|
|
|
+ ? NS_LITERAL_CSTRING("unique_index_data")
|
|
|
|
+ : NS_LITERAL_CSTRING("index_data");
|
|
|
|
|
2020-01-08 12:59:18 +01:00
|
|
|
// The result of MakeColumnPairSelectionList is stored in a local variable,
|
|
|
|
// since inlining it into the next statement causes a crash on some Mac OS X
|
|
|
|
// builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110).
|
|
|
|
const auto columnPairSelectionList = MakeColumnPairSelectionList(
|
|
|
|
NS_LITERAL_CSTRING("index_table.value"),
|
|
|
|
NS_LITERAL_CSTRING("index_table.value_locale"), kColumnNameAliasSortKey,
|
|
|
|
mCursor->IsLocaleAware());
|
|
|
|
@@ -26558,19 +26558,19 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
|
|
|
|
MOZ_ASSERT(mCursor->mType == OpenCursorParams::TIndexOpenKeyCursorParams);
|
|
|
|
MOZ_ASSERT(mCursor->mObjectStoreId);
|
|
|
|
MOZ_ASSERT(mCursor->mIndexId);
|
2019-12-18 18:50:22 +01:00
|
|
|
|
2020-01-08 12:59:18 +01:00
|
|
|
AUTO_PROFILER_LABEL("Cursor::OpenOp::DoIndexKeyDatabaseWork", DOM);
|
2019-12-18 18:50:22 +01:00
|
|
|
|
|
|
|
const bool usingKeyRange = mOptionalKeyRange.isSome();
|
|
|
|
|
|
|
|
- const auto& table = mCursor->mUniqueIndex
|
|
|
|
- ? NS_LITERAL_CSTRING("unique_index_data")
|
|
|
|
- : NS_LITERAL_CSTRING("index_data");
|
|
|
|
+ const auto table = mCursor->mUniqueIndex
|
|
|
|
+ ? NS_LITERAL_CSTRING("unique_index_data")
|
|
|
|
+ : NS_LITERAL_CSTRING("index_data");
|
|
|
|
|
2020-01-08 12:59:18 +01:00
|
|
|
// The result of MakeColumnPairSelectionList is stored in a local variable,
|
|
|
|
// since inlining it into the next statement causes a crash on some Mac OS X
|
|
|
|
// builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110).
|
|
|
|
const auto columnPairSelectionList = MakeColumnPairSelectionList(
|
|
|
|
NS_LITERAL_CSTRING("value"), NS_LITERAL_CSTRING("value_locale"),
|
|
|
|
kColumnNameAliasSortKey, mCursor->IsLocaleAware());
|
|
|
|
const nsCString sortColumnAlias = NS_LITERAL_CSTRING("SELECT ") +
|