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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotView.js

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 * @param {!WebInspector.Event} event 1232 * @param {!WebInspector.Event} event
1233 */ 1233 */
1234 _heapStatsUpdate: function(event) 1234 _heapStatsUpdate: function(event)
1235 { 1235 {
1236 if (!this._profileSamples) 1236 if (!this._profileSamples)
1237 return; 1237 return;
1238 var samples = /** @type {!Array.<number>} */ (event.data); 1238 var samples = /** @type {!Array.<number>} */ (event.data);
1239 var index; 1239 var index;
1240 for (var i = 0; i < samples.length; i += 3) { 1240 for (var i = 0; i < samples.length; i += 3) {
1241 index = samples[i]; 1241 index = samples[i];
1242 var size = samples[i+2]; 1242 var size = samples[i + 2];
1243 this._profileSamples.sizes[index] = size; 1243 this._profileSamples.sizes[index] = size;
1244 if (!this._profileSamples.max[index]) 1244 if (!this._profileSamples.max[index])
1245 this._profileSamples.max[index] = size; 1245 this._profileSamples.max[index] = size;
1246 } 1246 }
1247 }, 1247 },
1248 1248
1249 /** 1249 /**
1250 * @param {!WebInspector.Event} event 1250 * @param {!WebInspector.Event} event
1251 */ 1251 */
1252 _lastSeenObjectId: function(event) 1252 _lastSeenObjectId: function(event)
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 }, 1680 },
1681 1681
1682 /** 1682 /**
1683 * @override 1683 * @override
1684 * @param {!WebInspector.ChunkedReader} reader 1684 * @param {!WebInspector.ChunkedReader} reader
1685 * @param {!Event} e 1685 * @param {!Event} e
1686 */ 1686 */
1687 onError: function(reader, e) 1687 onError: function(reader, e)
1688 { 1688 {
1689 var subtitle; 1689 var subtitle;
1690 switch(e.target.error.code) { 1690 switch (e.target.error.code) {
1691 case e.target.error.NOT_FOUND_ERR: 1691 case e.target.error.NOT_FOUND_ERR:
1692 subtitle = WebInspector.UIString("'%s' not found.", reader.fileName( )); 1692 subtitle = WebInspector.UIString("'%s' not found.", reader.fileName( ));
1693 break; 1693 break;
1694 case e.target.error.NOT_READABLE_ERR: 1694 case e.target.error.NOT_READABLE_ERR:
1695 subtitle = WebInspector.UIString("'%s' is not readable", reader.file Name()); 1695 subtitle = WebInspector.UIString("'%s' is not readable", reader.file Name());
1696 break; 1696 break;
1697 case e.target.error.ABORT_ERR: 1697 case e.target.error.ABORT_ERR:
1698 return; 1698 return;
1699 default: 1699 default:
1700 subtitle = WebInspector.UIString("'%s' error %d", reader.fileName(), e.target.error.code); 1700 subtitle = WebInspector.UIString("'%s' error %d", reader.fileName(), e.target.error.code);
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2249 name.textContent = WebInspector.beautifyFunctionName(frame.functionN ame); 2249 name.textContent = WebInspector.beautifyFunctionName(frame.functionN ame);
2250 if (frame.scriptId) { 2250 if (frame.scriptId) {
2251 var urlElement = this._linkifier.linkifyScriptLocation(this._tar get, String(frame.scriptId), frame.scriptName, frame.line - 1, frame.column - 1) ; 2251 var urlElement = this._linkifier.linkifyScriptLocation(this._tar get, String(frame.scriptId), frame.scriptName, frame.line - 1, frame.column - 1) ;
2252 frameDiv.appendChild(urlElement); 2252 frameDiv.appendChild(urlElement);
2253 } 2253 }
2254 } 2254 }
2255 }, 2255 },
2256 2256
2257 __proto__: WebInspector.Widget.prototype 2257 __proto__: WebInspector.Widget.prototype
2258 } 2258 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698