OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium 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 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
8 */ | 8 */ |
9 WebInspector.PromisesPanel = function() | 9 WebInspector.PromisesPanel = function() |
10 { | 10 { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 */ | 102 */ |
103 function callback(error, promiseData) | 103 function callback(error, promiseData) |
104 { | 104 { |
105 if (error || !promiseData) | 105 if (error || !promiseData) |
106 return; | 106 return; |
107 | 107 |
108 promiseData.sort(this._comparePromises); | 108 promiseData.sort(this._comparePromises); |
109 var nodesToInsert = { __proto__: null }; | 109 var nodesToInsert = { __proto__: null }; |
110 for (var i = 0; i < promiseData.length; i++) { | 110 for (var i = 0; i < promiseData.length; i++) { |
111 var promise = promiseData[i]; | 111 var promise = promiseData[i]; |
112 var status = document.createElementWithClass("div", "status"); | 112 var status = createElementWithClass("div", "status"); |
113 status.classList.add(promise.status); | 113 status.classList.add(promise.status); |
114 status.createTextChild(promise.status); | 114 status.createTextChild(promise.status); |
115 var data = { | 115 var data = { |
116 promiseId: promise.id, | 116 promiseId: promise.id, |
117 status: status | 117 status: status |
118 }; | 118 }; |
119 if (promise.callFrame) | 119 if (promise.callFrame) |
120 data.location = this._linkifier.linkifyConsoleCallFrame(this
._target, promise.callFrame); | 120 data.location = this._linkifier.linkifyConsoleCallFrame(this
._target, promise.callFrame); |
121 if (promise.creationTime && promise.settlementTime && promise.se
ttlementTime >= promise.creationTime) | 121 if (promise.creationTime && promise.settlementTime && promise.se
ttlementTime >= promise.creationTime) |
122 data.tts = Number.millisToString(promise.settlementTime - pr
omise.creationTime, true); | 122 data.tts = Number.millisToString(promise.settlementTime - pr
omise.creationTime, true); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 undefined, | 190 undefined, |
191 [promise]); | 191 [promise]); |
192 this._target.consoleModel.addMessage(message); | 192 this._target.consoleModel.addMessage(message); |
193 WebInspector.console.show(); | 193 WebInspector.console.show(); |
194 } | 194 } |
195 }, | 195 }, |
196 | 196 |
197 __proto__: WebInspector.VBox.prototype | 197 __proto__: WebInspector.VBox.prototype |
198 } | 198 } |
199 | 199 |
OLD | NEW |