diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2023-03-04 17:05:41 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2023-03-04 21:32:16 +0800 |
commit | 88b54a8b67d3287f2aeafac43a146ddae62598c4 (patch) | |
tree | 3626516ff8654f9497d6eea584deccc13440ff0a /dom/svg | |
parent | 744da8ddb39fb4a34cb7c50fd3132b4a196fd677 (diff) | |
download | uxp-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.cpp | 8 |
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) |