Add self pinning on all message accessors for weak descriptor messages.
This guarantees that no matter how you get the instance we pin the type on any use. Previously, casting a `Message*` to some generated type and calling methods on it could trigger undefined behavior unless the cast is down via the ones provided by the library (eg `DownCastToGenerated`). PiperOrigin-RevId: 596066250
P
Protobuf Team Bot committed
f5b50c50227cc37945712bfb3bf8d9504aebf88f
Parent: 0d8080e
Committed by Copybara-Service <copybara-worker@google.com>
on 1/5/2024, 9:08:45 PM