mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 773892 - Part 2: Check for network status and delay until reconnect. r=vingtetun
--HG-- extra : rebase_source : 592fb8a0307676c212c19c5c19c59adaa2bc04bb
This commit is contained in:
parent
592ec87d72
commit
c8cae7bb3c
@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user