Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/utils.js

Issue 5731880649359360: Don't delay Firefox startup (Closed)
Patch Set: Fixed wrong callback parameters Created March 14, 2014, 6:08 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/io.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
},
/**
« no previous file with comments | « lib/io.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld