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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« defaults/prefs.js ('K') | « defaults/prefs.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 363 }
364 return selectedItem; 364 return selectedItem;
365 }, 365 },
366 366
367 /** 367 /**
368 * Pauses code execution and allows events to be processed. Warning: 368 * Pauses code execution and allows events to be processed. Warning:
369 * other extension code might execute, the extension might even shut down. 369 * other extension code might execute, the extension might even shut down.
370 */ 370 */
371 yield: function() 371 yield: function()
372 { 372 {
373 let {Prefs} = require("prefs");
374 if (Prefs.please_kill_startup_performance)
375 {
376 this.yield = function() {};
377 return;
378 }
373 let thread = Services.tm.currentThread; 379 let thread = Services.tm.currentThread;
374 while (thread.processNextEvent(false)); 380 while (thread.processNextEvent(false));
375 }, 381 },
376 382
377 /** 383 /**
378 * Saves sidebar state before detaching/reattaching 384 * Saves sidebar state before detaching/reattaching
379 */ 385 */
380 setParams: function(params) 386 setParams: function(params)
381 { 387 {
382 sidebarParams = params; 388 sidebarParams = params;
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 Cu.reportError(e); 778 Cu.reportError(e);
773 // Expected, ctypes isn't supported in Gecko 1.9.2 779 // Expected, ctypes isn't supported in Gecko 1.9.2
774 return null; 780 return null;
775 } 781 }
776 }); 782 });
777 783
778 if ("@mozilla.org/messenger/headerparser;1" in Cc) 784 if ("@mozilla.org/messenger/headerparser;1" in Cc)
779 XPCOMUtils.defineLazyServiceGetter(Utils, "headerParser", "@mozilla.org/messen ger/headerparser;1", "nsIMsgHeaderParser"); 785 XPCOMUtils.defineLazyServiceGetter(Utils, "headerParser", "@mozilla.org/messen ger/headerparser;1", "nsIMsgHeaderParser");
780 else 786 else
781 Utils.headerParser = null; 787 Utils.headerParser = null;
OLDNEW
« defaults/prefs.js ('K') | « defaults/prefs.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld