Fix standalone QUICHE build. This removes the use of ABSL_DIE_IF_NULL. I have thought more carefully about it, and realized that we probably shouldn't be using it (or anything in absl/log) since the we already swap out Abseil logging for embedder-specific logging on some platforms, and die_if_null would always use Abseil logging. Also add a missing Bazel dep, and remove some unused includes that the linter complains about. PiperOrigin-RevId: 615393182
diff --git a/quiche/BUILD.bazel b/quiche/BUILD.bazel index e150aa1..39d0de2 100644 --- a/quiche/BUILD.bazel +++ b/quiche/BUILD.bazel
@@ -128,6 +128,7 @@ "@com_google_absl//absl/synchronization", "@com_google_absl//absl/time", "@com_google_absl//absl/types:optional", + "@com_google_absl//absl/types:span", "@com_google_googleurl//url", ], )
diff --git a/quiche/common/lifetime_tracking.h b/quiche/common/lifetime_tracking.h index 34f8c6b..02b18ca 100644 --- a/quiche/common/lifetime_tracking.h +++ b/quiche/common/lifetime_tracking.h
@@ -36,19 +36,14 @@ #ifndef QUICHE_COMMON_LIFETIME_TRACKING_H_ #define QUICHE_COMMON_LIFETIME_TRACKING_H_ -#include <array> -#include <cstddef> -#include <iostream> #include <memory> #include <optional> -#include <sstream> -#include <string> #include <utility> #include <vector> -#include "absl/log/die_if_null.h" #include "absl/strings/str_format.h" #include "quiche/common/platform/api/quiche_export.h" +#include "quiche/common/platform/api/quiche_logging.h" #include "quiche/common/platform/api/quiche_stack_trace.h" namespace quiche { @@ -100,7 +95,10 @@ private: friend class LifetimeTrackable; explicit LifetimeTracker(std::shared_ptr<const LifetimeInfo> info) - : info_(ABSL_DIE_IF_NULL(info)) {} + : info_(std::move(info)) { + QUICHE_CHECK(info_ != nullptr) + << "Passed a null info pointer into the lifetime tracker"; + } void CopyFrom(const LifetimeTracker& other) { info_ = other.info_; } std::shared_ptr<const LifetimeInfo> info_;