Bug 1489308 part 6. Remove now-unused mWillReparent member. r=mccr8
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 27 Feb 2019 05:10:51 +0000
changeset 519457 c1113b00d864eaf617be6fbc3966b73c2af3e1c4
parent 519456 6504b5468b32786ec2f492e0dc6cd2ed3f1cf55d
child 519458 2166dac4d26c4b562dc673d73a42e8f693bbacc8
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1489308
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1489308 part 6. Remove now-unused mWillReparent member. r=mccr8 Differential Revision: https://phabricator.services.mozilla.com/D17324
dom/base/Document.cpp
dom/base/Document.h
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -1277,19 +1277,16 @@ Document::Document(const char* aContentT
       mValidMaxScale(false),
       mScaleStrEmpty(false),
       mWidthStrEmpty(false),
       mParserAborted(false),
       mReportedUseCounters(false),
       mHasReportedShadowDOMUsage(false),
       mDocTreeHadAudibleMedia(false),
       mDocTreeHadPlayRevoked(false),
-#ifdef DEBUG
-      mWillReparent(false),
-#endif
       mHasDelayedRefreshEvent(false),
       mLoadEventFiring(false),
       mSkipLoadEventAfterClose(false),
       mPendingFullscreenRequests(0),
       mXMLDeclarationBits(0),
       mOnloadBlockCount(0),
       mAsyncOnloadBlockCount(0),
       mCompatMode(eCompatibility_FullStandards),
@@ -4396,28 +4393,16 @@ void Document::SetScriptGlobalObject(
 
   UpdateFrameRequestCallbackSchedulingState();
 
   if (aScriptGlobalObject) {
     // Go back to using the docshell for the layout history state
     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::GetNonCCWObjectGlobal(obj) == newScope,
-                     "Wrong scope, this is really bad!");
-      }
-    }
-#endif
 
     if (mAllowDNSPrefetch) {
       nsCOMPtr<nsIDocShell> docShell(mDocumentContainer);
       if (docShell) {
 #ifdef DEBUG
         nsCOMPtr<nsIWebNavigation> webNav =
             do_GetInterface(aScriptGlobalObject);
         NS_ASSERTION(SameCOMIdentity(webNav, docShell),
--- a/dom/base/Document.h
+++ b/dom/base/Document.h
@@ -4239,23 +4239,16 @@ class Document : public nsINode,
   // top level content documents.
   bool mDocTreeHadAudibleMedia : 1;
   // True if this document contained, either directly or in a subdocument,
   // an HTMLMediaElement that was playing inaudibly and became audible and we
   // paused the HTMLMediaElement because it wasn't allowed to autoplay audibly.
   // This should only be set on top level content documents.
   bool mDocTreeHadPlayRevoked : 1;
 
-#ifdef DEBUG
- public:
-  bool mWillReparent : 1;
-
- protected:
-#endif
-
   // Whether an event triggered by the refresh driver was delayed because this
   // document has suppressed events.
   bool mHasDelayedRefreshEvent : 1;
 
   // The HTML spec has a "iframe load in progress" flag, but that doesn't seem
   // to have the right semantics.  See
   // <https://github.com/whatwg/html/issues/4292>. What we have instead is a
   // flag that is set while the window's 'load' event is firing if this document