OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |