fix(capture): retain Electron observations and HAR resource failures

This commit is contained in:
morluto
2026-10-09 06:49:02 +08:00
parent 6c13fc8e0a
commit 44fd18305f
27 changed files with 1462 additions and 145 deletions
+4 -2
View File
@@ -195,9 +195,11 @@ const createElectronActiveBoundaryPatches = ({
};
};
const patchSessionManager = (sessionModule) => {
const patchSessionManager = (sessionModule, app) => {
if (sessionModule === null || sessionModule === undefined) return;
patchSession(sessionModule.defaultSession);
if (app === undefined || app.isReady())
patchSession(sessionModule.defaultSession);
else app.once("ready", () => patchSession(sessionModule.defaultSession));
for (const method of ["fromPartition", "fromPath"]) {
const original = sessionModule[method];
if (typeof original !== "function") continue;