Bug 793243 - Eng builds (VARIANT=) fail to show homescreen on otoro [r=dhylands]

This commit is contained in:
Fabrice Desré 2012-09-21 20:40:03 -07:00
parent 68d7df3c26
commit 6b050bae3f

View File

@ -152,7 +152,11 @@ let DOMApplicationRegistry = {
#ifdef MOZ_WIDGET_GONK
// if first run, merge the system apps.
if (runUpdate) {
let file = FileUtils.getFile("coreAppsDir", ["webapps", "webapps.json"], false);
let file;
try {
file = FileUtils.getFile("coreAppsDir", ["webapps", "webapps.json"], false);
} catch(e) { }
if (file && file.exists) {
// 2.a
this._loadJSONAsync(file, (function loadCoreRegistry(aData) {
@ -194,6 +198,8 @@ let DOMApplicationRegistry = {
}
this.registerAppsHandlers();
}).bind(this));
} else {
this.registerAppsHandlers();
}
} else {
this.registerAppsHandlers();
@ -381,7 +387,8 @@ let DOMApplicationRegistry = {
if (aCallback)
aCallback(data);
} catch (ex) {
Cu.reportError("DOMApplicationRegistry: Could not parse JSON: " + ex);
Cu.reportError("DOMApplicationRegistry: Could not parse JSON: " +
aFile.path + " " + ex);
if (aCallback)
aCallback(null);
}