Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NativeScript/NativeScript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: NativeScript/NativeScript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: refactor/android-native-object-state
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 23 files changed
  • 2 contributors

Commits on Nov 22, 2026

  1. refactor(android): keep state for plain native objects in JS

    Core stored JS properties on plain (non-extended) Java objects: listener
    back-references on native views, the cached default background drawable,
    default paddings, the SeekBar owner, a Frame's attach-listener owner,
    animator transition data, and activity callbacks/flags on embedded host
    activities. Runtimes where a plain object's JS wrapper can be dropped and
    rebuilt lose that state or pay to mirror it.
    
    Keep the state on the owning JS objects instead: View fields for
    listeners and the default background, per-owner listener instances for
    Slider, Frame and fragment animators, and an activity registry for
    activity callbacks. Expandos on extended objects (NativeScriptActivity,
    FragmentClass, TabHostImpl, listener implementations) are unchanged.
    edusperoni committed Nov 22, 2026
    Configuration menu
    Copy the full SHA
    e736f9a View commit details
    Browse the repository at this point in the history
  2. refactor(android): pin embedded host activities until onDestroy

    The activity registry is keyed by the JS wrapper. A plain host activity
    has no other JS owner between onCreate and onDestroy, so a collected and
    rebuilt wrapper would lose its callbacks mid-lifecycle. Hold it strongly
    until onDestroy.
    edusperoni committed Nov 22, 2026
    Configuration menu
    Copy the full SHA
    29c8cfd View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2026

  1. Configuration menu
    Copy the full SHA
    d04b85f View commit details
    Browse the repository at this point in the history
Loading