René's URL Explorer Experiment


Title: Node-API: async-work complete callback runs without an entered context · Issue #441 · NativeScript/ios · GitHub

Open Graph Title: Node-API: async-work complete callback runs without an entered context · Issue #441 · NativeScript/ios

X Title: Node-API: async-work complete callback runs without an entered context · Issue #441 · NativeScript/ios

Description: Found while porting #437 to Android (NativeScript/android#2004) by an independent review of the port; the defect is shared with the iOS original. CompleteAsyncWork in NativeScript/napi/NodeApiEmbed.mm calls env->CallIntoModule(...) with ...

Open Graph Description: Found while porting #437 to Android (NativeScript/android#2004) by an independent review of the port; the defect is shared with the iOS original. CompleteAsyncWork in NativeScript/napi/NodeApiEmbed...

X Description: Found while porting #437 to Android (NativeScript/android#2004) by an independent review of the port; the defect is shared with the iOS original. CompleteAsyncWork in NativeScript/napi/NodeApiEmbed...

Opengraph URL: https://github.com/NativeScript/ios/issues/441

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Node-API: async-work complete callback runs without an entered context","articleBody":"Found while porting #437 to Android (NativeScript/android#2004) by an independent review of the port; the defect is shared with the iOS original.\n\n`CompleteAsyncWork` in `NativeScript/napi/NodeApiEmbed.mm` calls `env->CallIntoModule(...)` with no `v8::Context::Scope` (and no `HandleScope` of its own) — the event-loop entry it runs in supplies only Locker + Isolate::Scope + HandleScope. Every sibling entry path opens the context scope itself (`NapiEnv::CallFinalizer`, the TSFN dispatch in `NapiThreadSafeFunction.mm`), but the async-work completion path does not.\n\nConsequences:\n\n- Node guarantees the `complete` callback runs with the env's context entered; addon code that touches the engine directly (or any napi call that reads `isolate->GetCurrentContext()`) observes an empty current context.\n- If the complete callback throws JS-side (e.g. the documented `napi_throw_error` failure-reporting pattern), the exception handler runs against an empty current context — on the Android port this was a null-deref/CHECK crash in the error reporter; the iOS reporter may or may not survive it, but the contract violation is the same.\n\nFix is the same one-liner the Android port applied in review: open `v8::HandleScope` + `v8::Context::Scope(env->context())` in `CompleteAsyncWork` before `CallIntoModule`, mirroring `NapiEnv::CallFinalizer`.\n\nAndroid-side fix: NativeScript/android#2004 (`CompleteAsyncWork` in `test-app/runtime/src/main/cpp/napi/NodeApiEmbed.cpp`).","author":{"url":"https://github.com/edusperoni","@type":"Person","name":"edusperoni"},"datePublished":"2026-08-13T17:14:06Z","url":"https://github.com/NativeScript/ios/issues/441"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8f2b21cc-a5d6-1f49-eefd-13f9c8e01b69
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB24E:DB09F:176F0E1:1DE8A51:6B0141F0
html-safe-nonce5ea8118e2406c9aae71c910ea061cf056bec905cda80aadaa3229c3ad7da3c27
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjRFOkRCMDlGOjE3NkYwRTE6MURFOEE1MTo2QjAxNDFGMCIsInZpc2l0b3JfaWQiOiI4MTM5MzQ4OTM0ODIxNzU3NDI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9132db12c8993836771fb4d700eccfe043d3a8c9e140f92a7822de57a639024d
hovercard-subject-tagissue:5143944258
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/ios/441/issue_layout
twitter:imagehttps://opengraph.githubassets.com/afcd297eb70c85463e7715ac943b36963d26a98c463b0fea10b9da3b3c576917/NativeScript/ios/issues/441
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/afcd297eb70c85463e7715ac943b36963d26a98c463b0fea10b9da3b3c576917/NativeScript/ios/issues/441
og:image:altFound while porting #437 to Android (NativeScript/android#2004) by an independent review of the port; the defect is shared with the iOS original. CompleteAsyncWork in NativeScript/napi/NodeApiEmbed...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameedusperoni
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/ios git https://github.com/NativeScript/ios.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id172934359
octolytics-dimension-repository_nwoNativeScript/ios
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id172934359
octolytics-dimension-repository_network_root_nwoNativeScript/ios
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
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
react-app-nameissues

Links:

Skip to contenthttps://github.com/NativeScript/ios/issues/441#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fios%2Fissues%2F441
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%2Fios%2Fissues%2F441
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2Fios
Reloadhttps://github.com/NativeScript/ios/issues/441
Reloadhttps://github.com/NativeScript/ios/issues/441
Reloadhttps://github.com/NativeScript/ios/issues/441
NativeScripthttps://github.com/NativeScript
ioshttps://github.com/NativeScript/ios
Codehttps://github.com/NativeScript/ios
Issues56 (56)https://github.com/NativeScript/ios/issues
Pull requests42 (42)https://github.com/NativeScript/ios/pulls
Actionshttps://github.com/NativeScript/ios/actions
Projectshttps://github.com/NativeScript/ios/projects
Security and qualityhttps://github.com/NativeScript/ios/security
Insightshttps://github.com/NativeScript/ios/insights
https://github.com/NativeScript/ios
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/ios/issues/441
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/ios/issues/441
Node-API: async-work complete callback runs without an entered contexthttps://github.com/NativeScript/ios/issues/441#top
https://github.com/edusperoni
edusperonihttps://github.com/edusperoni
on Aug 13, 2026https://github.com/NativeScript/ios/issues/441#issue-5143944258
#437https://github.com/NativeScript/ios/pull/437
NativeScript/android#2004https://github.com/NativeScript/android/pull/2004
NativeScript/android#2004https://github.com/NativeScript/android/pull/2004
edusperonihttps://github.com/edusperoni
on Aug 13, 2026https://github.com/NativeScript/ios/issues/441#event-29414383729
fix: address independent review findings for the Node-API surfacehttps://github.com/NativeScript/android/commit/e07a7a6bb99c1f7332f10fc8c63e24a44ca5d60d
e07a7a6https://github.com/NativeScript/android/commit/e07a7a6bb99c1f7332f10fc8c63e24a44ca5d60d
edusperonihttps://github.com/edusperoni
completedhttps://github.com/NativeScript/ios/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
3645898https://github.com/NativeScript/ios/commit/3645898b9a5e8b8cd7b34fa45c49a83555ddaaaf
on Aug 13, 2026https://github.com/NativeScript/ios/issues/441#event-29414918127
adrian-niculescuhttps://github.com/adrian-niculescu
on Aug 23, 2026https://github.com/NativeScript/ios/issues/441#event-29870147675
fix(napi): enter the env's context around async-work completionhttps://github.com/adrian-niculescu/NativeScript-iOS/commit/3645898b9a5e8b8cd7b34fa45c49a83555ddaaaf
https://docs.github.com/articles/closing-issues-via-commit-messages
3645898https://github.com/adrian-niculescu/NativeScript-iOS/commit/3645898b9a5e8b8cd7b34fa45c49a83555ddaaaf
Sign up for freehttps://github.com/signup?return_to=https://github.com/NativeScript/ios/issues/441
Sign in to commenthttps://github.com/login?return_to=https://github.com/NativeScript/ios/issues/441
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.