mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Bug 526623: Send channel with crash data. r=dtownsend
This commit is contained in:
parent
00298412c0
commit
ade0db0dc5
@ -205,6 +205,7 @@
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsICrashReporter.h"
|
||||
#define NS_CRASHREPORTER_CONTRACTID "@mozilla.org/toolkit/crash-reporter;1"
|
||||
#include "nsIPrefService.h"
|
||||
#endif
|
||||
|
||||
#ifdef WINCE
|
||||
@ -3284,6 +3285,23 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
|
||||
rv |= xpcom.SetWindowCreator(nativeApp);
|
||||
NS_ENSURE_SUCCESS(rv, 1);
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
// tell the crash reporter to also send the release channel
|
||||
nsCOMPtr<nsIPrefService> prefs = do_GetService("@mozilla.org/preferences-service;1", &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIPrefBranch> defaultPrefBranch;
|
||||
rv = prefs->GetDefaultBranch(nsnull, getter_AddRefs(defaultPrefBranch));
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsXPIDLCString sval;
|
||||
rv = defaultPrefBranch->GetCharPref("app.update.channel", getter_Copies(sval));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("ReleaseChannel"),
|
||||
sval);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
{
|
||||
if (startOffline) {
|
||||
nsCOMPtr<nsIIOService2> io (do_GetService("@mozilla.org/network/io-service;1"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user