Bug 1460509 - part 84: Make HTMLEditRules::GetNodesFromPoint() use IgnoredErrorResult instead of ErrorResult r?m_kato
HTMLEditRules::GetNodesFromPoint() uses ErrorResult only for checking in
debug build. So, it should use IgnoredErrorResult instead.
MozReview-Commit-ID: 5roQI03A0kF
--- a/editor/libeditor/HTMLEditRules.cpp
+++ b/editor/libeditor/HTMLEditRules.cpp
@@ -7968,21 +7968,21 @@ HTMLEditRules::GetNodesFromPoint(
EditAction aOperation,
nsTArray<OwningNonNull<nsINode>>& outArrayOfNodes,
TouchContent aTouchContent)
{
if (NS_WARN_IF(!aPoint.IsSet())) {
return NS_ERROR_INVALID_ARG;
}
RefPtr<nsRange> range = new nsRange(aPoint.GetContainer());
- ErrorResult error;
- range->SetStart(aPoint, error);
+ IgnoredErrorResult ignoredError;
+ range->SetStart(aPoint, ignoredError);
// error will assert on failure, because we are not cleaning it up,
// but we're asserting in that case anyway.
- MOZ_ASSERT(!error.Failed());
+ MOZ_ASSERT(!ignoredError.Failed());
// Expand the range to include adjacent inlines
PromoteRange(*range, aOperation);
// Make array of ranges
nsTArray<RefPtr<nsRange>> arrayOfRanges;
// Stuff new opRange into array