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

Side by Side Diff: Source/devtools/front_end/promises/PromisesPanel.js

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months 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 // 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
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
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
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/ProfilesPanel.js ('k') | Source/devtools/front_end/resources/ApplicationCacheItemsView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698