Index: lib/utils.js |
=================================================================== |
--- a/lib/utils.js |
+++ b/lib/utils.js |
@@ -352,18 +352,17 @@ let Utils = exports.Utils = |
yield: function() |
{ |
let {Prefs} = require("prefs"); |
if (Prefs.please_kill_startup_performance) |
{ |
this.yield = function() {}; |
return; |
} |
- let thread = Services.tm.currentThread; |
- while (thread.processNextEvent(false)); |
+ return new Promise((resolve, reject) => Utils.runAsync(resolve)); |
}, |
/** |
* Saves sidebar state before detaching/reattaching |
*/ |
setParams: function(params) |
{ |
sidebarParams = params; |