Bug 1367830 - Mark hidden window as inactive. r=mystor draft
authorL. David Baron <dbaron@dbaron.org>
Fri, 26 May 2017 13:53:52 -0400
changeset 585229 aab0a239b733b9256a7ef398e18fc8accaa91cfd
parent 585228 24cdff62dde36e9c9c982557d9c95967eee87d12
child 630681 583d2ef6e9009ac813a6b7276eb668e614fc1d68
push id61063
push userdbaron@mozilla.com
push dateFri, 26 May 2017 17:54:58 +0000
reviewersmystor
bugs1367830
milestone55.0a1
Bug 1367830 - Mark hidden window as inactive. r=mystor MozReview-Commit-ID: GJOFjU6WcfG
xpfe/appshell/nsAppShellService.cpp
--- a/xpfe/appshell/nsAppShellService.cpp
+++ b/xpfe/appshell/nsAppShellService.cpp
@@ -139,16 +139,17 @@ nsAppShellService::CreateHiddenWindowHel
   rv = JustCreateTopWindow(nullptr, url,
                            chromeMask, initialWidth, initialHeight,
                            true, nullptr, nullptr, getter_AddRefs(newWindow));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDocShell> docShell;
   newWindow->GetDocShell(getter_AddRefs(docShell));
   if (docShell) {
+    docShell->SetIsActive(false);
     if (aIsPrivate) {
       docShell->SetAffectPrivateSessionLifetime(false);
     }
   }
 
   if (aIsPrivate) {
     mHiddenPrivateWindow.swap(newWindow);
   } else {