Turn iterator .end() DCHECK() into CHECK() for services [chromium/src : main]

1 view
Skip to first unread message

Alex Gough (Gerrit)

unread,
Jul 8, 2024, 6:08:11 PM (9 days ago) Jul 8
to Daniel Cheng, David Benjamin, Colin Blundell, Olga Sharonova, Jack Hsieh, chromium...@chromium.org, Raphael Kubo Da Costa, Rijubrata Bhaumik, Wanming Lin, mbarowsky+watc...@chromium.org, odejesu...@chromium.org, blundell+...@chromium.org, chrome-gr...@chromium.org, chrome-intell...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org, zhangwen...@google.com, mattreyno...@chromium.org, network-ser...@chromium.org, Alex Gough
Attention needed from Colin Blundell, Daniel Cheng, David Benjamin, Jack Hsieh and Olga Sharonova

Alex Gough has uploaded the change for review

Alex Gough would like Daniel Cheng, David Benjamin, Colin Blundell, Olga Sharonova and Jack Hsieh to review this change.

Commit message

Turn iterator .end() DCHECK() into CHECK() for services

Accessing an invalid iterator can sometimes be a security
issue and these checks are cheap, so upgrade to CHECKs.

For this CL instances were located with a weggli query
of `DCHECK(_ != _.end());` and some filtering of paths.

This CL was uploaded by git cl split.

R=blun...@chromium.org, chen...@chromium.org, davi...@chromium.org, dch...@chromium.org, ol...@chromium.org
Bug: 351745839
Change-Id: I0173d3932c30646787d8da3d39f3a96ecdcf7485

Change diff


Change information

Files:
  • M services/audio/group_coordinator-impl.h
  • M services/audio/loopback_stream.cc
  • M services/audio/mixing_graph_impl.cc
  • M services/audio/output_controller.cc
  • M services/audio/output_device_mixer_impl.cc
  • M services/audio/stream_factory.cc
  • M services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.cc
  • M services/data_decoder/public/cpp/safe_web_bundle_parser.cc
  • M services/device/generic_sensor/platform_sensor_provider_chromeos.cc
  • M services/device/geolocation/geolocation_context.cc
  • M services/device/hid/hid_connection_win.cc
  • M services/device/public/cpp/test/fake_serial_port_manager.cc
  • M services/device/public/cpp/test/test_wake_lock_provider.cc
  • M services/device/serial/fake_serial_device_enumerator.cc
  • M services/device/serial/serial_device_enumerator.cc
  • M services/device/usb/usb_device_handle_usbfs.cc
  • M services/device/usb/usb_device_handle_win.cc
  • M services/device/usb/usb_service.cc
  • M services/device/wake_lock/wake_lock_provider.cc
  • M services/device/wake_lock/wake_lock_unittest.cc
  • M services/network/cors/cors_url_loader_factory.h
  • M services/network/cors/preflight_controller.cc
  • M services/network/host_resolver.cc
  • M services/network/keepalive_statistics_recorder.cc
  • M services/network/mdns_responder.cc
  • M services/network/network_context.cc
  • M services/network/network_service.cc
  • M services/network/oblivious_http_request_handler.cc
  • M services/network/p2p/socket_manager.cc
  • M services/network/public/cpp/server/http_server_unittest.cc
  • M services/network/trust_tokens/in_memory_trust_token_persister.cc
  • M services/network/url_loader.cc
  • M services/network/web_bundle/web_bundle_chunked_buffer.cc
  • M services/on_device_model/on_device_model_service.cc
  • M services/proxy_resolver/proxy_host_resolver_cache.cc
  • M services/proxy_resolver_win/windows_system_proxy_resolver_impl.cc
  • M services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
  • M services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.cc
  • M services/service_manager/service_manager.cc
  • M services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.cc
Change size: M
Delta: 40 files changed, 139 insertions(+), 91 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Colin Blundell
  • Daniel Cheng
  • David Benjamin
  • Jack Hsieh
  • Olga Sharonova
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0173d3932c30646787d8da3d39f3a96ecdcf7485
Gerrit-Change-Number: 5685836
Gerrit-PatchSet: 1
Gerrit-Owner: Alex Gough <aj...@chromium.org>
Gerrit-Reviewer: Alex Gough <aj...@chromium.org>
Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
Gerrit-Reviewer: Jack Hsieh <chen...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-CC: Raphael Kubo Da Costa <raphael.ku...@intel.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: Wanming Lin <wanmi...@intel.com>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Attention: David Benjamin <davi...@chromium.org>
Gerrit-Attention: Colin Blundell <blun...@chromium.org>
Gerrit-Attention: Olga Sharonova <ol...@chromium.org>
Gerrit-Attention: Jack Hsieh <chen...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Gough (Gerrit)

unread,
Jul 8, 2024, 6:37:09 PM (9 days ago) Jul 8
to Alex Gough, Colin Blundell, Jack Hsieh, David Benjamin, Daniel Cheng, Olga Sharonova, chromium...@chromium.org, Raphael Kubo Da Costa, Rijubrata Bhaumik, Wanming Lin, blundell+...@chromium.org, chrome-gr...@chromium.org, chrome-intell...@chromium.org, marinacio...@chromium.org, mattreyno...@chromium.org, mbarowsky+watc...@chromium.org, network-ser...@chromium.org, odejesu...@chromium.org, olka+...@chromium.org, zhangwen...@google.com

Alex Gough abandoned this change

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: abandon
satisfied_requirement
unsatisfied_requirement
open
diffy

Olga Sharonova (Gerrit)

unread,
Jul 9, 2024, 4:41:56 AM (8 days ago) Jul 9
to Alex Gough, Colin Blundell, Jack Hsieh, David Benjamin, Daniel Cheng, chromium...@chromium.org, Raphael Kubo Da Costa, Rijubrata Bhaumik, Wanming Lin, blundell+...@chromium.org, chrome-gr...@chromium.org, chrome-intell...@chromium.org, marinacio...@chromium.org, mattreyno...@chromium.org, mbarowsky+watc...@chromium.org, network-ser...@chromium.org, odejesu...@chromium.org, olka+...@chromium.org, zhangwen...@google.com
Attention needed from Alex Gough

Olga Sharonova added 1 comment

File services/audio/output_controller.cc
Line 146, Patchset 1 (Latest): CHECK(task_runner_->BelongsToCurrentThread(), base::NotFatalUntil::M130);
Olga Sharonova . unresolved

Changes in this file do not seem to belong to the declared CL scope?

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Gough
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0173d3932c30646787d8da3d39f3a96ecdcf7485
Gerrit-Change-Number: 5685836
Gerrit-PatchSet: 1
Gerrit-Owner: Alex Gough <aj...@chromium.org>
Gerrit-Reviewer: Alex Gough <aj...@chromium.org>
Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
Gerrit-Reviewer: Jack Hsieh <chen...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-CC: Raphael Kubo Da Costa <raphael.ku...@intel.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-CC: Wanming Lin <wanmi...@intel.com>
Gerrit-Attention: Alex Gough <aj...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Jul 2024 08:41:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Colin Blundell (Gerrit)

unread,
Jul 9, 2024, 4:50:16 AM (8 days ago) Jul 9
to Alex Gough, Colin Blundell, Jack Hsieh, David Benjamin, Daniel Cheng, Olga Sharonova, chromium...@chromium.org, Raphael Kubo Da Costa, Rijubrata Bhaumik, Wanming Lin, blundell+...@chromium.org, chrome-gr...@chromium.org, chrome-intell...@chromium.org, marinacio...@chromium.org, mattreyno...@chromium.org, mbarowsky+watc...@chromium.org, network-ser...@chromium.org, odejesu...@chromium.org, olka+...@chromium.org, zhangwen...@google.com
Attention needed from Alex Gough

Colin Blundell added 1 comment

File services/audio/output_controller.cc
Line 146, Patchset 1 (Latest): CHECK(task_runner_->BelongsToCurrentThread(), base::NotFatalUntil::M130);
Olga Sharonova . unresolved

Changes in this file do not seem to belong to the declared CL scope?

Colin Blundell

(Alex abandoned this CL)

Gerrit-Comment-Date: Tue, 09 Jul 2024 08:50:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Olga Sharonova <ol...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages