Bug 1457316 - Inline the sendMessageToChrome implementation to avoid a dependency on paymentRequest.js in debugging.js. r=MattN
authorSam Foster <sfoster@mozilla.com>
Thu, 26 Apr 2018 15:15:54 -0700
changeset 472016 7d6abd1366c1060ca6b89e937a6e606c309f7105
parent 472015 a8fef63084795665c01e9753fb8647b71e9c0331
child 472017 a42293258ab3dffb794f3a1e8fe2c3937dd81bb5
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1457316
milestone61.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 1457316 - Inline the sendMessageToChrome implementation to avoid a dependency on paymentRequest.js in debugging.js. r=MattN MozReview-Commit-ID: 2GgRQ6NI63d
browser/components/payments/res/debugging.js
--- a/browser/components/payments/res/debugging.js
+++ b/browser/components/payments/res/debugging.js
@@ -270,17 +270,23 @@ let BASIC_CARDS_1 = {
     "cc-additional-name": "",
     "cc-family-name": "Doe",
     "cc-exp": "2023-05",
   },
 };
 
 let buttonActions = {
   debugFrame() {
-    window.parent.paymentRequest.sendMessageToChrome("debugFrame");
+    let event = new CustomEvent("paymentContentToChrome", {
+      bubbles: true,
+      detail: {
+        messageType: "debugFrame",
+      },
+    });
+    document.dispatchEvent(event);
   },
 
   delete1Address() {
     let savedAddresses = Object.assign({}, requestStore.getState().savedAddresses);
     delete savedAddresses[Object.keys(savedAddresses)[0]];
     // Use setStateFromParent since it ensures there is no dangling
     // `selectedShippingAddress` foreign key (FK) reference.
     paymentDialog.setStateFromParent({