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

Unified Diff: tracing/tracing/metrics/system_health/first_paint_metric.html

Issue 1988313003: Suppress frame URL query failures (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: add warning Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/system_health/first_paint_metric.html
diff --git a/tracing/tracing/metrics/system_health/first_paint_metric.html b/tracing/tracing/metrics/system_health/first_paint_metric.html
index 2d4bcb52445d34c763e210ab857be9f49ea3386b..3d12cf915f50f0ec38114d7b06bb20dd09a4fd72 100644
--- a/tracing/tracing/metrics/system_health/first_paint_metric.html
+++ b/tracing/tracing/metrics/system_health/first_paint_metric.html
@@ -80,8 +80,10 @@ tr.exportTo('tr.metrics.sh', function() {
var objects = rendererHelper.process.objects;
var frameLoaderInstances = objects.instancesByTypeName_['FrameLoader'];
if (frameLoaderInstances === undefined) {
- throw new Error(
- 'Couldn\'t find any FrameLoader instances to query frame url.');
+ console.warn('Failed to find FrameLoader for frameId "' + frameIdRef +
+ '" at ts ' + ts + ', the trace maybe incomplete or from an old' +
+ 'Chrome.');
+ return undefined;
}
frameLoaderInstances.forEach(function(instance) {
if (!instance.isAliveAt(ts))
@@ -172,7 +174,7 @@ tr.exportTo('tr.metrics.sh', function() {
firstPaintEvents.forEach(function(ev) {
var frameIdRef = ev.args['frame'];
var url = findUrlOfFrameAt(rendererHelper, frameIdRef, ev.start);
- if (shouldIgnoreURL(url))
+ if (url === undefined || shouldIgnoreURL(url))
return;
var navigationStartEvent =
findNavigationStartEventForFrameBeforeTimestamp(frameIdRef, ev.start);
« 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