Bug 1489760 - Follow-up: Move calItemBase.getParameterEnumerator's QI up. r=philipp DONTBUILD
authorJorg K <jorgk@jorgk.com>
Sun, 09 Sep 2018 18:05:04 +0200
changeset 33106 d8244e31ff87c057b7d7d7a42815b4d014a6cd41
parent 33105 b722826d24442a9f1e2c0966417318933e93134b
child 33107 fe142027bfffda203150e155d1d0747242e11fb0
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersphilipp
bugs1489760
Bug 1489760 - Follow-up: Move calItemBase.getParameterEnumerator's QI up. r=philipp DONTBUILD
calendar/base/src/calItemBase.js
--- a/calendar/base/src/calItemBase.js
+++ b/calendar/base/src/calItemBase.js
@@ -448,31 +448,31 @@ calItemBase.prototype = {
     // nsISimpleEnumerator getParameterEnumerator(in AString aPropertyName);
     getParameterEnumerator: function(aPropName) {
         let propName = aPropName.toUpperCase();
         if (!(propName in this.mPropertyParams)) {
             throw "Property " + aPropName + " not set";
         }
         let parameters = this.mPropertyParams[propName];
         return { // nsISimpleEnumerator
+            QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]),
+
             mParamNames: Object.keys(parameters),
             hasMoreElements: function() {
                 return (this.mParamNames.length > 0);
             },
 
             getNext: function() {
                 let paramName = this.mParamNames.pop();
                 return { // nsIProperty
                     QueryInterface: ChromeUtils.generateQI([Ci.nsIProperty]),
                     name: paramName,
                     value: parameters[paramName]
                 };
-            },
-
-            QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]),
+            }
         };
     },
 
     // void getAttendees(out PRUint32 count,
     //                   [array,size_is(count),retval] out calIAttendee attendees);
     getAttendees: function(countObj) {
         if (!this.mAttendees && this.mIsProxy) {
             this.mAttendees = this.mParentItem.getAttendees(countObj);