From 91e924a5c7bdb4c53bdf8e938a0686ab80c4941c Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Mon, 22 Feb 2021 17:46:29 +0000 Subject: [PATCH] Bug 1691527 - remove email bits from content process crash dialog. r=mconley We no longer want to collect email data in crash reports, so we no longer need to potentially solicit the user for it in the content process crash dialog. This removes the disabled code for collecting email data. Differential Revision: https://phabricator.services.mozilla.com/D105496 --- browser/base/content/aboutTabCrashed.js | 41 ----------- browser/base/content/aboutTabCrashed.xhtml | 8 --- .../base/content/test/tabcrashed/browser.ini | 1 - .../test/tabcrashed/browser_clearEmail.js | 71 ------------------- .../content/test/tabcrashed/browser_shown.js | 64 +---------------- .../locales/en-US/browser/aboutTabCrashed.ftl | 2 - browser/modules/ContentCrashHandlers.jsm | 22 +----- 7 files changed, 3 insertions(+), 206 deletions(-) delete mode 100644 browser/base/content/test/tabcrashed/browser_clearEmail.js diff --git a/browser/base/content/aboutTabCrashed.js b/browser/base/content/aboutTabCrashed.js index f1b1234c1aef..d5da1555f3fc 100644 --- a/browser/base/content/aboutTabCrashed.js +++ b/browser/base/content/aboutTabCrashed.js @@ -79,10 +79,6 @@ var AboutTabCrashed = { this.onClick(event); break; } - case "input": { - this.onInput(event); - break; - } } }, @@ -96,9 +92,6 @@ var AboutTabCrashed = { el.addEventListener("click", this); }); - // For setting "emailMe" checkbox automatically on email value change. - document.getElementById("email").addEventListener("input", this); - // Error pages are loaded as LOAD_BACKGROUND, so they don't get load events. let event = new CustomEvent("AboutTabCrashedLoad", { bubbles: true }); document.dispatchEvent(event); @@ -130,14 +123,6 @@ var AboutTabCrashed = { } }, - onInput(event) { - switch (event.target.id) { - case "email": { - document.getElementById("emailMe").checked = !!event.target.value; - break; - } - } - }, /** * After this page tells the parent that it has loaded, the parent * will respond with whether or not a crash report is available. This @@ -158,13 +143,6 @@ var AboutTabCrashed = { * Whether or not the user prefers to send the URL of * the tab that crashed. * - * emailMe (bool): - * Whether or not to send the email address of the user - * in the report. - * - * email (String): - * The email address of the user (empty if emailMe is false). - * * requestAutoSubmit (bool): * Whether or not we should ask the user to automatically * submit backlogged crash reports. @@ -180,14 +158,6 @@ var AboutTabCrashed = { document.getElementById("sendReport").checked = data.sendReport; document.getElementById("includeURL").checked = data.includeURL; - if (data.requestEmail) { - document.getElementById("requestEmail").hidden = false; - document.getElementById("emailMe").checked = data.emailMe; - if (data.emailMe) { - document.getElementById("email").value = data.email; - } - } - this.showCrashReportUI(data.sendReport); } else { this.showCrashReportUI(false); @@ -255,10 +225,8 @@ var AboutTabCrashed = { */ sendMessage(messageName) { let comments = ""; - let email = ""; let URL = ""; let sendReport = false; - let emailMe = false; let includeURL = false; let autoSubmit = false; @@ -271,13 +239,6 @@ var AboutTabCrashed = { if (includeURL) { URL = this.pageData.URL.trim(); } - - if (!document.getElementById("requestEmail").hidden) { - emailMe = document.getElementById("emailMe").checked; - if (emailMe) { - email = document.getElementById("email").value.trim(); - } - } } } @@ -293,8 +254,6 @@ var AboutTabCrashed = { RPMSendAsyncMessage(messageName, { sendReport, comments, - email, - emailMe, includeURL, URL, autoSubmit, diff --git a/browser/base/content/aboutTabCrashed.xhtml b/browser/base/content/aboutTabCrashed.xhtml index 87b33a1fe06c..df42de4ad363 100644 --- a/browser/base/content/aboutTabCrashed.xhtml +++ b/browser/base/content/aboutTabCrashed.xhtml @@ -56,14 +56,6 @@ - -