Remove most remaining CHECK(false)s
In most cases NOTREACHED() is now a better option. Also performs dead-code removal. Bug: 40122554 Change-Id: Ia0479bc9b347f8f60a3932ef16c8b99b87f34a71 Low-Coverage-Reason: OTHER Should-be-unreachable code Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6038981 Commit-Queue: Peter Boström <pbos@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Auto-Submit: Peter Boström <pbos@chromium.org> Owners-Override: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#1386708}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
29a5fbfb1d
commit
c922632dc6
ash
scalable_iph
wallpaper
wm
cc
chrome/browser/metrics
chromeos
ash
components
quick_answers
tools
onc_validator
codelabs/mojo_examples
content/browser/service_worker
crypto
device/fido
extensions
browser
api
declarative_net_request
filter_list_converter
renderer
shell
gin
gpu/command_buffer
ios
chrome
browser
web
web_state
ipc
media
base
formats
gpu
vaapi
test
fake_libva_driver
mojo
mojom
renderers
mojo
core
public
cpp
bindings
net
cert
quic
socket
url_request
ppapi/shared_impl
remoting/host
sandbox
linux
policy
win
tests
common
services
network
public
on_device_model
proxy_resolver
resource_coordinator
public
cpp
memory_instrumentation
video_capture
third_party/blink
public
renderer
bindings
core
modules
v8
serialization
core
html
inspector
loader
svg
testing
modules
platform
fonts
heap
loader
fetch
text
ui
accessibility
base
events
gesture_detection
gfx
gl
ozone
platform
url
@ -35,9 +35,8 @@ int GetResourceId(int preview_index) {
|
||||
case 3:
|
||||
return IDR_SCALABLE_IPH_NOTIFICATION_WALLPAPER_4_PNG;
|
||||
default:
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
NOTREACHED();
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_CROS_SCALABLE_IPH)
|
||||
|
||||
|
@ -69,8 +69,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
case WallpaperType::kCustomized:
|
||||
return "Customized";
|
||||
default:
|
||||
CHECK(false);
|
||||
return "Unknown";
|
||||
NOTREACHED();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/metrics/user_metrics.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/system/sys_info.h"
|
||||
#include "base/task/bind_post_task.h"
|
||||
@ -341,7 +342,7 @@ void LockStateController::StartLockAnimation() {
|
||||
views::Widget* owner = active_menu_controller->owner();
|
||||
SCOPED_CRASH_KEY_STRING256("LockStateController", "StartLockAnimation",
|
||||
owner ? owner->GetName() : "ownerless");
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
animating_lock_ = true;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "base/containers/adapters.h"
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "chromeos/ui/base/app_types.h"
|
||||
#include "chromeos/ui/base/window_properties.h"
|
||||
@ -57,7 +58,7 @@ class ScopedWindowClosingObserver : public aura::WindowObserver {
|
||||
}
|
||||
|
||||
// aura::WindowObserver:
|
||||
void OnWindowDestroyed(aura::Window* window) override { CHECK(false); }
|
||||
void OnWindowDestroyed(aura::Window* window) override { NOTREACHED(); }
|
||||
|
||||
private:
|
||||
raw_ptr<aura::Window> window_;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/rand_util.h"
|
||||
#include "base/values.h"
|
||||
#include "cc/base/math_util.h"
|
||||
@ -54,7 +55,7 @@ InvalidationBenchmark::InvalidationBenchmark(
|
||||
} else if (mode_string == "viewport") {
|
||||
mode_ = VIEWPORT;
|
||||
} else {
|
||||
CHECK(false) << "Invalid mode: " << mode_string
|
||||
NOTREACHED() << "Invalid mode: " << mode_string
|
||||
<< ". One of {fixed_size, layer, viewport, random} expected.";
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "cc/paint/skottie_wrapper.h"
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
|
||||
namespace cc {
|
||||
|
||||
@ -15,15 +15,13 @@ namespace cc {
|
||||
// static
|
||||
scoped_refptr<SkottieWrapper> SkottieWrapper::UnsafeCreateSerializable(
|
||||
std::vector<uint8_t> data) {
|
||||
CHECK(false) << "Skottie is not supported on this platform";
|
||||
return nullptr;
|
||||
NOTREACHED() << "Skottie is not supported on this platform";
|
||||
}
|
||||
|
||||
// static
|
||||
scoped_refptr<SkottieWrapper> SkottieWrapper::UnsafeCreateNonSerializable(
|
||||
base::span<const uint8_t> data) {
|
||||
CHECK(false) << "Skottie is not supported on this platform";
|
||||
return nullptr;
|
||||
NOTREACHED() << "Skottie is not supported on this platform";
|
||||
}
|
||||
|
||||
} // namespace cc
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "base/format_macros.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/not_fatal_until.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
@ -403,8 +404,8 @@ void ResourcePool::ReleaseResource(InUsePoolResource in_use_resource) {
|
||||
CHECK(!base::Contains(unused_resources_, pool_resource->unique_id(),
|
||||
&PoolResource::unique_id));
|
||||
|
||||
// Resource doesn't exist in any of our lists. CHECK.
|
||||
CHECK(false);
|
||||
// Resource doesn't exist in any of our lists. NOTREACHED().
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Also ensure that the resource wasn't null in our list.
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "base/containers/flat_map.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/process/process_handle.h"
|
||||
#include "base/test/metrics/histogram_tester.h"
|
||||
#include "build/build_config.h"
|
||||
@ -527,7 +528,7 @@ void PopulateMetrics(GlobalMemoryDumpPtr& global_dump,
|
||||
}
|
||||
|
||||
// We shouldn't reach here.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
MetricMap GetExpectedProcessMetrics(HistogramProcessType ptype) {
|
||||
@ -555,8 +556,7 @@ MetricMap GetExpectedProcessMetrics(HistogramProcessType ptype) {
|
||||
}
|
||||
|
||||
// We shouldn't reach here.
|
||||
CHECK(false);
|
||||
return MetricMap();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
ProcessInfoVector GetProcessInfo(ukm::TestUkmRecorder& ukm_recorder) {
|
||||
|
@ -95,8 +95,7 @@ void Key::Transform(KeyType target_key_type, const std::string& salt) {
|
||||
default:
|
||||
// The resulting key will be sent to cryptohomed. It should always be
|
||||
// hashed. If hashing fails, crash instead of sending a plain-text key.
|
||||
CHECK(false);
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
key_type_ = target_key_type;
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <string_view>
|
||||
|
||||
#include "base/metrics/histogram.h"
|
||||
#include "base/notreached.h"
|
||||
#include "chromeos/ash/services/ime/public/cpp/assistive_suggestions.h"
|
||||
#include "chromeos/ash/services/ime/public/cpp/autocorrect.h"
|
||||
#include "chromeos/ash/services/ime/public/mojom/input_method_host.mojom-shared.h"
|
||||
@ -180,9 +181,8 @@ struct StructTraits<ash::ime::mojom::BucketedHistogramDataView,
|
||||
case base::CUSTOM_HISTOGRAM:
|
||||
case base::SPARSE_HISTOGRAM:
|
||||
case base::DUMMY_HISTOGRAM:
|
||||
CHECK(false) << "Invalid histogram bucket type: "
|
||||
NOTREACHED() << "Invalid histogram bucket type: "
|
||||
<< static_cast<int>(histogram->GetHistogramType());
|
||||
return ash::ime::mojom::HistogramBucketType::kExponential;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "chromeos/ash/services/recording/video_capture_params.h"
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "chromeos/ash/services/recording/recording_service_constants.h"
|
||||
#include "components/viz/common/surfaces/subtree_capture_id.h"
|
||||
#include "media/base/video_types.h"
|
||||
@ -307,15 +308,13 @@ bool VideoCaptureParams::OnRecordedWindowChangingRoot(
|
||||
viz::FrameSinkId new_frame_sink_id,
|
||||
const gfx::Size& new_frame_sink_size_dip,
|
||||
float new_device_scale_factor) {
|
||||
CHECK(false) << "This can only be called when recording a window";
|
||||
return false;
|
||||
NOTREACHED() << "This can only be called when recording a window";
|
||||
}
|
||||
|
||||
bool VideoCaptureParams::OnRecordedWindowSizeChanged(
|
||||
mojo::Remote<viz::mojom::FrameSinkVideoCapturer>& capturer,
|
||||
const gfx::Size& new_window_size_dip) {
|
||||
CHECK(false) << "This can only be called when recording a window";
|
||||
return false;
|
||||
NOTREACHED() << "This can only be called when recording a window";
|
||||
}
|
||||
|
||||
bool VideoCaptureParams::OnFrameSinkSizeChanged(
|
||||
|
@ -38,7 +38,7 @@ QuickAnswersState::Error ToQuickAnswersStateError(
|
||||
return QuickAnswersState::Error::kUninitialized;
|
||||
}
|
||||
|
||||
CHECK(false) << "Unknown MagicBoostState::Error enum class value provided.";
|
||||
NOTREACHED() << "Unknown MagicBoostState::Error enum class value provided.";
|
||||
}
|
||||
|
||||
quick_answers::prefs::ConsentStatus ToQuickAnswersPrefsConsentStatus(
|
||||
@ -57,7 +57,7 @@ quick_answers::prefs::ConsentStatus ToQuickAnswersPrefsConsentStatus(
|
||||
return quick_answers::prefs::ConsentStatus::kRejected;
|
||||
}
|
||||
|
||||
CHECK(false) << "Unknown HMRConsentStatus enum class value provided.";
|
||||
NOTREACHED() << "Unknown HMRConsentStatus enum class value provided.";
|
||||
}
|
||||
|
||||
base::expected<bool, QuickAnswersState::Error> ToQuickAnswersStateIsEnabled(
|
||||
@ -373,7 +373,7 @@ QuickAnswersState::IsIntentEligibleExpectedAs(
|
||||
return quick_answers_unit_conversion_eligible_;
|
||||
}
|
||||
|
||||
CHECK(false) << "Invalid IntentType enum class value provided.";
|
||||
NOTREACHED() << "Invalid IntentType enum class value provided.";
|
||||
}
|
||||
}
|
||||
|
||||
@ -405,7 +405,7 @@ void QuickAnswersState::SetIntentEligibilityAsQuickAnswers(
|
||||
return;
|
||||
}
|
||||
|
||||
CHECK(false) << "Invalid Intent enum class value provided.";
|
||||
NOTREACHED() << "Invalid Intent enum class value provided.";
|
||||
}
|
||||
|
||||
void QuickAnswersState::InitializeObserver(
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "chromeos/components/quick_answers/quick_answers_model.h"
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "chromeos/components/quick_answers/utils/quick_answers_utils.h"
|
||||
@ -53,7 +54,7 @@ std::optional<quick_answers::Intent> ToIntent(IntentType intent_type) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
CHECK(false) << "Invalid intent type enum value provided";
|
||||
NOTREACHED() << "Invalid intent type enum value provided";
|
||||
}
|
||||
|
||||
PhoneticsInfo::PhoneticsInfo() = default;
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "chromeos/components/onc/onc_validator.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <cstdio>
|
||||
@ -13,9 +15,9 @@
|
||||
#include "base/json/json_file_value_serializer.h"
|
||||
#include "base/json/json_reader.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/values.h"
|
||||
#include "chromeos/components/onc/onc_signature.h"
|
||||
#include "chromeos/components/onc/onc_validator.h"
|
||||
|
||||
// TODO Check why this file do not fail on default trybots
|
||||
// http://crbug.com/543919
|
||||
@ -167,6 +169,6 @@ int main(int argc, const char* argv[]) {
|
||||
case chromeos::onc::Validator::INVALID:
|
||||
return kStatusInvalid;
|
||||
default:
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/message_loop/message_pump.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/process/launch.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/task/sequence_manager/sequence_manager.h"
|
||||
@ -114,13 +115,12 @@ class BrowserIPCListener : public IPC::Listener {
|
||||
|
||||
// IPC::Listener implementation.
|
||||
bool OnMessageReceived(const IPC::Message& msg) override {
|
||||
CHECK(false) << "The browser should not receive messages";
|
||||
return false;
|
||||
NOTREACHED() << "The browser should not receive messages";
|
||||
}
|
||||
void OnAssociatedInterfaceRequest(
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedInterfaceEndpointHandle handle) override {
|
||||
CHECK(false)
|
||||
NOTREACHED()
|
||||
<< "The browser should not receive associated interface requests";
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/message_loop/message_pump.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/process/launch.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/task/sequence_manager/sequence_manager.h"
|
||||
@ -101,13 +102,12 @@ class BrowserIPCListener : public IPC::Listener {
|
||||
|
||||
// IPC::Listener implementation.
|
||||
bool OnMessageReceived(const IPC::Message& msg) override {
|
||||
CHECK(false) << "The browser should not receive messages";
|
||||
return false;
|
||||
NOTREACHED() << "The browser should not receive messages";
|
||||
}
|
||||
void OnAssociatedInterfaceRequest(
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedInterfaceEndpointHandle handle) override {
|
||||
CHECK(false)
|
||||
NOTREACHED()
|
||||
<< "The browser should not receive associated interface requests";
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ void ServiceWorkerNewScriptLoader::FollowRedirect(
|
||||
const std::optional<GURL>& new_url) {
|
||||
// Resource requests for service worker scripts should not follow redirects.
|
||||
// See comments in OnReceiveRedirect().
|
||||
CHECK(false); // NOTREACHED
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void ServiceWorkerNewScriptLoader::SetPriority(net::RequestPriority priority,
|
||||
@ -460,7 +460,7 @@ void ServiceWorkerNewScriptLoader::OnComplete(
|
||||
std::string() /* status_message */, nullptr);
|
||||
return;
|
||||
}
|
||||
CHECK(false) << static_cast<int>(body_writer_state_); // NOTREACHED
|
||||
NOTREACHED() << static_cast<int>(body_writer_state_);
|
||||
}
|
||||
|
||||
// End of URLLoaderClient ------------------------------------------------------
|
||||
@ -588,7 +588,7 @@ void ServiceWorkerNewScriptLoader::OnNetworkDataAvailable(MojoResult) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
CHECK(false) << static_cast<int>(result); // NOTREACHED
|
||||
NOTREACHED() << static_cast<int>(result);
|
||||
}
|
||||
|
||||
void ServiceWorkerNewScriptLoader::WriteData(
|
||||
@ -633,8 +633,7 @@ void ServiceWorkerNewScriptLoader::WriteData(
|
||||
client_producer_watcher_.ArmOrNotify();
|
||||
return;
|
||||
default:
|
||||
CHECK(false) << static_cast<int>(result); // NOTREACHED
|
||||
return;
|
||||
NOTREACHED() << static_cast<int>(result);
|
||||
}
|
||||
|
||||
// Write the buffer in the service worker script storage up to the size we
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/not_fatal_until.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
@ -692,7 +693,7 @@ void DiagnosePublicSlotAndCrash(const base::FilePath& nss_path) {
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(false) << "Public slot is invalid.";
|
||||
NOTREACHED() << "Public slot is invalid.";
|
||||
}
|
||||
|
||||
} // namespace crypto
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/i18n/string_compare.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/time/time.h"
|
||||
@ -64,8 +65,7 @@ bool CableDiscoveryData::operator==(const CableDiscoveryData& other) const {
|
||||
return v2.value() == other.v2.value();
|
||||
|
||||
case CableDiscoveryData::Version::INVALID:
|
||||
CHECK(false);
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
@ -185,8 +186,7 @@ FidoCableDiscovery::CreateV1HandshakeHandler(
|
||||
|
||||
case CableDiscoveryData::Version::V2:
|
||||
case CableDiscoveryData::Version::INVALID:
|
||||
CHECK(false);
|
||||
return nullptr;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ class TestNetworkContext : public network::TestNetworkContext {
|
||||
contact_callback_->Run(tunnel_id, pairing_id, client_nonce,
|
||||
request_type_hint);
|
||||
} else {
|
||||
CHECK(false) << "unexpected path: " << path;
|
||||
NOTREACHED() << "unexpected path: " << path;
|
||||
}
|
||||
}
|
||||
|
||||
@ -219,7 +219,7 @@ class TestNetworkContext : public network::TestNetworkContext {
|
||||
void StartReceiving() override {}
|
||||
void StartClosingHandshake(uint16_t code,
|
||||
const std::string& reason) override {
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void set_peer(std::unique_ptr<Connection> peer) {
|
||||
@ -329,7 +329,7 @@ class TestNetworkContext : public network::TestNetworkContext {
|
||||
} else if (result == MOJO_RESULT_SHOULD_WAIT) {
|
||||
in_watcher_.Arm();
|
||||
} else {
|
||||
CHECK(false) << static_cast<int>(result);
|
||||
NOTREACHED() << static_cast<int>(result);
|
||||
}
|
||||
}
|
||||
|
||||
@ -362,7 +362,7 @@ class TestNetworkContext : public network::TestNetworkContext {
|
||||
} else if (result == MOJO_RESULT_FAILED_PRECONDITION) {
|
||||
// The reader has closed. Drop the message.
|
||||
} else {
|
||||
CHECK(false) << static_cast<int>(result);
|
||||
NOTREACHED() << static_cast<int>(result);
|
||||
}
|
||||
}
|
||||
|
||||
@ -793,15 +793,13 @@ class LateLinkingDevice : public authenticator::Transaction {
|
||||
break;
|
||||
|
||||
case MessageType::kUpdate:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case State::kShutdownReceived:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -254,10 +254,7 @@ class InvalidForTestingPrivateKey : public VirtualFidoDevice::PrivateKey {
|
||||
return {'s', 'i', 'g'};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> GetPKCS8PrivateKey() const override {
|
||||
CHECK(false);
|
||||
return {};
|
||||
}
|
||||
std::vector<uint8_t> GetPKCS8PrivateKey() const override { NOTREACHED(); }
|
||||
|
||||
std::unique_ptr<PublicKey> GetPublicKey() const override {
|
||||
cbor::Value::MapValue map;
|
||||
@ -285,8 +282,7 @@ VirtualFidoDevice::PrivateKey::~PrivateKey() = default;
|
||||
std::vector<uint8_t> VirtualFidoDevice::PrivateKey::GetX962PublicKey() const {
|
||||
// Not generally possible to encode in X9.62 format. Elliptic-specific
|
||||
// subclasses can override.
|
||||
CHECK(false);
|
||||
return std::vector<uint8_t>();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "base/json/json_file_value_serializer.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/values.h"
|
||||
@ -133,8 +134,7 @@ class ProtoToJSONRuleConverter {
|
||||
|
||||
switch (static_cast<proto::ActivationType>(activation_type)) {
|
||||
case proto::ACTIVATION_TYPE_UNSPECIFIED:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
case proto::ACTIVATION_TYPE_DOCUMENT:
|
||||
activation_types.emplace_back("document");
|
||||
break;
|
||||
@ -148,8 +148,7 @@ class ProtoToJSONRuleConverter {
|
||||
activation_types.emplace_back("genericblock");
|
||||
break;
|
||||
case proto::ACTIVATION_TYPE_ALL:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,8 +196,7 @@ class ProtoToJSONRuleConverter {
|
||||
result += "||";
|
||||
break;
|
||||
case proto::ANCHOR_TYPE_UNSPECIFIED:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
result += input_rule_.url_pattern();
|
||||
@ -211,8 +209,7 @@ class ProtoToJSONRuleConverter {
|
||||
break;
|
||||
case proto::ANCHOR_TYPE_SUBDOMAIN:
|
||||
case proto::ANCHOR_TYPE_UNSPECIFIED:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// If |result| is empty, omit persisting the url pattern. In that case, it
|
||||
@ -279,8 +276,7 @@ class ProtoToJSONRuleConverter {
|
||||
dnr_api::ResourceType resource_type = dnr_api::ResourceType::kNone;
|
||||
switch (static_cast<proto::ElementType>(element_type)) {
|
||||
case proto::ELEMENT_TYPE_UNSPECIFIED:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
case proto::ELEMENT_TYPE_OTHER:
|
||||
resource_type = dnr_api::ResourceType::kOther;
|
||||
break;
|
||||
@ -300,8 +296,7 @@ class ProtoToJSONRuleConverter {
|
||||
resource_type = dnr_api::ResourceType::kXmlhttprequest;
|
||||
break;
|
||||
case proto::ELEMENT_TYPE_OBJECT_SUBREQUEST:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
case proto::ELEMENT_TYPE_SUBDOCUMENT:
|
||||
resource_type = dnr_api::ResourceType::kSubFrame;
|
||||
break;
|
||||
@ -315,8 +310,7 @@ class ProtoToJSONRuleConverter {
|
||||
resource_type = dnr_api::ResourceType::kFont;
|
||||
break;
|
||||
case proto::ELEMENT_TYPE_POPUP:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
case proto::ELEMENT_TYPE_WEBSOCKET:
|
||||
resource_type = dnr_api::ResourceType::kWebsocket;
|
||||
break;
|
||||
@ -327,8 +321,7 @@ class ProtoToJSONRuleConverter {
|
||||
resource_type = dnr_api::ResourceType::kWebbundle;
|
||||
break;
|
||||
case proto::ELEMENT_TYPE_ALL:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
resource_types.Append(dnr_api::ToString(resource_type));
|
||||
@ -413,8 +406,7 @@ class ProtoToJSONRuleConverter {
|
||||
domain_type = dnr_api::DomainType::kThirdParty;
|
||||
break;
|
||||
case proto::SOURCE_TYPE_UNSPECIFIED:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
CHECK_NE(dnr_api::DomainType::kNone, domain_type);
|
||||
@ -441,8 +433,7 @@ class ProtoToJSONRuleConverter {
|
||||
}
|
||||
break;
|
||||
case proto::RULE_SEMANTICS_UNSPECIFIED:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
CHECK_NE(dnr_api::RuleActionType::kNone, action_type);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/debug/alias.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "extensions/renderer/get_script_context.h"
|
||||
@ -29,7 +30,7 @@ namespace {
|
||||
// Writes |message| to stack to show up in minidump, then crashes.
|
||||
void CheckWithMinidump(const std::string& message) {
|
||||
DEBUG_ALIAS_FOR_CSTR(minidump, message.c_str(), 1024);
|
||||
CHECK(false) << message;
|
||||
NOTREACHED() << message;
|
||||
}
|
||||
|
||||
void BoundLogMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
||||
|
@ -44,8 +44,7 @@ class ShellPermissionMessageProvider : public PermissionMessageProvider {
|
||||
const PermissionSet& requested_permissions,
|
||||
Manifest::Type extension_type) const override {
|
||||
// Ensure we implement this before shipping.
|
||||
CHECK(false);
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
PermissionIDSet GetAllPermissionIDs(
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "gin/converter.h"
|
||||
#include "gin/per_context_data.h"
|
||||
#include "gin/public/context_holder.h"
|
||||
@ -42,7 +43,7 @@ void ShellRunnerDelegate::DidRunScript(ShellRunner* runner) {
|
||||
|
||||
void ShellRunnerDelegate::UnhandledException(ShellRunner* runner,
|
||||
TryCatch& try_catch) {
|
||||
CHECK(false) << try_catch.GetStackTrace();
|
||||
NOTREACHED() << try_catch.GetStackTrace();
|
||||
}
|
||||
|
||||
ShellRunner::ShellRunner(ShellRunnerDelegate* delegate, Isolate* isolate)
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/raw_ref.h"
|
||||
#include "base/not_fatal_until.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/numerics/checked_math.h"
|
||||
#include "base/power_monitor/power_monitor.h"
|
||||
#include "base/strings/string_split.h"
|
||||
@ -105,12 +106,11 @@ struct AssignIfSameElseCrashFnImpl<R (*)(Args...), T2> {
|
||||
*out = in;
|
||||
} else if constexpr (std::is_same_v<R, void>) {
|
||||
*out = [](Args... args) {
|
||||
CHECK(false) << "Invalid call to deprecated function.";
|
||||
NOTREACHED() << "Invalid call to deprecated function.";
|
||||
};
|
||||
} else {
|
||||
*out = [](Args... args) -> R {
|
||||
CHECK(false) << "Invalid call to deprecated function.";
|
||||
return {};
|
||||
NOTREACHED() << "Invalid call to deprecated function.";
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -1166,10 +1166,7 @@ WebGPUDecoderImpl::WebGPUDecoderImpl(
|
||||
|
||||
DawnProcTable wire_procs = dawn::native::GetProcs();
|
||||
wire_procs.createInstance =
|
||||
[](const WGPUInstanceDescriptor*) -> WGPUInstance {
|
||||
CHECK(false);
|
||||
return nullptr;
|
||||
};
|
||||
[](const WGPUInstanceDescriptor*) -> WGPUInstance { NOTREACHED(); };
|
||||
wire_procs.instanceRequestAdapter2 = [](auto... args) {
|
||||
DCHECK(parent_decoder);
|
||||
return parent_decoder->RequestAdapterImpl(
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <ostream>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
|
||||
namespace gl_lpm_fuzzer {
|
||||
@ -115,8 +116,7 @@ std::string GetType(const fuzzing::Type& type, bool void_ok) {
|
||||
return "mat4x4";
|
||||
}
|
||||
}
|
||||
CHECK(false);
|
||||
return "";
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const fuzzing::Statement& statement);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#import "base/metrics/histogram_functions.h"
|
||||
#import "base/metrics/histogram_macros.h"
|
||||
#import "base/not_fatal_until.h"
|
||||
#import "base/notreached.h"
|
||||
#import "components/metrics/metrics_log_uploader.h"
|
||||
#import "components/ukm/ios/ukm_url_recorder.h"
|
||||
#import "ios/chrome/browser/default_browser/model/utils.h"
|
||||
@ -80,11 +81,10 @@ void IOSChromeDefaultBrowserMetricsProvider::ProvideCurrentSessionData(
|
||||
return;
|
||||
case metrics::MetricsLogUploader::MetricServiceType::STRUCTURED_METRICS:
|
||||
// `this` should never be instantiated with this service type.
|
||||
CHECK(false);
|
||||
return;
|
||||
NOTREACHED();
|
||||
case metrics::MetricsLogUploader::MetricServiceType::DWA:
|
||||
// `this` should never be instantiated with this service type.
|
||||
CHECK(false, base::NotFatalUntil::M134);
|
||||
NOTREACHED(base::NotFatalUntil::M134);
|
||||
return;
|
||||
}
|
||||
NOTREACHED();
|
||||
|
@ -11,6 +11,7 @@
|
||||
#import "base/functional/bind.h"
|
||||
#import "base/functional/callback_helpers.h"
|
||||
#import "base/memory/ptr_util.h"
|
||||
#import "base/notreached.h"
|
||||
#import "base/strings/utf_string_conversions.h"
|
||||
#import "base/values.h"
|
||||
#import "build/branding_buildflags.h"
|
||||
@ -165,7 +166,7 @@ void FlagsDOMHandler::HandleEnableExperimentalFeatureMessage(
|
||||
|
||||
void FlagsDOMHandler::HandleRestartBrowser(const base::Value::List& args) {
|
||||
#if BUILDFLAG(CHROMIUM_BRANDING)
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
#endif // BUILDFLAG(CHROMIUM_BRANDING)
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#import "base/metrics/histogram_functions.h"
|
||||
#import "base/metrics/user_metrics.h"
|
||||
#import "base/metrics/user_metrics_action.h"
|
||||
#import "base/notreached.h"
|
||||
#import "base/strings/sys_string_conversions.h"
|
||||
#import "build/branding_buildflags.h"
|
||||
#import "ios/web/common/annotations_utils.h"
|
||||
@ -1699,7 +1700,7 @@ CrFullscreenState CrFullscreenStateFromWKFullscreenState(
|
||||
if (!_documentURL.host().empty() &&
|
||||
(base::Contains(newURL.username(), _documentURL.host()) ||
|
||||
base::Contains(newURL.password(), _documentURL.host()))) {
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/message_loop/message_pump_type.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/pickle.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
@ -79,7 +80,7 @@ class QuitListener : public IPC::Listener {
|
||||
|
||||
void OnBadMessage(const BadType& bad_type) {
|
||||
// Should never be called since IPC wouldn't be deserialized correctly.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
bool bad_message_received_ = false;
|
||||
@ -206,7 +207,7 @@ class MessageCountFilter : public IPC::MessageFilter {
|
||||
|
||||
void OnBadMessage(const BadType& bad_type) {
|
||||
// Should never be called since IPC wouldn't be deserialized correctly.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
bool GetSupportedMessageClasses(
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "base/debug/crash_logging.h"
|
||||
#include "base/debug/dump_without_crashing.h"
|
||||
#include "base/notreached.h"
|
||||
#include "media/base/media_export.h"
|
||||
|
||||
namespace {
|
||||
@ -40,7 +41,7 @@ class MEDIA_EXPORT UseAfterFreeChecker {
|
||||
base::debug::ScopedCrashKeyString scoped(
|
||||
crash_key_string(),
|
||||
state_ == State::kDestructed ? "destructed" : "corrupt");
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <optional>
|
||||
#include <ostream>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "media/base/decrypt_config.h"
|
||||
@ -79,8 +80,7 @@ static std::string NALUTypeToString(int type) {
|
||||
case H264NALU::kReserved18:
|
||||
case H264NALU::kCodedSliceAux:
|
||||
case H264NALU::kCodedSliceExtension:
|
||||
CHECK(false) << "Unexpected type: " << type;
|
||||
break;
|
||||
NOTREACHED() << "Unexpected type: " << type;
|
||||
};
|
||||
|
||||
return "UnsupportedType";
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "media/formats/mp4/nalu_test_helper.h"
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "media/parsers/h264_parser.h"
|
||||
@ -70,8 +71,7 @@ H264NALU::Type H264StringToNALUType(const std::string& name) {
|
||||
if (name == "DPS")
|
||||
return H264NALU::kDPS;
|
||||
|
||||
CHECK(false) << "Unexpected name: " << name;
|
||||
return H264NALU::kUnspecified;
|
||||
NOTREACHED() << "Unexpected name: " << name;
|
||||
}
|
||||
|
||||
template <>
|
||||
@ -108,8 +108,7 @@ H265NALU::Type H265StringToNALUType(const std::string& name) {
|
||||
if (name == "I")
|
||||
return H265NALU::IDR_W_RADL;
|
||||
|
||||
CHECK(false) << "Unexpected name: " << name;
|
||||
return H265NALU::EOB_NUT;
|
||||
NOTREACHED() << "Unexpected name: " << name;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "media/base/mock_media_log.h"
|
||||
#include "media/formats/mp4/box_definitions.h"
|
||||
@ -236,9 +237,8 @@ class TrackRunIteratorTest : public testing::Test {
|
||||
sample_depends_on = kSampleDependsOnReserved;
|
||||
break;
|
||||
default:
|
||||
CHECK(false) << "Invalid sample dependency character '"
|
||||
<< str[0] << "'";
|
||||
break;
|
||||
NOTREACHED() << "Invalid sample dependency character '" << str[0]
|
||||
<< "'";
|
||||
}
|
||||
|
||||
switch(str[1]) {
|
||||
@ -249,9 +249,7 @@ class TrackRunIteratorTest : public testing::Test {
|
||||
is_non_sync_sample = true;
|
||||
break;
|
||||
default:
|
||||
CHECK(false) << "Invalid sync sample character '"
|
||||
<< str[1] << "'";
|
||||
break;
|
||||
NOTREACHED() << "Invalid sync sample character '" << str[1] << "'";
|
||||
}
|
||||
uint32_t flags = static_cast<uint32_t>(sample_depends_on) << 24;
|
||||
if (is_non_sync_sample)
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <set>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/numerics/checked_math.h"
|
||||
#include "media/gpu/vaapi/test/fake_libva_driver/fake_driver.h"
|
||||
#include "third_party/libyuv/include/libyuv.h"
|
||||
@ -385,9 +386,7 @@ VAStatus FakeCreateSurfaces(VADriverContextP ctx,
|
||||
int format,
|
||||
int num_surfaces,
|
||||
VASurfaceID* surfaces) {
|
||||
CHECK(false);
|
||||
|
||||
return VA_STATUS_SUCCESS;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
VAStatus FakeDestroySurfaces(VADriverContextP ctx,
|
||||
@ -539,9 +538,7 @@ VAStatus FakeSyncSurface(VADriverContextP ctx, VASurfaceID render_target) {
|
||||
VAStatus FakeQuerySurfaceStatus(VADriverContextP ctx,
|
||||
VASurfaceID render_target,
|
||||
VASurfaceStatus* status) {
|
||||
CHECK(false);
|
||||
|
||||
return VA_STATUS_SUCCESS;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
VAStatus FakePutSurface(VADriverContextP ctx,
|
||||
@ -763,18 +760,14 @@ VAStatus FakeAssociateSubpicture(VADriverContextP ctx,
|
||||
uint16_t dest_width,
|
||||
uint16_t dest_height,
|
||||
uint32_t flags) {
|
||||
CHECK(false);
|
||||
|
||||
return VA_STATUS_SUCCESS;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
VAStatus FakeDeassociateSubpicture(VADriverContextP ctx,
|
||||
VASubpictureID subpicture,
|
||||
VASurfaceID* target_surfaces,
|
||||
int num_surfaces) {
|
||||
CHECK(false);
|
||||
|
||||
return VA_STATUS_SUCCESS;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
VAStatus FakeQueryDisplayAttributes(VADriverContextP ctx,
|
||||
|
@ -713,8 +713,7 @@ struct StructTraits<media::stable::mojom::NativeGpuMemoryBufferHandleDataView,
|
||||
gfx::GpuMemoryBufferHandle& input) {
|
||||
// We should not be trying to serialize a gfx::GpuMemoryBufferHandle for the
|
||||
// purposes of this interface outside of Linux and Chrome OS.
|
||||
CHECK(false);
|
||||
return media::stable::mojom::NativePixmapHandle::New();
|
||||
NOTREACHED();
|
||||
}
|
||||
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "media/renderers/video_renderer_impl.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
@ -14,6 +16,7 @@
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_split.h"
|
||||
@ -33,7 +36,6 @@
|
||||
#include "media/base/test_helpers.h"
|
||||
#include "media/base/video_frame.h"
|
||||
#include "media/base/wall_clock_time_source.h"
|
||||
#include "media/renderers/video_renderer_impl.h"
|
||||
#include "media/video/mock_gpu_memory_buffer_video_frame_pool.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
@ -256,7 +258,7 @@ class VideoRendererImplTest : public testing::Test {
|
||||
continue;
|
||||
}
|
||||
|
||||
CHECK(false) << "Unrecognized decoder buffer token: " << token;
|
||||
NOTREACHED() << "Unrecognized decoder buffer token: " << token;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "base/debug/alias.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/platform_shared_memory_region.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "mojo/core/broker_messages.h"
|
||||
#include "mojo/core/channel.h"
|
||||
@ -70,8 +71,7 @@ Channel::MessagePtr WaitForBrokerMessage(HANDLE pipe_handle,
|
||||
|
||||
base::debug::Alias(&buffer[0]);
|
||||
base::debug::Alias(&bytes_read);
|
||||
CHECK(false);
|
||||
return nullptr;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
const BrokerMessageHeader* header =
|
||||
@ -81,8 +81,7 @@ Channel::MessagePtr WaitForBrokerMessage(HANDLE pipe_handle,
|
||||
|
||||
base::debug::Alias(&buffer[0]);
|
||||
base::debug::Alias(&bytes_read);
|
||||
CHECK(false);
|
||||
return nullptr;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
return message;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "base/memory/read_only_shared_memory_region.h"
|
||||
#include "base/memory/unsafe_shared_memory_region.h"
|
||||
#include "base/memory/writable_shared_memory_region.h"
|
||||
#include "base/notreached.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
namespace mojo {
|
||||
@ -46,7 +47,7 @@ PlatformSharedMemoryMapping::PlatformSharedMemoryMapping(
|
||||
return;
|
||||
}
|
||||
}
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
PlatformSharedMemoryMapping::~PlatformSharedMemoryMapping() = default;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/metrics/field_trial_params.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/rand_util.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/strings/strcat.h"
|
||||
@ -377,8 +378,7 @@ MojoResult Connector::AcceptAndGetResult(Message* message) {
|
||||
// TODO(vtl): I wonder if this should be a |DCHECK()|. (But, until
|
||||
// crbug.com/389666, etc. are resolved, this will make tests fail quickly
|
||||
// rather than hanging.)
|
||||
CHECK(false) << "Race condition or other bug detected";
|
||||
break;
|
||||
NOTREACHED() << "Race condition or other bug detected";
|
||||
default:
|
||||
// This particular write was rejected, presumably because of bad input.
|
||||
// The pipe is not necessarily in a bad state.
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "base/check_op.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/test/bind.h"
|
||||
#include "base/test/gtest_util.h"
|
||||
@ -67,22 +68,22 @@ class InterfaceImpl : public sample::Provider {
|
||||
}
|
||||
|
||||
void EchoString(const std::string& a, EchoStringCallback callback) override {
|
||||
CHECK(false) << "Not implemented.";
|
||||
NOTREACHED() << "Not implemented.";
|
||||
}
|
||||
|
||||
void EchoStrings(const std::string& a,
|
||||
const std::string& b,
|
||||
EchoStringsCallback callback) override {
|
||||
CHECK(false) << "Not implemented.";
|
||||
NOTREACHED() << "Not implemented.";
|
||||
}
|
||||
|
||||
void EchoMessagePipeHandle(ScopedMessagePipeHandle a,
|
||||
EchoMessagePipeHandleCallback callback) override {
|
||||
CHECK(false) << "Not implemented.";
|
||||
NOTREACHED() << "Not implemented.";
|
||||
}
|
||||
|
||||
void EchoEnum(sample::Enum a, EchoEnumCallback callback) override {
|
||||
CHECK(false) << "Not implemented.";
|
||||
NOTREACHED() << "Not implemented.";
|
||||
}
|
||||
|
||||
void ResetLastServerValueSeen() { last_server_value_seen_ = 0; }
|
||||
|
@ -479,8 +479,8 @@ int CertVerifyProcIOS::VerifyInternal(X509Certificate* cert,
|
||||
#else
|
||||
// It should be impossible to reach this code, but if somehow it is
|
||||
// reached it would allow any certificate as valid since no errors would
|
||||
// be added to cert_status. Therefore, add a CHECK as a fail safe.
|
||||
CHECK(false);
|
||||
// be added to cert_status. Therefore, add a NOTREACHED() as a fail safe.
|
||||
NOTREACHED();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
@ -141,7 +142,7 @@ class QuicProxyDatagramClientSocketTest : public QuicProxyClientSocketTestBase {
|
||||
}
|
||||
|
||||
void AssertAsyncReadEquals(const char* data, int len) override {
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void AssertReadStarts(const char* data, int len) override {
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "base/auto_reset.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/notreached.h"
|
||||
#include "net/base/completion_once_callback.h"
|
||||
#include "net/base/features.h"
|
||||
#include "net/base/net_error_details.h"
|
||||
@ -143,8 +144,7 @@ int QuicSessionAttempt::DoLoop(int rv) {
|
||||
next_state_ = State::kNone;
|
||||
switch (state) {
|
||||
case State::kNone:
|
||||
CHECK(false) << "Invalid state";
|
||||
break;
|
||||
NOTREACHED() << "Invalid state";
|
||||
case State::kCreateSession:
|
||||
rv = DoCreateSession();
|
||||
break;
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
@ -55,7 +55,7 @@ void SocketTag::Apply(SocketDescriptor socket) const {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
net::android::TagSocket(socket, uid_, traffic_stats_tag_);
|
||||
#else
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "base/location.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/rand_util.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/run_loop.h"
|
||||
@ -495,13 +496,11 @@ SequencedSocketData::SequencedSocketData(base::span<const MockRead> reads,
|
||||
continue;
|
||||
}
|
||||
if (next_write != writes.end()) {
|
||||
CHECK(false) << "Sequence number " << next_write->sequence_number
|
||||
NOTREACHED() << "Sequence number " << next_write->sequence_number
|
||||
<< " not found where expected: " << next_sequence_number;
|
||||
} else {
|
||||
CHECK(false) << "Too few writes, next expected sequence number: "
|
||||
<< next_sequence_number;
|
||||
}
|
||||
return;
|
||||
NOTREACHED() << "Too few writes, next expected sequence number: "
|
||||
<< next_sequence_number;
|
||||
}
|
||||
|
||||
// Last event must not be a pause. For the final event to indicate the
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/types/pass_key.h"
|
||||
#include "build/build_config.h"
|
||||
@ -154,7 +155,7 @@ void URLRequestContext::AssertNoURLRequests() const {
|
||||
DEBUG_ALIAS_FOR_GURL(url_buf, request->url());
|
||||
base::debug::Alias(&num_requests);
|
||||
base::debug::Alias(&load_flags);
|
||||
CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: "
|
||||
NOTREACHED() << "Leaked " << num_requests << " URLRequest(s). First URL: "
|
||||
<< request->url().spec().c_str() << ".";
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/notreached.h"
|
||||
#include "ppapi/shared_impl/ppapi_globals.h"
|
||||
#include "ppapi/shared_impl/var_tracker.h"
|
||||
|
||||
@ -60,8 +60,7 @@ PP_Bool ArrayVar::Set(uint32_t index, const PP_Var& value) {
|
||||
|
||||
uint32_t ArrayVar::GetLength() const {
|
||||
if (elements_.size() > std::numeric_limits<uint32_t>::max()) {
|
||||
CHECK(false);
|
||||
return 0;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
return static_cast<uint32_t>(elements_.size());
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "ppapi/shared_impl/ppapi_globals.h"
|
||||
#include "ppapi/shared_impl/var.h"
|
||||
#include "ppapi/shared_impl/var_tracker.h"
|
||||
@ -74,8 +74,7 @@ PP_Var PPB_X509Certificate_Fields::GetFieldAsPPVar(
|
||||
}
|
||||
|
||||
// Should not reach here.
|
||||
CHECK(false);
|
||||
return PP_MakeUndefined();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -135,8 +134,7 @@ bool PPB_X509Certificate_Private_Shared::ParseDER(
|
||||
// A concrete PPB_X509Certificate_Private_Shared should only ever be
|
||||
// constructed by passing in PPB_X509Certificate_Fields, in which case it is
|
||||
// already initialized.
|
||||
CHECK(false);
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace ppapi
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "build/build_config.h"
|
||||
#include "remoting/host/action_executor.h"
|
||||
@ -31,8 +33,6 @@
|
||||
#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
|
||||
#include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "remoting/host/win/evaluate_d3d.h"
|
||||
#endif
|
||||
@ -75,7 +75,7 @@ class IgnoreXServerGrabsWatchdog : public base::Watchdog::Delegate {
|
||||
|
||||
void Alarm() override {
|
||||
// Crash the host if IgnoreXServerGrabs() takes too long.
|
||||
CHECK(false) << "IgnoreXServerGrabs() timed out.";
|
||||
NOTREACHED() << "IgnoreXServerGrabs() timed out.";
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
#include "remoting/host/crash_process.h"
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/debug/alias.h"
|
||||
#include "base/location.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_util.h"
|
||||
|
||||
namespace remoting {
|
||||
@ -26,7 +26,7 @@ void CrashProcess(const std::string& function_name,
|
||||
base::debug::Alias(message);
|
||||
|
||||
// Crash the process.
|
||||
CHECK(false) << message;
|
||||
NOTREACHED() << message;
|
||||
}
|
||||
|
||||
} // namespace remoting
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/process/launch.h"
|
||||
#include "base/strings/strcat.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@ -739,7 +740,7 @@ void Daemonize() {
|
||||
PCHECK(setuid(real_uid) == 0) << "setuid failed";
|
||||
close(kMessageFd);
|
||||
WaitForMessagesAndExit(read_fd, log_file.path);
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/notreached.h"
|
||||
#include "sandbox/linux/bpf_dsl/bpf_dsl_impl.h"
|
||||
#include "sandbox/linux/bpf_dsl/errorcode.h"
|
||||
#include "sandbox/linux/bpf_dsl/policy_compiler.h"
|
||||
@ -233,8 +234,7 @@ uint64_t DefaultMask(size_t size) {
|
||||
case 8:
|
||||
return std::numeric_limits<uint64_t>::max();
|
||||
default:
|
||||
CHECK(false) << "Unimplemented DefaultMask case";
|
||||
return 0;
|
||||
NOTREACHED() << "Unimplemented DefaultMask case";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/test/bind.h"
|
||||
@ -628,11 +629,11 @@ class BPFTesterBrokerDelegate : public BPFTesterDelegate {
|
||||
case SyscallerType::DirectSyscaller:
|
||||
#if defined(DIRECT_SYSCALLER_ENABLED)
|
||||
syscaller_ = std::make_unique<DirectSyscaller>();
|
||||
break;
|
||||
#else
|
||||
CHECK(false) << "Requested instantiation of DirectSyscaller on a "
|
||||
NOTREACHED() << "Requested instantiation of DirectSyscaller on a "
|
||||
"platform that doesn't support it";
|
||||
#endif
|
||||
break;
|
||||
case SyscallerType::LibcSyscaller:
|
||||
syscaller_ = std::make_unique<LibcSyscaller>();
|
||||
break;
|
||||
|
@ -97,7 +97,7 @@ int ScopedProcess::WaitForExit(bool* got_signaled) {
|
||||
process_info.si_code == CLD_DUMPED) {
|
||||
*got_signaled = true;
|
||||
} else {
|
||||
CHECK(false) << "ScopedProcess needs to be extended for si_code "
|
||||
NOTREACHED() << "ScopedProcess needs to be extended for si_code "
|
||||
<< process_info.si_code;
|
||||
}
|
||||
return process_info.si_status;
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <linux/kcmp.h>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "media/gpu/buildflags.h"
|
||||
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
|
||||
#include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h"
|
||||
@ -46,8 +47,7 @@ HardwareVideoDecodingProcessPolicy::ComputePolicyType(
|
||||
// chrome/browser/ash/arc/video/gpu_arc_video_service_host.cc depends on it
|
||||
// and that file is built for ash-chrome regardless of VA-API/V4L2. That means
|
||||
// that bots like linux-chromeos-rel end up compiling this policy.
|
||||
CHECK(false);
|
||||
return PolicyType::kVaapiOnIntel;
|
||||
NOTREACHED();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "base/feature_list.h"
|
||||
#include "base/files/scoped_file.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "sandbox/policy/features.h"
|
||||
@ -105,8 +106,7 @@ std::string GetSandboxProfile(sandbox::mojom::Sandbox sandbox_type) {
|
||||
profile += kSeatbeltPolicyString_renderer;
|
||||
break;
|
||||
case sandbox::mojom::Sandbox::kNoSandbox:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
return profile;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/memory/platform_shared_memory_region.h"
|
||||
#include "base/memory/read_only_shared_memory_region.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/process/process.h"
|
||||
#include "base/process/process_handle.h"
|
||||
#include "base/sequence_checker.h"
|
||||
@ -146,7 +147,7 @@ class TestBrokerServicesDelegateImpl : public BrokerServicesDelegate {
|
||||
base::OnceCallback<void(CreateTargetResult)> reply) override {
|
||||
// This function is only used for parallel launching and should not get
|
||||
// called.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void BeforeTargetProcessCreateOnCreationThread(
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "services/network/public/mojom/chunked_data_pipe_getter.mojom.h"
|
||||
@ -112,9 +113,8 @@ DataElement DataElement::Clone() const {
|
||||
case network::DataElement::Tag::kChunkedDataPipe:
|
||||
// DataElementChunkedDataPipe is not generally copyable, especially if
|
||||
// `read_only_once` is true.
|
||||
// We want to be strict on this case, and use CHECK rather than DCHECK.
|
||||
CHECK(false);
|
||||
return DataElement();
|
||||
// We want to be strict on this case, and use NOTREACHED().
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "services/network/public/cpp/resource_request.h"
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/trace_event/typed_macros.h"
|
||||
#include "base/types/optional_util.h"
|
||||
@ -371,8 +372,7 @@ net::ReferrerPolicy ReferrerPolicyForUrlRequest(
|
||||
return net::ReferrerPolicy::
|
||||
ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE;
|
||||
case mojom::ReferrerPolicy::kDefault:
|
||||
CHECK(false);
|
||||
return net::ReferrerPolicy::NO_REFERRER;
|
||||
NOTREACHED();
|
||||
case mojom::ReferrerPolicy::kStrictOriginWhenCrossOrigin:
|
||||
return net::ReferrerPolicy::REDUCE_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN;
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/native_library.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/process/process.h"
|
||||
#include "build/build_config.h"
|
||||
#include "services/on_device_model/ml/chrome_ml_api.h"
|
||||
@ -57,7 +58,7 @@ void FatalGpuErrorFn(const char* msg) {
|
||||
base::UmaHistogramEnumeration("OnDeviceModel.GpuErrorReason", error_reason);
|
||||
if (error_reason == GpuErrorReason::kOther) {
|
||||
// Collect crash reports on unknown errors.
|
||||
CHECK(false) << "ChromeML(GPU) Error: " << msg;
|
||||
NOTREACHED() << "ChromeML(GPU) Error: " << msg;
|
||||
} else {
|
||||
base::Process::TerminateCurrentProcessImmediately(0);
|
||||
}
|
||||
@ -65,7 +66,7 @@ void FatalGpuErrorFn(const char* msg) {
|
||||
|
||||
void FatalErrorFn(const char* msg) {
|
||||
SCOPED_CRASH_KEY_STRING1024("ChromeML", "error_msg", msg);
|
||||
CHECK(false) << "ChromeML Error: " << msg;
|
||||
NOTREACHED() << "ChromeML Error: " << msg;
|
||||
}
|
||||
|
||||
// Helpers to disabiguate overloads in base.
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
@ -594,7 +595,7 @@ TEST_F(ProxyResolverV8TracingTest, DnsDuringInit) {
|
||||
|
||||
void CrashCallback(int) {
|
||||
// Be extra sure that if the callback ever gets invoked, the test will fail.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Start some requests, cancel them all, and then destroy the resolver.
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
@ -77,8 +78,7 @@ class MockJSBindings : public ProxyResolverV8::JSBindings {
|
||||
return !dns_resolve_ex_result.empty();
|
||||
}
|
||||
|
||||
CHECK(false);
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void OnError(int line_number, const std::u16string& message) override {
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation_mojom_traits.h"
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom.h"
|
||||
|
||||
namespace mojo {
|
||||
@ -21,9 +22,7 @@ EnumTraits<memory_instrumentation::mojom::DumpType,
|
||||
case base::trace_event::MemoryDumpType::kSummaryOnly:
|
||||
return memory_instrumentation::mojom::DumpType::SUMMARY_ONLY;
|
||||
default:
|
||||
CHECK(false) << "Invalid type: " << static_cast<uint8_t>(type);
|
||||
// This should not be reached. Just return a random value.
|
||||
return memory_instrumentation::mojom::DumpType::PERIODIC_INTERVAL;
|
||||
NOTREACHED() << "Invalid type: " << static_cast<uint8_t>(type);
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,9 +60,7 @@ EnumTraits<memory_instrumentation::mojom::LevelOfDetail,
|
||||
case base::trace_event::MemoryDumpLevelOfDetail::kDetailed:
|
||||
return memory_instrumentation::mojom::LevelOfDetail::DETAILED;
|
||||
default:
|
||||
CHECK(false) << "Invalid type: " << static_cast<uint8_t>(level_of_detail);
|
||||
// This should not be reached. Just return a random value.
|
||||
return memory_instrumentation::mojom::LevelOfDetail::BACKGROUND;
|
||||
NOTREACHED() << "Invalid type: " << static_cast<uint8_t>(level_of_detail);
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,9 +96,7 @@ EnumTraits<memory_instrumentation::mojom::Determinism,
|
||||
case base::trace_event::MemoryDumpDeterminism::kForceGc:
|
||||
return memory_instrumentation::mojom::Determinism::FORCE_GC;
|
||||
default:
|
||||
CHECK(false) << "Invalid type: " << static_cast<uint8_t>(determinism);
|
||||
// This should not be reached. Just return a random value.
|
||||
return memory_instrumentation::mojom::Determinism::NONE;
|
||||
NOTREACHED() << "Invalid type: " << static_cast<uint8_t>(determinism);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "services/video_capture/testing_controls_impl.h"
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
|
||||
namespace video_capture {
|
||||
|
||||
@ -13,7 +13,7 @@ TestingControlsImpl::TestingControlsImpl() = default;
|
||||
TestingControlsImpl::~TestingControlsImpl() = default;
|
||||
|
||||
void TestingControlsImpl::Crash() {
|
||||
CHECK(false) << "This is an intentional crash for the purpose of testing";
|
||||
NOTREACHED() << "This is an intentional crash for the purpose of testing";
|
||||
}
|
||||
|
||||
} // namespace video_capture
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/flat_tree.h"
|
||||
#include "base/notreached.h"
|
||||
#include "device/fido/authenticator_selection_criteria.h"
|
||||
#include "device/fido/cable/cable_discovery_data.h"
|
||||
#include "device/fido/fido_constants.h"
|
||||
@ -198,8 +199,7 @@ struct BLINK_COMMON_EXPORT
|
||||
case device::CableDiscoveryData::Version::V2:
|
||||
return 2;
|
||||
case device::CableDiscoveryData::Version::INVALID:
|
||||
CHECK(false);
|
||||
return 0;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -929,8 +929,7 @@ void ResourceScriptStreamer::SendClientLoadFinishedCallback() {
|
||||
|
||||
switch (loading_state_) {
|
||||
case LoadingState::kLoading:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
case LoadingState::kCancelled:
|
||||
response_body_loader_client_->DidCancelLoadingBody();
|
||||
break;
|
||||
@ -955,8 +954,7 @@ void ResourceScriptStreamer::AdvanceLoadingState(LoadingState new_state) {
|
||||
case LoadingState::kLoaded:
|
||||
case LoadingState::kFailed:
|
||||
case LoadingState::kCancelled:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
loading_state_ = new_state;
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <tuple>
|
||||
|
||||
#include "base/debug/crash_logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "third_party/blink/public/mojom/origin_trials/origin_trial_feature.mojom-blink.h"
|
||||
#include "third_party/blink/public/platform/platform.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
|
||||
@ -179,7 +180,7 @@ void WorkerOrWorkletScriptController::Initialize(const KURL& url_for_debugger) {
|
||||
}
|
||||
SCOPED_CRASH_KEY_STRING256("shared-storage", "context-empty",
|
||||
ot_feature_string.ReleaseString().Utf8());
|
||||
CHECK(false) << "V8 context is empty";
|
||||
NOTREACHED() << "V8 context is empty";
|
||||
}
|
||||
CHECK(!context.IsEmpty());
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h"
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "build/build_config.h"
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
@ -363,7 +364,7 @@ WebCryptoResult ToWebCryptoResult(ScriptState* script_state,
|
||||
std::move(function)),
|
||||
MakeGarbageCollected<WebCryptoResultAdapter<IDLAny, DOMException*>>(
|
||||
WTF::BindRepeating([](DOMException* exception) {
|
||||
CHECK(false) << "crypto operation failed";
|
||||
NOTREACHED() << "crypto operation failed";
|
||||
})));
|
||||
return result->Result();
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <type_traits>
|
||||
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/timer/elapsed_timer.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "third_party/blink/renderer/core/dom/attribute.h"
|
||||
@ -565,8 +566,7 @@ class HTMLFastPathParser {
|
||||
static HTMLElement* Create(Document& document) {
|
||||
// Body is only supported as an element for adding children, and not
|
||||
// a node that is created by this code.
|
||||
CHECK(false);
|
||||
return nullptr;
|
||||
NOTREACHED();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
@ -107,8 +108,9 @@ class DevToolsSession::IOSession : public mojom::blink::DevToolsSession {
|
||||
TRACE_EVENT_FLAG_FLOW_OUT | TRACE_EVENT_FLAG_FLOW_IN,
|
||||
"call_id", call_id);
|
||||
// Crash renderer.
|
||||
if (method == "Page.crash")
|
||||
CHECK(false);
|
||||
if (method == "Page.crash") {
|
||||
NOTREACHED();
|
||||
}
|
||||
// Post a task to the worker or main renderer thread that will interrupt V8
|
||||
// and be run immediately. Only methods that do not run JS code are safe.
|
||||
Vector<uint8_t> message_copy;
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "third_party/blink/public/platform/task_type.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/binding_security.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
|
||||
@ -270,8 +271,7 @@ protocol::DOM::PseudoType InspectorDOMAgent::ProtocolPseudoElementType(
|
||||
case kAfterLastInternalPseudoId:
|
||||
case kPseudoIdNone:
|
||||
case kPseudoIdInvalid:
|
||||
CHECK(false);
|
||||
return "";
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -442,10 +442,7 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
// should define their own subclass of LocalFrameClient or
|
||||
// EmptyLocalFrameClient and override the CreateURLLoaderForTesting method.
|
||||
// See also https://crbug.com/891872.
|
||||
// We use CHECK(false) instead of NOTREACHED() here to catch errors on
|
||||
// clusterfuzz and production.
|
||||
CHECK(false);
|
||||
return nullptr;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
std::unique_ptr<URLLoader> CreateURLLoaderForTesting() override {
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "base/auto_reset.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/not_fatal_until.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/time/time.h"
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
|
||||
@ -369,8 +370,7 @@ void ImageResourceContent::UpdateToLoadedContentStatus(
|
||||
break;
|
||||
|
||||
case ResourceStatus::kNotStarted:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Updates the status.
|
||||
@ -381,8 +381,7 @@ void ImageResourceContent::NotifyStartLoad() {
|
||||
// Checks ImageResourceContent's previous status.
|
||||
switch (GetContentStatus()) {
|
||||
case ResourceStatus::kPending:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
|
||||
case ResourceStatus::kNotStarted:
|
||||
// Normal load start.
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "base/types/expected.h"
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
@ -538,8 +539,7 @@ void ScriptResource::AdvanceStreamingState(StreamingState new_state) {
|
||||
CHECK_EQ(new_state, StreamingState::kStreamingDisabled);
|
||||
break;
|
||||
case StreamingState::kStreamingDisabled:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
streaming_state_ = new_state;
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "third_party/blink/renderer/core/svg/graphics/isolated_svg_document_host.h"
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "services/network/public/cpp/single_request_url_loader_factory.h"
|
||||
#include "third_party/blink/public/common/tokens/tokens.h"
|
||||
@ -168,8 +169,7 @@ IsolatedSVGDocumentHost::IsolatedSVGDocumentHost(
|
||||
break;
|
||||
case kNotStarted:
|
||||
case kWaitingForAsyncLoadCompletion:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,8 +225,7 @@ void IsolatedSVGDocumentHost::LoadCompleted() {
|
||||
|
||||
case kNotStarted:
|
||||
case kCompleted:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "third_party/blink/renderer/core/svg/svg_resource_document_content.h"
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "third_party/blink/renderer/core/frame/local_frame.h"
|
||||
#include "third_party/blink/renderer/core/loader/resource/svg_document_resource.h"
|
||||
@ -91,8 +92,7 @@ void SVGResourceDocumentContent::NotifyStartLoad() {
|
||||
// Check previous status.
|
||||
switch (status_) {
|
||||
case ResourceStatus::kPending:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
|
||||
case ResourceStatus::kNotStarted:
|
||||
// Normal load start.
|
||||
@ -123,8 +123,7 @@ void SVGResourceDocumentContent::UpdateStatus(ResourceStatus new_status) {
|
||||
break;
|
||||
|
||||
case ResourceStatus::kNotStarted:
|
||||
CHECK(false);
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
status_ = new_status;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "base/functional/function_ref.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "base/process/process_handle.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
@ -3698,7 +3699,7 @@ String Internals::getProgrammaticScrollAnimationState(Node* node) const {
|
||||
}
|
||||
|
||||
void Internals::crash() {
|
||||
CHECK(false) << "Intentional crash";
|
||||
NOTREACHED() << "Intentional crash";
|
||||
}
|
||||
|
||||
String Internals::evaluateInInspectorOverlay(const String& script) {
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "components/schema_org/common/metadata.mojom-blink.h"
|
||||
#include "third_party/blink/public/mojom/document_metadata/document_metadata.mojom-blink.h"
|
||||
#include "third_party/blink/renderer/core/dom/document.h"
|
||||
@ -152,7 +153,7 @@ bool ParseRepeatedValue(const JSONArray& arr,
|
||||
}
|
||||
case JSONValue::ValueType::kTypeNull:
|
||||
case JSONValue::ValueType::kTypeArray:
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
@ -324,8 +325,7 @@ void MockMediaStreamVideoRenderer::QueueFrames(
|
||||
gfx::Size(standard_size_.width() * 2, standard_size_.height() * 2);
|
||||
}
|
||||
if (token < static_cast<int>(FrameType::MIN_TYPE)) {
|
||||
CHECK(false) << "Unrecognized frame type: " << token;
|
||||
return;
|
||||
NOTREACHED() << "Unrecognized frame type: " << token;
|
||||
}
|
||||
|
||||
if (token < 0) {
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
#include "base/debug/alias.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/escape.h"
|
||||
#include "base/system/sys_info.h"
|
||||
#include "base/timer/elapsed_timer.h"
|
||||
@ -325,7 +326,7 @@ void FontCache::CrashWithFontInfo(const FontDescription* font_description) {
|
||||
base::debug::Alias(&is_test_font_mgr);
|
||||
base::debug::Alias(&num_families);
|
||||
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void FontCache::DumpShapeResultCache(
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/thread_annotations.h"
|
||||
#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
|
||||
|
||||
@ -51,7 +52,7 @@ class BarrierCallbackInfo {
|
||||
|
||||
template <typename T>
|
||||
void ShouldNeverRun(T t) {
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/strcat.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "base/time/time.h"
|
||||
@ -1122,8 +1123,8 @@ Resource* ResourceFetcher::CreateResourceForStaticData(
|
||||
break;
|
||||
|
||||
default:
|
||||
CHECK(false) << "Unexpected resource status: "
|
||||
<< (int)resource->GetStatus();
|
||||
NOTREACHED() << "Unexpected resource status: "
|
||||
<< static_cast<int>(resource->GetStatus());
|
||||
}
|
||||
|
||||
AddToMemoryCacheIfNeeded(params, resource);
|
||||
|
2
third_party/blink/renderer/platform/loader/fetch/url_loader/background_url_loader_unittest.cc
vendored
2
third_party/blink/renderer/platform/loader/fetch/url_loader/background_url_loader_unittest.cc
vendored
@ -748,7 +748,7 @@ TEST_F(BackgroundResourceFecherTest, CancelSoonAfterStart) {
|
||||
mojo::PendingRemote<network::mojom::URLLoaderClient>
|
||||
client) {
|
||||
// CreateLoaderAndStart should not be called.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}));
|
||||
std::unique_ptr<BackgroundURLLoader> background_url_loader =
|
||||
std::make_unique<BackgroundURLLoader>(
|
||||
|
9
third_party/blink/renderer/platform/loader/fetch/url_loader/resource_request_sender_unittest.cc
vendored
9
third_party/blink/renderer/platform/loader/fetch/url_loader/resource_request_sender_unittest.cc
vendored
@ -15,6 +15,7 @@
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
#include "base/task/thread_pool.h"
|
||||
@ -534,7 +535,7 @@ TEST_F(ResourceRequestSenderTest, RedirectSyncCancel) {
|
||||
base::BindRepeating([](const std::vector<std::string>& removed_headers,
|
||||
const net::HttpRequestHeaders& modified_headers) {
|
||||
// FollowRedirect() must not be called.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}));
|
||||
|
||||
mock_client_->SetOnReceivedRedirectCallback(base::BindLambdaForTesting(
|
||||
@ -723,7 +724,7 @@ TEST_F(ResourceRequestSenderTest, RedirectAsyncFollowAfterCancel) {
|
||||
base::BindRepeating([](const std::vector<std::string>& removed_headers,
|
||||
const net::HttpRequestHeaders& modified_headers) {
|
||||
// FollowRedirect() must not be called.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}));
|
||||
|
||||
net::RedirectInfo redirect_info;
|
||||
@ -1656,7 +1657,7 @@ TEST_F(ResourceRequestSenderTest, KeepaliveRequest) {
|
||||
std::make_unique<DummyCodeCacheHost>(base::BindLambdaForTesting(
|
||||
[&](mojom::blink::CodeCacheType cache_type, const KURL& url,
|
||||
FetchCachedCodeCallback callback) {
|
||||
CHECK(false) << "FetchCachedCode shouold not be called";
|
||||
NOTREACHED() << "FetchCachedCode shouold not be called";
|
||||
}));
|
||||
|
||||
StartAsync(std::move(request), mock_client_,
|
||||
@ -1971,7 +1972,7 @@ TEST_F(ResourceRequestSenderSyncTest, SendSyncRedirectCancel) {
|
||||
const std::vector<std::string>& removed_headers,
|
||||
const net::HttpRequestHeaders& modified_headers) {
|
||||
// FollowRedirect() must not be called.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
},
|
||||
std::move(refcounted_client)));
|
||||
}));
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "partition_alloc/oom.h"
|
||||
|
||||
namespace blink {
|
||||
@ -22,8 +23,7 @@ void ICUError::HandleFailure() {
|
||||
ICUOutOfMemory();
|
||||
break;
|
||||
case U_ILLEGAL_ARGUMENT_ERROR:
|
||||
CHECK(false) << error_;
|
||||
break;
|
||||
NOTREACHED() << error_;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/raw_ptr_exclusion.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/timer/elapsed_timer.h"
|
||||
#include "ui/accessibility/ax_common.h"
|
||||
@ -661,7 +662,7 @@ AXTreeSerializer<AXSourceNode,
|
||||
base::debug::SetCrashKeyString(missing_parent_err,
|
||||
error.str().substr(0, 230));
|
||||
if (crash_on_error_) {
|
||||
CHECK(false) << error.str();
|
||||
NOTREACHED() << error.str();
|
||||
} else {
|
||||
LOG(ERROR) << error.str();
|
||||
// Different from other errors, not calling Reset() here to avoid breaking
|
||||
@ -1011,7 +1012,7 @@ bool AXTreeSerializer<AXSourceNode,
|
||||
"ax_ts_reparent_err", base::debug::CrashKeySize::Size256);
|
||||
base::debug::SetCrashKeyString(reparent_err, error.str().substr(0, 230));
|
||||
if (crash_on_error_) {
|
||||
CHECK(false) << error.str();
|
||||
NOTREACHED() << error.str();
|
||||
} else {
|
||||
LOG(ERROR) << error.str();
|
||||
Reset();
|
||||
@ -1126,7 +1127,7 @@ bool AXTreeSerializer<AXSourceNode,
|
||||
"ax_ts_dupe_id_err", base::debug::CrashKeySize::Size256);
|
||||
base::debug::SetCrashKeyString(dupe_id_err, error.str().substr(0, 230));
|
||||
if (crash_on_error_) {
|
||||
CHECK(false) << error.str();
|
||||
NOTREACHED() << error.str();
|
||||
} else {
|
||||
LOG(ERROR) << error.str();
|
||||
Reset();
|
||||
|
@ -415,7 +415,7 @@ TEST_F(AXTreeSerializerTest, MaximumSerializedNodeCount) {
|
||||
}
|
||||
|
||||
#if defined(GTEST_HAS_DEATH_TEST)
|
||||
// If duplicate ids are encountered, it crashes via CHECK(false).
|
||||
// If duplicate ids are encountered, it crashes via NOTREACHED().
|
||||
TEST_F(AXTreeSerializerTest, DuplicateIdsCrashes) {
|
||||
// (1 (2 (3 (4) 5)))
|
||||
treedata0_.root_id = 1;
|
||||
|
@ -2,11 +2,12 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#include "ui/base/models/image_model.h"
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "ui/color/color_id.h"
|
||||
@ -174,7 +175,7 @@ gfx::ImageSkia ImageModel::Rasterize(
|
||||
|
||||
if (IsVectorIcon()) {
|
||||
#if BUILDFLAG(IS_IOS)
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
#else
|
||||
DCHECK(color_provider);
|
||||
return ThemedVectorIcon(GetVectorIcon()).GetImageSkia(color_provider);
|
||||
|
@ -476,7 +476,7 @@ std::string ResourceBundle::LoadLocaleResources(const std::string& pref_locale,
|
||||
std::size(path_copy));
|
||||
base::debug::Alias(path_copy);
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
locale_resources_data_ = std::move(data_pack);
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/escape.h"
|
||||
#include "base/values.h"
|
||||
|
||||
@ -195,7 +196,7 @@ bool ReplaceTemplateExpressionsInternal(
|
||||
// Escape quotes and backslash for '$i18nPolymer{}' use (i.e. quoted).
|
||||
replacement = PolymerParameterEscape(replacement, is_javascript);
|
||||
} else {
|
||||
CHECK(false) << "Unknown context " << context;
|
||||
NOTREACHED() << "Unknown context " << context;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/location.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "base/test/metrics/histogram_tester.h"
|
||||
@ -125,8 +126,7 @@ class GestureProviderTest : public testing::Test, public GestureProviderClient {
|
||||
positions[2].x(),
|
||||
positions[2].y());
|
||||
default:
|
||||
CHECK(false) << "MockMotionEvent only supports 1-3 pointers";
|
||||
return MockMotionEvent();
|
||||
NOTREACHED() << "MockMotionEvent only supports 1-3 pointers";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ gfx::GpuFenceHandle::ScopedPlatformFence PlatformDuplicate(
|
||||
if (!result) {
|
||||
const DWORD last_error = ::GetLastError();
|
||||
base::debug::Alias(&last_error);
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
return base::win::ScopedHandle(duplicated_handle);
|
||||
#else
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "base/debug/alias.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
|
||||
namespace gfx {
|
||||
|
||||
@ -34,7 +35,7 @@ base::win::ScopedHandle DuplicateSharedHandle(HANDLE shared_handle) {
|
||||
if (!result) {
|
||||
const DWORD last_error = ::GetLastError();
|
||||
base::debug::Alias(&last_error);
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
return base::win::ScopedHandle(duplicated_handle);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include "base/debug/alias.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "skia/ext/font_utils.h"
|
||||
@ -42,8 +43,7 @@ void CreateDWriteFactory(IDWriteFactory** factory) {
|
||||
&factory_unknown);
|
||||
if (FAILED(hr)) {
|
||||
base::debug::Alias(&hr);
|
||||
CHECK(false);
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
factory_unknown.CopyTo(factory);
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/singleton.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
@ -246,7 +247,7 @@ void WindowImpl::Init(HWND parent, const Rect& bounds) {
|
||||
bool procs_match = got_class && class_info.lpfnWndProc ==
|
||||
base::win::WrappedWindowProc<&WindowImpl::WndProc>;
|
||||
base::debug::Alias(&procs_match);
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
CheckWindowCreated(hwnd_, create_window_error);
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/message_loop/message_pump_type.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/threading/thread.h"
|
||||
#include "base/threading/thread_checker.h"
|
||||
#include "base/win/wrapped_window_proc.h"
|
||||
@ -105,7 +106,7 @@ void CreateWindowsOnThread(base::WaitableEvent* event,
|
||||
if (!window) {
|
||||
logging::SystemErrorCode error = logging::GetLastSystemErrorCode();
|
||||
base::debug::Alias(&error);
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
*child_window = window;
|
||||
event->Signal();
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "ui/gl/gl_fence_egl.h"
|
||||
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/notreached.h"
|
||||
#include "ui/gl/egl_util.h"
|
||||
#include "ui/gl/gl_bindings.h"
|
||||
#include "ui/gl/gl_bindings_autogen_gl.h"
|
||||
@ -92,9 +93,8 @@ EGLint GLFenceEGL::ClientWaitWithTimeoutNanos(EGLTimeKHR timeout) {
|
||||
EGLint flags = 0;
|
||||
EGLint result = eglClientWaitSyncKHR(display_, sync_, flags, timeout);
|
||||
if (result == EGL_FALSE) {
|
||||
LOG(ERROR) << "Failed to wait for EGLSync. error:"
|
||||
<< ui::GetLastEGLErrorString();
|
||||
CHECK(false);
|
||||
NOTREACHED() << "Failed to wait for EGLSync. error:"
|
||||
<< ui::GetLastEGLErrorString();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -116,9 +116,8 @@ void GLFenceEGL::ServerWait() {
|
||||
}
|
||||
|
||||
if (!completed && eglWaitSyncKHR(display_, sync_, flags) == EGL_FALSE) {
|
||||
LOG(ERROR) << "Failed to wait for EGLSync. error:"
|
||||
<< ui::GetLastEGLErrorString();
|
||||
CHECK(false);
|
||||
NOTREACHED() << "Failed to wait for EGLSync. error:"
|
||||
<< ui::GetLastEGLErrorString();
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user