deno_core icon indicating copy to clipboard operation
deno_core copied to clipboard

If ordering of op init between snapshot and runtime differ, a very undescript error occurs

Open lucacasonato opened this issue 1 year ago • 0 comments

What happens is that ops are linked together in the wrong way, and then the wrong underlying op gets called for each JS side fn.

For example a sync op will just start calling the backing for a different async op, resulting in fun errors like TypeError: invalid promise id: expected type 'v8::data::Integer', got 'v8::data::Value'.

It'd be great to add a debug assertion to core to ensure that ops are loaded in the same order between snapshot and runtime.

lucacasonato avatar Apr 24 '23 11:04 lucacasonato