Description: To build against xulrunner 1.9.1
Origin: https://bugzilla.instantbird.org/attachment.cgi?id=297
Author: Florian Quèze <florian@instantbird.org>

diff --git a/instantbird/content/addbuddy.js b/instantbird/content/addbuddy.js
--- a/instantbird/content/addbuddy.js
+++ b/instantbird/content/addbuddy.js
@@ -58,17 +58,17 @@ var addBuddy = {
       document.getElementById("addBuddyDialog").cancelDialog();
       throw "No connected account!";
     }
     accountList.selectedIndex = 0;
   },
 
   buildTagList: function ab_buildTagList() {
     var tagList = document.getElementById("taglist");
-    let tags = this.pcs.getTags();
+    let tags = this.pcs.getTags({});
     if (!tags.length) {
       let bundle = document.getElementById("instantbirdBundle");
       tags.push(this.pcs.createTag(bundle.getString("defaultGroup")));
     }
 
     tags.forEach(function (tag) {
       tagList.appendItem(tag.name, tag.id);
     });
diff --git a/instantbird/content/blist.js b/instantbird/content/blist.js
--- a/instantbird/content/blist.js
+++ b/instantbird/content/blist.js
@@ -119,17 +119,17 @@ buddyListContextMenu.prototype = {
     let groupId = this.target.group.groupId;
     let pcs = Components.classes["@instantbird.org/purple/core;1"]
                         .getService(Ci.purpleICoreService);
 
     let sortFunction = function (a, b) {
       let [a, b] = [a.name.toLowerCase(), b.name.toLowerCase()];
       return a < b ? 1 : a > b ? -1 : 0;
     };
-    pcs.getTags()
+    pcs.getTags({})
        .sort(sortFunction)
        .forEach(function (aTag) {
       item = document.createElement("menuitem");
       item.setAttribute("label", aTag.name);
       item.setAttribute("type", "radio");
       let id = aTag.id;
       item.groupId = id;
       if (groupId == id)
@@ -204,17 +204,17 @@ var buddyList = {
       if (showOffline)
         item.setAttribute("checked", "true");
       else
         item.removeAttribute("checked");
 
       var pcs = Components.classes["@instantbird.org/purple/core;1"]
                           .getService(Ci.purpleICoreService);
       let blistBox = document.getElementById("buddylistbox");
-      pcs.getTags().forEach(function (aTag) {
+      pcs.getTags({}).forEach(function (aTag) {
         let elt = document.getElementById("group" + aTag.id);
         if (!elt && showOffline) {
           elt = document.createElement("group");
           blistBox.appendChild(elt);
           elt._showOffline = true;
           if (!elt.build(aTag))
             blistBox.removeChild(elt);
         }
@@ -500,17 +500,17 @@ var buddyList = {
     if (buddyList._showOffline) {
       document.getElementById("context-show-offline-buddies")
               .setAttribute("checked", "true");
     }
 
     let pcs = Components.classes["@instantbird.org/purple/core;1"]
                         .getService(Ci.purpleICoreService);
     let blistBox = document.getElementById("buddylistbox");
-    pcs.getTags().forEach(function (aTag) {
+    pcs.getTags({}).forEach(function (aTag) {
       let groupElt = document.createElement("group");
       blistBox.appendChild(groupElt);
       if (buddyList._showOffline)
         groupElt._showOffline = true;
       if (!groupElt.build(aTag))
         blistBox.removeChild(groupElt);
     });
 
diff --git a/instantbird/content/group.xml b/instantbird/content/group.xml
--- a/instantbird/content/group.xml
+++ b/instantbird/content/group.xml
@@ -84,18 +84,18 @@
         if (source.HasAssertion(elt, RDF.GetResource("closed"),
                                 RDF.GetLiteral("true"), true)) {
           this.setAttribute("closed", "true");
           this._updateGroupLabel();
           this._updateClosedState(true);
         }
 
         let empty = true;
-        this.tag.getBuddies().forEach(function (aBuddy) {
-          aBuddy.getAccountBuddies()
+        this.tag.getBuddies({}).forEach(function (aBuddy) {
+          aBuddy.getAccountBuddies({})
                 .filter(function (b) (this.showOffline || b.online) && b.tag.id == this.groupId, this)
                 .forEach(function(b) { this.addBuddy(b); empty = false; }, this);
         }, this);
 
         if (!empty)
           this.tag.addObserver(this);
         return !empty;
       ]]>
@@ -107,18 +107,18 @@
          <![CDATA[
            return this._showOffline;
          ]]>
        </getter>
        <setter>
          <![CDATA[
            this._showOffline = val;
            if (val) {
-             this.tag.getBuddies().forEach(function (aBuddy) {
-               aBuddy.getAccountBuddies()
+             this.tag.getBuddies({}).forEach(function (aBuddy) {
+               aBuddy.getAccountBuddies({})
                      .filter(function (b) !b.online && b.tag.id == this.groupId, this)
                      .forEach(function(b) { this.addBuddy(b); }, this);
              }, this);
            }
            else {
              this.buddies.filter(function (b) b.removeOfflineAccounts())
                          .forEach(function (b) { b.parentNode.removeChild(b);
                                                  this.removeBuddy(b); }, this);
diff --git a/purple/purplexpcom/public/purpleIBuddy.idl b/purple/purplexpcom/public/purpleIBuddy.idl
--- a/purple/purplexpcom/public/purpleIBuddy.idl
+++ b/purple/purplexpcom/public/purpleIBuddy.idl
@@ -66,18 +66,18 @@ interface purpleIBuddy: nsISupports {
 
   // enumerator of purpleTooltipInfo components
   nsISimpleEnumerator getTooltipInfo();
 
   attribute AUTF8String alias;
   readonly attribute short nbOnline;
   readonly attribute short accountCount;
   purpleIAccount getAccount(in unsigned short aAccountIndex);
-  void getAccounts([optional] out unsigned long accountCount,
+  void getAccounts(out unsigned long accountCount,
                    [retval, array, size_is(accountCount)] out purpleIAccount accounts);
-  void getAccountBuddies([optional] out unsigned long accountBuddyCount,
+  void getAccountBuddies(out unsigned long accountBuddyCount,
                          [retval, array, size_is(accountBuddyCount)] out purpleIAccountBuddy accountBuddies);
 
   //  readonly attribute purpleIContact contact;
   nsISimpleEnumerator getTags();
   purpleIConversation createConversation(in unsigned short aAccountIndex);
   [noscript] purpleIAccountBuddy getAccountBuddyForPurpleBuddy(in PurpleNativeBuddy aBuddy);
 };
diff --git a/purple/purplexpcom/public/purpleICoreService.idl b/purple/purplexpcom/public/purpleICoreService.idl
--- a/purple/purplexpcom/public/purpleICoreService.idl
+++ b/purple/purplexpcom/public/purpleICoreService.idl
@@ -62,17 +62,17 @@ interface purpleICoreService: nsISupport
   purpleIBuddy getBuddyById(in long aId);
   [noscript] purpleIBuddy getBuddyByPurpleBuddy(in PurpleNativeBuddy aBuddy);
   void addBuddy(in purpleIAccount aAccount, in purpleITag aTag, in AUTF8String aName);
   [noscript] void purpleBuddyRemoved(in PurpleNativeBuddy aBuddy);
 
   purpleITag createTag(in AUTF8String aName);
   purpleITag getTagById(in long aId);
   purpleITag getTagByName(in AUTF8String aName);
-  void getTags([optional] out unsigned long tagCount,
+  void getTags(out unsigned long tagCount,
                [retval, array, size_is(tagCount)] out purpleITag tags);
 
   nsISimpleEnumerator getConversations();
   purpleIConversation getConversationById(in unsigned long aId);
 
   // returns an enumerator on a purpleIProtocol array
   nsISimpleEnumerator getProtocols();
 
diff --git a/purple/purplexpcom/public/purpleITag.idl b/purple/purplexpcom/public/purpleITag.idl
--- a/purple/purplexpcom/public/purpleITag.idl
+++ b/purple/purplexpcom/public/purpleITag.idl
@@ -47,17 +47,17 @@
 interface purpleIBuddy;
 
 [scriptable, uuid(29225656-fbea-4df2-9d61-0339b1c20c65)]
 interface purpleITag: nsISupports {
   readonly attribute long id;
   readonly attribute AUTF8String name;
   readonly attribute boolean visible;
 
-  void getBuddies([optional] out unsigned long buddyCount,
+  void getBuddies(out unsigned long buddyCount,
 		  [retval, array, size_is(buddyCount)] out purpleIBuddy buddies);
 
   void addObserver(in nsIObserver aObserver);
   void removeObserver(in nsIObserver aObserver);
   /* Observers will receive these notifications:
        buddy-added
        buddy-signed-on
        buddy-signed-off
