mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1258792 - ensure window before trying to use it in update check; r=marco, a=ritu
This commit is contained in:
parent
f0b3db2d72
commit
fba9e3febf
@ -102,15 +102,14 @@ this.WebappRT = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!window.navigator.mozApps) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for updates once a day.
|
||||
let timerManager = Cc["@mozilla.org/updates/timer-manager;1"].
|
||||
getService(Ci.nsIUpdateTimerManager);
|
||||
timerManager.registerTimer("updateTimer", () => {
|
||||
let window = Services.wm.getMostRecentWindow("webapprt:webapp");
|
||||
if (!window.navigator.mozApps) {
|
||||
return;
|
||||
}
|
||||
window.navigator.mozApps.mgmt.getAll().onsuccess = function() {
|
||||
let thisApp = null;
|
||||
for (let app of this.result) {
|
||||
|
Loading…
Reference in New Issue
Block a user