Bug 1326443 - Bug 1292569/bug 1294960 follow-up: Change return to yield in generator. r=jorgk CLOSED TREE DONTBUILD
authorChris Feilen <cfeilen@semperiion.com>
Wed, 04 Jan 2017 21:27:00 +0100
changeset 20966 8e89d3c05ce45753b470301396c01185de56930a
parent 20965 1d934dcb80bcf60a56355e5b981de7bf3b25a902
child 20967 8be3e2e18dffce0ce15176138d2fac1bd2018a6d
push id12714
push usermozilla@jorgk.com
push dateThu, 05 Jan 2017 23:19:59 +0000
treeherdercomm-central@8e89d3c05ce4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1326443, 1292569, 1294960
Bug 1326443 - Bug 1292569/bug 1294960 follow-up: Change return to yield in generator. r=jorgk CLOSED TREE DONTBUILD
mail/components/im/modules/index_im.js
--- a/mail/components/im/modules/index_im.js
+++ b/mail/components/im/modules/index_im.js
@@ -636,18 +636,20 @@ var GlodaIMIndexer = {
     this._indexingJobPromise = null;
     aJob.conversation.indexPending = false;
     aJob.conversation.glodaConv = glodaConv.value;
     yield Gloda.kWorkDone;
   },
 
   _worker_logsFolderSweep: function*(aJob) {
     let dir = FileUtils.getFile("ProfD", ["logs"]);
-    if (!dir.exists() || !dir.isDirectory())
-      return;
+    if (!dir.exists() || !dir.isDirectory()) {
+      // If the folder does not exist, then we are done.
+      yield GlodaIndexer.kWorkDone;
+    }
 
     // Sweep the logs directory for log files, adding any new entries to the
     // _knownFiles tree as we traverse.
     let children = dir.directoryEntries;
     while (children.hasMoreElements()) {
       let proto = children.getNext().QueryInterface(Ci.nsIFile);
       if (!proto.isDirectory())
         continue;