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

Side by Side Diff: lib/adblockplus_compat.js

Issue 8492145: Fixed: IO.readFromFile expects a listener object, not a callback (Closed)
Patch Set: Created Oct. 9, 2012, 5:56 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
« .hgsubstate ('K') | « .hgsubstate ('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 Source Code is subject to the terms of the Mozilla Public License 2 * This Source Code is subject to the terms of the Mozilla Public License
3 * version 2.0 (the "License"). You can obtain a copy of the License at 3 * version 2.0 (the "License"). You can obtain a copy of the License at
4 * http://mozilla.org/MPL/2.0/. 4 * http://mozilla.org/MPL/2.0/.
5 */ 5 */
6 6
7 // 7 //
8 // Module framework stuff 8 // Module framework stuff
9 // 9 //
10 10
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 writer.write(blob); 202 writer.write(blob);
203 }, callback); 203 }, callback);
204 }, callback); 204 }, callback);
205 }, 205 },
206 206
207 copyFile: function(fromFile, toFile, callback) 207 copyFile: function(fromFile, toFile, callback)
208 { 208 {
209 // Simply combine read and write operations 209 // Simply combine read and write operations
210 var data = []; 210 var data = [];
211 this.readFromFile(fromFile, false, function(line) 211 this.readFromFile(fromFile, false, {
212 { 212 process: function(line)
213 data.push(line); 213 {
214 if (line !== null)
215 data.push(line);
216 }
214 }, function(e) 217 }, function(e)
215 { 218 {
216 if (e) 219 if (e)
217 callback(e); 220 callback(e);
218 else 221 else
219 this.writeToFile(toFile, false, data, callback); 222 this.writeToFile(toFile, false, data, callback);
220 }.bind(this)); 223 }.bind(this));
221 }, 224 },
222 225
223 renameFile: function(fromFile, newName, callback) 226 renameFile: function(fromFile, newName, callback)
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 status: -1, 531 status: -1,
529 notificationCallbacks: {}, 532 notificationCallbacks: {},
530 loadFlags: 0, 533 loadFlags: 0,
531 INHIBIT_CACHING: 0, 534 INHIBIT_CACHING: 0,
532 VALIDATE_ALWAYS: 0, 535 VALIDATE_ALWAYS: 0,
533 QueryInterface: function() 536 QueryInterface: function()
534 { 537 {
535 return this; 538 return this;
536 } 539 }
537 }; 540 };
OLDNEW
« .hgsubstate ('K') | « .hgsubstate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld