summaryrefslogtreecommitdiffstats
path: root/dom/base/nsINode.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-12-23 00:02:26 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-12-23 00:04:31 +0100
commite0f0b34926b75c842a3228ea8d42b5bc44cacd9b (patch)
treebd1eec4b4eb56f5578b09d1fa39969220688c607 /dom/base/nsINode.cpp
parentb1c7cc07c093c795cbc01c8eb43b355ea81435e4 (diff)
downloadUXP-e0f0b34926b75c842a3228ea8d42b5bc44cacd9b.tar
UXP-e0f0b34926b75c842a3228ea8d42b5bc44cacd9b.tar.gz
UXP-e0f0b34926b75c842a3228ea8d42b5bc44cacd9b.tar.lz
UXP-e0f0b34926b75c842a3228ea8d42b5bc44cacd9b.tar.xz
UXP-e0f0b34926b75c842a3228ea8d42b5bc44cacd9b.zip
Issue #1118 - Part 8: Remove no-longer-used mDidDocumentOpen and
CheckForOutdatedParent() This was only used to check for cases when document.open() changed the global, and elements being inserted into the document needing a new reflector as a result. Since document.open() no longer changes the global, this code is no longer needed.
Diffstat (limited to 'dom/base/nsINode.cpp')
-rw-r--r--dom/base/nsINode.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp
index ca507a5fc..212110b72 100644
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
@@ -1550,27 +1550,6 @@ AdoptNodeIntoOwnerDoc(nsINode *aParent, nsINode *aNode)
}
static nsresult
-CheckForOutdatedParent(nsINode* aParent, nsINode* aNode)
-{
- if (JSObject* existingObjUnrooted = aNode->GetWrapper()) {
- JS::Rooted<JSObject*> existingObj(RootingCx(), existingObjUnrooted);
-
- AutoJSContext cx;
- nsIGlobalObject* global = aParent->OwnerDoc()->GetScopeObject();
- MOZ_ASSERT(global);
-
- if (js::GetGlobalForObjectCrossCompartment(existingObj) !=
- global->GetGlobalJSObject()) {
- JSAutoCompartment ac(cx, existingObj);
- nsresult rv = ReparentWrapper(cx, existingObj);
- NS_ENSURE_SUCCESS(rv, rv);
- }
- }
-
- return NS_OK;
-}
-
-static nsresult
ReparentWrappersInSubtree(nsIContent* aRoot)
{
MOZ_ASSERT(ShouldUseXBLScope(aRoot));
@@ -1631,9 +1610,6 @@ nsINode::doInsertChildAt(nsIContent* aKid, uint32_t aIndex,
if (OwnerDoc() != aKid->OwnerDoc()) {
rv = AdoptNodeIntoOwnerDoc(this, aKid);
NS_ENSURE_SUCCESS(rv, rv);
- } else if (OwnerDoc()->DidDocumentOpen()) {
- rv = CheckForOutdatedParent(this, aKid);
- NS_ENSURE_SUCCESS(rv, rv);
}
uint32_t childCount = aChildArray.ChildCount();
@@ -2481,11 +2457,6 @@ nsINode::ReplaceOrInsertBefore(bool aReplace, nsINode* aNewChild,
if (aError.Failed()) {
return nullptr;
}
- } else if (doc->DidDocumentOpen()) {
- aError = CheckForOutdatedParent(this, aNewChild);
- if (aError.Failed()) {
- return nullptr;
- }
}
/*