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

Side by Side Diff: lib/filterStorage.js

Issue 5147885138083840: Issue 153 - FilterStorage.firstRun isn`t being set (Closed)
Patch Set: Created April 14, 2014, 7:28 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 if (e || !statData.exists) 468 if (e || !statData.exists)
469 { 469 {
470 this.firstRun = true; 470 this.firstRun = true;
471 this._loading = false; 471 this._loading = false;
472 FilterNotifier.triggerListeners("load"); 472 FilterNotifier.triggerListeners("load");
473 473
474 TimeLine.leave("FilterStorage.loadFromDisk() read callback done"); 474 TimeLine.leave("FilterStorage.loadFromDisk() read callback done");
475 } 475 }
476 else 476 else
477 readFile(sourceFile, 0); 477 readFile(sourceFile, 0);
478 } 478 }.bind(this);
479 479
480 if (sourceFile) 480 if (sourceFile)
481 IO.statFile(sourceFile, callback); 481 IO.statFile(sourceFile, callback);
482 else 482 else
483 callback(true); 483 callback(true);
484 } 484 }
485 485
486 TimeLine.leave("FilterStorage.loadFromDisk() done"); 486 TimeLine.leave("FilterStorage.loadFromDisk() done");
487 }, 487 },
488 488
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 Subscription.knownSubscriptions = origKnownSubscriptions; 885 Subscription.knownSubscriptions = origKnownSubscriptions;
886 } 886 }
887 887
888 // Allow events to be processed every now and then. 888 // Allow events to be processed every now and then.
889 // Note: IO.readFromFile() will deal with the potential reentrance here. 889 // Note: IO.readFromFile() will deal with the potential reentrance here.
890 this.linesProcessed++; 890 this.linesProcessed++;
891 if (this.linesProcessed % 1000 == 0) 891 if (this.linesProcessed % 1000 == 0)
892 Utils.yield(); 892 Utils.yield();
893 } 893 }
894 }; 894 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld