summaryrefslogtreecommitdiffstats
path: root/dom/base/nsINode.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2019-12-28 10:14:29 +0000
committerGitHub <noreply@github.com>2019-12-28 10:14:29 +0000
commit357405f6356e28e5fa94cecc078b65c20433d236 (patch)
tree9716965ca2d9d03446fc9290d37e5ef42f80558e /dom/base/nsINode.cpp
parentf60bbaf9e49733e61aaec675276fcd898ef6bc73 (diff)
parent8b88623463bf30ae7e5fcc64ef7d8d5fb62354c9 (diff)
downloadUXP-357405f6356e28e5fa94cecc078b65c20433d236.tar
UXP-357405f6356e28e5fa94cecc078b65c20433d236.tar.gz
UXP-357405f6356e28e5fa94cecc078b65c20433d236.tar.lz
UXP-357405f6356e28e5fa94cecc078b65c20433d236.tar.xz
UXP-357405f6356e28e5fa94cecc078b65c20433d236.zip
Merge pull request #1335 from MoonchildProductions/document_open
Align document.open() with the overhauled specification
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;
- }
}
/*