bug 1262812 - use fallback strings in CrashSubmit.jsm so submitting crashes from about:crashes works on Android. r?mconley
MozReview-Commit-ID: 3aw17aFysu4
--- a/toolkit/crashreporter/CrashSubmit.jsm
+++ b/toolkit/crashreporter/CrashSubmit.jsm
@@ -52,18 +52,23 @@ function getL10nStrings() {
path = path.parent;
path = path.parent;
path.append("MacOS");
path.append("crashreporter.app");
path.append("Contents");
path.append("Resources");
path.append("crashreporter.ini");
if (!path.exists()) {
- // very bad, but I don't know how to recover
- return null;
+ // This happens on Android where everything is in an APK.
+ // Android users can't see the contents of the submitted files
+ // anyway, so just hardcode some fallback strings.
+ return {
+ "crashid": "Crash ID: %s",
+ "reporturl": "You can view details of this crash at %s"
+ };
}
}
let crstrings = parseINIStrings(path);
let strings = {
"crashid": crstrings.CrashID,
"reporturl": crstrings.CrashDetailsURL
};