From d2a965e8837b47a01dddefb0b16bf676c2aa9f15 Mon Sep 17 00:00:00 2001 From: Peter Van der Beken Date: Wed, 29 Sep 2021 07:24:37 +0000 Subject: [PATCH] Bug 1729329 - Mark txPushNewContext::addSort as infallible. r=farre Differential Revision: https://phabricator.services.mozilla.com/D124660 --- dom/xslt/xslt/txInstructions.cpp | 3 +-- dom/xslt/xslt/txInstructions.h | 10 +++++----- dom/xslt/xslt/txStylesheetCompileHandlers.cpp | 7 +++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/dom/xslt/xslt/txInstructions.cpp b/dom/xslt/xslt/txInstructions.cpp index 87bd181ca785..52bd24b8059e 100644 --- a/dom/xslt/xslt/txInstructions.cpp +++ b/dom/xslt/xslt/txInstructions.cpp @@ -559,7 +559,7 @@ nsresult txPushNewContext::execute(txExecutionState& aEs) { return NS_OK; } -nsresult txPushNewContext::addSort(UniquePtr&& aSelectExpr, +void txPushNewContext::addSort(UniquePtr&& aSelectExpr, UniquePtr&& aLangExpr, UniquePtr&& aDataTypeExpr, UniquePtr&& aOrderExpr, @@ -571,7 +571,6 @@ nsresult txPushNewContext::addSort(UniquePtr&& aSelectExpr, key->mDataTypeExpr = std::move(aDataTypeExpr); key->mOrderExpr = std::move(aOrderExpr); key->mCaseOrderExpr = std::move(aCaseOrderExpr); - return NS_OK; } nsresult txPushNullTemplateRule::execute(txExecutionState& aEs) { diff --git a/dom/xslt/xslt/txInstructions.h b/dom/xslt/xslt/txInstructions.h index 97e655075f85..61e7ec956c79 100644 --- a/dom/xslt/xslt/txInstructions.h +++ b/dom/xslt/xslt/txInstructions.h @@ -229,11 +229,11 @@ class txPushNewContext : public txInstruction { TX_DECL_TXINSTRUCTION - nsresult addSort(mozilla::UniquePtr&& aSelectExpr, - mozilla::UniquePtr&& aLangExpr, - mozilla::UniquePtr&& aDataTypeExpr, - mozilla::UniquePtr&& aOrderExpr, - mozilla::UniquePtr&& aCaseOrderExpr); + void addSort(mozilla::UniquePtr&& aSelectExpr, + mozilla::UniquePtr&& aLangExpr, + mozilla::UniquePtr&& aDataTypeExpr, + mozilla::UniquePtr&& aOrderExpr, + mozilla::UniquePtr&& aCaseOrderExpr); struct SortKey { mozilla::UniquePtr mSelectExpr; diff --git a/dom/xslt/xslt/txStylesheetCompileHandlers.cpp b/dom/xslt/xslt/txStylesheetCompileHandlers.cpp index 224437de4c89..b2f8e9d874fa 100644 --- a/dom/xslt/xslt/txStylesheetCompileHandlers.cpp +++ b/dom/xslt/xslt/txStylesheetCompileHandlers.cpp @@ -1882,10 +1882,9 @@ static nsresult txFnStartSort(int32_t aNamespaceID, nsAtom* aLocalName, caseOrder); NS_ENSURE_SUCCESS(rv, rv); - rv = aState.mSorter->addSort(std::move(select), std::move(lang), - std::move(dataType), std::move(order), - std::move(caseOrder)); - NS_ENSURE_SUCCESS(rv, rv); + aState.mSorter->addSort(std::move(select), std::move(lang), + std::move(dataType), std::move(order), + std::move(caseOrder)); return aState.pushHandlerTable(gTxIgnoreHandler); }