This repository has been archived by the owner on Apr 12, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapted original patch[0] to also fix dom localstorage. [0]: https://bugzilla.mozilla.org/show_bug.cgi?id=1601707#c6
- Loading branch information
Showing
2 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
pkgs/applications/networking/browsers/firefox/fix-ff71-lto.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
Original Patch: https://bugzilla.mozilla.org/show_bug.cgi?id=1601707#c6 | ||
|
||
Also fixes the issues with dom localstorage. | ||
|
||
--- a/dom/indexedDB/ActorsParent.cpp | ||
+++ b/dom/indexedDB/ActorsParent.cpp | ||
@@ -24311,11 +24311,11 @@ nsresult ObjectStoreAddOrPutRequestOp::DoDatabaseWork( | ||
// 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 "); | ||
rv = aConnection->GetCachedStatement( | ||
- NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective + | ||
+ NS_LITERAL_CSTRING("INSERT ") + | ||
+ ((!mOverwrite || keyUnset) | ||
+ ? NS_LITERAL_CSTRING("") | ||
+ : NS_LITERAL_CSTRING("OR REPLACE ")) + | ||
NS_LITERAL_CSTRING("INTO object_data " | ||
"(object_store_id, key, file_ids, data) " | ||
"VALUES (:") + | ||
@@ -26076,9 +26076,6 @@ nsresult Cursor::OpenOp::DoIndexDatabaseWork(DatabaseConnection* aConnection) { | ||
|
||
const bool usingKeyRange = mOptionalKeyRange.isSome(); | ||
|
||
- const auto& indexTable = mCursor->mUniqueIndex | ||
- ? NS_LITERAL_CSTRING("unique_index_data") | ||
- : NS_LITERAL_CSTRING("index_data"); | ||
|
||
NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column"); | ||
|
||
@@ -26099,7 +26096,9 @@ nsresult Cursor::OpenOp::DoIndexDatabaseWork(DatabaseConnection* aConnection) { | ||
"object_data.file_ids, " | ||
"object_data.data " | ||
"FROM ") + | ||
- indexTable + | ||
+ (mCursor->mUniqueIndex | ||
+ ? NS_LITERAL_CSTRING("unique_index_data") | ||
+ : NS_LITERAL_CSTRING("index_data")) + | ||
NS_LITERAL_CSTRING( | ||
" AS index_table " | ||
"JOIN object_data " | ||
@@ -26198,9 +26197,6 @@ nsresult Cursor::OpenOp::DoIndexKeyDatabaseWork( | ||
|
||
const bool usingKeyRange = mOptionalKeyRange.isSome(); | ||
|
||
- const auto& table = mCursor->mUniqueIndex | ||
- ? NS_LITERAL_CSTRING("unique_index_data") | ||
- : NS_LITERAL_CSTRING("index_data"); | ||
|
||
NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column"); | ||
|
||
@@ -26218,7 +26214,10 @@ nsresult Cursor::OpenOp::DoIndexKeyDatabaseWork( | ||
NS_LITERAL_CSTRING( | ||
"object_data_key " | ||
" FROM ") + | ||
- table + NS_LITERAL_CSTRING(" WHERE index_id = :") + | ||
+ (mCursor->mUniqueIndex | ||
+ ? NS_LITERAL_CSTRING("unique_index_data") | ||
+ : NS_LITERAL_CSTRING("index_data")) + | ||
+ NS_LITERAL_CSTRING(" WHERE index_id = :") + | ||
kStmtParamNameId; | ||
|
||
const auto keyRangeClause = | ||
diff --git a/dom/localstorage/ActorsParent.cpp b/dom/localstorage/ActorsParent.cpp | ||
index 9c46c20670..642cef1701 100644 | ||
--- a/dom/localstorage/ActorsParent.cpp | ||
+++ b/dom/localstorage/ActorsParent.cpp | ||
@@ -6959,13 +6959,10 @@ nsresult PrepareDatastoreOp::Start() { | ||
MOZ_ASSERT(!QuotaClient::IsShuttingDownOnBackgroundThread()); | ||
MOZ_ASSERT(MayProceed()); | ||
|
||
- const LSRequestCommonParams& commonParams = | ||
- mForPreload | ||
- ? mParams.get_LSRequestPreloadDatastoreParams().commonParams() | ||
- : mParams.get_LSRequestPrepareDatastoreParams().commonParams(); | ||
- | ||
const PrincipalInfo& storagePrincipalInfo = | ||
- commonParams.storagePrincipalInfo(); | ||
+ mForPreload | ||
+ ? mParams.get_LSRequestPreloadDatastoreParams().commonParams().storagePrincipalInfo() | ||
+ : mParams.get_LSRequestPrepareDatastoreParams().commonParams().storagePrincipalInfo(); | ||
|
||
if (storagePrincipalInfo.type() == PrincipalInfo::TSystemPrincipalInfo) { | ||
QuotaManager::GetInfoForChrome(&mSuffix, &mGroup, &mOrigin); | ||
@@ -6996,10 +6993,9 @@ nsresult PrepareDatastoreOp::CheckExistingOperations() { | ||
return NS_ERROR_FAILURE; | ||
} | ||
|
||
- const LSRequestCommonParams& commonParams = | ||
- mForPreload | ||
- ? mParams.get_LSRequestPreloadDatastoreParams().commonParams() | ||
- : mParams.get_LSRequestPrepareDatastoreParams().commonParams(); | ||
+ const LSRequestCommonParams& preloadCommonParams = mParams.get_LSRequestPreloadDatastoreParams().commonParams(); | ||
+ const LSRequestCommonParams& prepareCommonParams = mParams.get_LSRequestPrepareDatastoreParams().commonParams(); | ||
+ const LSRequestCommonParams& commonParams = mForPreload ? preloadCommonParams : prepareCommonParams; | ||
|
||
const PrincipalInfo& storagePrincipalInfo = | ||
commonParams.storagePrincipalInfo(); |