Bug 1484496: Follow-up: Fix busted JS enumerator in Android directory service. r=bustage
authorKris Maglione <maglione.k@gmail.com>
Thu, 23 Aug 2018 18:13:58 -0700
changeset 433253 701ceb33e3d751be2faa8bf1b99bd14d51f3eadb
parent 433252 602fa2f2e75da226a632f65700c9a1db8baf89ae
child 433254 5d6bf0312e088bb2424a8177589a9fd4aa44bfa8
push id34501
push usertoros@mozilla.com
push dateFri, 24 Aug 2018 09:45:02 +0000
treeherdermozilla-central@190b827aaa2b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1484496
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 1484496: Follow-up: Fix busted JS enumerator in Android directory service. r=bustage
mobile/android/components/DirectoryProvider.js
--- a/mobile/android/components/DirectoryProvider.js
+++ b/mobile/android/components/DirectoryProvider.js
@@ -135,16 +135,19 @@ DirectoryProvider.prototype = {
     if (prop != NS_APP_DISTRIBUTION_SEARCH_DIR_LIST)
       return null;
 
     let result = [];
     this._appendDistroSearchDirs(result);
 
     return {
       QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]),
+      [Symbol.iterator]() {
+        return result.values();
+      },
       hasMoreElements: function() {
         return result.length > 0;
       },
       getNext: function() {
         return result.shift();
       }
     };
   },