|
1 Workaround GCC/Clang6 not supporting class-temporary#6.7 [1] |
|
2 Bugs: |
|
3 + https://bugzilla.mozilla.org/show_bug.cgi?id=1601707 |
|
4 + http://gcc.gnu.org/PR92831 |
|
5 + https://bugzilla.redhat.com/show_bug.cgi?id=1779082 |
|
6 |
|
7 [1] http://eel.is/c++draft/class.temporary#6.7 |
|
8 |
|
9 diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp |
|
10 --- a/dom/indexedDB/ActorsParent.cpp |
|
11 +++ b/dom/indexedDB/ActorsParent.cpp |
|
12 @@ -24311,11 +24311,11 @@ |
|
13 // if we allow overwrite or not. By not allowing overwrite we raise |
|
14 // detectable errors rather than corrupting data. |
|
15 DatabaseConnection::CachedStatement stmt; |
|
16 - const auto& optReplaceDirective = (!mOverwrite || keyUnset) |
|
17 - ? NS_LITERAL_CSTRING("") |
|
18 - : NS_LITERAL_CSTRING("OR REPLACE "); |
|
19 rv = aConnection->GetCachedStatement( |
|
20 - NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective + |
|
21 + NS_LITERAL_CSTRING("INSERT ") + |
|
22 + ((!mOverwrite || keyUnset) |
|
23 + ? NS_LITERAL_CSTRING("") |
|
24 + : NS_LITERAL_CSTRING("OR REPLACE ")) + |
|
25 NS_LITERAL_CSTRING("INTO object_data " |
|
26 "(object_store_id, key, file_ids, data) " |
|
27 "VALUES (:") + |
|
28 @@ -26076,9 +26076,6 @@ |
|
29 |
|
30 const bool usingKeyRange = mOptionalKeyRange.isSome(); |
|
31 |
|
32 - const auto& indexTable = mCursor->mUniqueIndex |
|
33 - ? NS_LITERAL_CSTRING("unique_index_data") |
|
34 - : NS_LITERAL_CSTRING("index_data"); |
|
35 |
|
36 NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column"); |
|
37 |
|
38 @@ -26099,7 +26096,9 @@ |
|
39 "object_data.file_ids, " |
|
40 "object_data.data " |
|
41 "FROM ") + |
|
42 - indexTable + |
|
43 + (mCursor->mUniqueIndex |
|
44 + ? NS_LITERAL_CSTRING("unique_index_data") |
|
45 + : NS_LITERAL_CSTRING("index_data")) + |
|
46 NS_LITERAL_CSTRING( |
|
47 " AS index_table " |
|
48 "JOIN object_data " |
|
49 @@ -26198,9 +26197,6 @@ |
|
50 |
|
51 const bool usingKeyRange = mOptionalKeyRange.isSome(); |
|
52 |
|
53 - const auto& table = mCursor->mUniqueIndex |
|
54 - ? NS_LITERAL_CSTRING("unique_index_data") |
|
55 - : NS_LITERAL_CSTRING("index_data"); |
|
56 |
|
57 NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column"); |
|
58 |
|
59 @@ -26218,7 +26214,10 @@ |
|
60 NS_LITERAL_CSTRING( |
|
61 "object_data_key " |
|
62 " FROM ") + |
|
63 - table + NS_LITERAL_CSTRING(" WHERE index_id = :") + |
|
64 + (mCursor->mUniqueIndex |
|
65 + ? NS_LITERAL_CSTRING("unique_index_data") |
|
66 + : NS_LITERAL_CSTRING("index_data")) + |
|
67 + NS_LITERAL_CSTRING(" WHERE index_id = :") + |
|
68 kStmtParamNameId; |
|
69 |
|
70 const auto keyRangeClause = |
|
71 |