mozilla-bmo1601707.patch
branchfirefox73
changeset 1121 004e4b1efb26
parent 1120 6168af2507a2
child 1122 a9cd24eaa361
equal deleted inserted replaced
1120:6168af2507a2 1121:004e4b1efb26
     1 # HG changeset patch
       
     2 # Parent  862430a659a4f1fcbbbbfcf1cba98eb7e31035dc
       
     3 
       
     4 diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp
       
     5 --- a/dom/indexedDB/ActorsParent.cpp
       
     6 +++ b/dom/indexedDB/ActorsParent.cpp
       
     7 @@ -24612,19 +24612,19 @@ nsresult ObjectStoreAddOrPutRequestOp::D
       
     8      }
       
     9    }
       
    10  
       
    11    // The "|| keyUnset" here is mostly a debugging tool. If a key isn't
       
    12    // specified we should never have a collision and so it shouldn't matter
       
    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 +  const auto optReplaceDirective = (!mOverwrite || keyUnset)
       
    20 +                                       ? NS_LITERAL_CSTRING("")
       
    21 +                                       : NS_LITERAL_CSTRING("OR REPLACE ");
       
    22    rv = aConnection->GetCachedStatement(
       
    23        NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective +
       
    24            NS_LITERAL_CSTRING("INTO object_data "
       
    25                               "(object_store_id, key, file_ids, data) "
       
    26                               "VALUES (:") +
       
    27            kStmtParamNameObjectStoreId + NS_LITERAL_CSTRING(", :") +
       
    28            kStmtParamNameKey + NS_LITERAL_CSTRING(", :") +
       
    29            kStmtParamNameFileIds + NS_LITERAL_CSTRING(", :") +
       
    30 @@ -26452,19 +26452,19 @@ nsresult Cursor::OpenOp::DoIndexDatabase
       
    31    MOZ_ASSERT(mCursor->mType == OpenCursorParams::TIndexOpenCursorParams);
       
    32    MOZ_ASSERT(mCursor->mObjectStoreId);
       
    33    MOZ_ASSERT(mCursor->mIndexId);
       
    34  
       
    35    AUTO_PROFILER_LABEL("Cursor::OpenOp::DoIndexDatabaseWork", DOM);
       
    36  
       
    37    const bool usingKeyRange = mOptionalKeyRange.isSome();
       
    38  
       
    39 -  const auto& indexTable = mCursor->mUniqueIndex
       
    40 -                               ? NS_LITERAL_CSTRING("unique_index_data")
       
    41 -                               : NS_LITERAL_CSTRING("index_data");
       
    42 +  const auto indexTable = mCursor->mUniqueIndex
       
    43 +                              ? NS_LITERAL_CSTRING("unique_index_data")
       
    44 +                              : NS_LITERAL_CSTRING("index_data");
       
    45  
       
    46    // The result of MakeColumnPairSelectionList is stored in a local variable,
       
    47    // since inlining it into the next statement causes a crash on some Mac OS X
       
    48    // builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110).
       
    49    const auto columnPairSelectionList = MakeColumnPairSelectionList(
       
    50        NS_LITERAL_CSTRING("index_table.value"),
       
    51        NS_LITERAL_CSTRING("index_table.value_locale"), kColumnNameAliasSortKey,
       
    52        mCursor->IsLocaleAware());
       
    53 @@ -26558,19 +26558,19 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
       
    54    MOZ_ASSERT(mCursor->mType == OpenCursorParams::TIndexOpenKeyCursorParams);
       
    55    MOZ_ASSERT(mCursor->mObjectStoreId);
       
    56    MOZ_ASSERT(mCursor->mIndexId);
       
    57  
       
    58    AUTO_PROFILER_LABEL("Cursor::OpenOp::DoIndexKeyDatabaseWork", DOM);
       
    59  
       
    60    const bool usingKeyRange = mOptionalKeyRange.isSome();
       
    61  
       
    62 -  const auto& table = mCursor->mUniqueIndex
       
    63 -                          ? NS_LITERAL_CSTRING("unique_index_data")
       
    64 -                          : NS_LITERAL_CSTRING("index_data");
       
    65 +  const auto table = mCursor->mUniqueIndex
       
    66 +                         ? NS_LITERAL_CSTRING("unique_index_data")
       
    67 +                         : NS_LITERAL_CSTRING("index_data");
       
    68  
       
    69    // The result of MakeColumnPairSelectionList is stored in a local variable,
       
    70    // since inlining it into the next statement causes a crash on some Mac OS X
       
    71    // builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110).
       
    72    const auto columnPairSelectionList = MakeColumnPairSelectionList(
       
    73        NS_LITERAL_CSTRING("value"), NS_LITERAL_CSTRING("value_locale"),
       
    74        kColumnNameAliasSortKey, mCursor->IsLocaleAware());
       
    75    const nsCString sortColumnAlias = NS_LITERAL_CSTRING("SELECT ") +