commit | 76c0fce42f994f030ce4d40da545e0c3dfce988e | [log] [tgz] |
---|---|---|
author | Daniel Bratell <bratell@opera.com> | Mon Mar 04 17:37:17 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Mar 04 17:37:17 2019 |
tree | d70d3ba05866c13dcdd99a218ad47b9a8194619c | |
parent | b9481b2d32cd3a6036ab2456df5608ccdf0b6eab [diff] |
Remove variable shadowing in blink/animation In an effort to reduce or even ban variable shadowing, this renames and removes some variable. I'm interested in prohibiting shadowing because I think it might prevent potential jumbo problems. The exact warning this this avoids is: third_party/blink/renderer/core/animation/css/css_animations.cc:385:25: error: declaration shadows a local variable [-Werror,-Wshadow] for (wtf_size_t i = 0; i < css_animations->running_animations_.size(); ^ third_party/blink/renderer/core/animation/css/css_animations.cc:354:21: note: previous declaration is here for (wtf_size_t i = 0; i < name_list.size(); ++i) { ^ third_party/blink/renderer/core/animation/effect_input.cc:548:11: error: declaration shadows a local variable [-Werror,-Wshadow] auto* keyframe = keyframes.at(keys[i]); ^ third_party/blink/renderer/core/animation/effect_input.cc:429:69: note: previous declaration is here const v8::Local<v8::Object>& keyframe, ^ third_party/blink/renderer/core/animation/list_interpolation_functions.cc:142:26: error: declaration shadows a local variable [-Werror,-Wshadow] InterpolationValue start( ^ third_party/blink/renderer/core/animation/list_interpolation_functions.cc:82:26: note: previous declaration is here InterpolationValue&& start, ^ third_party/blink/renderer/core/animation/list_interpolation_functions.cc:145:26: error: declaration shadows a local variable [-Werror,-Wshadow] InterpolationValue end(end_interpolable_list.Get(i % end_length)->Clone(), ^ third_party/blink/renderer/core/animation/list_interpolation_functions.cc:83:26: note: previous declaration is here InterpolationValue&& end, ^ third_party/blink/renderer/core/animation/list_interpolation_functions.cc:147:34: error: declaration shadows a local variable [-Werror,-Wshadow] PairwiseInterpolationValue result = ^ third_party/blink/renderer/core/animation/list_interpolation_functions.cc:138:32: note: previous declaration is here PairwiseInterpolationValue result = nullptr; ^ Bug: 923510 Change-Id: I6c7180f8ff481cee78045ae9aa24bd4dd9631d1f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495544 Reviewed-by: Robert Flack <flackr@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#637329}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .