For for mozbz#1601707 - segfault in doDatabaseWork - not working addons

This commit is contained in:
Jan Horak 2020-01-07 13:46:52 +01:00
parent 1a74061329
commit 301ffd6239
2 changed files with 18 additions and 69 deletions

View File

@ -353,8 +353,7 @@ This package contains results of tests executed during build.
# Workaround for kiosk mode # Workaround for kiosk mode
# https://bugzilla.mozilla.org/show_bug.cgi?id=1594738 # https://bugzilla.mozilla.org/show_bug.cgi?id=1594738
#%patch241 -p1 -b .kiosk-workaround #%patch241 -p1 -b .kiosk-workaround
# Cannot be applied at the moment, lot of hunk failures %patch242 -p1 -b .mozilla-1601707
#%patch242 -p1 -b .mozilla-1601707
%patch402 -p1 -b .1196777 %patch402 -p1 -b .1196777
%ifarch %{arm} %ifarch %{arm}

View File

@ -1,7 +1,7 @@
diff -up firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround firefox-71.0/dom/indexedDB/ActorsParent.cpp diff -up firefox-72.0/dom/indexedDB/ActorsParent.cpp.mozilla-1601707 firefox-72.0/dom/indexedDB/ActorsParent.cpp
--- firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround 2019-12-02 13:22:58.000000000 +0100 --- firefox-72.0/dom/indexedDB/ActorsParent.cpp.mozilla-1601707 2020-01-03 19:57:54.000000000 +0100
+++ firefox-71.0/dom/indexedDB/ActorsParent.cpp 2019-12-08 21:52:54.449199120 +0100 +++ firefox-72.0/dom/indexedDB/ActorsParent.cpp 2020-01-07 13:33:31.950688264 +0100
@@ -24311,11 +24311,11 @@ nsresult ObjectStoreAddOrPutRequestOp::D @@ -24617,11 +24617,11 @@ nsresult ObjectStoreAddOrPutRequestOp::D
// if we allow overwrite or not. By not allowing overwrite we raise // if we allow overwrite or not. By not allowing overwrite we raise
// detectable errors rather than corrupting data. // detectable errors rather than corrupting data.
DatabaseConnection::CachedStatement stmt; DatabaseConnection::CachedStatement stmt;
@ -17,69 +17,18 @@ diff -up firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround firefox-71.0
NS_LITERAL_CSTRING("INTO object_data " NS_LITERAL_CSTRING("INTO object_data "
"(object_store_id, key, file_ids, data) " "(object_store_id, key, file_ids, data) "
"VALUES (:") + "VALUES (:") +
@@ -25869,11 +25869,8 @@ void Cursor::OpenOp::PrepareIndexKeyCond @@ -26457,10 +26457,6 @@ nsresult Cursor::OpenOp::DoIndexDatabase
}
}
- const auto& comparisonChar =
- isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<");
-
mCursor->mContinueToQuery =
- aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") + comparisonChar +
+ aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") + (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) +
NS_LITERAL_CSTRING("= :") + kStmtParamNameCurrentKey;
switch (mCursor->mDirection) {
@@ -25881,11 +25878,11 @@ void Cursor::OpenOp::PrepareIndexKeyCond
case IDBCursor::PREV:
mCursor->mContinueQuery =
aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") +
- comparisonChar + NS_LITERAL_CSTRING("= :") +
+ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING("= :") +
kStmtParamNameCurrentKey + NS_LITERAL_CSTRING(" AND ( sort_column ") +
- comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
+ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
NS_LITERAL_CSTRING(" OR ") + aObjectDataKeyPrefix +
- NS_LITERAL_CSTRING("object_data_key ") + comparisonChar +
+ NS_LITERAL_CSTRING("object_data_key ") + (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) +
NS_LITERAL_CSTRING(" :") + kStmtParamNameObjectStorePosition +
NS_LITERAL_CSTRING(" ) ");
@@ -25896,12 +25893,12 @@ void Cursor::OpenOp::PrepareIndexKeyCond
"(sort_column == :") +
kStmtParamNameCurrentKey + NS_LITERAL_CSTRING(" AND ") +
aObjectDataKeyPrefix + NS_LITERAL_CSTRING("object_data_key ") +
- comparisonChar + NS_LITERAL_CSTRING("= :") +
+ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING("= :") +
kStmtParamNameObjectStorePosition +
NS_LITERAL_CSTRING(
") OR "
"sort_column ") +
- comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
+ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
NS_LITERAL_CSTRING(")");
break;
@@ -25909,7 +25906,7 @@ void Cursor::OpenOp::PrepareIndexKeyCond
case IDBCursor::PREV_UNIQUE:
mCursor->mContinueQuery =
aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") +
- comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey;
+ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey;
break;
default:
@@ -26076,9 +26073,6 @@ nsresult Cursor::OpenOp::DoIndexDatabase
const bool usingKeyRange = mOptionalKeyRange.isSome(); const bool usingKeyRange = mOptionalKeyRange.isSome();
- const auto& indexTable = mCursor->mUniqueIndex - const auto& indexTable = mCursor->mUniqueIndex
- ? NS_LITERAL_CSTRING("unique_index_data") - ? NS_LITERAL_CSTRING("unique_index_data")
- : NS_LITERAL_CSTRING("index_data"); - : NS_LITERAL_CSTRING("index_data");
-
NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column"); // 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
@@ -26099,7 +26093,9 @@ nsresult Cursor::OpenOp::DoIndexDatabase // builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110).
@@ -26478,7 +26474,9 @@ nsresult Cursor::OpenOp::DoIndexDatabase
"object_data.file_ids, " "object_data.file_ids, "
"object_data.data " "object_data.data "
"FROM ") + "FROM ") +
@ -90,17 +39,18 @@ diff -up firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround firefox-71.0
NS_LITERAL_CSTRING( NS_LITERAL_CSTRING(
" AS index_table " " AS index_table "
"JOIN object_data " "JOIN object_data "
@@ -26198,9 +26194,6 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab @@ -26563,10 +26561,6 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
const bool usingKeyRange = mOptionalKeyRange.isSome(); const bool usingKeyRange = mOptionalKeyRange.isSome();
- const auto& table = mCursor->mUniqueIndex - const auto& table = mCursor->mUniqueIndex
- ? NS_LITERAL_CSTRING("unique_index_data") - ? NS_LITERAL_CSTRING("unique_index_data")
- : NS_LITERAL_CSTRING("index_data"); - : NS_LITERAL_CSTRING("index_data");
-
NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column"); // 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
@@ -26218,7 +26211,10 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab // builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110).
@@ -26581,7 +26575,10 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
NS_LITERAL_CSTRING( NS_LITERAL_CSTRING(
"object_data_key " "object_data_key "
" FROM ") + " FROM ") +
@ -111,4 +61,4 @@ diff -up firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround firefox-71.0
+ NS_LITERAL_CSTRING(" WHERE index_id = :") + + NS_LITERAL_CSTRING(" WHERE index_id = :") +
kStmtParamNameId; kStmtParamNameId;
const auto keyRangeClause = const auto keyRangeClause = MaybeGetBindingClauseForKeyRange(