| 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 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 { | 841 { |
| 842 var serializedData = JSON.stringify(data); | 842 var serializedData = JSON.stringify(data); |
| 843 | 843 |
| 844 /** | 844 /** |
| 845 * @this {WebInspector.CPUProfileHeader} | 845 * @this {WebInspector.CPUProfileHeader} |
| 846 */ | 846 */ |
| 847 function didCreateTempFile(tempFile) | 847 function didCreateTempFile(tempFile) |
| 848 { | 848 { |
| 849 this._writeToTempFile(tempFile, serializedData); | 849 this._writeToTempFile(tempFile, serializedData); |
| 850 } | 850 } |
| 851 new WebInspector.TempFile("cpu-profiler", String(this.uid), didCreateTem
pFile.bind(this)); | 851 WebInspector.TempFile.create("cpu-profiler", String(this.uid)) |
| 852 .then(didCreateTempFile.bind(this)); |
| 852 }, | 853 }, |
| 853 | 854 |
| 854 /** | 855 /** |
| 855 * @param {?WebInspector.TempFile} tempFile | 856 * @param {?WebInspector.TempFile} tempFile |
| 856 * @param {string} serializedData | 857 * @param {string} serializedData |
| 857 */ | 858 */ |
| 858 _writeToTempFile: function(tempFile, serializedData) | 859 _writeToTempFile: function(tempFile, serializedData) |
| 859 { | 860 { |
| 860 this._tempFile = tempFile; | 861 this._tempFile = tempFile; |
| 861 if (!tempFile) { | 862 if (!tempFile) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 880 _notifyTempFileReady: function() | 881 _notifyTempFileReady: function() |
| 881 { | 882 { |
| 882 if (this._onTempFileReady) { | 883 if (this._onTempFileReady) { |
| 883 this._onTempFileReady(); | 884 this._onTempFileReady(); |
| 884 this._onTempFileReady = null; | 885 this._onTempFileReady = null; |
| 885 } | 886 } |
| 886 }, | 887 }, |
| 887 | 888 |
| 888 __proto__: WebInspector.ProfileHeader.prototype | 889 __proto__: WebInspector.ProfileHeader.prototype |
| 889 } | 890 } |
| OLD | NEW |