mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
Bug 773892 - Part 1: Add crash submission when starting b2g. r=ted
--HG-- extra : rebase_source : 48289cfd83479d98c169bdee564e5bae8775391f
This commit is contained in:
parent
4445fe5a1f
commit
d48c62bedf
@ -198,6 +198,8 @@ pref("app.privacyURL", "http://www.mozilla.com/%LOCALE%/m/privacy.html");
|
||||
pref("app.creditsURL", "http://www.mozilla.org/credits/");
|
||||
pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/b2g/features/");
|
||||
pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/b2g/faq/");
|
||||
// Whether we want to report crashes (headless)
|
||||
pref("app.reportCrashes", true);
|
||||
|
||||
// Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
|
||||
pref("security.alternate_certificate_error_page", "certerror");
|
||||
|
@ -74,6 +74,22 @@ function addPermissions(urls) {
|
||||
}
|
||||
|
||||
var shell = {
|
||||
|
||||
get CrashSubmit() {
|
||||
delete this.CrashSubmit;
|
||||
Cu.import("resource://gre/modules/CrashSubmit.jsm", this);
|
||||
return this.CrashSubmit;
|
||||
},
|
||||
|
||||
reportCrash: function shell_reportCrash() {
|
||||
let crashID = Cc["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Ci.nsIXULRuntime).lastRunCrashID;
|
||||
if (Services.prefs.getBoolPref('app.reportCrashes') &&
|
||||
crashID) {
|
||||
this.CrashSubmit().submit(crashID)
|
||||
}
|
||||
},
|
||||
|
||||
get contentBrowser() {
|
||||
delete this.contentBrowser;
|
||||
return this.contentBrowser = document.getElementById('homescreen');
|
||||
@ -270,6 +286,8 @@ var shell = {
|
||||
|
||||
this.contentBrowser.removeEventListener('mozbrowserloadstart', this, true);
|
||||
|
||||
this.reportCrash();
|
||||
|
||||
let chromeWindow = window.QueryInterface(Ci.nsIDOMChromeWindow);
|
||||
chromeWindow.browserDOMWindow = new nsBrowserAccess();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user