Bug 1574499 - nsWebBrowser::mIsActive / mActivating seem dead. r=farre
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 21 Aug 2019 17:28:05 +0000
changeset 549905 66bdd7503ada17f678d24bfdf2f02381c04ad905
parent 549904 046093029373072067a9f84e79dc87c1ea969a82
child 549906 a68132c5a5c39befb509d7ade7bcf0fb764eb0fb
push id11848
push userffxbld-merge
push dateMon, 26 Aug 2019 19:26:25 +0000
treeherdermozilla-beta@9b31bfdfac10 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfarre
bugs1574499
milestone70.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 1574499 - nsWebBrowser::mIsActive / mActivating seem dead. r=farre Differential Revision: https://phabricator.services.mozilla.com/D42314
toolkit/components/browser/nsWebBrowser.cpp
toolkit/components/browser/nsWebBrowser.h
--- a/toolkit/components/browser/nsWebBrowser.cpp
+++ b/toolkit/components/browser/nsWebBrowser.cpp
@@ -54,19 +54,17 @@
 #include "nsXULAppAPI.h"
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 using namespace mozilla::layers;
 
 nsWebBrowser::nsWebBrowser(int aItemType)
     : mContentType(aItemType),
-      mActivating(false),
       mShouldEnableHistory(true),
-      mIsActive(true),
       mParentNativeWindow(nullptr),
       mProgressListener(nullptr),
       mWidgetListenerDelegate(this),
       mBackgroundColor(0),
       mPersistCurrentState(nsIWebBrowserPersist::PERSIST_STATE_READY),
       mPersistResult(NS_OK),
       mPersistFlags(nsIWebBrowserPersist::PERSIST_FLAGS_NONE),
       mParentWidget(nullptr) {
@@ -1244,22 +1242,16 @@ nsWebBrowser::SetDocShell(nsIDocShell* a
     mDocShellAsWin = baseWin;
     mDocShellAsNav = nav;
     mDocShellAsScrollable = scrollable;
     mWebProgress = progress;
 
     // By default, do not allow DNS prefetch, so we don't break our frozen
     // API.  Embeddors who decide to enable it should do so manually.
     mDocShell->SetAllowDNSPrefetch(false);
-
-    // It's possible to call setIsActive() on us before we have a docshell.
-    // If we're getting a docshell now, pass along our desired value. The
-    // default here (true) matches the default of the docshell, so this is
-    // a no-op unless setIsActive(false) has been called on us.
-    mDocShell->SetIsActive(mIsActive);
   } else {
     if (mDocShellTreeOwner) {
       mDocShellTreeOwner->RemoveFromWatcher();  // evil twin of Add in Create()
     }
     if (mDocShellAsWin) {
       mDocShellAsWin->Destroy();
     }
 
--- a/toolkit/components/browser/nsWebBrowser.h
+++ b/toolkit/components/browser/nsWebBrowser.h
@@ -144,19 +144,17 @@ class nsWebBrowser final : public nsIWeb
   nsCOMPtr<nsIBaseWindow> mDocShellAsWin;
   nsCOMPtr<nsIWebNavigation> mDocShellAsNav;
   nsCOMPtr<nsIScrollable> mDocShellAsScrollable;
   mozilla::OriginAttributes mOriginAttributes;
 
   nsCOMPtr<nsIWidget> mInternalWidget;
   nsCOMPtr<nsIWindowWatcher> mWWatch;
   const uint32_t mContentType;
-  bool mActivating;
   bool mShouldEnableHistory;
-  bool mIsActive;
   nativeWindow mParentNativeWindow;
   nsIWebProgressListener* mProgressListener;
   nsCOMPtr<nsIWebProgress> mWebProgress;
 
   nsCOMPtr<nsIPrintSettings> mPrintSettings;
 
   WidgetListenerDelegate mWidgetListenerDelegate;