Bug 1326443 - Bug 1292569/bug 1294960 follow-up: Change return to yield in generator. r=jorgk a=jorgk DONTBUILD
authorChris Feilen <cfeilen@semperiion.com>
Wed, 04 Jan 2017 21:27:00 +0100
changeset 26901 fc8949513c6be12860698bb98f1ea57417f6cf17
parent 26900 d3bfb5682b058b2357fd499f2f176bde5005fc7a
child 26902 567ce3fd3edbc8fb1b887981a7e8221d271a7d18
push id1834
push userclokep@gmail.com
push dateMon, 23 Jan 2017 21:48:40 +0000
treeherdercomm-beta@293cffe83e59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk, jorgk
bugs1326443, 1292569, 1294960
Bug 1326443 - Bug 1292569/bug 1294960 follow-up: Change return to yield in generator. r=jorgk a=jorgk 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;