| OLD | NEW |
| 1 // Copyright 2014 The Chromium OS Authors. All rights reserved. | 1 // Copyright 2014 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * The main namespace for the extension. | 8 * The main namespace for the extension. |
| 9 * @namespace | 9 * @namespace |
| 10 */ | 10 */ |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 if (!compressor) { | 472 if (!compressor) { |
| 473 console.error('No compressor for: compressor id' + compressorId + '.'); | 473 console.error('No compressor for: compressor id' + compressorId + '.'); |
| 474 return; | 474 return; |
| 475 } | 475 } |
| 476 | 476 |
| 477 unpacker.app.mountProcessCounter--; | 477 unpacker.app.mountProcessCounter--; |
| 478 if (Object.keys(unpacker.app.volumes).length === 0 && | 478 if (Object.keys(unpacker.app.volumes).length === 0 && |
| 479 unpacker.app.mountProcessCounter === 0) { | 479 unpacker.app.mountProcessCounter === 0) { |
| 480 unpacker.app.unloadNaclModule(); | 480 unpacker.app.unloadNaclModule(); |
| 481 } else { | 481 } else { |
| 482 // Request libarchive to abort any ongoing process and release resources. | 482 // Request minizip to abort any ongoing process and release resources. |
| 483 // The argument indicates whether an error occurred or not. | 483 // The argument indicates whether an error occurred or not. |
| 484 if (hasError) | 484 if (hasError) |
| 485 compressor.sendCloseArchiveRequest(hasError); | 485 compressor.sendCloseArchiveRequest(hasError); |
| 486 } | 486 } |
| 487 | 487 |
| 488 // Delete the archive file if it exists. | 488 // Delete the archive file if it exists. |
| 489 if (compressor.archiveFileEntry) | 489 if (compressor.archiveFileEntry) |
| 490 compressor.archiveFileEntry.remove(); | 490 compressor.archiveFileEntry.remove(); |
| 491 | 491 |
| 492 delete unpacker.app.compressors[compressorId]; | 492 delete unpacker.app.compressors[compressorId]; |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 }, | 832 }, |
| 833 | 833 |
| 834 /** | 834 /** |
| 835 * Saves the state before suspending the event page, so we can resume it | 835 * Saves the state before suspending the event page, so we can resume it |
| 836 * once new events arrive. | 836 * once new events arrive. |
| 837 */ | 837 */ |
| 838 onSuspend: function() { | 838 onSuspend: function() { |
| 839 unpacker.app.saveState_(Object.keys(unpacker.app.volumes)); | 839 unpacker.app.saveState_(Object.keys(unpacker.app.volumes)); |
| 840 } | 840 } |
| 841 }; | 841 }; |
| OLD | NEW |