Backed out changeset 9a5b7ed8dae4 (bug 965527) on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Tue, 11 Mar 2014 13:38:25 -0700
changeset 173071 dfd483bbeea6180c64d4229740da9cc17c1bef0e
parent 173070 2d9cee99cdcb06b037b23fe0b48ad1ebaf716e74
child 173072 77b2ebd5ffff0e7cbe98b6c058ba3fc00a0433cd
child 173101 69fbe69ddb8c0c5c936a20914260269b8676ffe3
push id40911
push userkwierso@gmail.com
push dateTue, 11 Mar 2014 20:38:38 +0000
treeherdermozilla-inbound@dfd483bbeea6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs965527
milestone30.0a1
backs out9a5b7ed8dae47207f8871d8330215e4c43bee86f
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
Backed out changeset 9a5b7ed8dae4 (bug 965527) on a CLOSED TREE
toolkit/components/osfile/modules/osfile_async_front.jsm
--- a/toolkit/components/osfile/modules/osfile_async_front.jsm
+++ b/toolkit/components/osfile/modules/osfile_async_front.jsm
@@ -195,23 +195,17 @@ let Scheduler = {
    *
    * @param {function} code A function returning a Promise.
    * This function will be executed once all the previously
    * pushed tasks have completed.
    * @return {Promise} A promise with the same behavior as
    * the promise returned by |code|.
    */
   push: function(code) {
-    let promise = this.queue.then(function() {
-      if (this.shutdown) {
-        LOG("OS.File is not available anymore. Request has been rejected.");
-        throw new Error("OS.File has been shut down.");
-      }
-      return code();
-    }.bind(this));
+    let promise = this.queue.then(code);
     // By definition, |this.queue| can never reject.
     this.queue = promise.then(null, () => undefined);
     // Fork |promise| to ensure that uncaught errors are reported
     return promise.then(null, null);
   },
 
   /**
    * Post a message to the worker thread.
@@ -409,23 +403,24 @@ const PREF_OSFILE_TEST_SHUTDOWN_OBSERVER
  * @return {promise} A promise satisfied once all pending messages
  * (including the shutdown warning message) have been answered.
  */
 function warnAboutUnclosedFiles(shutdown = true) {
   if (!Scheduler.launched || !worker) {
     // Don't launch the scheduler on our behalf. If no message has been
     // sent to the worker, we can't have any leaking file/directory
     // descriptor.
-    Scheduler.shutdown = Scheduler.shutdown || shutdown;
     return null;
   }
   let promise = Scheduler.post("Meta_getUnclosedResources");
 
   // Configure the worker to reject any further message.
-  Scheduler.shutdown = Scheduler.shutdown || shutdown;
+  if (shutdown) {
+    Scheduler.shutdown = true;
+  }
 
   return promise.then(function onSuccess(opened) {
     let msg = "";
     if (opened.openedFiles.length > 0) {
       msg += "The following files are still open:\n" +
         opened.openedFiles.join("\n");
     }
     if (msg) {