| 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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 { | 738 { |
| 739 var serializedData = JSON.stringify(data); | 739 var serializedData = JSON.stringify(data); |
| 740 | 740 |
| 741 /** | 741 /** |
| 742 * @this {WebInspector.CPUProfileHeader} | 742 * @this {WebInspector.CPUProfileHeader} |
| 743 */ | 743 */ |
| 744 function didCreateTempFile(tempFile) | 744 function didCreateTempFile(tempFile) |
| 745 { | 745 { |
| 746 this._writeToTempFile(tempFile, serializedData); | 746 this._writeToTempFile(tempFile, serializedData); |
| 747 } | 747 } |
| 748 new WebInspector.TempFile("cpu-profiler", String(this.uid), didCreateTem
pFile.bind(this)); | 748 WebInspector.TempFile.create("cpu-profiler", String(this.uid)) |
| 749 .then(didCreateTempFile.bind(this)); |
| 749 }, | 750 }, |
| 750 | 751 |
| 751 /** | 752 /** |
| 752 * @param {?WebInspector.TempFile} tempFile | 753 * @param {?WebInspector.TempFile} tempFile |
| 753 * @param {string} serializedData | 754 * @param {string} serializedData |
| 754 */ | 755 */ |
| 755 _writeToTempFile: function(tempFile, serializedData) | 756 _writeToTempFile: function(tempFile, serializedData) |
| 756 { | 757 { |
| 757 this._tempFile = tempFile; | 758 this._tempFile = tempFile; |
| 758 if (!tempFile) { | 759 if (!tempFile) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 777 _notifyTempFileReady: function() | 778 _notifyTempFileReady: function() |
| 778 { | 779 { |
| 779 if (this._onTempFileReady) { | 780 if (this._onTempFileReady) { |
| 780 this._onTempFileReady(); | 781 this._onTempFileReady(); |
| 781 this._onTempFileReady = null; | 782 this._onTempFileReady = null; |
| 782 } | 783 } |
| 783 }, | 784 }, |
| 784 | 785 |
| 785 __proto__: WebInspector.ProfileHeader.prototype | 786 __proto__: WebInspector.ProfileHeader.prototype |
| 786 } | 787 } |
| OLD | NEW |