mirror of
https://github.com/stablyai/orca.git
synced 2026-10-19 16:03:26 +00:00
test(terminal): always restore forced GC flag
This commit is contained in:
@@ -9,9 +9,12 @@ export function resolveForcedGc(): (() => void) | null {
|
||||
}
|
||||
try {
|
||||
setFlagsFromString('--expose-gc')
|
||||
const exposed = runInNewContext('gc') as unknown
|
||||
setFlagsFromString('--no-expose-gc')
|
||||
return typeof exposed === 'function' ? (exposed as () => void) : null
|
||||
try {
|
||||
const exposed = runInNewContext('gc') as unknown
|
||||
return typeof exposed === 'function' ? (exposed as () => void) : null
|
||||
} finally {
|
||||
setFlagsFromString('--no-expose-gc')
|
||||
}
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user