Bug 1343995 - Wait for sanitizing to really finish before shutting down. r=jchen
authorJan Henning <jh+bugzilla@buttercookie.de>
Thu, 02 Mar 2017 21:34:23 +0100
changeset 345889 dc8b32d3d5c68e2ad7a247da875a696b06fa9a1c
parent 345888 7f8d8f0964ff22d92ffb88abfd96246addd8a6b6
child 345890 2eef7989fbb6c2b9237be607c86a6c2e7660fdc0
push id31451
push usercbook@mozilla.com
push dateMon, 06 Mar 2017 09:52:09 +0000
treeherdermozilla-central@7099e03837e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs1343995, 1266594
milestone54.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 1343995 - Wait for sanitizing to really finish before shutting down. r=jchen BrowserApp's sanitize() function assumed that the Sanitizer would return promises for each sanitization handler, so it could wait for them to resolve before proceeding with shutdown (which was also the assumption behind the patch for bug 1266594). In fact even the Sanitizer expected to do this is well, since it wrapped each of its handling functions within a promise/task/sendRequestForResult. However it turns out that Sanitizer's clearItem function then failed to actually return this promise - apparently ever since this was implemented. MozReview-Commit-ID: 6hN3UTXUIuV
mobile/android/modules/Sanitizer.jsm
--- a/mobile/android/modules/Sanitizer.jsm
+++ b/mobile/android/modules/Sanitizer.jsm
@@ -33,20 +33,20 @@ function Sanitizer() {}
 Sanitizer.prototype = {
   clearItem: function (aItemName)
   {
     let item = this.items[aItemName];
     let canClear = item.canClear;
     if (typeof canClear == "function") {
       canClear(function clearCallback(aCanClear) {
         if (aCanClear)
-          item.clear();
+          return item.clear();
       });
     } else if (canClear) {
-      item.clear();
+      return item.clear();
     }
   },
 
   items: {
     cache: {
       clear: function ()
       {
         return new Promise(function(resolve, reject) {