Bug 1442757 - use `sendMessageToContent` helper. r=mattn draft
authorJonathan Guillotte-Blouin <jonathan.guillotte.blouin@gmail.com>
Fri, 02 Mar 2018 18:10:46 -0500
changeset 762825 d968830e85b50d19cd1159c4819ef2c1889b4d7c
parent 762824 5a4ca582d84bf9082f217547e9ae6afcb1d88363
push id101262
push userbmo:jonathan.guillotte.blouin@gmail.com
push dateSat, 03 Mar 2018 00:34:17 +0000
reviewersmattn
bugs1442757
milestone60.0a1
Bug 1442757 - use `sendMessageToContent` helper. r=mattn MozReview-Commit-ID: Ir3PUTopIJo
toolkit/components/payments/content/paymentDialogWrapper.js
--- a/toolkit/components/payments/content/paymentDialogWrapper.js
+++ b/toolkit/components/payments/content/paymentDialogWrapper.js
@@ -253,21 +253,18 @@ var paymentDialogWrapper = {
     });
   },
 
   updateRequest() {
     // There is no need to update this.request since the object is live
     // and will automatically get updated if event.updateWith is used.
     let requestSerialized = this._serializeRequest(this.request);
 
-    this.mm.sendAsyncMessage("paymentChromeToContent", {
-      messageType: "updateState",
-      data: {
-        request: requestSerialized,
-      },
+    this.sendMessageToContent("updateState", {
+      request: requestSerialized,
     });
   },
 
   /**
    * Recursively convert and filter input to the subset of data types supported by JSON
    *
    * @param {*} value - any type of input to serialize
    * @param {string?} name - name or key associated with this input.