I did some more experiments and it turns out that freezing all globals
breaks quite a bit of code since the semantics for property assignment
change. For example, the following pattern wouldn't work anymore if
Error.prototype is frozen:
function MyError(e) {}
MyError.prototype = new Error
I had another thought about re-using contexts. If there was a way to freeze
the global object (make it and all its child objects read-only), would that
be enough to guarantee a predictable state per request? I realize that this
probably would break some libraries, but I'd like to explore it
On Mon, Nov 29, 2021 at 5:07 PM Maik Riechert
wrote:
> Hi all,
>
> The CCF project (https://github.com/microsoft/CCF) is evaluating to use
> V8 as JavaScript engine (currently QuickJS) for handling HTTP requests.
>
> One of the requirements we have is that each request should get a fresh
>
Hi all,
The CCF project (https://github.com/microsoft/CCF) is evaluating to use V8
as JavaScript engine (currently QuickJS) for handling HTTP requests.
One of the requirements we have is that each request should get a fresh
environment. In QuickJS, we simply create a new runtime for each