www-client/firefox: workaround compilers that do not exten lifetime
authorJory Pratt <anarchy@gentoo.org>
Mon, 6 Jan 2020 17:43:04 +0000 (11:43 -0600)
committerJory Pratt <anarchy@gentoo.org>
Mon, 6 Jan 2020 17:43:18 +0000 (11:43 -0600)
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
www-client/firefox/files/mozilla-bug1601707-gcc-fixup-72.patch [new file with mode: 0644]
www-client/firefox/firefox-72.0.ebuild

diff --git a/www-client/firefox/files/mozilla-bug1601707-gcc-fixup-72.patch b/www-client/firefox/files/mozilla-bug1601707-gcc-fixup-72.patch
new file mode 100644 (file)
index 0000000..8e2cbee
--- /dev/null
@@ -0,0 +1,83 @@
+
+# HG changeset patch
+# User Simon Giesecke <sgiesecke@mozilla.com>
+# Date 1576592608 0
+# Node ID 810f85be6ba971bfad7fdacf1722e7c40b08be75
+# Parent  230e7d093c196ddbe7430179321d236590936cfa
+Bug 1601707 - Workaround for compilers that do not extend the lifetime of temporaries resulting from ?: expressions. r=dom-workers-and-storage-reviewers,janv
+
+Differential Revision: https://phabricator.services.mozilla.com/D56873
+
+diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp
+--- a/dom/indexedDB/ActorsParent.cpp
++++ b/dom/indexedDB/ActorsParent.cpp
+@@ -24578,19 +24578,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
+   // 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 "
+                              "(object_store_id, key, file_ids, data) "
+                              "VALUES (:") +
+           kStmtParamNameObjectStoreId + NS_LITERAL_CSTRING(", :") +
+           kStmtParamNameKey + NS_LITERAL_CSTRING(", :") +
+           kStmtParamNameFileIds + NS_LITERAL_CSTRING(", :") +
+@@ -26422,19 +26422,19 @@ nsresult Cursor::OpenOp::DoIndexDatabase
+   MOZ_ASSERT(mCursor->mType == OpenCursorParams::TIndexOpenCursorParams);
+   MOZ_ASSERT(mCursor->mObjectStoreId);
+   MOZ_ASSERT(mCursor->mIndexId);
+   AUTO_PROFILER_LABEL("Cursor::OpenOp::DoIndexDatabaseWork", DOM);
+   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");
+   // 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());
+@@ -26528,19 +26528,19 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
+   MOZ_ASSERT(mCursor->mType == OpenCursorParams::TIndexOpenKeyCursorParams);
+   MOZ_ASSERT(mCursor->mObjectStoreId);
+   MOZ_ASSERT(mCursor->mIndexId);
+   AUTO_PROFILER_LABEL("Cursor::OpenOp::DoIndexKeyDatabaseWork", DOM);
+   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");
+   // 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 ") +
+
index d59811c1547c1242bcd13090ef5dbed1afd66c4c..27a6d5d655734853cbd3827d5b9fe719968e686b 100644 (file)
@@ -259,6 +259,7 @@ src_prepare() {
        use !wayland && rm -f "${WORKDIR}/firefox/2019_mozilla-bug1539471.patch"
        eapply "${WORKDIR}/firefox"
        eapply "${FILESDIR}/${PN}-69.0-lto-gcc-fix.patch"
+       eapply "${FILESDIR}/mozilla-bug1601707-gcc-fixup-72.patch"
 
        # Allow user to apply any additional patches without modifing ebuild
        eapply_user