summaryrefslogtreecommitdiffstats
path: root/tools/deep_memory_profiler
diff options
context:
space:
mode:
authorperia@chromium.org <peria@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-20 05:59:35 +0000
committerperia@chromium.org <peria@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-20 05:59:35 +0000
commit434c16483007e44c1e45e2b0330ab92c23bb623d (patch)
treef027a0fa1788fba2ee70c352800bcc4f4f7d9513 /tools/deep_memory_profiler
parent6aa176af92167a0bcb9761fb60279d6233c3fcb9 (diff)
downloadchromium_src-434c16483007e44c1e45e2b0330ab92c23bb623d.zip
chromium_src-434c16483007e44c1e45e2b0330ab92c23bb623d.tar.gz
chromium_src-434c16483007e44c1e45e2b0330ab92c23bb623d.tar.bz2
DMP visualizer has ignored default_template parameter in input data.
After this CL, DMP visualizer sets profiler's template in following order. 2) is added in this CL. 1) input template, if it is given in constructor 2) default_template, if JSON has the parameter 3) l2, if none of above conditions is fulfilled BUG=259206 Review URL: https://codereview.chromium.org/28153002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/deep_memory_profiler')
-rw-r--r--tools/deep_memory_profiler/visualizer/static/profiler.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/deep_memory_profiler/visualizer/static/profiler.js b/tools/deep_memory_profiler/visualizer/static/profiler.js
index dcd5ba0..e47a4c6 100644
--- a/tools/deep_memory_profiler/visualizer/static/profiler.js
+++ b/tools/deep_memory_profiler/visualizer/static/profiler.js
@@ -9,7 +9,10 @@
var Profiler = function(jsonData, template) {
this.jsonData_ = jsonData;
// Initialize template with templates information.
- this.template_ = template || jsonData.templates['l2'];
+ this.template_ = template ||
+ (jsonData.default_template &&
+ jsonData.templates[jsonData.default_template]) ||
+ jsonData.templates['l2'];
// Initialize selected category, and nothing selected at first.
this.selected_ = null;