Repository navigation
Move RefBase and the LifecycleHelper primary template into bind_lang/. - #486
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
…lang/`. * `implementation/ref_base.h` moves to `bind_lang/ref_base.h` (`namespace bind_lang`). Its unused `friend struct EntryBase` is dropped: `EntryBase` only touches `Base::object_ref_`, which is already accessible to derived classes, and naming it would make `bind_lang` depend on JNI Bind. * New `bind_lang/lifecycle.h` declares `LifecycleType` and the primary `LifecycleHelper<Span, LifecycleType>` template. JNI Bind (and later Proto Bind) specialize it for their own handle types. * JNI specializations (`jobject`, `jclass`, `jstring`, and the generic local/global fallbacks) stay in `implementation/jni_helper/`, but are declared in `namespace bind_lang` as the language requires. `jni::LifecycleType`, `jni::LifecycleHelper`, `jni::RefBase`, etc. remain available via using-declarations. PiperOrigin-RevId: 989542143
copybara-service
Bot
force-pushed
the
test_989542143
branch
from
October 23, 2026 07:17
8445327 to
4345ec5
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move
RefBaseand theLifecycleHelperprimary template intobind_lang/.implementation/ref_base.hmoves tobind_lang/ref_base.h(namespace bind_lang). Its unusedfriend struct EntryBaseis dropped:EntryBaseonly touchesBase::object_ref_, which is already accessible to derived classes, and naming it would makebind_langdepend on JNI Bind.bind_lang/lifecycle.hdeclaresLifecycleTypeand the primaryLifecycleHelper<Span, LifecycleType>template. JNI Bind (and later Proto Bind) specialize it for their own handle types.jobject,jclass,jstring, and the generic local/global fallbacks) stay inimplementation/jni_helper/, but are declared innamespace bind_langas the language requires.jni::LifecycleType,jni::LifecycleHelper,jni::RefBase, etc. remain available via using-declarations.