summaryrefslogtreecommitdiff
path: root/absl/strings/cord.cc
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2020-10-19 15:25:26 -0700
committerGravatar Gennadiy Rozental <rogeeff@google.com>2020-10-19 19:24:23 -0400
commit4b915e70929ca2d6152240facc83d3d38c5d5f28 (patch)
tree3663ad6f3ddb8f0a94045bac592901ee7298447e /absl/strings/cord.cc
parent8f1c34a77a2ba04512b7f9cbc6013d405e6a0b31 (diff)
Export of internal Abseil changes
-- 77c85460dc3c46593b231c5161ac55273bb0c7ef by Abseil Team <absl-team@google.com>: Support int128 in SimpleAtoi. PiperOrigin-RevId: 337946262 -- 0be53049ccf8309650e4e22f23b290e5f75ee828 by Gennadiy Rozental <rogeeff@google.com>: Update build scripts to use --mount instead of --volume to mount the host data into a container. This is somewhat more verbose, but more readable and flexible. More importantly this is what docker documentation is recomending to use now. PiperOrigin-RevId: 337898761 -- 3bc877f1679fdf61ecbf4365287a0403cfc9b53e by Samuel Benzaquen <sbenza@google.com>: Add Cord constructor for constinit instances. PiperOrigin-RevId: 337871148 -- 8b87701892b9c325e78ad4e8e4f16b785a744622 by Chris Kennelly <ckennelly@google.com>: Use the address of kSeed, rather than its value. We initialize kSeed with &kSeed, so these are equivalent, but kSeed requires a load from memory while &kSeed can be formed as a RIP-relative lea. PiperOrigin-RevId: 337868415 GitOrigin-RevId: 77c85460dc3c46593b231c5161ac55273bb0c7ef Change-Id: I3d06c18a123f1be29dad5801e8625952dc41cd95
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) {