Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that proto reflection falls back to dynamic lookup #413

Merged
merged 2 commits into from
Feb 10, 2021

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