Bug 786897 - Command line option -private crashes, if privacy mode is enabled in preferences. r=ehsan

This commit is contained in:
Luqman Aden 2012-09-05 22:14:37 -04:00
parent c30bfea585
commit 97366a0c4e

View File

@ -479,6 +479,10 @@ PrivateBrowsingService.prototype = {
this._obs.removeObserver(this, "command-line-startup");
aSubject.QueryInterface(Ci.nsICommandLine);
if (aSubject.findFlag("private", false) >= 0) {
// Don't need to go into PB mode if it's already set to autostart
if (this._autoStarted)
aSubject.handleFlag("private", false);
this.privateBrowsingEnabled = true;
this._autoStarted = true;
this._lastChangedByCommandLine = true;