| 912 | } |
| 913 | |
| 914 | void StringRepeatedFieldAccessor( |
| 915 | int index, const google::protobuf::Message* absl_nonnull message, |
| 916 | const google::protobuf::FieldDescriptor* absl_nonnull field, |
| 917 | const google::protobuf::Reflection* absl_nonnull reflection, |
| 918 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 919 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 920 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) { |
| 921 | ABSL_DCHECK(message != nullptr); |
| 922 | ABSL_DCHECK(field != nullptr); |
| 923 | ABSL_DCHECK(message_factory != nullptr); |
| 924 | ABSL_DCHECK(descriptor_pool != nullptr); |
| 925 | ABSL_DCHECK(reflection != nullptr); |
| 926 | ABSL_DCHECK(arena != nullptr); |
| 927 | ABSL_DCHECK(result != nullptr); |
| 928 | ABSL_DCHECK_EQ(reflection, message->GetReflection()); |
| 929 | ABSL_DCHECK_EQ(field->containing_type(), message->GetDescriptor()); |
| 930 | ABSL_DCHECK(field->is_repeated()); |
| 931 | ABSL_DCHECK_EQ(field->type(), google::protobuf::FieldDescriptor::TYPE_STRING); |
| 932 | ABSL_DCHECK_GE(index, 0); |
| 933 | ABSL_DCHECK_LT(index, reflection->FieldSize(*message, field)); |
| 934 | |
| 935 | std::string scratch; |
| 936 | absl::visit( |
| 937 | absl::Overload( |
| 938 | [&](absl::string_view string) { |
| 939 | if (string.data() == scratch.data() && |
| 940 | string.size() == scratch.size()) { |
| 941 | *result = StringValue(arena, std::move(scratch)); |
| 942 | } else { |
| 943 | if (message->GetArena() == nullptr) { |
| 944 | *result = StringValue(arena, string); |
| 945 | } else { |
| 946 | *result = StringValue(Borrower::Arena(arena), string); |
| 947 | } |
| 948 | } |
| 949 | }, |
| 950 | [&](absl::Cord&& cord) { *result = StringValue(std::move(cord)); }), |
| 951 | well_known_types::AsVariant(well_known_types::GetRepeatedStringField( |
| 952 | *message, field, index, scratch))); |
| 953 | } |
| 954 | |
| 955 | void MessageRepeatedFieldAccessor( |
| 956 | int index, const google::protobuf::Message* absl_nonnull message, |
nothing calls this directly
no test coverage detected