How the limit is measured
The test is short: write a function that bumps a counter and then calls itself, let it recurse until it crashes, and record the counter. That final number is surprisingly specific. V8 (Chrome), SpiderMonkey (Firefox), and JavaScriptCore (Safari) each set aside stack space differently and enforce different ceilings, so the depth falls into a distinct range for each engine. The exact value also shifts with CPU architecture (x86-64 vs ARM64), the operating system (default stack sizes differ), and how much space each call uses - so probes fix the function's shape (the number of arguments and local variables) to keep results comparable across runs.
Because the number is produced by the engine actually executing real instructions, you cannot move it from JavaScript - there is no property to overwrite; the limit is simply where execution genuinely runs out of room.
Why it catches engine spoofing
The most powerful use is catching tools whose engine does not match their claimed browser. Camoufox is Firefox under the hood; if it presents a Chrome User-Agent, its recursion depth lands in the SpiderMonkey range rather than the V8 range - an immediate contradiction. The same goes for any "Chrome" that is really something else, or a JavaScript runtime pretending to be a browser. Measuring the depth in several places - the main thread, a Web Worker (a background JavaScript thread), and WebAssembly (WASM, a lower-level code format browsers can run) - adds even more resolution, because the ratios between those contexts are also engine-specific.
This is one of a family of engine-level probes (alongside Math precision and WASM measurements) that read the real implementation instead of the advertised one. Because the limit is set inside the engine, the value reported by a session is consistent only when the engine actually running matches the browser it identifies as - for example a Chrome-based engine reporting a Chrome User-Agent; the depth is determined at the C++ level and cannot be altered from JavaScript.
