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

Side by Side Diff: WebCore/inspector/front-end/HeapSnapshotView.js

Issue 6048013: Revert 73364 - Merge 73229 - 2010-12-02 Mikhail Naganov <mnaganov@chromium.... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | WebCore/inspector/front-end/ProfilesPanel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 return this._snapshotDataGridList; 320 return this._snapshotDataGridList;
321 }, 321 },
322 322
323 _getProfiles: function() 323 _getProfiles: function()
324 { 324 {
325 return WebInspector.panels.profiles.getProfiles(WebInspector.HeapSnapsho tProfileType.TypeId); 325 return WebInspector.panels.profiles.getProfiles(WebInspector.HeapSnapsho tProfileType.TypeId);
326 }, 326 },
327 327
328 _loadProfile: function(profile, callback) 328 _loadProfile: function(profile, callback)
329 { 329 {
330 WebInspector.panels.profiles.loadHeapSnapshot(profile.uid, callback); 330 if (profile._loaded) {
331 }, 331 callback(profile);
332 return;
333 }
332 334
333 processLoadedSnapshot: function(profile, loadedSnapshot) 335 InspectorBackend.getProfile(profile.typeId, profile.uid, loadedCallback. bind(this));
334 { 336
335 var snapshot = WebInspector.HeapSnapshotView.prototype._convertSnapshot( loadedSnapshot); 337 function loadedCallback(loadedSnapshot) {
336 profile.children = snapshot.children; 338 profile.children = loadedSnapshot.head.children;
337 profile.entries = snapshot.entries; 339 profile.entries = loadedSnapshot.head.entries;
338 profile.lowlevels = snapshot.lowlevels; 340 profile.lowlevels = loadedSnapshot.head.lowlevels;
339 WebInspector.HeapSnapshotView.prototype._prepareProfile(profile); 341 this._prepareProfile(profile);
342 profile._loaded = true;
343 this.parent.updateProfile(profile);
344 callback(profile);
345 }
340 }, 346 },
341 347
342 _mouseDownInDataGrid: function(event) 348 _mouseDownInDataGrid: function(event)
343 { 349 {
344 if (event.detail < 2) 350 if (event.detail < 2)
345 return; 351 return;
346 352
347 var cell = event.target.enclosingNodeOrSelfWithNodeName("td"); 353 var cell = event.target.enclosingNodeOrSelfWithNodeName("td");
348 if (!cell || (!cell.hasStyleClass("count-column") && !cell.hasStyleClass ("size-column") && !cell.hasStyleClass("countDelta-column") && !cell.hasStyleCla ss("sizeDelta-column"))) 354 if (!cell || (!cell.hasStyleClass("count-column") && !cell.hasStyleClass ("size-column") && !cell.hasStyleClass("countDelta-column") && !cell.hasStyleCla ss("sizeDelta-column")))
349 return; 355 return;
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 return new WebInspector.ProfileSidebarTreeElement(profile, WebInspector. UIString("Snapshot %d"), "heap-snapshot-sidebar-tree-item"); 999 return new WebInspector.ProfileSidebarTreeElement(profile, WebInspector. UIString("Snapshot %d"), "heap-snapshot-sidebar-tree-item");
994 }, 1000 },
995 1001
996 createView: function(profile) 1002 createView: function(profile)
997 { 1003 {
998 return new WebInspector.HeapSnapshotView(WebInspector.panels.profiles, p rofile); 1004 return new WebInspector.HeapSnapshotView(WebInspector.panels.profiles, p rofile);
999 } 1005 }
1000 } 1006 }
1001 1007
1002 WebInspector.HeapSnapshotProfileType.prototype.__proto__ = WebInspector.ProfileT ype.prototype; 1008 WebInspector.HeapSnapshotProfileType.prototype.__proto__ = WebInspector.ProfileT ype.prototype;
OLDNEW
« no previous file with comments | « no previous file | WebCore/inspector/front-end/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698