From b1c7cc07c093c795cbc01c8eb43b355ea81435e4 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 23 Dec 2019 00:00:23 +0100 Subject: Issue #1118 - Part 7: Remove no-longer-used mWillReparent debug code. --- dom/base/nsDocument.cpp | 12 ------------ dom/base/nsDocument.h | 5 ----- 2 files changed, 17 deletions(-) diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 0f663636f..afe88a454 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -4512,18 +4512,6 @@ nsDocument::SetScriptGlobalObject(nsIScriptGlobalObject *aScriptGlobalObject) mLayoutHistoryState = nullptr; SetScopeObject(aScriptGlobalObject); mHasHadDefaultView = true; -#ifdef DEBUG - if (!mWillReparent) { - // We really shouldn't have a wrapper here but if we do we need to make sure - // it has the correct parent. - JSObject *obj = GetWrapperPreserveColor(); - if (obj) { - JSObject *newScope = aScriptGlobalObject->GetGlobalJSObject(); - NS_ASSERTION(js::GetGlobalForObjectCrossCompartment(obj) == newScope, - "Wrong scope, this is really bad!"); - } - } -#endif if (mAllowDNSPrefetch) { nsCOMPtr docShell(mDocumentContainer); diff --git a/dom/base/nsDocument.h b/dom/base/nsDocument.h index c2b1d3cdb..8ea4993f0 100644 --- a/dom/base/nsDocument.h +++ b/dom/base/nsDocument.h @@ -1646,11 +1646,6 @@ private: // Set to true when the document is possibly controlled by the ServiceWorker. // Used to prevent multiple requests to ServiceWorkerManager. bool mMaybeServiceWorkerControlled; - -#ifdef DEBUG -public: - bool mWillReparent; -#endif }; class nsDocumentOnStack -- cgit v1.2.3