Misplaced/dead Windows code in `node.cc`?
In
| #if NODE_USE_V8_WASM_TRAP_HANDLER | |
| #if defined(_WIN32) | |
| { | |
| constexpr ULONG first = TRUE; | |
| per_process::old_vectored_exception_handler = | |
| AddVectoredExceptionHandler(first, TrapWebAssemblyOrContinue); | |
| } | |
| #else |
, we have Windows-specific code.
The problem is that this code is inside a #ifdef __POSIX__ section:
This seems to be unexpected dead code for Windows.
I found this from a compiler warning: src\node.cc(428,13): warning : unused function 'TrapWebAssemblyOrContinue' [-Wunused-function] [D:\Git\nodejs\node\libnode.vcxproj]