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

Unified Diff: chrome/browser/resources/tracing/timeline_model.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
« no previous file with comments | « no previous file | chrome/browser/resources/tracing/timeline_model_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/tracing/timeline_model.js
diff --git a/chrome/browser/resources/tracing/timeline_model.js b/chrome/browser/resources/tracing/timeline_model.js
index f7883501666e648709754d18fcf6c76df0658699..68beb982521b186374f92d6ab6d973171b6fc536 100644
--- a/chrome/browser/resources/tracing/timeline_model.js
+++ b/chrome/browser/resources/tracing/timeline_model.js
@@ -502,7 +502,28 @@ cr.define('tracing', function() {
*/
TimelineModel.registerImporter = function(importerConstructor) {
importerConstructors.push(importerConstructor);
- }
+ };
+
+ function TimelineModelEmptyImporter(events) {
+ };
+
+ TimelineModelEmptyImporter.canImport = function(eventData) {
+ if (eventData instanceof Array && eventData.length == 0)
+ return true;
+ if (typeof(eventData) === 'string' || eventData instanceof String) {
+ return eventData.length == 0;
+ }
+ return false;
+ };
+
+ TimelineModelEmptyImporter.prototype = {
+ __proto__: Object.prototype,
+
+ importEvents : function() {
+ }
+ };
+
+ TimelineModel.registerImporter(TimelineModelEmptyImporter);
TimelineModel.prototype = {
__proto__: cr.EventTarget.prototype,
@@ -787,4 +808,5 @@ cr.define('tracing', function() {
TimelineCpu: TimelineCpu,
TimelineModel: TimelineModel
};
+
});
« no previous file with comments | « no previous file | chrome/browser/resources/tracing/timeline_model_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698