| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 
| 3  * Copyright (C) 2006-2015 Eyeo GmbH | 3  * Copyright (C) 2006-2015 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 469           readFile(sourceFile, 0); | 469           readFile(sourceFile, 0); | 
| 470       }.bind(this); | 470       }.bind(this); | 
| 471 | 471 | 
| 472       if (sourceFile) | 472       if (sourceFile) | 
| 473         IO.statFile(sourceFile, callback); | 473         IO.statFile(sourceFile, callback); | 
| 474       else | 474       else | 
| 475         callback(true); | 475         callback(true); | 
| 476     } | 476     } | 
| 477   }, | 477   }, | 
| 478 | 478 | 
| 479   _generateFilterData: function(subscriptions) | 479   _generateFilterData: function*(subscriptions) | 
| 480   { | 480   { | 
| 481     yield "# Adblock Plus preferences"; | 481     yield "# Adblock Plus preferences"; | 
| 482     yield "version=" + formatVersion; | 482     yield "version=" + formatVersion; | 
| 483 | 483 | 
| 484     let saved = Object.create(null); | 484     let saved = Object.create(null); | 
| 485     let buf = []; | 485     let buf = []; | 
| 486 | 486 | 
| 487     // Save filter data | 487     // Save filter data | 
| 488     for (let i = 0; i < subscriptions.length; i++) | 488     for (let i = 0; i < subscriptions.length; i++) | 
| 489     { | 489     { | 
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 863       Subscription.knownSubscriptions = origKnownSubscriptions; | 863       Subscription.knownSubscriptions = origKnownSubscriptions; | 
| 864     } | 864     } | 
| 865 | 865 | 
| 866     // Allow events to be processed every now and then. | 866     // Allow events to be processed every now and then. | 
| 867     // Note: IO.readFromFile() will deal with the potential reentrance here. | 867     // Note: IO.readFromFile() will deal with the potential reentrance here. | 
| 868     this.linesProcessed++; | 868     this.linesProcessed++; | 
| 869     if (this.linesProcessed % 1000 == 0) | 869     if (this.linesProcessed % 1000 == 0) | 
| 870       Utils.yield(); | 870       Utils.yield(); | 
| 871   } | 871   } | 
| 872 }; | 872 }; | 
| OLD | NEW | 
|---|