Masayuki Nakano 6dfe53690e Bug 1837463 - Make move node methods return nsresult instead of using ErrorResult out-param r=m_kato
The assertion failure is caused by that `RemoveChild()` or `InsertBefore()` is
failed, and overriding the error code with `NS_ERROR_EDITOR_DESTROYED`.

For saving the construction cost of `ErrorResult` instances, the related methods
take `ErrorResult&` as in/out-param.  However, the cost is not so high if we
use `IgnoredErrorResult` and do not create it in the `for` loop in
`MoveChildrenBetween()`.  Therefore, this patch make them return `nsresult`
simply to avoid updating error code and suppressing JS error in various places.

Depends on D180786

Differential Revision: https://phabricator.services.mozilla.com/D180787
2023-06-16 08:17:16 +00:00
..