summaryrefslogtreecommitdiff
path: root/dom/svg
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2023-03-04 17:05:41 +0800
committerFranklinDM <mrmineshafter17@gmail.com>2023-03-04 21:32:16 +0800
commit88b54a8b67d3287f2aeafac43a146ddae62598c4 (patch)
tree3626516ff8654f9497d6eea584deccc13440ff0a /dom/svg
parent744da8ddb39fb4a34cb7c50fd3132b4a196fd677 (diff)
downloaduxp-88b54a8b67d3287f2aeafac43a146ddae62598c4.tar.gz
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.
Diffstat (limited to 'dom/svg')
-rw-r--r--dom/svg/SVGUseElement.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/dom/svg/SVGUseElement.cpp b/dom/svg/SVGUseElement.cpp
index aceac1bb8a..31470ede23 100644
--- a/dom/svg/SVGUseElement.cpp
+++ b/dom/svg/SVGUseElement.cpp
@@ -259,14 +259,12 @@ SVGUseElement::CreateAnonymousContent()
}
}
- nsCOMPtr<nsINode> newnode;
- nsCOMArray<nsINode> unused;
nsNodeInfoManager* nodeInfoManager =
targetContent->OwnerDoc() == OwnerDoc() ?
nullptr : OwnerDoc()->NodeInfoManager();
- nsNodeUtils::Clone(targetContent, true, nodeInfoManager, unused,
- getter_AddRefs(newnode));
-
+ IgnoredErrorResult rv;
+ nsCOMPtr<nsINode> newnode =
+ nsNodeUtils::Clone(targetContent, true, nodeInfoManager, nullptr, rv);
nsCOMPtr<nsIContent> newcontent = do_QueryInterface(newnode);
if (!newcontent)