Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(1)

Issue 2708083002: Change declarations from var to let/const in runtime_stats_metric.html. (Closed)

Created:
2 years, 8 months ago by mythria
Modified:
2 years, 1 month ago
Reviewers:
benjhayden
CC:
catapult-reviews_chromium.org, tracing-review_chromium.org
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

Change declarations from var to let/const in runtime_stats_metric.html. BUG=chromium:686250

Patch Set 1 #

Patch Set 2 : Rebased the patch. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -47 lines) Patch
M tracing/tracing/metrics/v8/runtime_stats_metric.html View 1 11 chunks +47 lines, -47 lines 0 comments Download

Messages

Total messages: 11 (9 generated)
mythria
Hi Ben, I updated runtime_stats_metric.html to use let/const declarations instead of var. PTAL. Thanks, Mythri
2 years, 8 months ago (2017-03-08 16:36:54 UTC) #10
benjhayden
2 years, 8 months ago (2017-03-08 18:04:18 UTC) #11
Thanks for doing this!
Sorry the recommendations changed out from under you. :-/
It looks like there's some confusion about when you can use const. It's ok, I'm
still learning this myself. :-)
JS const !== C++ const: JS const variables can be modified, but the name-object
binding cannot be re-assigned.
I think that almost all of these lets can be changed to const.
for..of loops can all use const unless the loop body re-assigns the loop
variable.
C-style for-loops cannot use const because the *crement re-assigns the loop
variable.

Powered by Google App Engine
This is Rietveld 408576698