summaryrefslogtreecommitdiff
path: root/absl/strings/cord.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/strings/cord.cc')
-rw-r--r--absl/strings/cord.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/absl/strings/cord.cc b/absl/strings/cord.cc
index 5092fd14..9efd1357 100644
--- a/absl/strings/cord.cc
+++ b/absl/strings/cord.cc
@@ -241,6 +241,7 @@ static void UnrefInternal(CordRep* rep) {
absl::InlinedVector<CordRep*, kInlinedVectorSize> pending;
while (true) {
+ assert(!rep->refcount.IsImmortal());
if (rep->tag == CONCAT) {
CordRepConcat* rep_concat = rep->concat();
CordRep* right = rep_concat->right;
@@ -256,6 +257,7 @@ static void UnrefInternal(CordRep* rep) {
}
} else if (rep->tag == EXTERNAL) {
CordRepExternal* rep_external = rep->external();
+ assert(rep_external->releaser_invoker != nullptr);
rep_external->releaser_invoker(rep_external);
rep = nullptr;
} else if (rep->tag == SUBSTRING) {