Skip to content

Conversation

@TristonianJones
Copy link
Collaborator

When proto descriptors are not shared by CEL and an input proto message, make sure that the GetFrom and IsSet tests fallback to dynamic FieldDescriptor lookups rather than using cached values.

…scriptors are not shared by CEL and the proto
pbDesc := pbRef.Descriptor()
if pbDesc == fd.desc.ContainingMessage() {
// When the target protobuf shares the same message descriptor instance as the field
// descriptoruse the cached field descriptor value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"descriptoruse" -> "descriptor, use"

@TristonianJones TristonianJones merged commit 9c6eada into google:master Feb 10, 2021
@TristonianJones TristonianJones deleted the dyn-pb-fallback branch February 10, 2021 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants