Issue #2135 - Bug 1393806/Part 1: Change nsNodeUtils cloning/adopting stuff to use an ErrorResult for errors

This will allow us to propagate out more informative errors in some cases.
This commit is contained in:
FranklinDM 2023-03-04 17:05:41 +08:00 committed by roytam1
commit e65a864a3e
6 changed files with 100 additions and 103 deletions

View file

@ -3084,9 +3084,7 @@ nsINode::WrapObject(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
already_AddRefed<nsINode>
nsINode::CloneNode(bool aDeep, ErrorResult& aError)
{
nsCOMPtr<nsINode> result;
aError = nsNodeUtils::CloneNodeImpl(this, aDeep, getter_AddRefs(result));
return result.forget();
return nsNodeUtils::CloneNodeImpl(this, aDeep, aError);
}
nsDOMAttributeMap*