deno_core
deno_core copied to clipboard
If ordering of op init between snapshot and runtime differ, a very undescript error occurs
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.