mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Issue #2135 - Bug 1393806/Part 3: Change dom::ReparentWrapper to take an ErrorResult
* Bug 1393806 (Part 4) landed as part of Issue #1118. * Account for ReparentWrappersInSubtree, introduced in 1466991
This commit is contained in:
parent
3062964d28
commit
9f0fb9c16e
7 changed files with 72 additions and 41 deletions
|
|
@ -614,8 +614,8 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNode, bool aClone, bool aDeep,
|
|||
if ((wrapper = aNode->GetWrapper())) {
|
||||
MOZ_ASSERT(IsDOMObject(wrapper));
|
||||
JSAutoCompartment ac(cx, wrapper);
|
||||
nsresult rv = ReparentWrapper(cx, wrapper);
|
||||
if (NS_FAILED(rv)) {
|
||||
ReparentWrapper(cx, wrapper, aError);
|
||||
if (aError.Failed()) {
|
||||
if (wasRegistered) {
|
||||
aNode->OwnerDoc()->UnregisterActivityObserver(aNode->AsElement());
|
||||
}
|
||||
|
|
@ -623,7 +623,6 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNode, bool aClone, bool aDeep,
|
|||
if (wasRegistered) {
|
||||
aNode->OwnerDoc()->RegisterActivityObserver(aNode->AsElement());
|
||||
}
|
||||
aError.Throw(rv);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue