summaryrefslogtreecommitdiff
path: root/absl/strings/internal/cordz_info.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2021-05-13 11:31:11 -0700
committerGravatar vslashg <gfalcon@google.com>2021-05-13 15:59:01 -0400
commitaad2c8a3966424bbaa2f26027d104d17f9c1c1ae (patch)
treeab4f61bfb0ec4af44fbdd08bb0be7a44f8335a2d /absl/strings/internal/cordz_info.h
parentce42de10fbea616379826e91c7c23c16bffe6e61 (diff)
Export of internal Abseil changes
-- 912c205cf80c4ed24a08000c04263403857b7f75 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 373620391 -- d454f10549d27d7b025d1ce0ef90a0cdec42c361 by Martijn Vels <mvels@google.com>: Add SetCordRepForTesting() helper to CordzInfo PiperOrigin-RevId: 373602832 -- 7a2d7bdd2e60fb51333e81cd71ebd0a4edb60704 by Evan Brown <ezb@google.com>: For StrAppend, make sure to follow exponential growth like std::string::append. PiperOrigin-RevId: 373589332 -- 24397f19bce45133a42feaa7c883009ef9325095 by Greg Falcon <gfalcon@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 373569246 GitOrigin-RevId: 912c205cf80c4ed24a08000c04263403857b7f75 Change-Id: I5444f7ca2c0980685ca5c51596c259b845d69673
Diffstat (limited to 'absl/strings/internal/cordz_info.h')
-rw-r--r--absl/strings/internal/cordz_info.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/absl/strings/internal/cordz_info.h b/absl/strings/internal/cordz_info.h
index 13aaee17..026d5b99 100644
--- a/absl/strings/internal/cordz_info.h
+++ b/absl/strings/internal/cordz_info.h
@@ -158,6 +158,11 @@ class ABSL_LOCKABLE CordzInfo : public CordzHandle {
return rep_;
}
+ // Sets the current value of `rep_` for testing purposes only.
+ void SetCordRepForTesting(CordRep* rep) ABSL_NO_THREAD_SAFETY_ANALYSIS {
+ rep_ = rep;
+ }
+
// Returns the stack trace for where the cord was first sampled. Cords are
// potentially sampled when they promote from an inlined cord to a tree or
// ring representation, which is not necessarily the location where the cord