0

Migrate remaining NOTREACHED()s in components/

NOTREACHED() and NOTREACHED_IN_MIGRATION() are both CHECK-fatal now.
The former is [[noreturn]] so this CL also performs dead-code removal
after the NOTREACHED().

This CL does not attempt to do additional rewrites of any surrounding
code, like:

if (!foo) {
  NOTREACHED();
}

to CHECK(foo);

Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.

Bug: 40580068
Change-Id: I72205fb77747957c6bf33dbea93656fd20085a42
Low-Coverage-Reason: OTHER Should-be-unreachable code
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6010008
Reviewed-by: Rick Byers <rbyers@chromium.org>
Owners-Override: Rick Byers <rbyers@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1382618}
This commit is contained in:
Peter Boström
2024-11-13 22:26:11 +00:00
committed by Chromium LUCI CQ
parent 21b15227e9
commit 77d2135a33
444 changed files with 798 additions and 1392 deletions
components
account_id
account_manager_core
android_autofill
arc
assist_ranker
background_fetch
background_sync
blocked_content
bookmarks
browser_ui
site_settings
browsing_data
browsing_topics
captive_portal
cast
message_port
cast_streaming
cbor
cdm
chromeos_camera
cloud_devices
commerce
content_capture
content_settings
crash
cronet
desks_storage
device_event_log
device_signals
discardable_memory
dom_distiller
domain_reliability
drive
embedder_support
enterprise
error_page
favicon
favicon_base
feature_engagement
feed
find_in_page
flags_ui
gcm_driver
global_media_controls
guest_view
headless
heap_profiling
history_clusters
image_fetcher
invalidation
javascript_dialogs
keep_alive_registry
keyed_service
leveldb_proto
live_caption
local_state
lookalikes
media_message_center
memory_pressure
minidump_uploader
mirroring
nacl
named_mojo_ipc_server
navigation_interception
net_log
network_time
no_state_prefetch
ntp_tiles
offline_pages
open_from_clipboard
openscreen_platform
os_crypt
page_content_annotations
page_load_metrics
paint_preview
pdf
performance_manager
plugins
plus_addresses
policy
core
power_bookmarks
prefs
printing
privacy_sandbox
proxy_config
query_parser
reading_list
remote_cocoa
renderer_context_menu
reporting
rlz
safe_search_api
saved_tab_groups
search_engines
search_provider_logos
security_interstitials
security_state
segmentation_platform
services
sessions
shared_highlighting
sharing_message
site_engagement
site_isolation
speech
spellcheck
ssl_errors
startup_metric_utils
storage_monitor
subresource_filter
supervised_user
sync_bookmarks
sync_device_info
sync_preferences
sync_sessions
sync_user_events
system_media_controls
tab_groups
translate
trusted_vault
ui_devtools
url_formatter
url_matcher
url_pattern_index
url_rewrite
user_education
user_manager
value_store
variations
visitedlink
viz
web_package
webapps
webauthn
webcrypto
webrtc
webxr
wifi

@ -108,8 +108,7 @@ void ForceYouTubeRestrict(const GURL& url,
switch (mode) {
case YOUTUBE_RESTRICT_OFF:
case YOUTUBE_RESTRICT_COUNT:
NOTREACHED_IN_MIGRATION();
break;
NOTREACHED();
case YOUTUBE_RESTRICT_MODERATE:
headers->SetHeader(kYouTubeRestrictHeaderName,