Bug 1476345 - Fix console listener to not spew when .message doesn't exist. r=jaws
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 14 Aug 2018 16:26:36 -0700
changeset 431800 d44b1a94dbd5b9df13820893b04f063684a2b63e
parent 431799 b0f499acc5b52462604c14056b8cfa634a22aee0
child 431801 ad4b3942b9af6445273427bf47e9033a07f6214f
push id34451
push userebalazs@mozilla.com
push dateThu, 16 Aug 2018 09:25:15 +0000
treeherdermozilla-central@161817e6d127 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1476345
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1476345 - Fix console listener to not spew when .message doesn't exist. r=jaws Sometimes .errorMessage exists without .message MozReview-Commit-ID: D4zBJKxfJba
browser/components/payments/test/browser/head.js
--- a/browser/components/payments/test/browser/head.js
+++ b/browser/components/payments/test/browser/head.js
@@ -319,17 +319,17 @@ add_task(async function setup_head() {
     if (msg.isWarning || !msg.errorMessage) {
       // Ignore warnings and non-errors.
       return;
     }
     if (msg.category == "CSP_CSPViolationWithURI" && msg.errorMessage.includes("at inline")) {
       // Ignore unknown CSP error.
       return;
     }
-    if (msg.message.match(/docShell is null.*BrowserUtils.jsm/)) {
+    if (msg.message && msg.message.match(/docShell is null.*BrowserUtils.jsm/)) {
       // Bug 1478142 - Console spam from the Find Toolbar.
       return;
     }
     ok(false, msg.message || msg.errorMessage);
   });
   await setupFormAutofillStorage();
   registerCleanupFunction(function cleanup() {
     paymentSrv.cleanup();