Files
orca/config/scripts/native-build/windows/windows-process-tree-creation-time.cjs
Neil 9bd6272fdf refactor(tooling): organize build, CI, and test owners (#38130)
* refactor(tooling): organize test runtime and maintenance owners

* test(tooling): preserve relocated runtime fixture dependency edges

* refactor(tooling): preserve xterm routing owner checks

* ci(tooling): include routing owner in sparse checkout

* test(tooling): preserve copied workflow dependency closures

* fix(tooling): normalize hashed JSON assets in release parity

* fix(tooling): distinguish asset aliases from literal references

* fix(tooling): frame normalized asset reference payloads

* fix(tooling): normalize decoded JSON asset references

* refactor(tooling): organize build, CI and release owners

* fix(tooling): align moved generator and workflow path contracts

* fix(tooling): update generated plugin bundle owner banners

* test(tooling): create relocated mobile verifier fixture directories

* test(tooling): copy headless detector dependency closure

* test(tooling): align native batch policy fixtures with owner path

* fix(tooling): link moved reliability command to historical evidence

* fix(tooling): preserve nested sandbox owners and canonical guide source

* fix(tooling): target release version owners in checkout fixture
2026-11-04 21:08:19 -08:00

33 lines
1.2 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use strict'
// Tarball prebuilt shares build/Release path and loads under Node/Electron even when JS exposes CreationTime that binary ignores.
// Require patched addon’s supportedProcessDataFlags export as binary proof, shared by Node/Electron probes.
/** `ProcessDataFlags::CREATIONTIME` in src/process.h. */
const CREATION_TIME_FLAG = 4
function assertWindowsProcessTreeCreationTime({ module, platform = process.platform }) {
if (platform !== 'win32') {
return
}
const supported = module?.supportedProcessDataFlags
if (
typeof supported === 'number' &&
(supported & CREATION_TIME_FLAG) !== 0 &&
typeof module?.getProcessCreationTime === 'function'
) {
return
}
throw new Error(
[
'@vscode/windows-process-tree does not report CreationTime support with a synchronous identity getter',
`(supportedProcessDataFlags=${String(supported)}).`,
'This is an unpatched or older binary, so process identities or synchronous',
'profile-owner recovery are unavailable.',
'Rebuild it from source so config/patches/@vscode__windows-process-tree@0.8.0.patch applies.'
].join(' ')
)
}
module.exports = { assertWindowsProcessTreeCreationTime, CREATION_TIME_FLAG }