зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1168606 - Fix code generation issue on Mac OS X. r=acreskey,ttung
As reported in https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110, some Mac OS X release build crashes with the original code, probably due to some temporary string being destroyed prematurely. Assigning to a named variable reportedly solves the issue. Differential Revision: https://phabricator.services.mozilla.com/D49422 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
e260591a8d
Коммит
ed63d87f12
|
@ -26082,13 +26082,16 @@ nsresult Cursor::OpenOp::DoIndexDatabaseWork(DatabaseConnection* aConnection) {
|
|||
|
||||
NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column");
|
||||
|
||||
const nsCString sortColumnAlias =
|
||||
NS_LITERAL_CSTRING("SELECT ") +
|
||||
MakeColumnPairSelectionList(
|
||||
NS_LITERAL_CSTRING("index_table.value"),
|
||||
NS_LITERAL_CSTRING("index_table.value_locale"), sortColumn,
|
||||
mCursor->IsLocaleAware()) +
|
||||
NS_LITERAL_CSTRING(", ");
|
||||
// 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"), sortColumn,
|
||||
mCursor->IsLocaleAware());
|
||||
const nsCString sortColumnAlias = NS_LITERAL_CSTRING("SELECT ") +
|
||||
columnPairSelectionList +
|
||||
NS_LITERAL_CSTRING(", ");
|
||||
|
||||
nsAutoCString queryStart = sortColumnAlias +
|
||||
NS_LITERAL_CSTRING(
|
||||
|
@ -26201,12 +26204,15 @@ nsresult Cursor::OpenOp::DoIndexKeyDatabaseWork(
|
|||
|
||||
NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column");
|
||||
|
||||
const nsCString sortColumnAlias =
|
||||
NS_LITERAL_CSTRING("SELECT ") +
|
||||
MakeColumnPairSelectionList(NS_LITERAL_CSTRING("value"),
|
||||
NS_LITERAL_CSTRING("value_locale"),
|
||||
sortColumn, mCursor->IsLocaleAware()) +
|
||||
NS_LITERAL_CSTRING(", ");
|
||||
// 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"),
|
||||
sortColumn, mCursor->IsLocaleAware());
|
||||
const nsCString sortColumnAlias = NS_LITERAL_CSTRING("SELECT ") +
|
||||
columnPairSelectionList +
|
||||
NS_LITERAL_CSTRING(", ");
|
||||
|
||||
nsAutoCString queryStart = sortColumnAlias +
|
||||
NS_LITERAL_CSTRING(
|
||||
|
|
Загрузка…
Ссылка в новой задаче