forked from mirrors/gecko-dev
Bug 1533405 - Do not create the hidden window if it's too early on startup or during shutdown. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D24252 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
b0968b1c83
commit
581be0ee79
1 changed files with 14 additions and 0 deletions
|
|
@ -26,8 +26,10 @@
|
|||
#include "nsIRequestObserver.h"
|
||||
#include "nsIEmbeddingSiteWindow.h"
|
||||
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsAppShellService.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDirectoryServiceUtils.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsILoadContext.h"
|
||||
|
|
@ -109,6 +111,18 @@ nsresult nsAppShellService::CreateHiddenWindowHelper(bool aIsPrivate) {
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
if (mXPCOMShuttingDown) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIFile> profileDir;
|
||||
NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
|
||||
getter_AddRefs(profileDir));
|
||||
if (!profileDir) {
|
||||
// This is too early on startup to create the hidden window
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
int32_t initialHeight = 100, initialWidth = 100;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue