mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Fixing crash when no profile directory exists.
This commit is contained in:
parent
9b0fa55141
commit
fdb6b63a3a
@ -83,6 +83,7 @@ REQUIRES = xpcom \
|
||||
phone \
|
||||
js \
|
||||
imglib2 \
|
||||
toolkitcomps \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = Minimo.cpp \
|
||||
|
@ -470,10 +470,14 @@ nsresult StartupProfile()
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
appDataDir->Create(nsIFile::DIRECTORY_TYPE, 0700);
|
||||
|
||||
rv = appDataDir->Append(NS_LITERAL_STRING("minimo"));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
appDataDir->Create(nsIFile::DIRECTORY_TYPE, 0700);
|
||||
|
||||
nsCOMPtr<nsILocalFile> localAppDataDir(do_QueryInterface(appDataDir));
|
||||
|
||||
nsCOMPtr<nsProfileDirServiceProvider> locProvider;
|
||||
@ -704,6 +708,14 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsICommandLineRunner> cmdLine = do_CreateInstance("@mozilla.org/toolkit/command-line;1");
|
||||
|
||||
nsCOMPtr<nsIFile> workingDir;
|
||||
NS_GetSpecialDirectory(NS_OS_CURRENT_WORKING_DIR, getter_AddRefs(workingDir));
|
||||
|
||||
if (cmdLine)
|
||||
cmdLine->Init(argc, argv, workingDir, nsICommandLine::STATE_INITIAL_LAUNCH);
|
||||
|
||||
appShell->Create(nsnull, nsnull);
|
||||
|
||||
ApplicationObserver *appObserver = new ApplicationObserver(appShell);
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include "nsIAppStartupNotifier.h"
|
||||
#include "nsIBadCertListener.h"
|
||||
#include "nsIClipboardCommands.h"
|
||||
#include "nsICommandLineRunner.h"
|
||||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
|
@ -83,7 +83,7 @@ WindowCreator::CreateChromeWindow2(nsIWebBrowserChrome *aParent,
|
||||
nsCOMPtr<nsIXULWindow> xulParent(do_GetInterface(aParent));
|
||||
|
||||
|
||||
appShell->CreateTopLevelWindow(xulParent, // get rid of if you undef above
|
||||
appShell->CreateTopLevelWindow(xulParent,
|
||||
0,
|
||||
aChromeFlags,
|
||||
x,
|
||||
|
@ -56,5 +56,8 @@ include $(topsrcdir)/config/config.mk
|
||||
LOCAL_INCLUDES += -I$(srcdir)/.
|
||||
OS_LIBS += $(call EXPAND_LIBNAME, aygshell cellcore uuid ole32 oleaut32)
|
||||
|
||||
# default size is 1mb which is way to much for this app.
|
||||
LDFLAGS += -STACK:65536
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user