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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 * @this {WebInspector.HeapSnapshotView} | 938 * @this {WebInspector.HeapSnapshotView} |
939 */ | 939 */ |
940 function didChangePerspective() | 940 function didChangePerspective() |
941 { | 941 { |
942 this._dataGrid.highlightObjectByHeapSnapshotId(snapshotObjectId, did
HighlightObject); | 942 this._dataGrid.highlightObjectByHeapSnapshotId(snapshotObjectId, did
HighlightObject); |
943 } | 943 } |
944 | 944 |
945 function didHighlightObject(found) | 945 function didHighlightObject(found) |
946 { | 946 { |
947 if (!found) | 947 if (!found) |
948 WebInspector.console.log("Cannot find corresponding heap snapsho
t node", WebInspector.ConsoleMessage.MessageLevel.Error, true); | 948 WebInspector.messageSink.addErrorMessage("Cannot find correspond
ing heap snapshot node", true); |
949 } | 949 } |
950 }, | 950 }, |
951 | 951 |
952 _getHoverAnchor: function(target) | 952 _getHoverAnchor: function(target) |
953 { | 953 { |
954 var span = target.enclosingNodeOrSelfWithNodeName("span"); | 954 var span = target.enclosingNodeOrSelfWithNodeName("span"); |
955 if (!span) | 955 if (!span) |
956 return; | 956 return; |
957 var row = target.enclosingNodeOrSelfWithNodeName("tr"); | 957 var row = target.enclosingNodeOrSelfWithNodeName("tr"); |
958 if (!row) | 958 if (!row) |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1669 | 1669 |
1670 /** | 1670 /** |
1671 * @param {boolean} accepted | 1671 * @param {boolean} accepted |
1672 * @this {WebInspector.HeapProfileHeader} | 1672 * @this {WebInspector.HeapProfileHeader} |
1673 */ | 1673 */ |
1674 function onOpen(accepted) | 1674 function onOpen(accepted) |
1675 { | 1675 { |
1676 if (!accepted) | 1676 if (!accepted) |
1677 return; | 1677 return; |
1678 if (this._failedToCreateTempFile) { | 1678 if (this._failedToCreateTempFile) { |
1679 WebInspector.console.log("Failed to open temp file with heap sna
pshot", | 1679 WebInspector.messageSink.addErrorMessage("Failed to open temp fi
le with heap snapshot"); |
1680 WebInspector.ConsoleMessage.MessageLevel.Error)
; | |
1681 fileOutputStream.close(); | 1680 fileOutputStream.close(); |
1682 } else if (this._tempFile) { | 1681 } else if (this._tempFile) { |
1683 var delegate = new WebInspector.SaveSnapshotOutputStreamDelegate
(this); | 1682 var delegate = new WebInspector.SaveSnapshotOutputStreamDelegate
(this); |
1684 this._tempFile.writeToOutputSteam(fileOutputStream, delegate); | 1683 this._tempFile.writeToOutputSteam(fileOutputStream, delegate); |
1685 } else { | 1684 } else { |
1686 this._onTempFileReady = onOpen.bind(this, accepted); | 1685 this._onTempFileReady = onOpen.bind(this, accepted); |
1687 this._updateSaveProgress(0, 1); | 1686 this._updateSaveProgress(0, 1); |
1688 } | 1687 } |
1689 } | 1688 } |
1690 this._fileName = this._fileName || "Heap-" + new Date().toISO8601Compact
() + this._profileType.fileExtension(); | 1689 this._fileName = this._fileName || "Heap-" + new Date().toISO8601Compact
() + this._profileType.fileExtension(); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1792 onChunkTransferred: function(reader) | 1791 onChunkTransferred: function(reader) |
1793 { | 1792 { |
1794 this._profileHeader._updateSaveProgress(reader.loadedSize(), reader.file
Size()); | 1793 this._profileHeader._updateSaveProgress(reader.loadedSize(), reader.file
Size()); |
1795 }, | 1794 }, |
1796 | 1795 |
1797 /** | 1796 /** |
1798 * @param {!WebInspector.ChunkedReader} reader | 1797 * @param {!WebInspector.ChunkedReader} reader |
1799 */ | 1798 */ |
1800 onError: function(reader, event) | 1799 onError: function(reader, event) |
1801 { | 1800 { |
1802 WebInspector.console.log("Failed to read heap snapshot from temp file: "
+ event.message, | 1801 WebInspector.messageSink.addErrorMessage("Failed to read heap snapshot f
rom temp file: " + event.message); |
1803 WebInspector.ConsoleMessage.MessageLevel.Error); | |
1804 this.onTransferFinished(); | 1802 this.onTransferFinished(); |
1805 } | 1803 } |
1806 } | 1804 } |
1807 | 1805 |
1808 /** | 1806 /** |
1809 * @constructor | 1807 * @constructor |
1810 * @extends {WebInspector.VBox} | 1808 * @extends {WebInspector.VBox} |
1811 * @param {!WebInspector.HeapProfileHeader} heapProfileHeader | 1809 * @param {!WebInspector.HeapProfileHeader} heapProfileHeader |
1812 */ | 1810 */ |
1813 WebInspector.HeapTrackingOverviewGrid = function(heapProfileHeader) | 1811 WebInspector.HeapTrackingOverviewGrid = function(heapProfileHeader) |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 urlElement = this._linkifier.linkifyRawLocation(rawLocation)
; | 2268 urlElement = this._linkifier.linkifyRawLocation(rawLocation)
; |
2271 if (!urlElement) | 2269 if (!urlElement) |
2272 urlElement = this._linkifier.linkifyLocation(this._target, f
rame.scriptName, frame.line - 1, frame.column - 1); | 2270 urlElement = this._linkifier.linkifyLocation(this._target, f
rame.scriptName, frame.line - 1, frame.column - 1); |
2273 frameDiv.appendChild(urlElement); | 2271 frameDiv.appendChild(urlElement); |
2274 } | 2272 } |
2275 } | 2273 } |
2276 }, | 2274 }, |
2277 | 2275 |
2278 __proto__: WebInspector.View.prototype | 2276 __proto__: WebInspector.View.prototype |
2279 } | 2277 } |
OLD | NEW |