From 797b470fe8f0b77301aeac7e4d09c81edd853844 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Fri, 3 Mar 2023 12:13:32 -0800 Subject: [PATCH] Automated rollback of commit bf0d8e238480bdbe5d0136bd3a6186b2569f8f2f. PiperOrigin-RevId: 513889737 --- src/google/protobuf/descriptor.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc index a321f94f86..efcd86e358 100644 --- a/src/google/protobuf/descriptor.cc +++ b/src/google/protobuf/descriptor.cc @@ -3740,10 +3740,10 @@ class DescriptorBuilder { // Maximum recursion depth corresponds to 32 nested message declarations. int recursion_depth_ = 32; - void AddError(absl::string_view element_name, const Message& descriptor, + void AddError(const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, - absl::string_view error); - void AddError(absl::string_view element_name, const Message& descriptor, + const std::string& error); + void AddError(const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, const char* error); void AddRecursiveImportError(const FileDescriptorProto& proto, int from_here); @@ -3937,7 +3937,6 @@ class DescriptorBuilder { void SuggestFieldNumbers(FileDescriptor* file, const FileDescriptorProto& proto); - // Must be run only after cross-linking. void InterpretOptions(); @@ -4190,9 +4189,9 @@ DescriptorBuilder::DescriptorBuilder( DescriptorBuilder::~DescriptorBuilder() {} PROTOBUF_NOINLINE void DescriptorBuilder::AddError( - absl::string_view element_name, const Message& descriptor, + const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, - absl::string_view error) { + const std::string& error) { if (error_collector_ == nullptr) { if (!had_errors_) { ABSL_LOG(ERROR) << "Invalid proto descriptor for file \"" << filename_ @@ -4207,7 +4206,7 @@ PROTOBUF_NOINLINE void DescriptorBuilder::AddError( } PROTOBUF_NOINLINE void DescriptorBuilder::AddError( - absl::string_view element_name, const Message& descriptor, + const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, const char* error) { AddError(element_name, descriptor, location, std::string(error)); } @@ -6463,7 +6462,6 @@ void DescriptorBuilder::CrossLinkExtensionRange( } - void DescriptorBuilder::CrossLinkField(FieldDescriptor* field, const FieldDescriptorProto& proto) { if (field->options_ == nullptr) {