mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00

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