| Index: third_party/protobuf/src/google/protobuf/stubs/shared_ptr.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/stubs/shared_ptr.h b/third_party/protobuf/src/google/protobuf/stubs/shared_ptr.h
|
| index d250bf4d33850d0a48507d10d1bcfd181cc2d853..83b39ac98e5b94f0bbbcc35def5a869bc13f8ac7 100644
|
| --- a/third_party/protobuf/src/google/protobuf/stubs/shared_ptr.h
|
| +++ b/third_party/protobuf/src/google/protobuf/stubs/shared_ptr.h
|
| @@ -428,11 +428,13 @@ class enable_shared_from_this {
|
| shared_ptr<T> shared_from_this() {
|
| // Behavior is undefined if the precondition isn't satisfied; we choose
|
| // to die with a CHECK failure.
|
| - CHECK(!weak_this_.expired()) << "No shared_ptr owns this object";
|
| + // No shared_ptr owns this object
|
| + CHECK(!weak_this_.expired());
|
| return weak_this_.lock();
|
| }
|
| shared_ptr<const T> shared_from_this() const {
|
| - CHECK(!weak_this_.expired()) << "No shared_ptr owns this object";
|
| + // No shared_ptr owns this object
|
| + CHECK(!weak_this_.expired());
|
| return weak_this_.lock();
|
| }
|
|
|
| @@ -456,7 +458,8 @@ class enable_shared_from_this {
|
| template<typename T>
|
| void shared_ptr<T>::MaybeSetupWeakThis(enable_shared_from_this<T>* ptr) {
|
| if (ptr) {
|
| - CHECK(ptr->weak_this_.expired()) << "Object already owned by a shared_ptr";
|
| + // Object already owned by a shared_ptr
|
| + CHECK(ptr->weak_this_.expired());
|
| ptr->weak_this_ = *this;
|
| }
|
| }
|
|
|