Bug 773892 - Part 2: Check for network status and delay until reconnect. r=vingtetun

--HG--
extra : rebase_source : 592fb8a0307676c212c19c5c19c59adaa2bc04bb
This commit is contained in:
Hub Figuière 2012-07-18 17:19:41 -07:00
parent 592ec87d72
commit c8cae7bb3c

View File

@ -73,7 +73,21 @@ var shell = {
} catch(e) { }
if (Services.prefs.getBoolPref('app.reportCrashes') &&
crashID) {
this.CrashSubmit().submit(crashID)
if (!Services.io.offline) {
this.CrashSubmit.submit(crashID);
return;
}
Services.obs.addObserver(function observer(subject, topic, state) {
if (topic != "network:offline-status-changed")
return;
if (state == 'online') {
shell.CrashSubmit.submit(crashID);
Services.obs.removeObserver(observer, topic);
}
}
, "network:offline-status-changed", false);
}
},