Bug 1552219. Get rid of unnecessary variables that clutter PrintUtils.printWindow. r=Gijs
authorJonathan Watt <jwatt@jwatt.org>
Fri, 03 May 2019 07:34:07 +0100
changeset 474331 62321377e204a921c6cf4282565756267fbea2dc
parent 474330 f4c4b796f845283408175b4b30383d1b83347a58
child 474332 73c9f2d6d3a067cd3f0a1982e22f60d70123ca21
push id113145
push userjwatt@jwatt.org
push dateFri, 17 May 2019 16:50:32 +0000
treeherdermozilla-inbound@930f0f51b681 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1552219
milestone68.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 1552219. Get rid of unnecessary variables that clutter PrintUtils.printWindow. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D31488
toolkit/components/printing/content/printUtils.js
--- a/toolkit/components/printing/content/printUtils.js
+++ b/toolkit/components/printing/content/printUtils.js
@@ -118,22 +118,20 @@ var PrintUtils = {
    * Starts the process of printing the contents of a window.
    *
    * @param aWindowID
    *        The outer window ID of the nsIDOMWindow to print.
    * @param aBrowser
    *        The <xul:browser> that the nsIDOMWindow for aWindowID belongs to.
    */
   printWindow(aWindowID, aBrowser) {
-    let mm = aBrowser.messageManager;
-    let defaultPrinterName = this._getDefaultPrinterName();
-    mm.sendAsyncMessage("Printing:Print", {
+    aBrowser.messageManager.sendAsyncMessage("Printing:Print", {
       windowID: aWindowID,
       simplifiedMode: this._shouldSimplify,
-      defaultPrinterName,
+      defaultPrinterName: this._getDefaultPrinterName(),
     });
   },
 
   /**
    * Initializes print preview.
    *
    * @param aListenerObj
    *        An object that defines the following functions: