| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 if (!accepted) | 810 if (!accepted) |
| 811 return; | 811 return; |
| 812 function didRead(data) | 812 function didRead(data) |
| 813 { | 813 { |
| 814 if (data) | 814 if (data) |
| 815 fileOutputStream.write(data, fileOutputStream.close.bind(fil
eOutputStream)); | 815 fileOutputStream.write(data, fileOutputStream.close.bind(fil
eOutputStream)); |
| 816 else | 816 else |
| 817 fileOutputStream.close(); | 817 fileOutputStream.close(); |
| 818 } | 818 } |
| 819 if (this._failedToCreateTempFile) { | 819 if (this._failedToCreateTempFile) { |
| 820 WebInspector.console.addErrorMessage("Failed to open temp file w
ith heap snapshot"); | 820 WebInspector.console.error("Failed to open temp file with heap s
napshot"); |
| 821 fileOutputStream.close(); | 821 fileOutputStream.close(); |
| 822 } else if (this._tempFile) { | 822 } else if (this._tempFile) { |
| 823 this._tempFile.read(didRead); | 823 this._tempFile.read(didRead); |
| 824 } else { | 824 } else { |
| 825 this._onTempFileReady = onOpenForSave.bind(this, accepted); | 825 this._onTempFileReady = onOpenForSave.bind(this, accepted); |
| 826 } | 826 } |
| 827 } | 827 } |
| 828 this._fileName = this._fileName || "CPU-" + new Date().toISO8601Compact(
) + this._profileType.fileExtension(); | 828 this._fileName = this._fileName || "CPU-" + new Date().toISO8601Compact(
) + this._profileType.fileExtension(); |
| 829 fileOutputStream.open(this._fileName, onOpenForSave.bind(this)); | 829 fileOutputStream.open(this._fileName, onOpenForSave.bind(this)); |
| 830 }, | 830 }, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 _notifyTempFileReady: function() | 905 _notifyTempFileReady: function() |
| 906 { | 906 { |
| 907 if (this._onTempFileReady) { | 907 if (this._onTempFileReady) { |
| 908 this._onTempFileReady(); | 908 this._onTempFileReady(); |
| 909 this._onTempFileReady = null; | 909 this._onTempFileReady = null; |
| 910 } | 910 } |
| 911 }, | 911 }, |
| 912 | 912 |
| 913 __proto__: WebInspector.ProfileHeader.prototype | 913 __proto__: WebInspector.ProfileHeader.prototype |
| 914 } | 914 } |
| OLD | NEW |