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

Unified Diff: tools/cc-frame-viewer/src/model.js

Issue 12260030: [cc-frame-viewer] Panoply of fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 7 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 | « tools/cc-frame-viewer/src/lthi_view.js ('k') | tools/cc-frame-viewer/src/quad_view_viewport.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cc-frame-viewer/src/model.js
diff --git a/tools/cc-frame-viewer/src/model.js b/tools/cc-frame-viewer/src/model.js
index ca86f290362e6f7c38da3707d78db9a827a9f3da..495a7205a34b99666226ee030e0dcbc7d83baf13 100644
--- a/tools/cc-frame-viewer/src/model.js
+++ b/tools/cc-frame-viewer/src/model.js
@@ -9,6 +9,8 @@ base.require('model.layer_tree_host_impl');
base.exportTo('ccfv', function() {
function unquoteIfNeeded(val) {
+ if (typeof val !== 'string')
+ return val;
if (val[0] == '{' && val[val.length - 1] == '}') {
return JSON.parse(val);
} else {
@@ -55,7 +57,7 @@ base.exportTo('ccfv', function() {
},
handleFrameEvent: function(event) {
- if (typeof event.args.frame !== 'string')
+ if (event.args.frame === 'undefined')
throw new Error('Expected Frame to have args.frame of type string.');
var frameData = unquoteIfNeeded(event.args.frame);
« no previous file with comments | « tools/cc-frame-viewer/src/lthi_view.js ('k') | tools/cc-frame-viewer/src/quad_view_viewport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698