From 8e265b6280dec492ff359466116b31f09c8356c9 Mon Sep 17 00:00:00 2001 From: Ben Campbell Date: Fri, 12 Feb 2021 11:56:39 +0200 Subject: [PATCH] Bug 1682939 - Remove nsISimpleEnumerator use in imIAccountsService. r=clokep --- chat/components/public/imIAccountsService.idl | 3 +-- chat/components/src/imAccounts.jsm | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/chat/components/public/imIAccountsService.idl b/chat/components/public/imIAccountsService.idl index 682aee84ac..38a2d52a12 100644 --- a/chat/components/public/imIAccountsService.idl +++ b/chat/components/public/imIAccountsService.idl @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsISupports.idl" -#include "nsISimpleEnumerator.idl" #include "imIAccount.idl" [scriptable, uuid(b3b6459a-5c26-47b8-8e9c-ba838b6f632a)] @@ -37,7 +36,7 @@ interface imIAccountsService: nsISupports { /* will throw NS_ERROR_FAILURE if not found */ imIAccount getAccountByNumericId(in unsigned long aAccountId); - nsISimpleEnumerator getAccounts(); + Array getAccounts(); /* will fire the event account-added */ imIAccount createAccount(in AUTF8String aName, in AUTF8String aPrpl); diff --git a/chat/components/src/imAccounts.jsm b/chat/components/src/imAccounts.jsm index e9cad65312..7bc258c25e 100644 --- a/chat/components/src/imAccounts.jsm +++ b/chat/components/src/imAccounts.jsm @@ -6,7 +6,6 @@ var EXPORTED_SYMBOLS = ["AccountsService"]; var { ClassInfo, - nsSimpleEnumerator, XPCOMUtils, setTimeout, clearTimeout, @@ -1226,7 +1225,7 @@ AccountsService.prototype = { return this._accountsById[aAccountId]; }, getAccounts() { - return new nsSimpleEnumerator(this._accounts); + return this._accounts; }, createAccount(aName, aPrpl) {