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

Issue 23933002: Fill json data in index.html template for dmprof visualizer (Closed)

Created:
7 years, 3 months ago by junjianx
Modified:
7 years, 3 months ago
CC:
chromium-reviews, dmikurube+memory_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Fill json data in index.html template for dmprof visualizer. Fill json data in index.html template by python script and try to open page in chrome using xdg-open command. If page open failed, it will output the path of generated html file. index.html containing the content of index.js would be generated by python script, so index.html and index.js are deleted. BUG=259206 NOTRY=True Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221222

Patch Set 1 #

Patch Set 2 : delete redundant file unit-test.html #

Total comments: 8

Patch Set 3 : Fix review problems #

Total comments: 20

Patch Set 4 : Fix review problems #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -48 lines) Patch
A tools/deep_memory_profiler/.gitignore View 1 2 1 chunk +1 line, -0 lines 0 comments Download
D tools/deep_memory_profiler/visualizer/index.html View 1 chunk +0 lines, -29 lines 0 comments Download
D tools/deep_memory_profiler/visualizer/index.js View 1 chunk +0 lines, -19 lines 0 comments Download
A tools/deep_memory_profiler/visualizer/template.py View 1 2 3 1 chunk +80 lines, -0 lines 1 comment Download

Messages

Total messages: 13 (0 generated)
junjianx
I wrote python script for template generating. Please review my code, thanks.
7 years, 3 months ago (2013-09-04 03:22:31 UTC) #1
Dai Mikurube (NOT FULLTIME)
Thanks for working on it. Comments: https://codereview.chromium.org/23933002/diff/3001/tools/deep_memory_profiler/visualizer/template.py File tools/deep_memory_profiler/visualizer/template.py (right): https://codereview.chromium.org/23933002/diff/3001/tools/deep_memory_profiler/visualizer/template.py#newcode11 tools/deep_memory_profiler/visualizer/template.py:11: nit: better to ...
7 years, 3 months ago (2013-09-04 04:06:40 UTC) #2
junjianx
I fixed the review problems, please review my code again, thanks https://codereview.chromium.org/23933002/diff/3001/tools/deep_memory_profiler/visualizer/template.py File tools/deep_memory_profiler/visualizer/template.py (right): ...
7 years, 3 months ago (2013-09-04 06:55:36 UTC) #3
Dai Mikurube (NOT FULLTIME)
The first line of the issue description should be requisite minimum. Recommended to be less ...
7 years, 3 months ago (2013-09-04 07:39:47 UTC) #4
junjianx
I fixed review problems, please review my code again, thanks. https://codereview.chromium.org/23933002/diff/8001/tools/deep_memory_profiler/visualizer/template.py File tools/deep_memory_profiler/visualizer/template.py (right): https://codereview.chromium.org/23933002/diff/8001/tools/deep_memory_profiler/visualizer/template.py#newcode2 ...
7 years, 3 months ago (2013-09-04 07:55:36 UTC) #5
Dai Mikurube (NOT FULLTIME)
The code looks good, but could you fix the issue description as I said in ...
7 years, 3 months ago (2013-09-04 07:58:51 UTC) #6
junjianx.google
oh, sorry, I neglected that comment. Does the issue description look good now? On Wed, ...
7 years, 3 months ago (2013-09-04 08:03:20 UTC) #7
Dai Mikurube (NOT FULLTIME)
Needs some more fix. 1) The first line still should have "for dmprof visualizer". 2) ...
7 years, 3 months ago (2013-09-04 08:07:27 UTC) #8
Dai Mikurube (NOT FULLTIME)
lgtm
7 years, 3 months ago (2013-09-04 08:20:51 UTC) #9
sullivan
lgtm https://codereview.chromium.org/23933002/diff/13001/tools/deep_memory_profiler/visualizer/template.py File tools/deep_memory_profiler/visualizer/template.py (right): https://codereview.chromium.org/23933002/diff/13001/tools/deep_memory_profiler/visualizer/template.py#newcode65 tools/deep_memory_profiler/visualizer/template.py:65: html_file.write(Template(_TEMPLATE).safe_substitute({ 'DATA': data })) Are there any concerns ...
7 years, 3 months ago (2013-09-04 14:15:22 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/junjianx@chromium.org/23933002/13001
7 years, 3 months ago (2013-09-04 16:39:13 UTC) #11
commit-bot: I haz the power
Change committed as 221222
7 years, 3 months ago (2013-09-04 17:28:51 UTC) #12
junjianx.google
7 years, 3 months ago (2013-09-05 05:45:41 UTC) #13
hello, @sullivan

Thank you for the review.
This python script is only for local usage of dmprof, so we think that
there is no need to think about security problem.

xu


On Wed, Sep 4, 2013 at 11:15 PM, <sullivan@chromium.org> wrote:

> lgtm
>
>
>
>
> https://codereview.chromium.**org/23933002/diff/13001/tools/**
>
deep_memory_profiler/**visualizer/template.py<https://codereview.chromium.org/23933002/diff/13001/tools/deep_memory_profiler/visualizer/template.py>
> File tools/deep_memory_profiler/**visualizer/template.py (right):
>
> https://codereview.chromium.**org/23933002/diff/13001/tools/**
>
deep_memory_profiler/**visualizer/template.py#**newcode65<https://codereview.chromium.org/23933002/diff/13001/tools/deep_memory_profiler/visualizer/template.py#newcode65>
> tools/deep_memory_profiler/**visualizer/template.py:65:
> html_file.write(Template(_**TEMPLATE).safe_substitute({ 'DATA': data }))
> Are there any concerns about XSS here? For example, the file could
> contain arbitrary JavaScript which runs on the user's machine. Should it
> be verified to be valid JSON first?
>
>
https://codereview.chromium.**org/23933002/<https://codereview.chromium.org/2...
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698