mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
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:
parent
b72ddcf657
commit
e65a864a3e
6 changed files with 100 additions and 103 deletions
|
|
@ -321,10 +321,11 @@ nsXBLBinding::GenerateAnonymousContent()
|
|||
if (hasContent) {
|
||||
nsIDocument* doc = mBoundElement->OwnerDoc();
|
||||
|
||||
nsCOMPtr<nsINode> clonedNode;
|
||||
nsCOMArray<nsINode> nodesWithProperties;
|
||||
nsNodeUtils::Clone(content, true, doc->NodeInfoManager(),
|
||||
nodesWithProperties, getter_AddRefs(clonedNode));
|
||||
IgnoredErrorResult rv;
|
||||
nsCOMPtr<nsINode> clonedNode =
|
||||
nsNodeUtils::Clone(content, true, doc->NodeInfoManager(), nullptr, rv);
|
||||
// FIXME: Bug 1399558, Why is this code OK assuming that nsNodeUtils::Clone
|
||||
// never fails?
|
||||
mContent = clonedNode->AsElement();
|
||||
|
||||
// Search for <xbl:children> elements in the XBL content. In the presence
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue