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

Unified Diff: lib/utils.js

Issue 6744383034490880: Issue 549 - Allow users to enforce ABP being loaded completely at Firefox startup, even if delaying… (Closed)
Patch Set: Created May 23, 2014, 12:26 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
« defaults/prefs.js ('K') | « defaults/prefs.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
@@ -365,16 +365,22 @@ let Utils = exports.Utils =
},
/**
* Pauses code execution and allows events to be processed. Warning:
* other extension code might execute, the extension might even shut down.
*/
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));
},
/**
* Saves sidebar state before detaching/reattaching
*/
setParams: function(params)
« defaults/prefs.js ('K') | « defaults/prefs.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld