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

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

Issue 396993003: DevTools: get rid of WebInspector.cssModel, use target models instead (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 /* 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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 * @this {WebInspector.HeapSnapshotView} 897 * @this {WebInspector.HeapSnapshotView}
898 */ 898 */
899 function didChangePerspective() 899 function didChangePerspective()
900 { 900 {
901 this._dataGrid.highlightObjectByHeapSnapshotId(snapshotObjectId, did HighlightObject); 901 this._dataGrid.highlightObjectByHeapSnapshotId(snapshotObjectId, did HighlightObject);
902 } 902 }
903 903
904 function didHighlightObject(found) 904 function didHighlightObject(found)
905 { 905 {
906 if (!found) 906 if (!found)
907 WebInspector.console.addErrorMessage("Cannot find corresponding heap snapshot node", true); 907 WebInspector.console.error("Cannot find corresponding heap snaps hot node");
908 } 908 }
909 }, 909 },
910 910
911 _getHoverAnchor: function(target) 911 _getHoverAnchor: function(target)
912 { 912 {
913 var span = target.enclosingNodeOrSelfWithNodeName("span"); 913 var span = target.enclosingNodeOrSelfWithNodeName("span");
914 if (!span) 914 if (!span)
915 return; 915 return;
916 var row = target.enclosingNodeOrSelfWithNodeName("tr"); 916 var row = target.enclosingNodeOrSelfWithNodeName("tr");
917 if (!row) 917 if (!row)
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 1576
1577 /** 1577 /**
1578 * @param {boolean} accepted 1578 * @param {boolean} accepted
1579 * @this {WebInspector.HeapProfileHeader} 1579 * @this {WebInspector.HeapProfileHeader}
1580 */ 1580 */
1581 function onOpen(accepted) 1581 function onOpen(accepted)
1582 { 1582 {
1583 if (!accepted) 1583 if (!accepted)
1584 return; 1584 return;
1585 if (this._failedToCreateTempFile) { 1585 if (this._failedToCreateTempFile) {
1586 WebInspector.console.addErrorMessage("Failed to open temp file w ith heap snapshot"); 1586 WebInspector.console.error("Failed to open temp file with heap s napshot");
1587 fileOutputStream.close(); 1587 fileOutputStream.close();
1588 } else if (this._tempFile) { 1588 } else if (this._tempFile) {
1589 var delegate = new WebInspector.SaveSnapshotOutputStreamDelegate (this); 1589 var delegate = new WebInspector.SaveSnapshotOutputStreamDelegate (this);
1590 this._tempFile.writeToOutputSteam(fileOutputStream, delegate); 1590 this._tempFile.writeToOutputSteam(fileOutputStream, delegate);
1591 } else { 1591 } else {
1592 this._onTempFileReady = onOpen.bind(this, accepted); 1592 this._onTempFileReady = onOpen.bind(this, accepted);
1593 this._updateSaveProgress(0, 1); 1593 this._updateSaveProgress(0, 1);
1594 } 1594 }
1595 } 1595 }
1596 this._fileName = this._fileName || "Heap-" + new Date().toISO8601Compact () + this._profileType.fileExtension(); 1596 this._fileName = this._fileName || "Heap-" + new Date().toISO8601Compact () + this._profileType.fileExtension();
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 { 1700 {
1701 this._profileHeader._updateSaveProgress(reader.loadedSize(), reader.file Size()); 1701 this._profileHeader._updateSaveProgress(reader.loadedSize(), reader.file Size());
1702 }, 1702 },
1703 1703
1704 /** 1704 /**
1705 * @param {!WebInspector.ChunkedReader} reader 1705 * @param {!WebInspector.ChunkedReader} reader
1706 * @param {!Event} event 1706 * @param {!Event} event
1707 */ 1707 */
1708 onError: function(reader, event) 1708 onError: function(reader, event)
1709 { 1709 {
1710 WebInspector.console.addErrorMessage("Failed to read heap snapshot from temp file: " + /** @type {!ErrorEvent} */ (event).message); 1710 WebInspector.console.error("Failed to read heap snapshot from temp file: " + /** @type {!ErrorEvent} */ (event).message);
1711 this.onTransferFinished(); 1711 this.onTransferFinished();
1712 } 1712 }
1713 } 1713 }
1714 1714
1715 /** 1715 /**
1716 * @constructor 1716 * @constructor
1717 * @extends {WebInspector.VBox} 1717 * @extends {WebInspector.VBox}
1718 * @param {!WebInspector.HeapProfileHeader} heapProfileHeader 1718 * @param {!WebInspector.HeapProfileHeader} heapProfileHeader
1719 */ 1719 */
1720 WebInspector.HeapTrackingOverviewGrid = function(heapProfileHeader) 1720 WebInspector.HeapTrackingOverviewGrid = function(heapProfileHeader)
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
2173 name.textContent = frame.functionName; 2173 name.textContent = frame.functionName;
2174 if (frame.scriptId) { 2174 if (frame.scriptId) {
2175 var urlElement = this._linkifier.linkifyLocationByScriptId(this. _weakTarget.get(), String(frame.scriptId), frame.scriptName, frame.line - 1, fra me.column - 1); 2175 var urlElement = this._linkifier.linkifyLocationByScriptId(this. _weakTarget.get(), String(frame.scriptId), frame.scriptName, frame.line - 1, fra me.column - 1);
2176 frameDiv.appendChild(urlElement); 2176 frameDiv.appendChild(urlElement);
2177 } 2177 }
2178 } 2178 }
2179 }, 2179 },
2180 2180
2181 __proto__: WebInspector.View.prototype 2181 __proto__: WebInspector.View.prototype
2182 } 2182 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/HeapSnapshotProxy.js ('k') | Source/devtools/front_end/profiler/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698