Backing out a499cb7e3af1 and 8e8543323a93. Cause test failures

This commit is contained in:
Doug Turner 2011-11-21 13:00:58 -08:00
Родитель 6da8ed7721
Коммит 711aabc400
3 изменённых файлов: 23 добавлений и 38 удалений

Просмотреть файл

@ -687,7 +687,6 @@ function cleanupActiveUpdate() {
* the application directory.
*/
function getLocale() {
if (gLocale)
return gLocale;
@ -695,10 +694,11 @@ function getLocale() {
if (!localeFile.exists())
localeFile = FileUtils.getFile(KEY_GRED, [FILE_UPDATE_LOCALE]);
if (!localeFile.exists()) {
// XXX temp workaround. see bug 704230
return "en-US";
}
if (!localeFile.exists())
throw Components.Exception(FILE_UPDATE_LOCALE + " file doesn't exist in " +
"either the " + KEY_APPDIR + " or " + KEY_GRED +
" directories", Cr.NS_ERROR_FILE_NOT_FOUND);
gLocale = readStringFromFile(localeFile);
LOG("getLocale - getting locale from file: " + localeFile.path +
", locale: " + gLocale);

Просмотреть файл

@ -251,18 +251,8 @@ GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid)
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID)
ifdef MOZILLA_OFFICIAL
DEFINES += -DMOZILLA_OFFICIAL
endif
DEFINES += -DAPP_VERSION=$(MOZ_APP_VERSION)
$(srcdir)/nsAppRunner.cpp: $(DEPTH)/config/buildid $(topsrcdir)/config/milestone.txt
ifeq ($(OS_TARGET),Android)
nsAndroidStartup.o: $(DEPTH)/config/buildid $(topsrcdir)/config/milestone.txt
endif
platform.ini: FORCE
$(PYTHON) $(srcdir)/make-platformini.py --buildid=$(shell cat $(DEPTH)/config/buildid) $(INIARGS) $(topsrcdir)/config/milestone.txt > $@

Просмотреть файл

@ -57,9 +57,6 @@
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, MOZ_APP_NAME, args)
#define _STR(s) # s
#define STR(s) _STR(s)
struct AutoAttachJavaThread {
AutoAttachJavaThread() {
attached = mozilla_AndroidBridge_SetMainThread((void*)pthread_self());
@ -100,6 +97,20 @@ GeckoStart(void *data)
LOG("Failed to get GRE_HOME from the env vars");
return 0;
}
nsCAutoString appini_path(greHome);
appini_path.AppendLiteral("/application.ini");
rv = NS_NewNativeLocalFile(appini_path, false, getter_AddRefs(appini));
if (NS_FAILED(rv)) {
LOG("Failed to create nsILocalFile for appdata\n");
return 0;
}
nsXREAppData *appData;
rv = XRE_CreateAppData(appini, &appData);
if (NS_FAILED(rv)) {
LOG("Failed to load application.ini from %s\n", appini_path.get());
return 0;
}
nsCOMPtr<nsILocalFile> xreDir;
rv = NS_NewNativeLocalFile(nsDependentCString(greHome), false, getter_AddRefs(xreDir));
@ -108,25 +119,7 @@ GeckoStart(void *data)
return 0;
}
nsXREAppData appData = {
sizeof(nsXREAppData),
xreDir.get(),
"Mozilla",
"Fennec",
STR(APP_VERSION),
STR(GRE_BUILDID),
STR(APP_ID),
NULL,
#ifdef MOZILLA_OFFICIAL
NS_XRE_ENABLE_EXTENSION_MANAGER | NS_XRE_ENABLE_CRASH_REPORTER,
#else
NS_XRE_ENABLE_EXTENSION_MANAGER,
#endif
xreDir.get(),
STR(GRE_MILESTONE),
STR(GRE_MILESTONE),
"https://crash-reports.mozilla.com/submit"
};
appData->xreDirectory = xreDir.get();
nsTArray<char *> targs;
char *arg = strtok(static_cast<char *>(data), " ");
@ -136,11 +129,13 @@ GeckoStart(void *data)
}
targs.AppendElement(static_cast<char *>(nsnull));
int result = XRE_main(targs.Length() - 1, targs.Elements(), &appData);
int result = XRE_main(targs.Length() - 1, targs.Elements(), appData);
if (result)
LOG("XRE_main returned %d", result);
XRE_FreeAppData(appData);
mozilla::AndroidBridge::Bridge()->NotifyXreExit();
free(targs[0]);