| Index: lib/filterStorage.js | 
| =================================================================== | 
| --- a/lib/filterStorage.js | 
| +++ b/lib/filterStorage.js | 
| @@ -23,16 +23,17 @@ Cu.import("resource://gre/modules/Servic | 
| Cu.import("resource://gre/modules/FileUtils.jsm"); | 
| Cu.import("resource://gre/modules/XPCOMUtils.jsm"); | 
|  | 
| let {IO} = require("io"); | 
| let {Prefs} = require("prefs"); | 
| let {Filter, ActiveFilter} = require("filterClasses"); | 
| let {Subscription, SpecialSubscription, ExternalSubscription} = require("subscriptionClasses"); | 
| let {FilterNotifier} = require("filterNotifier"); | 
| +let {Utils} = require("utils"); | 
| let {TimeLine} = require("timeline"); | 
|  | 
| /** | 
| * Version number of the filter storage file format. | 
| * @type Integer | 
| */ | 
| let formatVersion = 4; | 
|  | 
| @@ -785,19 +786,20 @@ function INIParser() | 
| { | 
| this.fileProperties = this.curObj = {}; | 
| this.subscriptions = []; | 
| this.knownFilters = {__proto__: null}; | 
| this.knownSubscriptions = {__proto__: null}; | 
| } | 
| INIParser.prototype = | 
| { | 
| +  linesProcessed: 0, | 
| subscriptions: null, | 
| knownFilters: null, | 
| -  knownSubscrptions : null, | 
| +  knownSubscriptions : null, | 
| wantObj: true, | 
| fileProperties: null, | 
| curObj: null, | 
| curSection: null, | 
| userFilters: null, | 
|  | 
| process: function(val) | 
| { | 
| @@ -872,10 +874,16 @@ INIParser.prototype = | 
| else if (this.wantObj === false && val) | 
| this.curObj.push(val.replace(/\\\[/g, "[")); | 
| } | 
| finally | 
| { | 
| Filter.knownFilters = origKnownFilters; | 
| Subscription.knownSubscriptions = origKnownSubscriptions; | 
| } | 
| + | 
| +    // Allow events to be processed every now and then. | 
| +    // Note: IO.readFromFile() will deal with the potential reentrance here. | 
| +    this.linesProcessed++; | 
| +    if (this.linesProcessed % 1000 == 0) | 
| +      Utils.yield(); | 
| } | 
| }; | 
|  |