fix(browser): retain module resolver cleanup ownership
Serialize resolution with shutdown, retain the owned browser after close failures, and retry cleanup before another launch. Wire cleanup through the shared service and CLI/MCP lifecycles, preserving primary failures and completed native reports alongside cleanup diagnostics. Separate the browser resolution workflow from lifecycle ownership. Validation: seven resolver source tests, eleven application tests, MCP shutdown retry, public CLI parity, and full static/architecture checks passed. Real Chromium behavior remains unverified.
This commit is contained in:
@@ -216,6 +216,8 @@ export const createServer = (
|
||||
options.evmInterface ?? createEvmInterfaceService(environment);
|
||||
const webSourceLocation =
|
||||
options.webSourceLocation ?? createWebSourceLocationService(environment);
|
||||
const webModuleTrace =
|
||||
options.webModuleTrace ?? createWebModuleTraceService(environment);
|
||||
const javascriptRecovery =
|
||||
options.javascriptRecovery ?? createJavaScriptRecoveryProvider(environment);
|
||||
const artifactResources = new ArtifactResourceScope();
|
||||
@@ -228,6 +230,7 @@ export const createServer = (
|
||||
delivery,
|
||||
evmInterface,
|
||||
webSourceLocation,
|
||||
webModuleTrace,
|
||||
javascriptRecovery,
|
||||
};
|
||||
const startedAt = new Date().toISOString();
|
||||
@@ -257,6 +260,7 @@ export const createServer = (
|
||||
adbDevice.close(),
|
||||
evmInterface.close(),
|
||||
webSourceLocation.close(),
|
||||
webModuleTrace.close(),
|
||||
javascriptRecovery.close?.() ?? Promise.resolve(),
|
||||
artifactResources.close(),
|
||||
firmwareAnalysis.close(),
|
||||
|
||||
Reference in New Issue
Block a user