mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-25 14:20:50 +08:00
Replace CHECK(false) instances
In most cases NOTREACHED() is now a better option. Also performs dead-code removal. Bug: 40122554, 40580068 Change-Id: I2deffa59d375db7813ea6779b1d387718d5c62c7 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6013409 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Peter Boström <pbos@chromium.org>
This commit is contained in:
parent
02d094f3bb
commit
65a45013d0
@ -17,6 +17,7 @@
|
||||
#include "base/check.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "client/crashpad_client.h"
|
||||
#include "util/misc/paths.h"
|
||||
|
||||
@ -54,7 +55,7 @@ void CfgCrash() {
|
||||
IndirectCall(&func);
|
||||
} __except (EXCEPTION_EXECUTE_HANDLER) {
|
||||
// CFG fast fail should never be caught.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
// Should only reach here if CFG is disabled.
|
||||
abort();
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "base/check.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "client/crashpad_client.h"
|
||||
#include "util/misc/paths.h"
|
||||
|
||||
@ -43,7 +44,7 @@ void HeapCorruptionCrash() {
|
||||
HeapDestroy(heap);
|
||||
} __except (EXCEPTION_EXECUTE_HANDLER) {
|
||||
// Heap corruption exception should never be caught.
|
||||
CHECK(false);
|
||||
NOTREACHED();
|
||||
}
|
||||
// Should never reach here.
|
||||
abort();
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "gtest/gtest.h"
|
||||
@ -56,7 +57,7 @@ void ScopedTempDir::Rename() {
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(false) << "Couldn't move to a new unique temp dir";
|
||||
NOTREACHED() << "Couldn't move to a new unique temp dir";
|
||||
}
|
||||
|
||||
// static
|
||||
@ -70,8 +71,7 @@ base::FilePath ScopedTempDir::CreateTemporaryDirectory() {
|
||||
return path_to_create;
|
||||
}
|
||||
|
||||
CHECK(false) << "Couldn't create a new unique temp dir";
|
||||
return base::FilePath();
|
||||
NOTREACHED() << "Couldn't create a new unique temp dir";
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
|
Loading…
x
Reference in New Issue
Block a user