kDefaultJsStackSize top-level property
Default QuickJS C-stack limit for all runtime construction paths.
It has to stay well below the OS thread stack, or the thread runs out of
stack before QuickJS reaches its own limit and can raise InternalError: stack overflow. Windows threads get 1 MiB by default, where a 1 MiB limit
never triggers and a deeply nested value (JSON.stringify on 20 000 levels,
for instance) takes the process down; Linux and Apple threads start at
8 MiB.
Implementation
final int kDefaultJsStackSize = Platform.isWindows
? 256 * 1024
: 1024 * 1024;