JIT compilation, or just-in-time compilation, is a browser performance technique that translates JavaScript into machine code while a page is running. Instead of interpreting every instruction slowly, the browser watches how code behaves and generates faster native code for common paths. This improves speed, but it also means the JavaScript engine is handling complex optimizations on untrusted webpage input.
In security terms, JIT code is high value because bugs in optimization, type tracking, or memory handling can lead to crashes, memory corruption, or sometimes code execution. Attackers often try to trigger these flaws with carefully crafted pages that stress the engine’s edge cases. Defenders care because patched engines, browser updates, and reduced JavaScript exposure can close the attack path. In hardened browsers, limiting JavaScript or keeping the engine current is a practical way to reduce risk from JIT-related vulnerabilities.


