Bug 1449925 - make the --private command line parameter work when browser.startup.blankWindow is true, r=Ehsan.

This commit is contained in:
Florian Quèze
2018-04-04 21:29:16 +02:00
parent eada08dc14
commit df41ea7e19
2 changed files with 9 additions and 10 deletions

View File

@@ -112,7 +112,6 @@
#include "nsIPromptFactory.h"
#include "nsIReflowObserver.h"
#include "nsIScriptChannel.h"
#include "nsIScriptError.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsIScriptSecurityManager.h"
#include "nsIScrollableFrame.h"
@@ -1732,12 +1731,6 @@ nsDocShell::GetUsePrivateBrowsing(bool* aUsePrivateBrowsing)
NS_IMETHODIMP
nsDocShell::SetUsePrivateBrowsing(bool aUsePrivateBrowsing)
{
nsContentUtils::ReportToConsoleNonLocalized(
NS_LITERAL_STRING("Only internal code is allowed to set the usePrivateBrowsing attribute"),
nsIScriptError::warningFlag,
NS_LITERAL_CSTRING("Internal API Used"),
mContentViewer ? mContentViewer->GetDocument() : nullptr);
if (!CanSetOriginAttributes()) {
bool changed = aUsePrivateBrowsing != (mPrivateBrowsingId > 0);