fix(javascript): retain bound intrinsic mutation effects

This commit is contained in:
morluto
2026-10-12 00:34:35 +08:00
parent b60248c462
commit 1e1a611012
5 changed files with 171 additions and 22 deletions
@@ -407,10 +407,14 @@ export function* classifyParsedJavaScriptElectronBindingsSteps(
if (kind === "opaque-call") return interop.opaqueMutationPath(root);
const exported = kind === "binding" ? undefined : rootExport(root);
return exported === undefined
? interop.intrinsicPath(root)
? (interop.intrinsicPath(root) ??
(kind === "member"
? interop.boundIntrinsic(root)?.path
: undefined))
: ["electron", ...exported];
},
interop.intrinsicInvocation,
interop.staticString,
interop.isFreshObject,
(node, path) => {
if (path[0] === "electron") writes.retain(path);