| Index: lib/utils.js |
| =================================================================== |
| --- a/lib/utils.js |
| +++ b/lib/utils.js |
| @@ -360,16 +360,26 @@ let Utils = exports.Utils = |
| } |
| } |
| } |
| } |
| return selectedItem; |
| }, |
| /** |
| + * Pauses code execution and allows events to be processed. Warning: |
| + * other extension code might execute, the extension might even shut down. |
| + */ |
| + yield: function() |
| + { |
| + let thread = Services.tm.currentThread; |
| + while (thread.processNextEvent(false)); |
| + }, |
| + |
| + /** |
| * Saves sidebar state before detaching/reattaching |
| */ |
| setParams: function(params) |
| { |
| sidebarParams = params; |
| }, |
| /** |