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

Side by Side Diff: runtime/bin/vmservice/observatory/lib/src/elements/heap_map.dart

Issue 779103003: Fix bugs in heapmap, binary payloads, 'address' request. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library heap_map_element; 5 library heap_map_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:math'; 9 import 'dart:math';
10 import 'observatory_element.dart'; 10 import 'observatory_element.dart';
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 void _handleMouseMove(MouseEvent event) { 149 void _handleMouseMove(MouseEvent event) {
150 var info = _objectAt(event.offset); 150 var info = _objectAt(event.offset);
151 var addressString = '${info.size}B @ 0x${info.address.toRadixString(16)}'; 151 var addressString = '${info.size}B @ 0x${info.address.toRadixString(16)}';
152 var className = _classNameAt(event.offset); 152 var className = _classNameAt(event.offset);
153 status = (className == '') ? '-' : '$className $addressString'; 153 status = (className == '') ? '-' : '$className $addressString';
154 } 154 }
155 155
156 void _handleClick(MouseEvent event) { 156 void _handleClick(MouseEvent event) {
157 var address = _objectAt(event.offset).address.toRadixString(16); 157 var address = _objectAt(event.offset).address.toRadixString(16);
158 window.location.hash = "/${fragmentation.isolate.link}/address/$address"; 158 window.location.hash = "${fragmentation.isolate.link}/address/$address";
Cutch 2014/12/08 18:24:47 You shouldn't be touching the window.location.hash
koda 2014/12/08 18:36:57 Done.
159 } 159 }
160 160
161 void _updateFragmentationData() { 161 void _updateFragmentationData() {
162 if (fragmentation == null || _fragmentationCanvas == null) { 162 if (fragmentation == null || _fragmentationCanvas == null) {
163 return; 163 return;
164 } 164 }
165 _updateClassList( 165 _updateClassList(
166 fragmentation['class_list'], fragmentation['free_class_id']); 166 fragmentation['class_list'], fragmentation['free_class_id']);
167 var pages = fragmentation['pages']; 167 var pages = fragmentation['pages'];
168 var width = _fragmentationCanvas.parent.client.width; 168 var width = _fragmentationCanvas.parent.client.width;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 }).whenComplete(done); 222 }).whenComplete(done);
223 } 223 }
224 224
225 void fragmentationChanged(oldValue) { 225 void fragmentationChanged(oldValue) {
226 // Async, in case attached has not yet run (observed in JS version). 226 // Async, in case attached has not yet run (observed in JS version).
227 new Future(() { 227 new Future(() {
228 _updateFragmentationData(); 228 _updateFragmentationData();
229 }); 229 });
230 } 230 }
231 } 231 }
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/service_html.dart ('k') | runtime/bin/vmservice/observatory/test/graph_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698