René's URL Explorer Experiment


Title: feat(worker): accept platform options under android, deprecate androidPriority by edusperoni · Pull Request #2041 · NativeScript/android · GitHub

Open Graph Title: feat(worker): accept platform options under android, deprecate androidPriority by edusperoni · Pull Request #2041 · NativeScript/android

X Title: feat(worker): accept platform options under android, deprecate androidPriority by edusperoni · Pull Request #2041 · NativeScript/android

Description: What changed new Worker(url, options) now takes its Android-specific settings under an android namespace object, so future platform options have a place to live instead of accumulating as androidSomething keys on the top level. const worker = new Worker("./worker.js", { android: { priority: "lowest" }, }); android.priority accepts the camelCase android.os.Process.THREAD_PRIORITY_* names — "lowest", "background", "lessFavorable", "default", "moreFavorable", "foreground", "display", "urgentDisplay", "video", "audio", "urgentAudio" — or a raw nice value clamped to [-20, 19], and is applied with Process.setThreadPriority on the worker thread. Deprecation options.androidPriority keeps working unchanged. Passing it logs a one-time per-process warning pointing at android.priority. When both keys are present, android.priority wins and the legacy value is not validated. Validation Input Result android present and not an object (null counts as absent, as for a WebIDL dictionary) TypeError android.priority neither a recognized name nor a number TypeError naming "android.priority" android.priority an unknown string TypeError naming "android.priority" android.priority a number outside [-20, 19] clamped unknown keys inside android ignored (forward compatibility) androidPriority with an unusable value unchanged (throws, as before) The thrown value is a genuine TypeError instance, so e instanceof TypeError holds in JS — NativeScriptException gained an overload that carries an already-built JS error value through ReThrowToV8 unchanged. Along the way, an options getter that throws now stops construction: the ->Get(...).ToLocal(...) result was folded into the "no option given" branch, so the pending exception was dropped and the worker started at the default priority. Verification ./gradlew runtestsAndVerifyResults -Pabis=arm64-v8a, Debug, API 33 emulator. Metric Count tests 1223 failures 0 errors 0 skipped 4 That is the 1207-test baseline plus the 16 specs added here; the skips are unchanged. Mirrors NativeScript/ios#470. Deviations from the iOS PR Android's priority surface is a nice value, not NSQualityOfService, so android.priority also accepts numbers and the "must be a string" rejection becomes "neither a recognized name nor a number". No std::optional sentinel fix is needed: Android's "unset" default is THREAD_PRIORITY_BACKGROUND (10), which no sentinel collides with. The specs read the thread's nice value back with android.os.Process.getThreadPriority(android.os.Process.myTid()) from inside the worker. Only the non-negative names are asserted exactly — lowering a thread's nice value needs a privilege the app may not hold — with the negative names covered by starting a worker instead. Follow-ups @nativescript/core typings for WorkerOptions need android?: { priority?: ... }, with androidPriority marked @deprecated. A stacked PR adds resourceLimits. Summary by CodeRabbit New Features Added support for configuring Android worker thread priority with named or numeric values. Priority settings now support negative values and safe range clamping. Nested Android options take precedence over legacy priority settings. Bug Fixes Invalid priority values now produce clear JavaScript TypeError errors. Legacy priority configuration remains supported with a deprecation notice. Errors encountered while reading worker options are now preserved and reported correctly.

Open Graph Description: What changed new Worker(url, options) now takes its Android-specific settings under an android namespace object, so future platform options have a place to live instead of accumulating as androidSo...

X Description: What changed new Worker(url, options) now takes its Android-specific settings under an android namespace object, so future platform options have a place to live instead of accumulating as androidSo...

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

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:366b2284-c953-0ab5-f0c5-ae6116dc4687
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD148:3F4253:1820199:2014753:6B014908
html-safe-noncee52c52e26cb81752f3e1a0198995e8800ebf44be9e9905ff078ad0b0502cab65
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTQ4OjNGNDI1MzoxODIwMTk5OjIwMTQ3NTM6NkIwMTQ5MDgiLCJ2aXNpdG9yX2lkIjoiMjQ0NDc1MjU2OTg3MzAyNTI4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac018c1ecc96780b6394732c7871608d421ce467c7a0cf12beefdc258ed39ce30f
hovercard-subject-tagpull_request:4509659022
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/2041/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:altWhat changed new Worker(url, options) now takes its Android-specific settings under an android namespace object, so future platform options have a place to live instead of accumulating as androidSo...
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/2041/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fandroid%2Fpull%2F2041%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%2F2041%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/2041/files
Reloadhttps://github.com/NativeScript/android/pull/2041/files
Reloadhttps://github.com/NativeScript/android/pull/2041/files
NativeScripthttps://github.com/NativeScript
androidhttps://github.com/NativeScript/android
Codehttps://github.com/NativeScript/android
Issues106 (106)https://github.com/NativeScript/android/issues
Pull requests24 (24)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
edusperonihttps://github.com/edusperoni
mainhttps://github.com/NativeScript/android/tree/main
feat/worker-android-optionshttps://github.com/NativeScript/android/tree/feat/worker-android-options
Conversation 5 https://github.com/NativeScript/android/pull/2041
Commits 2 https://github.com/NativeScript/android/pull/2041/commits
Checks 7 https://github.com/NativeScript/android/pull/2041/checks
Files changed https://github.com/NativeScript/android/pull/2041/files
Please reload this pagehttps://github.com/NativeScript/android/pull/2041/files
feat(worker): accept platform options under android, deprecate androidPriority https://github.com/NativeScript/android/pull/2041/files#top
Show all changes 2 commits https://github.com/NativeScript/android/pull/2041/files
557139c feat: accept platform options under android, deprecate androidPriority edusperoni Sep 11, 2026 https://github.com/NativeScript/android/pull/2041/commits/557139c2d23baa1ee44216d1ed0ceb83ade1990c
b35fd57 fix: clamp numeric worker priorities before converting to int edusperoni Sep 11, 2026 https://github.com/NativeScript/android/pull/2041/commits/b35fd572cdfaac4a4bd2e4ffd46aaa586659e2b4
Clear filters https://github.com/NativeScript/android/pull/2041/files
Please reload this pagehttps://github.com/NativeScript/android/pull/2041/files
Please reload this pagehttps://github.com/NativeScript/android/pull/2041/files
mainpage.js https://github.com/NativeScript/android/pull/2041/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
testWorkerOptions.js https://github.com/NativeScript/android/pull/2041/files#diff-7bdf28ec8fb0e607e04968d148050141cf8677bf235d4e0560aaf5958d2cf881
workerOptionsPriorityWorker.js https://github.com/NativeScript/android/pull/2041/files#diff-e67a457bf13c7263eb10a5e39739bb29178145179b855f766a2d3b240d4b3081
CallbackHandlers.cpp https://github.com/NativeScript/android/pull/2041/files#diff-a784229ab7689cd9ce3d502557091158b2943269fad47c1891a15a07c355500e
NativeScriptException.cpp https://github.com/NativeScript/android/pull/2041/files#diff-93d70766ca3edeb71b49baba2158c55cc56fbd8a53a22f093384344d5a3cb0f3
NativeScriptException.h https://github.com/NativeScript/android/pull/2041/files#diff-3ceefb129128d9579e6732142d8954978878b0825420a7813462eafccacbfe9a
test-app/app/src/main/assets/app/mainpage.jshttps://github.com/NativeScript/android/pull/2041/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
View file https://github.com/NativeScript/android/blob/b35fd572cdfaac4a4bd2e4ffd46aaa586659e2b4/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/2041/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/2041/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
https://github.com/NativeScript/android/pull/2041/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
test-app/app/src/main/assets/app/tests/testWorkerOptions.jshttps://github.com/NativeScript/android/pull/2041/files#diff-7bdf28ec8fb0e607e04968d148050141cf8677bf235d4e0560aaf5958d2cf881
View file https://github.com/NativeScript/android/blob/b35fd572cdfaac4a4bd2e4ffd46aaa586659e2b4/test-app/app/src/main/assets/app/tests/testWorkerOptions.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/2041/{{ revealButtonHref }}
test-app/app/src/main/assets/app/tests/workerOptionsPriorityWorker.jshttps://github.com/NativeScript/android/pull/2041/files#diff-e67a457bf13c7263eb10a5e39739bb29178145179b855f766a2d3b240d4b3081
View file https://github.com/NativeScript/android/blob/b35fd572cdfaac4a4bd2e4ffd46aaa586659e2b4/test-app/app/src/main/assets/app/tests/workerOptionsPriorityWorker.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/2041/{{ revealButtonHref }}
Please reload this pagehttps://github.com/NativeScript/android/pull/2041/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.