summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dom/base/nsIDocument.h9
-rw-r--r--dom/base/nsINode.cpp29
-rw-r--r--dom/html/nsHTMLDocument.cpp2
3 files changed, 0 insertions, 40 deletions
diff --git a/dom/base/nsIDocument.h b/dom/base/nsIDocument.h
index e2b34f7e3..fdaee39ca 100644
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -909,10 +909,6 @@ public:
*/
nsresult GetSrcdocData(nsAString& aSrcdocData);
- bool DidDocumentOpen() {
- return mDidDocumentOpen;
- }
-
already_AddRefed<mozilla::dom::AnonymousContent>
InsertAnonymousContent(mozilla::dom::Element& aElement,
mozilla::ErrorResult& aError);
@@ -3159,11 +3155,6 @@ protected:
// Whether the document was created by a srcdoc iframe.
bool mIsSrcdocDocument : 1;
- // Records whether we've done a document.open. If this is true, it's possible
- // for nodes from this document to have outdated wrappers in their wrapper
- // caches.
- bool mDidDocumentOpen : 1;
-
// Whether this document has a display document and thus is considered to
// be a resource document. Normally this is the same as !!mDisplayDocument,
// but mDisplayDocument is cleared during Unlink. mHasDisplayDocument is
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;
- }
}
/*
diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp
index 112e957cb..0f2d90673 100644
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -1586,8 +1586,6 @@ nsHTMLDocument::Open(JSContext* cx,
SetReadyStateInternal(READYSTATE_UNINITIALIZED,
/* updateTimingInformation = */ false);
- mDidDocumentOpen = true;
-
// Step 13 - Set our compatibility mode to standards.
SetCompatibilityMode(eCompatibility_FullStandards);