René's URL Explorer Experiment


Title: feat: add AbortController and AbortSignal by edusperoni · Pull Request #2025 · NativeScript/android · GitHub

Open Graph Title: feat: add AbortController and AbortSignal by edusperoni · Pull Request #2025 · NativeScript/android

X Title: feat: add AbortController and AbortSignal by edusperoni · Pull Request #2025 · NativeScript/android

Description: Mirrors NativeScript/ios#447 on Android (same three commits, same file shapes). What Installs the DOM Standard's abort primitives as globals in every isolate (main and workers), modeled on Node's internal/abort_controller.js: AbortController — controller.signal (stable identity) and controller.abort(reason?). AbortSignal extending the runtime's EventTarget, with aborted, reason, throwIfAborted(), the abort event, and onabort with HTML event-handler semantics. new AbortSignal() throws TypeError: Illegal constructor. Statics: AbortSignal.abort(reason?), AbortSignal.timeout(delay) (Node's delay validation), and AbortSignal.any(signals) (composite flattening, first-aborted-reason-wins, spec-ordered state flips before events fire). WebIDL-shaped interfaces: enumerable members, Symbol.toStringTag, brand-checked accessors (via private fields). How The builtin (test-app/runtime/src/main/cpp/js/abort-signal.js) runs from Events::Init immediately after the Event/EventTarget builtin it is layered on. This PR also introduces a sixth fixed wrapper parameter, internals: one plain per-isolate object (a BuiltinRealm slot in the per-runtime state) handed identically to every builtin and reachable from nowhere app code can see — the private channel for cross-builtin capabilities. Both previously ad-hoc channels now ride it: the kListenerChanged hook key (events → abort-signal) and setListenerErrorReporter (error-events → events), replacing the _installListenerErrorReporter one-shot that transiently sat on the app-reachable global target. Documented in the js README as an interim mechanism, with the intended end-state being a Node-style private internal-module tier (require("internal/…") for builtins only). RangeError, NumberIsInteger, WeakRef, and FinalizationRegistry are added to primordials (and the eslint restriction lists). GC contract (Node-equivalent, documented in docs/abort-signal.md) Internal references never keep an unobservable signal alive and never drop an observable abort: timeout() timers close over a WeakRef; a FinalizationRegistry cancels the pending native timer if the signal is collected first. any() links are WeakRefs in both directions with prune registries, so per-request composites never accumulate on a long-lived source, and a composite whose sources all died stops being retained. A gcPersistentSignals set strong-holds exactly the signals whose abort someone can still observe: live timeout signals and non-empty composites while they have abort listeners, plus timeout sources a composite follows until their timer fires. The listener accounting comes from a new symbol-keyed listener-mutation hook in events.js (called from add, remove, and the once-splice during dispatch), published on the builtin-only internals channel — so it cannot be bypassed via a captured EventTarget.prototype.addEventListener. Deviation from Node No DOMException in this runtime: default reasons are Error instances with name patched to "AbortError" / "TimeoutError", the same stand-in performance.js and structured-clone.js use. Tests 20 behavioral specs: illegal constructor, state-flips-before-event ordering, reason identity (including null), throwing listeners not stopping dispatch, once listeners, onabort set/replace/clear, delay validation, any() flattening/dedup/no-double-fire, arbitrary iterables, toStringTag, brand checks. 8 GC specs driven by __collect(): a finalization-registry substrate canary, collectability of unobserved timeout signals and composites, survival (and delivery) for listened ones, a composite keeping a dropped timeout source alive until it fires, release of a listened composite once its last source dies, and release on last-listener removal. The spec files are byte-identical to the iOS suite; the only source divergence from iOS is one comment line naming the Android init path (PrepareV8Runtime). Summary by CodeRabbit New Features Added global AbortController and AbortSignal APIs. Supports abort events, custom reasons, throwIfAborted(), timeouts, and combining multiple signals. Added validation and WebIDL-compatible interface behavior. Bug Fixes Improved cleanup of unused timeout and composite signals to reduce unnecessary resource retention. Documentation Added comprehensive API documentation, including behavior, error handling, and garbage-collection considerations. Tests Added extensive coverage for lifecycle, propagation, validation, events, errors, and cleanup behavior.

Open Graph Description: Mirrors NativeScript/ios#447 on Android (same three commits, same file shapes). What Installs the DOM Standard's abort primitives as globals in every isolate (main and workers), modeled on Node...

X Description: Mirrors NativeScript/ios#447 on Android (same three commits, same file shapes). What Installs the DOM Standard's abort primitives as globals in every isolate (main and workers), modeled on ...

Opengraph URL: https://github.com/NativeScript/android/pull/2025

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:cc3cb62c-3bdc-71e0-769b-e8483a6fb776
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBDC8:22DB35:1EA994F:2722597:6B0154E1
html-safe-nonce1e8cc9f2a3352c07fe67229f713f2d8d614b8c02ae952e714e1d1b76e2fce627
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREM4OjIyREIzNToxRUE5OTRGOjI3MjI1OTc6NkIwMTU0RTEiLCJ2aXNpdG9yX2lkIjoiMzU2NDUwMjc2OTcxOTkyMjg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb96fc72d2af0a4fd94af7ba8b9231e7a196a5c2eda963a0b7b4bb9bdfaf26a02
hovercard-subject-tagpull_request:4350613001
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/android/pull/2025/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:altMirrors NativeScript/ios#447 on Android (same three commits, same file shapes). What Installs the DOM Standard's abort primitives as globals in every isolate (main and workers), modeled on Node...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/NativeScript/android git https://github.com/NativeScript/android.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id29137950
octolytics-dimension-repository_nwoNativeScript/android
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id29137950
octolytics-dimension-repository_network_root_nwoNativeScript/android
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/android/pull/2025/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fandroid%2Fpull%2F2025%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%2Fandroid%2Fpull%2F2025%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%2Fandroid
Reloadhttps://github.com/NativeScript/android/pull/2025/files
Reloadhttps://github.com/NativeScript/android/pull/2025/files
Reloadhttps://github.com/NativeScript/android/pull/2025/files
NativeScripthttps://github.com/NativeScript
androidhttps://github.com/NativeScript/android
Codehttps://github.com/NativeScript/android
Issues106 (106)https://github.com/NativeScript/android/issues
Pull requests25 (25)https://github.com/NativeScript/android/pulls
Actionshttps://github.com/NativeScript/android/actions
Projectshttps://github.com/NativeScript/android/projects
Wikihttps://github.com/NativeScript/android/wiki
Security and qualityhttps://github.com/NativeScript/android/security
Insightshttps://github.com/NativeScript/android/insights
Sign up for GitHub https://github.com/signup?return_to=%2FNativeScript%2Fandroid%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FNativeScript%2Fandroid%2Fissues%2Fnew%2Fchoose
NathanWalkerhttps://github.com/NathanWalker
mainhttps://github.com/NativeScript/android/tree/main
feat/abortsignalhttps://github.com/NativeScript/android/tree/feat/abortsignal
Conversation 1 https://github.com/NativeScript/android/pull/2025
Commits 3 https://github.com/NativeScript/android/pull/2025/commits
Checks 7 https://github.com/NativeScript/android/pull/2025/checks
Files changed https://github.com/NativeScript/android/pull/2025/files
Please reload this pagehttps://github.com/NativeScript/android/pull/2025/files
feat: add AbortController and AbortSignal https://github.com/NativeScript/android/pull/2025/files#top
Show all changes 3 commits https://github.com/NativeScript/android/pull/2025/files
671b15a feat: add AbortController and AbortSignal edusperoni Aug 24, 2026 https://github.com/NativeScript/android/pull/2025/commits/671b15a172af41001b176eacdd4dd008d7794253
018a7cd feat: GC-transparent AbortSignal (weak timers and any() links) edusperoni Aug 24, 2026 https://github.com/NativeScript/android/pull/2025/commits/018a7cd7f74e4fd40a3803f57ce5d1cc60dda05e
074a8e5 refactor: shared internals parameter for cross-builtin capabilities edusperoni Aug 24, 2026 https://github.com/NativeScript/android/pull/2025/commits/074a8e5a4df92927543305278ec47adf38785f84
Clear filters https://github.com/NativeScript/android/pull/2025/files
Please reload this pagehttps://github.com/NativeScript/android/pull/2025/files
Please reload this pagehttps://github.com/NativeScript/android/pull/2025/files
README.md https://github.com/NativeScript/android/pull/2025/files#diff-0b5ca119d2be595aa307d34512d9679e49186307ef94201e4b3dfa079aa89938
abort-signal.md https://github.com/NativeScript/android/pull/2025/files#diff-856574337e45ef92d18b6abda6035015c6a08fa366defc45b0ab982f1d47075a
eslint.config.mjs https://github.com/NativeScript/android/pull/2025/files#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2
mainpage.js https://github.com/NativeScript/android/pull/2025/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
testAbortSignal.js https://github.com/NativeScript/android/pull/2025/files#diff-68ecaeefcfda8efb7999008b84632a821402e3b4f9b6a1d90c19eeb56da8de71
CMakeLists.txt https://github.com/NativeScript/android/pull/2025/files#diff-9aa48152a82c07a60ab6e09923a9b266e2985f78e579653848df730cd8ec5e4c
BuiltinLoader.cpp https://github.com/NativeScript/android/pull/2025/files#diff-fcedb819fe4f3f0f0406fa6f3ad2e6b725f6f39d83737af64486c91ba96fdffa
BuiltinLoader.h https://github.com/NativeScript/android/pull/2025/files#diff-80ceda457b8ed4e5fc6f0d5a7cb59538fb88ffd8b9787e6f91c8f6be728c05d8
Events.cpp https://github.com/NativeScript/android/pull/2025/files#diff-45844f0332b701d110f9e828f0d95337f160c10c222f079e089364d187527ca6
Events.h https://github.com/NativeScript/android/pull/2025/files#diff-1305ec58c1f21d6b44748852ae90433a93c43266828b79b34778f35478733ed7
README.md https://github.com/NativeScript/android/pull/2025/files#diff-751334ceaf7705bb581ba52ea1f45b471007312e7194253725e94c12eb8f22fe
abort-signal.js https://github.com/NativeScript/android/pull/2025/files#diff-b5d0f39f7c91e79c7f220e3674b06b28c30857a03e4d8d0b96f3bdda45eb14db
error-events.js https://github.com/NativeScript/android/pull/2025/files#diff-819b39a5be6266ede2c585e82de3aeac11dd3050630c475aa0bf4d7df76eb230
events.js https://github.com/NativeScript/android/pull/2025/files#diff-15bc07870a0153b6b63d42bcfe4c35c81696d01b681d4c816f2206f5cea57f38
primordials.js https://github.com/NativeScript/android/pull/2025/files#diff-9b1f22214698543a37f4ef99bb7a3c87aa30de65ecd042dd7b9eec18501914fc
docs/README.mdhttps://github.com/NativeScript/android/pull/2025/files#diff-0b5ca119d2be595aa307d34512d9679e49186307ef94201e4b3dfa079aa89938
View file https://github.com/NativeScript/android/blob/074a8e5a4df92927543305278ec47adf38785f84/docs/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/2025/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/2025/files#diff-0b5ca119d2be595aa307d34512d9679e49186307ef94201e4b3dfa079aa89938
https://github.com/NativeScript/android/pull/2025/files#diff-0b5ca119d2be595aa307d34512d9679e49186307ef94201e4b3dfa079aa89938
docs/abort-signal.mdhttps://github.com/NativeScript/android/pull/2025/files#diff-856574337e45ef92d18b6abda6035015c6a08fa366defc45b0ab982f1d47075a
View file https://github.com/NativeScript/android/blob/074a8e5a4df92927543305278ec47adf38785f84/docs/abort-signal.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/2025/{{ revealButtonHref }}
eslint.config.mjshttps://github.com/NativeScript/android/pull/2025/files#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2
View file https://github.com/NativeScript/android/blob/074a8e5a4df92927543305278ec47adf38785f84/eslint.config.mjs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/2025/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/2025/files#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2
https://github.com/NativeScript/android/pull/2025/files#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2
https://github.com/NativeScript/android/pull/2025/files#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2
https://github.com/NativeScript/android/pull/2025/files#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2
test-app/app/src/main/assets/app/mainpage.jshttps://github.com/NativeScript/android/pull/2025/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
View file https://github.com/NativeScript/android/blob/074a8e5a4df92927543305278ec47adf38785f84/test-app/app/src/main/assets/app/mainpage.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/2025/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/2025/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
https://github.com/NativeScript/android/pull/2025/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
Please reload this pagehttps://github.com/NativeScript/android/pull/2025/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.