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: Created March 13, 2014, 1:52 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
« lib/io.js ('K') | « 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;
},
/**
« lib/io.js ('K') | « lib/io.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld