fix(session): track retained bundle cleanup dependencies

This commit is contained in:
morluto committed 2026-10-27 07:40:40 +08:00
1 parent e80fb638be
commit 6a9911ea77
4 files changed
+145 -12

No files matched your search

@@ -70,14 +70,16 @@ export const combineBundleResourceClients = (
closeAnalysisClient(artifactClient, "bundle-resources", options),
closeAnalysisClient(nativeClient, "bundle-resources", options),
]);
if (!artifact.ok && !native.ok)
return err(
analysisErrorWithCleanupFailure(
artifact.error,
native.error,
"close_binary",
),
if (!artifact.ok && !native.ok) {
const failure = analysisErrorWithCleanupFailure(
artifact.error,
native.error,
"close_binary",
);
if (artifact.error.cleanupIncomplete && native.error.cleanupIncomplete)
failure.bindCleanupDependencies([artifact.error, native.error]);
return err(failure);
}
if (!artifact.ok) return artifact;
if (!native.ok) return native;
return ok(null);