| Index: components/tracing/core/proto_zero_message.cc
|
| diff --git a/components/tracing/core/proto_zero_message.cc b/components/tracing/core/proto_zero_message.cc
|
| index b7152304204742f0a71e43e38b0c3c051a81c75a..f4e63df5102a3d47f80925b7a66619f6e256d637 100644
|
| --- a/components/tracing/core/proto_zero_message.cc
|
| +++ b/components/tracing/core/proto_zero_message.cc
|
| @@ -7,6 +7,7 @@
|
| #include <string.h>
|
|
|
| #include "components/tracing/core/proto_utils.h"
|
| +#include "components/tracing/core/proto_zero_message_handle.h"
|
|
|
| #if !defined(ARCH_CPU_LITTLE_ENDIAN)
|
| // The memcpy() for float and double below needs to be adjusted if we want to
|
| @@ -44,6 +45,7 @@ void ProtoZeroMessage::Reset(ScatteredStreamWriter* stream_writer) {
|
| nesting_depth_ = 0;
|
| #if DCHECK_IS_ON()
|
| sealed_ = false;
|
| + handle_ = nullptr;
|
| #endif
|
| }
|
|
|
| @@ -128,6 +130,8 @@ size_t ProtoZeroMessage::Finalize() {
|
|
|
| #if DCHECK_IS_ON()
|
| sealed_ = true;
|
| + if (handle_)
|
| + handle_->reset_message();
|
| #endif
|
|
|
| return size_;
|
|
|