summaryrefslogtreecommitdiffstats
path: root/toolkit/content
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-03-30 08:50:58 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-03-30 08:50:58 +0200
commit4e368f8199a61c6319621ad1b9d6c352f0319f41 (patch)
tree69c6e2296c4e183ecbe6cfd1e856619e3715ae01 /toolkit/content
parent59bf4204a84f7638d3f89a29bc7c04e5dc401369 (diff)
downloadUXP-4e368f8199a61c6319621ad1b9d6c352f0319f41.tar
UXP-4e368f8199a61c6319621ad1b9d6c352f0319f41.tar.gz
UXP-4e368f8199a61c6319621ad1b9d6c352f0319f41.tar.lz
UXP-4e368f8199a61c6319621ad1b9d6c352f0319f41.tar.xz
UXP-4e368f8199a61c6319621ad1b9d6c352f0319f41.zip
Remove base conditional code for crash reporter and injector.
Diffstat (limited to 'toolkit/content')
-rw-r--r--toolkit/content/aboutSupport.js64
-rw-r--r--toolkit/content/aboutSupport.xhtml28
-rw-r--r--toolkit/content/browser-child.js26
3 files changed, 1 insertions, 117 deletions
diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js
index 5daf6d189..3bd06ddcc 100644
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -75,69 +75,7 @@ var snapshotFormatters = {
},
crashes: function crashes(data) {
- if (!AppConstants.MOZ_CRASHREPORTER)
- return;
-
- let strings = stringBundle();
- let daysRange = Troubleshoot.kMaxCrashAge / (24 * 60 * 60 * 1000);
- $("crashes-title").textContent =
- PluralForm.get(daysRange, strings.GetStringFromName("crashesTitle"))
- .replace("#1", daysRange);
- let reportURL;
- try {
- reportURL = Services.prefs.getCharPref("breakpad.reportURL");
- // Ignore any non http/https urls
- if (!/^https?:/i.test(reportURL))
- reportURL = null;
- }
- catch (e) { }
- if (!reportURL) {
- $("crashes-noConfig").style.display = "block";
- $("crashes-noConfig").classList.remove("no-copy");
- return;
- }
- $("crashes-allReports").style.display = "block";
- $("crashes-allReports").classList.remove("no-copy");
-
- if (data.pending > 0) {
- $("crashes-allReportsWithPending").textContent =
- PluralForm.get(data.pending, strings.GetStringFromName("pendingReports"))
- .replace("#1", data.pending);
- }
-
- let dateNow = new Date();
- $.append($("crashes-tbody"), data.submitted.map(function (crash) {
- let date = new Date(crash.date);
- let timePassed = dateNow - date;
- let formattedDate;
- if (timePassed >= 24 * 60 * 60 * 1000)
- {
- let daysPassed = Math.round(timePassed / (24 * 60 * 60 * 1000));
- let daysPassedString = strings.GetStringFromName("crashesTimeDays");
- formattedDate = PluralForm.get(daysPassed, daysPassedString)
- .replace("#1", daysPassed);
- }
- else if (timePassed >= 60 * 60 * 1000)
- {
- let hoursPassed = Math.round(timePassed / (60 * 60 * 1000));
- let hoursPassedString = strings.GetStringFromName("crashesTimeHours");
- formattedDate = PluralForm.get(hoursPassed, hoursPassedString)
- .replace("#1", hoursPassed);
- }
- else
- {
- let minutesPassed = Math.max(Math.round(timePassed / (60 * 1000)), 1);
- let minutesPassedString = strings.GetStringFromName("crashesTimeMinutes");
- formattedDate = PluralForm.get(minutesPassed, minutesPassedString)
- .replace("#1", minutesPassed);
- }
- return $.new("tr", [
- $.new("td", [
- $.new("a", crash.id, null, {href : reportURL + crash.id})
- ]),
- $.new("td", formattedDate)
- ]);
- }));
+ return;
},
extensions: function extensions(data) {
diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml
index e2885c8b8..6d9f34b7e 100644
--- a/toolkit/content/aboutSupport.xhtml
+++ b/toolkit/content/aboutSupport.xhtml
@@ -253,34 +253,6 @@
</table>
<!-- - - - - - - - - - - - - - - - - - - - - -->
-#ifdef MOZ_CRASHREPORTER
-
- <h2 class="major-section" id="crashes-title">
- &aboutSupport.crashes.title;
- </h2>
-
- <table id="crashes-table">
- <thead>
- <tr>
- <th>
- &aboutSupport.crashes.id;
- </th>
- <th>
- &aboutSupport.crashes.sendDate;
- </th>
- </tr>
- </thead>
- <tbody id="crashes-tbody">
- </tbody>
- </table>
- <p id="crashes-allReports" class="hidden no-copy">
- <a href="about:crashes" id="crashes-allReportsWithPending" class="block">&aboutSupport.crashes.allReports;</a>
- </p>
- <p id="crashes-noConfig" class="hidden no-copy">&aboutSupport.crashes.noConfig;</p>
-
-#endif
- <!-- - - - - - - - - - - - - - - - - - - - - -->
-
<h2 class="major-section">
&aboutSupport.extensionsTitle;
</h2>
diff --git a/toolkit/content/browser-child.js b/toolkit/content/browser-child.js
index c819e3db6..7d0fe18c5 100644
--- a/toolkit/content/browser-child.js
+++ b/toolkit/content/browser-child.js
@@ -17,12 +17,6 @@ Cu.import("resource://gre/modules/Timer.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PageThumbUtils",
"resource://gre/modules/PageThumbUtils.jsm");
-if (AppConstants.MOZ_CRASHREPORTER) {
- XPCOMUtils.defineLazyServiceGetter(this, "CrashReporter",
- "@mozilla.org/xre/app-info;1",
- "nsICrashReporter");
-}
-
function makeInputStream(aString) {
let stream = Cc["@mozilla.org/io/string-input-stream;1"].
createInstance(Ci.nsISupportsCString);
@@ -174,15 +168,6 @@ var WebProgressListener = {
json.principal = content.document.nodePrincipal;
json.synthetic = content.document.mozSyntheticDocument;
json.inLoadURI = WebNavigation.inLoadURI;
-
- if (AppConstants.MOZ_CRASHREPORTER && CrashReporter.enabled) {
- let uri = aLocationURI.clone();
- try {
- // If the current URI contains a username/password, remove it.
- uri.userPass = "";
- } catch (ex) { /* Ignore failures on about: URIs. */ }
- CrashReporter.annotateCrashReport("URL", uri.spec);
- }
}
this._send("Content:LocationChange", json, objects);
@@ -310,17 +295,6 @@ var WebNavigation = {
},
loadURI: function(uri, flags, referrer, referrerPolicy, postData, headers, baseURI) {
- if (AppConstants.MOZ_CRASHREPORTER && CrashReporter.enabled) {
- let annotation = uri;
- try {
- let url = Services.io.newURI(uri, null, null);
- // If the current URI contains a username/password, remove it.
- url.userPass = "";
- annotation = url.spec;
- } catch (ex) { /* Ignore failures to parse and failures
- on about: URIs. */ }
- CrashReporter.annotateCrashReport("URL", annotation);
- }
if (referrer)
referrer = Services.io.newURI(referrer, null, null);
if (postData)