Bug 1483363: Stop loading ZoomChild.jsm before necessary. r=mconley
authorKris Maglione <maglione.k@gmail.com>
Tue, 31 Jul 2018 19:41:09 -0700
changeset 431564 4bb158b7bc66d4732235664e7b7fbe3cb675872a
parent 431563 409f4eff2f396a892eef236d007cdb0f9194f896
child 431565 076f7722d9b58982b3ea8a12c10a6e1369477b8c
push id34443
push usercsabou@mozilla.com
push dateWed, 15 Aug 2018 00:53:32 +0000
treeherdermozilla-central@b80906e2fbc9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1483363
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 1483363: Stop loading ZoomChild.jsm before necessary. r=mconley
browser/base/content/test/performance/browser_startup_content.js
toolkit/content/widgets/remote-browser.xml
--- a/browser/base/content/test/performance/browser_startup_content.js
+++ b/browser/base/content/test/performance/browser_startup_content.js
@@ -54,17 +54,16 @@ const whitelist = {
     "resource:///modules/ContentMetaHandler.jsm",
     "resource:///actors/PageStyleChild.jsm",
     "resource://gre/modules/ActorChild.jsm",
     "resource://gre/modules/ActorManagerChild.jsm",
     "resource://gre/modules/E10SUtils.jsm",
     "resource://gre/modules/PrivateBrowsingUtils.jsm",
     "resource://gre/modules/ReaderMode.jsm",
     "resource://gre/modules/WebProgressChild.jsm",
-    "resource://gre/actors/ZoomChild.jsm",
 
     // Pocket
     "chrome://pocket/content/AboutPocket.jsm",
 
     // Telemetry
     "resource://gre/modules/TelemetryController.jsm", // bug 1470339
     "resource://gre/modules/TelemetrySession.jsm", // bug 1470339
     "resource://gre/modules/TelemetryUtils.jsm", // bug 1470339
--- a/toolkit/content/widgets/remote-browser.xml
+++ b/toolkit/content/widgets/remote-browser.xml
@@ -159,42 +159,42 @@
       <field name="_fullZoom">1</field>
       <property name="fullZoom">
         <getter><![CDATA[
           return this._fullZoom;
         ]]></getter>
         <setter><![CDATA[
           let changed = val.toFixed(2) != this._fullZoom.toFixed(2);
 
-          this._fullZoom = val;
-          try {
-            this.messageManager.sendAsyncMessage("FullZoom", {value: val});
-          } catch (ex) {}
+          if (changed) {
+            this._fullZoom = val;
+            try {
+              this.messageManager.sendAsyncMessage("FullZoom", {value: val});
+            } catch (ex) {}
 
-          if (changed) {
             let event = new Event("FullZoomChange", {bubbles: true});
             this.dispatchEvent(event);
           }
         ]]></setter>
       </property>
 
       <field name="_textZoom">1</field>
       <property name="textZoom">
         <getter><![CDATA[
           return this._textZoom;
         ]]></getter>
         <setter><![CDATA[
           let changed = val.toFixed(2) != this._textZoom.toFixed(2);
 
-          this._textZoom = val;
-          try {
-            this.messageManager.sendAsyncMessage("TextZoom", {value: val});
-          } catch (ex) {}
+          if (changed) {
+            this._textZoom = val;
+            try {
+              this.messageManager.sendAsyncMessage("TextZoom", {value: val});
+            } catch (ex) {}
 
-          if (changed) {
             let event = new Event("TextZoomChange", {bubbles: true});
             this.dispatchEvent(event);
           }
         ]]></setter>
       </property>
 
       <field name="_isSyntheticDocument">false</field>
       <property name="isSyntheticDocument">