René's URL Explorer Experiment


Title: fix(android): hold the TextBase from its text transformation weakly by edusperoni · Pull Request #11662 · NativeScript/NativeScript · GitHub

Open Graph Title: fix(android): hold the TextBase from its text transformation weakly by edusperoni · Pull Request #11662 · NativeScript/NativeScript

X Title: fix(android): hold the TextBase from its text transformation weakly by edusperoni · Pull Request #11662 · NativeScript/NativeScript

Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. You have signed the CLA. All existing tests are passing: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/DevelopmentWorkflow.md#unit-testing. Tests for the changes are included - https://github.com/NativeScript/NativeScript/blob/master/tools/notes/WritingUnitTests.md. What is the current behavior? text-transform (any value but initial) and a Button's formatted text install a TextTransformationImpl on the native TextView. The transformation held its TextBase in a strong textBase property, and the TextBase reaches the TextView again through its native view: TextView --mTransformation--> TextTransformationImpl --(JS) textBase--> TextBase --nativeView--> TextView Tearing a view down breaks the cycle from the JS side, so the cycle only lasts for views that are never torn down. One case is the previous root after Application.resetRootView(): resetActivityContent unloads it but does not tear down its UI. With the default wrapper lifetime, the runtime breaks the cycle anyway: once the transformation's wrapper is unreachable from JS, it is resurrected and its Java object weakened. A wrapper lifetime that keeps a JS-implemented object's state for as long as Java holds the object (the experimental canary mode, NativeScript/android#2127) cannot, so the old root stays alive through every transformed label or formatted-text button in it. The new RESET-ROOT-VIEW spec resets to a layout root holding a Label with text-transform: uppercase and a Button with formatted text, then resets away from it. Without this change, findLeakCycles() (NativeScript/android#2130) reports, in both the extended and all scopes: StackLayout --ViewGroup.mChildren--> View[] --[]--> StyleableTextView --TextView.mTransformation--> TextTransformationImpl --ns:record--> JS Object --textBase--> JS Label --parent--> JS StackLayout --_androidView--> JS StackLayout wrapper --ns:wrapper--> StackLayout android.widget.Button --TextView.mTransformation--> TextTransformationImpl --ns:record--> JS Object --textBase--> JS Button --_androidView--> JS android.widget.Button wrapper --ns:wrapper--> android.widget.Button This is the same class of cycle as #11658 (Button and ActionBar listener owners), and belongs on that PR's list of remaining strong owners. What is the new behavior? TextTransformationImpl holds the TextBase through a WeakRef. Once the view is gone, getTransformation returns the text it was given unchanged. The transformation itself is still held by the TextView, and the TextBase by the view tree, so nothing it needs becomes weaker under resurrection. New TEXT-BASE spec test_android_text_transform_survives_garbage_collection sets text-transform on a Label and formatted text on a Button, then collects both heaps (gc() + java.lang.System.gc() + runFinalization()). It then changes the text, requests a layout and checks what the transformation returns (CHANGED, and the updated span text). Verification Android 15 (API 35) emulator, with an Android runtime built from NativeScript/android#2130 (stacked on #2127): "wrapperLifetime": { "mode": "resurrecting" } (today's default behavior, confirmed with getConfig("wrapperLifetimeMode")): Full automated suite 1698 OK, 0 failed, including both new specs. The runtime counted 76,736 resurrections and 28,988 collected wrappers over the run. "canary", RESET-ROOT-VIEW module only: The two TextTransformationImpl cycles above are gone in both the extended and all scopes, and the module passes. The old root is still retained through the Button's click listener; #11658 fixes that. "canary", scope "all", with this change and #11656–#11661 applied together: Full suite 1705 OK, 0 failed. findLeakCycles() reports 0 cycles, 0 leaked objects. Related: #11658

Open Graph Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...

X Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...

Opengraph URL: https://github.com/NativeScript/NativeScript/pull/11662

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:684b8234-5c01-7e20-8300-d87359c1e7bb
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA322:D5AA4:146BF70:1B3AD1A:6B0124D0
html-safe-noncec2b1353f5df3389d6003c7eaddce94aeb2817a63e1e0a7eb3a6aad92e85bd8c6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzIyOkQ1QUE0OjE0NkJGNzA6MUIzQUQxQTo2QjAxMjREMCIsInZpc2l0b3JfaWQiOiIxNzg3MzE4MDIxNzQ5MDIzOTUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3c70111bfae6b01850104d650fc5d494d24431c45ae312e37f916b8cf60e30de
hovercard-subject-tagpull_request:5420044570
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/NativeScript/NativeScript/pull/11662/files
twitter:imagehttps://avatars.githubusercontent.com/u/4061767?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4061767?s=400&v=4
og:image:altPR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/pull/11662/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F11662%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F11662%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/pull/11662/files
Reloadhttps://github.com/NativeScript/NativeScript/pull/11662/files
Reloadhttps://github.com/NativeScript/NativeScript/pull/11662/files
NativeScripthttps://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Codehttps://github.com/NativeScript/NativeScript
Issues231 (231)https://github.com/NativeScript/NativeScript/issues
Pull requests107 (107)https://github.com/NativeScript/NativeScript/pulls
Discussionshttps://github.com/NativeScript/NativeScript/discussions
Actionshttps://github.com/NativeScript/NativeScript/actions
Projectshttps://github.com/NativeScript/NativeScript/projects
Wikihttps://github.com/NativeScript/NativeScript/wiki
Security and qualityhttps://github.com/NativeScript/NativeScript/security
Insightshttps://github.com/NativeScript/NativeScript/insights
Sign up for GitHub https://github.com/signup?return_to=%2FNativeScript%2FNativeScript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FNativeScript%2FNativeScript%2Fissues%2Fnew%2Fchoose
edusperonihttps://github.com/edusperoni
mainhttps://github.com/NativeScript/NativeScript/tree/main
fix/android-text-transformation-ownerhttps://github.com/NativeScript/NativeScript/tree/fix/android-text-transformation-owner
Conversation 2 https://github.com/NativeScript/NativeScript/pull/11662
Commits 1 https://github.com/NativeScript/NativeScript/pull/11662/commits
Checks 9 https://github.com/NativeScript/NativeScript/pull/11662/checks
Files changed 3 https://github.com/NativeScript/NativeScript/pull/11662/files
fix(android): hold the TextBase from its text transformation weakly https://github.com/NativeScript/NativeScript/pull/11662/files#top
Show all changes 1 commit https://github.com/NativeScript/NativeScript/pull/11662/files
69c034b fix(android): hold the TextBase from its text transformation weakly edusperoni Nov 20, 2026 https://github.com/NativeScript/NativeScript/pull/11662/commits/69c034bb96953da71fadbd77a67fc68571bea530
Clear filters https://github.com/NativeScript/NativeScript/pull/11662/files
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/11662/files
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/11662/files
reset-root-view-tests.ts https://github.com/NativeScript/NativeScript/pull/11662/files#diff-c8e7755fe07a587423ad884cd4b98670e14c3324f9f15c72e34f88e333477bc9
text-base-tests.ts https://github.com/NativeScript/NativeScript/pull/11662/files#diff-51a26ac22f87b975aa65bef7428a235d927f68707c1497e2a6c8046f6212c127
index.android.ts https://github.com/NativeScript/NativeScript/pull/11662/files#diff-d6c6ee5086ae6a6cd68421197312bba4d1880efb0a844c86d1a9c18080dd50f3
apps/automated/src/ui/root-view/reset-root-view-tests.tshttps://github.com/NativeScript/NativeScript/pull/11662/files#diff-c8e7755fe07a587423ad884cd4b98670e14c3324f9f15c72e34f88e333477bc9
View file https://github.com/NativeScript/NativeScript/blob/69c034bb96953da71fadbd77a67fc68571bea530/apps/automated/src/ui/root-view/reset-root-view-tests.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/NativeScript/pull/11662/{{ revealButtonHref }}
https://github.com/NativeScript/NativeScript/pull/11662/files#diff-c8e7755fe07a587423ad884cd4b98670e14c3324f9f15c72e34f88e333477bc9
https://github.com/NativeScript/NativeScript/pull/11662/files#diff-c8e7755fe07a587423ad884cd4b98670e14c3324f9f15c72e34f88e333477bc9
https://github.com/NativeScript/NativeScript/pull/11662/files#diff-c8e7755fe07a587423ad884cd4b98670e14c3324f9f15c72e34f88e333477bc9
apps/automated/src/ui/text-base/text-base-tests.tshttps://github.com/NativeScript/NativeScript/pull/11662/files#diff-51a26ac22f87b975aa65bef7428a235d927f68707c1497e2a6c8046f6212c127
View file https://github.com/NativeScript/NativeScript/blob/69c034bb96953da71fadbd77a67fc68571bea530/apps/automated/src/ui/text-base/text-base-tests.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/NativeScript/pull/11662/{{ revealButtonHref }}
https://github.com/NativeScript/NativeScript/pull/11662/files#diff-51a26ac22f87b975aa65bef7428a235d927f68707c1497e2a6c8046f6212c127
packages/core/ui/text-base/index.android.tshttps://github.com/NativeScript/NativeScript/pull/11662/files#diff-d6c6ee5086ae6a6cd68421197312bba4d1880efb0a844c86d1a9c18080dd50f3
View file https://github.com/NativeScript/NativeScript/blob/69c034bb96953da71fadbd77a67fc68571bea530/packages/core/ui/text-base/index.android.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/NativeScript/pull/11662/{{ revealButtonHref }}
https://github.com/NativeScript/NativeScript/pull/11662/files#diff-d6c6ee5086ae6a6cd68421197312bba4d1880efb0a844c86d1a9c18080dd50f3
https://github.com/NativeScript/NativeScript/pull/11662/files#diff-d6c6ee5086ae6a6cd68421197312bba4d1880efb0a844c86d1a9c18080dd50f3
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/11662/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.