Changeset 116959 in webkit
- Timestamp:
- May 14, 2012 10:12:11 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116957 r116959 1 2012-05-14 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Web Inspector: do not update $0-$4 console variables for the objects from loaded from file heap snapshot. 4 https://bugs.webkit.org/show_bug.cgi?id=86371 5 6 When the user selects an object in HeapSnapshot we are updating $0 variable in console API. 7 But if the snapshot was loaded from file then we can't map object id for the selected obect 8 from the snapshot to the live objects in the inspected page. 9 10 Reviewed by Yury Semikhatsky. 11 12 * inspector/front-end/HeapSnapshotView.js: 13 (WebInspector.HeapSnapshotView.prototype._inspectedObjectChanged): 14 (WebInspector.HeapSnapshotView.prototype._updateFilterOptions): 15 (WebInspector.HeapProfileHeader): 16 (WebInspector.HeapProfileHeader.prototype.canSaveToFile): 17 (WebInspector.HeapProfileHeader.prototype.saveToFile): 18 * inspector/front-end/ProfilesPanel.js: 19 (WebInspector.ProfileHeader): 20 (WebInspector.ProfileHeader.prototype.loadFromFile): 21 (WebInspector.ProfileHeader.prototype.fromFile): 22 (WebInspector.ProfilesPanel.prototype._loadFromFile): 23 1 24 2012-05-14 Andrey Kosyakov <caseq@chromium.org> 2 25 -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js
r116855 r116959 453 453 { 454 454 var selectedNode = event.target.selectedNode; 455 if ( selectedNode instanceof WebInspector.HeapSnapshotGenericObjectNode)455 if (!this.profile.fromFile() && selectedNode instanceof WebInspector.HeapSnapshotGenericObjectNode) 456 456 ConsoleAgent.addInspectedHeapObject(selectedNode.snapshotNodeId); 457 457 }, … … 560 560 _resolveObjectForPopover: function(element, showCallback, objectGroupName) 561 561 { 562 if (this.profile.fromFile()) 563 return; 562 564 element.node.queryObjectContent(showCallback, objectGroupName); 563 565 }, … … 689 691 } 690 692 691 if (this.profile. _fromFile)693 if (this.profile.fromFile()) 692 694 return; 693 695 for (var i = this.filterSelectElement.length - 1, n = list.length; i < n; ++i) { … … 794 796 this.maxJSObjectId = maxJSObjectId; 795 797 this._loaded = false; 796 this._fromFile = false;797 798 this._totalNumberOfChunks = 0; 798 799 } … … 885 886 canSaveToFile: function() 886 887 { 887 return !this. _fromFile&& this._loaded && !this._savedChunksCount && WebInspector.fileManager.canAppend();888 return !this.fromFile() && this._loaded && !this._savedChunksCount && WebInspector.fileManager.canAppend(); 888 889 }, 889 890 … … 908 909 } 909 910 910 this._fileName = this._fileName || "Heap-" + new Date().toISO8601Compact() + ". json";911 this._fileName = this._fileName || "Heap-" + new Date().toISO8601Compact() + ".heapsnapshot"; 911 912 WebInspector.fileManager.addEventListener(WebInspector.FileManager.EventTypes.SavedURL, startSavingSnapshot, this); 912 913 WebInspector.fileManager.save(this._fileName, "", true); … … 943 944 } 944 945 945 this._fromFile = true;946 946 this.title = file.name; 947 947 this.sidebarElement.subtitle = WebInspector.UIString("Loading\u2026"); -
trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js
r116857 r116959 140 140 this.isTemporary = false; 141 141 } 142 this._fromFile = false; 142 143 } 143 144 … … 163 164 * @param {File} file 164 165 */ 165 loadFromFile: function(file) { throw new Error("Needs implemented"); } 166 loadFromFile: function(file) { throw new Error("Needs implemented"); }, 167 168 /** 169 * @return {boolean} 170 */ 171 fromFile: function() { return this._fromFile; } 166 172 } 167 173 … … 270 276 this.addProfileHeader(temporaryProfile); 271 277 278 temporaryProfile._fromFile = true; 272 279 temporaryProfile.loadFromFile(file); 273 280 this._createFileSelectorElement();
Note: See TracChangeset
for help on using the changeset viewer.