Bug 1445292 - Use Services.els in tabbox.xml r=dao
☠☠ backed out by a930e1f75ba5 ☠ ☠
authorVivek Dhingra <vivek3zero@gmail.com>
Fri, 16 Mar 2018 10:46:53 -0400
changeset 408611 8d44271e5973cad25b6a8b8153fe958cadaba33c
parent 408610 a09f27b6dceb0b3f8f43468489ee3eac2c4e5a86
child 408612 7c36968eadca498eb91c4d5a44b32e651416bcc2
push id100996
push userbtara@mozilla.com
push dateSat, 17 Mar 2018 10:37:43 +0000
treeherdermozilla-inbound@97160a734959 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1445292
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 1445292 - Use Services.els in tabbox.xml r=dao MozReview-Commit-ID: Loia4p98D6C
toolkit/content/widgets/tabbox.xml
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -181,44 +181,36 @@
       </method>
 
       <field name="_eventNode">this</field>
 
       <property name="eventNode" onget="return this._eventNode;">
         <setter>
           <![CDATA[
             if (val != this._eventNode) {
-              const nsIEventListenerService =
-                Ci.nsIEventListenerService;
-              let els = Cc["@mozilla.org/eventlistenerservice;1"]
-                          .getService(nsIEventListenerService);
-              els.addSystemEventListener(val, "keydown", this, false);
-              els.removeSystemEventListener(this._eventNode, "keydown", this, false);
+              Services.els.addSystemEventListener(val, "keydown", this, false);
+              Services.els.removeSystemEventListener(this._eventNode, "keydown", this, false);
               this._eventNode = val;
             }
             return val;
           ]]>
         </setter>
       </property>
 
       <constructor>
         switch (this.getAttribute("eventnode")) {
           case "parent": this._eventNode = this.parentNode; break;
           case "window": this._eventNode = window; break;
           case "document": this._eventNode = document; break;
         }
-        let els = Cc["@mozilla.org/eventlistenerservice;1"]
-                    .getService(Ci.nsIEventListenerService);
-        els.addSystemEventListener(this._eventNode, "keydown", this, false);
+        Services.els.addSystemEventListener(this._eventNode, "keydown", this, false);
       </constructor>
 
       <destructor>
-        let els = Cc["@mozilla.org/eventlistenerservice;1"]
-                    .getService(Ci.nsIEventListenerService);
-        els.removeSystemEventListener(this._eventNode, "keydown", this, false);
+        Services.els.removeSystemEventListener(this._eventNode, "keydown", this, false);
       </destructor>
     </implementation>
   </binding>
 
   <binding id="tabs"
            extends="chrome://global/content/bindings/general.xml#basecontrol">
     <resources>
       <stylesheet src="chrome://global/skin/tabbox.css"/>