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

Unified Diff: chrome/browser/resources/tracing/trace_event_importer.js

Issue 9584022: Fix ph error on about:tracing startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
Index: chrome/browser/resources/tracing/trace_event_importer.js
diff --git a/chrome/browser/resources/tracing/trace_event_importer.js b/chrome/browser/resources/tracing/trace_event_importer.js
index 56c8217ebc0c772902b89a0a2df93cf31fc350a4..3c4e1885b41046f1a011e4a7a7ae6686e08e6b73 100644
--- a/chrome/browser/resources/tracing/trace_event_importer.js
+++ b/chrome/browser/resources/tracing/trace_event_importer.js
@@ -65,7 +65,7 @@ cr.define('tracing', function() {
}
// Might just be an array of events
- if (eventData instanceof Array && eventData[0].ph)
+ if (eventData instanceof Array && eventData.length && eventData[0].ph)
return true;
// Might be an object with a traceEvents field in it.

Powered by Google App Engine
This is Rietveld 408576698