| 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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 }, false); | 307 }, false); |
| 308 | 308 |
| 309 request.addEventListener("load", event => | 309 request.addEventListener("load", event => |
| 310 { | 310 { |
| 311 if (onShutdown.done) | 311 if (onShutdown.done) |
| 312 return; | 312 return; |
| 313 | 313 |
| 314 this._downloading.delete(downloadable.url); | 314 this._downloading.delete(downloadable.url); |
| 315 | 315 |
| 316 // Status will be 0 for non-HTTP requests | 316 // Status will be 0 for non-HTTP requests |
| 317 if (request.status && request.status != 200) | 317 if (request.status && request.status !== 200) |
| 318 { | 318 { |
| 319 errorCallback("synchronize_connection_error"); | 319 errorCallback("synchronize_connection_error"); |
| 320 return; | 320 return; |
| 321 } | 321 } |
| 322 | 322 |
| 323 downloadable.downloadCount++; | 323 downloadable.downloadCount++; |
| 324 | 324 |
| 325 this.onDownloadSuccess( | 325 this.onDownloadSuccess( |
| 326 downloadable, request.responseText, errorCallback, | 326 downloadable, request.responseText, errorCallback, |
| 327 url => | 327 url => |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 * @type {number} | 413 * @type {number} |
| 414 */ | 414 */ |
| 415 hardExpiration: 0, | 415 hardExpiration: 0, |
| 416 | 416 |
| 417 /** | 417 /** |
| 418 * Number indicating how often the object was downloaded. | 418 * Number indicating how often the object was downloaded. |
| 419 * @type {number} | 419 * @type {number} |
| 420 */ | 420 */ |
| 421 downloadCount: 0 | 421 downloadCount: 0 |
| 422 }; | 422 }; |
| OLD | NEW |