Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: Source/devtools/front_end/profiler/CPUProfileView.js

Issue 705063004: DevTools: Promisify WebInspector.TempFile (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698