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

Side by Side Diff: runtime/observatory/lib/src/elements/script_inset.dart

Issue 2302163002: Manage null CallSite receivers in script-inset (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 script_inset_element; 5 library script_inset_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:observatory/app.dart'; 9 import 'package:observatory/app.dart';
10 import 'package:observatory/models.dart' as M; 10 import 'package:observatory/models.dart' as M;
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 details.append(row('Call of "${callSite.name}" did not execute')); 1174 details.append(row('Call of "${callSite.name}" did not execute'));
1175 } else { 1175 } else {
1176 var r = row(); 1176 var r = row();
1177 r.append(cell("Container")); 1177 r.append(cell("Container"));
1178 r.append(cell("Count")); 1178 r.append(cell("Count"));
1179 r.append(cell("Target")); 1179 r.append(cell("Target"));
1180 details.append(r); 1180 details.append(r);
1181 1181
1182 for (var entry in callSite.entries) { 1182 for (var entry in callSite.entries) {
1183 var r = row(); 1183 var r = row();
1184 r.append(cell(serviceRef(entry.receiver))); 1184 if (entry.receiver == null) {
1185 r.append(cell(""));
1186 } else {
1187 r.append(cell(serviceRef(entry.receiver)));
1188 }
1185 r.append(cell(entry.count.toString())); 1189 r.append(cell(entry.count.toString()));
1186 r.append(cell(serviceRef(entry.target))); 1190 r.append(cell(serviceRef(entry.target)));
1187 details.append(r); 1191 details.append(r);
1188 } 1192 }
1189 } 1193 }
1190 return details; 1194 return details;
1191 }); 1195 });
1192 } 1196 }
1193 } 1197 }
1194 1198
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 if (self) { 1341 if (self) {
1338 return selfTicks / sampleCount; 1342 return selfTicks / sampleCount;
1339 } else { 1343 } else {
1340 return totalTicks / sampleCount; 1344 return totalTicks / sampleCount;
1341 } 1345 }
1342 } 1346 }
1343 1347
1344 bool isHot(bool self) => _percent(self) > kHotThreshold; 1348 bool isHot(bool self) => _percent(self) > kHotThreshold;
1345 bool isMedium(bool self) => _percent(self) > kMediumThreshold; 1349 bool isMedium(bool self) => _percent(self) > kMediumThreshold;
1346 } 1350 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698