mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 915260 - "TypeError: Services.settings is undefined" error in B2G mochitest logs r=etienne
This commit is contained in:
parent
a514180c06
commit
0d26383f62
@ -317,8 +317,11 @@ let AdbController = {
|
||||
|
||||
// Check if we have a remote debugging session going on. If so, we won't
|
||||
// disable adb even if the screen is locked.
|
||||
let isDebugging = Object.keys(DebuggerServer._connections).length > 0;
|
||||
this.debug("isDebugging=" + isDebugging);
|
||||
let isDebugging = DebuggerServer._connections &&
|
||||
Object.keys(DebuggerServer._connections).length > 0;
|
||||
if (this.DEBUG) {
|
||||
this.debug("isDebugging=" + isDebugging);
|
||||
}
|
||||
|
||||
let enableAdb = this.remoteDebuggerEnabled &&
|
||||
(!(this.lockEnabled && this.locked) || isDebugging);
|
||||
|
@ -9,8 +9,17 @@ this.EXPORTED_SYMBOLS = ["WebappsUpdater"];
|
||||
const Cc = Components.classes;
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "settings",
|
||||
"@mozilla.org/settingsService;1",
|
||||
"nsISettingsService");
|
||||
|
||||
function debug(aStr) {
|
||||
//dump("--*-- WebappsUpdater: " + aStr);
|
||||
}
|
||||
|
||||
this.WebappsUpdater = {
|
||||
_checkingApps: false,
|
||||
_pendingEvents: [],
|
||||
@ -29,7 +38,7 @@ this.WebappsUpdater = {
|
||||
let browser = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
if (!browser) {
|
||||
this._pendingEvents.push(detail);
|
||||
dump("Warning: Couldn't send update event " + aType +
|
||||
debug("Warning: Couldn't send update event " + aType +
|
||||
": no content browser. Will send again when content becomes available.");
|
||||
return false;
|
||||
}
|
||||
@ -39,8 +48,8 @@ this.WebappsUpdater = {
|
||||
},
|
||||
|
||||
_appsUpdated: function(aApps) {
|
||||
dump("appsUpdated: " + aApps.length + " apps to update");
|
||||
let lock = Services.settings.createLock();
|
||||
debug("appsUpdated: " + aApps.length + " apps to update");
|
||||
let lock = settings.createLock();
|
||||
lock.set("apps.updateStatus", "check-complete", null);
|
||||
this.sendChromeEvent("apps-update-check", { apps: aApps });
|
||||
this._checkingApps = false;
|
||||
@ -49,7 +58,7 @@ this.WebappsUpdater = {
|
||||
// Trigger apps update check and wait for all to be done before
|
||||
// notifying gaia.
|
||||
updateApps: function() {
|
||||
dump("updateApps (" + this._checkingApps + ")");
|
||||
debug("updateApps (" + this._checkingApps + ")");
|
||||
// Don't start twice.
|
||||
if (this._checkingApps) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user