commit | 980663c9167022c6f5738f9a41571ddee57e5783 | [log] [tgz] |
---|---|---|
author | Daniel Bratell <bratell@opera.com> | Thu Mar 07 18:46:15 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Mar 07 18:46:15 2019 |
tree | 245f7e602d1eedeb52e9ae9e93fb4a1d16646d5a | |
parent | d8cc4739db01e629d525b681ec3ab1f08dcb139f [diff] |
Remove some variable shadowing in blink/core In an effort to reduce or even ban variable shadowing, this renames some variables. I'm interested in prohibiting shadowing because I think it might prevent potential jumbo problems. The exact warnings this prevents is: third_party/blink/renderer/core/fileapi/file_reader_loader.cc:358:16: error: declaration shadows a local variable [-Werror,-Wshadow] MojoResult result = consumer_handle_->BeginReadData( ^ third_party/blink/renderer/core/fileapi/file_reader_loader.cc:346:54: note: previous declaration is here void FileReaderLoader::OnDataPipeReadable(MojoResult result) { ^ third_party/blink/renderer/core/aom/accessible_node.cc:288:16: error: declaration shadows a local variable [-Werror,-Wshadow] Element* element = accessible_node->element(); ^ third_party/blink/renderer/core/aom/accessible_node.cc:278:43: note: previous declaration is here bool AccessibleNode::GetProperty(Element* element, ^ third_party/blink/renderer/core/invisible_dom/invisible_dom.cc:43:16: error: declaration shadows a local variable [-Werror,-Wshadow] for (Node& node : FlatTreeTraversal::AncestorsOf(node)) { ^ third_party/blink/renderer/core/invisible_dom/invisible_dom.cc:40:14: note: previous declaration is here for (Node& node : range.Nodes()) { ^ third_party/blink/renderer/core/loader/frame_loader.cc:892:10: error: declaration shadows a local variable [-Werror,-Wshadow] auto request = mojo::MakeRequest(&navigation_initiator); ^ third_party/blink/renderer/core/loader/frame_loader.cc:798:20: note: previous declaration is here FrameLoadRequest request(passed_request); ^ third_party/blink/renderer/core/script/modulator.cc:52:20: error: declaration shadows a local variable [-Werror,-Wshadow] } else if (auto* scope = DynamicTo<WorkerGlobalScope>(execution_context)) { ^ third_party/blink/renderer/core/script/modulator.cc:45:20: note: previous declaration is here } else if (auto* scope = DynamicTo<WorkletGlobalScope>(execution_context)) { ^ Bug: 923510 Change-Id: I82659c403eb15b4f676d24b97414bfbbced9d701 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1508517 Commit-Queue: Daniel Bratell <bratell@opera.com> Reviewed-by: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#638662}
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 .