|
1 # HG changeset patch |
|
2 # Parent 862430a659a4f1fcbbbbfcf1cba98eb7e31035dc |
|
3 |
1 diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp |
4 diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp |
2 --- a/dom/indexedDB/ActorsParent.cpp |
5 --- a/dom/indexedDB/ActorsParent.cpp |
3 +++ b/dom/indexedDB/ActorsParent.cpp |
6 +++ b/dom/indexedDB/ActorsParent.cpp |
4 @@ -24311,9 +24311,9 @@ |
7 @@ -24612,19 +24612,19 @@ nsresult ObjectStoreAddOrPutRequestOp::D |
|
8 } |
|
9 } |
|
10 |
|
11 // The "|| keyUnset" here is mostly a debugging tool. If a key isn't |
|
12 // specified we should never have a collision and so it shouldn't matter |
5 // if we allow overwrite or not. By not allowing overwrite we raise |
13 // if we allow overwrite or not. By not allowing overwrite we raise |
6 // detectable errors rather than corrupting data. |
14 // detectable errors rather than corrupting data. |
7 DatabaseConnection::CachedStatement stmt; |
15 DatabaseConnection::CachedStatement stmt; |
8 - const auto& optReplaceDirective = (!mOverwrite || keyUnset) |
16 - const auto& optReplaceDirective = (!mOverwrite || keyUnset) |
9 - ? NS_LITERAL_CSTRING("") |
17 - ? NS_LITERAL_CSTRING("") |
12 + ? NS_LITERAL_CSTRING("") |
20 + ? NS_LITERAL_CSTRING("") |
13 + : NS_LITERAL_CSTRING("OR REPLACE "); |
21 + : NS_LITERAL_CSTRING("OR REPLACE "); |
14 rv = aConnection->GetCachedStatement( |
22 rv = aConnection->GetCachedStatement( |
15 NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective + |
23 NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective + |
16 NS_LITERAL_CSTRING("INTO object_data " |
24 NS_LITERAL_CSTRING("INTO object_data " |
17 @@ -25869,7 +25869,7 @@ |
25 "(object_store_id, key, file_ids, data) " |
18 } |
26 "VALUES (:") + |
19 } |
27 kStmtParamNameObjectStoreId + NS_LITERAL_CSTRING(", :") + |
|
28 kStmtParamNameKey + NS_LITERAL_CSTRING(", :") + |
|
29 kStmtParamNameFileIds + NS_LITERAL_CSTRING(", :") + |
|
30 @@ -26452,19 +26452,19 @@ nsresult Cursor::OpenOp::DoIndexDatabase |
|
31 MOZ_ASSERT(mCursor->mType == OpenCursorParams::TIndexOpenCursorParams); |
|
32 MOZ_ASSERT(mCursor->mObjectStoreId); |
|
33 MOZ_ASSERT(mCursor->mIndexId); |
20 |
34 |
21 - const auto& comparisonChar = |
35 AUTO_PROFILER_LABEL("Cursor::OpenOp::DoIndexDatabaseWork", DOM); |
22 + const auto comparisonChar = |
|
23 isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<"); |
|
24 |
|
25 mCursor->mContinueToQuery = |
|
26 @@ -26076,9 +26076,9 @@ |
|
27 |
36 |
28 const bool usingKeyRange = mOptionalKeyRange.isSome(); |
37 const bool usingKeyRange = mOptionalKeyRange.isSome(); |
29 |
38 |
30 - const auto& indexTable = mCursor->mUniqueIndex |
39 - const auto& indexTable = mCursor->mUniqueIndex |
31 - ? NS_LITERAL_CSTRING("unique_index_data") |
40 - ? NS_LITERAL_CSTRING("unique_index_data") |
32 - : NS_LITERAL_CSTRING("index_data"); |
41 - : NS_LITERAL_CSTRING("index_data"); |
33 + const auto indexTable = mCursor->mUniqueIndex |
42 + const auto indexTable = mCursor->mUniqueIndex |
34 + ? NS_LITERAL_CSTRING("unique_index_data") |
43 + ? NS_LITERAL_CSTRING("unique_index_data") |
35 + : NS_LITERAL_CSTRING("index_data"); |
44 + : NS_LITERAL_CSTRING("index_data"); |
36 |
45 |
37 NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column"); |
46 // The result of MakeColumnPairSelectionList is stored in a local variable, |
|
47 // since inlining it into the next statement causes a crash on some Mac OS X |
|
48 // builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110). |
|
49 const auto columnPairSelectionList = MakeColumnPairSelectionList( |
|
50 NS_LITERAL_CSTRING("index_table.value"), |
|
51 NS_LITERAL_CSTRING("index_table.value_locale"), kColumnNameAliasSortKey, |
|
52 mCursor->IsLocaleAware()); |
|
53 @@ -26558,19 +26558,19 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab |
|
54 MOZ_ASSERT(mCursor->mType == OpenCursorParams::TIndexOpenKeyCursorParams); |
|
55 MOZ_ASSERT(mCursor->mObjectStoreId); |
|
56 MOZ_ASSERT(mCursor->mIndexId); |
38 |
57 |
39 @@ -26198,9 +26198,9 @@ |
58 AUTO_PROFILER_LABEL("Cursor::OpenOp::DoIndexKeyDatabaseWork", DOM); |
40 |
59 |
41 const bool usingKeyRange = mOptionalKeyRange.isSome(); |
60 const bool usingKeyRange = mOptionalKeyRange.isSome(); |
42 |
61 |
43 - const auto& table = mCursor->mUniqueIndex |
62 - const auto& table = mCursor->mUniqueIndex |
44 - ? NS_LITERAL_CSTRING("unique_index_data") |
63 - ? NS_LITERAL_CSTRING("unique_index_data") |
45 - : NS_LITERAL_CSTRING("index_data"); |
64 - : NS_LITERAL_CSTRING("index_data"); |
46 + const auto table = mCursor->mUniqueIndex |
65 + const auto table = mCursor->mUniqueIndex |
47 + ? NS_LITERAL_CSTRING("unique_index_data") |
66 + ? NS_LITERAL_CSTRING("unique_index_data") |
48 + : NS_LITERAL_CSTRING("index_data"); |
67 + : NS_LITERAL_CSTRING("index_data"); |
49 |
68 |
50 NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column"); |
69 // The result of MakeColumnPairSelectionList is stored in a local variable, |
51 |
70 // since inlining it into the next statement causes a crash on some Mac OS X |
52 |
71 // builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110). |
|
72 const auto columnPairSelectionList = MakeColumnPairSelectionList( |
|
73 NS_LITERAL_CSTRING("value"), NS_LITERAL_CSTRING("value_locale"), |
|
74 kColumnNameAliasSortKey, mCursor->IsLocaleAware()); |
|
75 const nsCString sortColumnAlias = NS_LITERAL_CSTRING("SELECT ") + |