Example on GitHub
Runnable example for CPU and memory limits.
Runnable example
CPU time limit
Set a CPU time budget in milliseconds. When exceeded, the execution exits with code124.
Memory limit
Cap isolate memory in MB. Default is128.
Payload limits
The bridge enforces size limits on data crossing the isolate boundary. Oversized payloads are rejected withERR_SANDBOX_PAYLOAD_TOO_LARGE instead of exhausting host memory.
Timing mitigation
High-resolution timers are frozen by default to mitigate timing side-channel attacks."freeze" mode:
Date.now()andperformance.now()return frozen values within an executionprocess.hrtime()andprocess.uptime()follow the hardened pathSharedArrayBufferis unavailable