deno_core
deno_core copied to clipboard
WeakRef, FinalizationRegistry, and SharedArrayBuffer are not available during snapshotting
cc @bnoordhuis @piscisaureus
Not sure. How can I test?
FinalizationRegistry is not supposed to be used during snapshotting so perhaps that's why it's not visible.
SharedArrayBuffer won't be visible when --enable_sharedarraybuffer_per_context
is set but I don't think that's the case.
Add this to the top of 01_core.js
and compile:
if (typeof SharedArrayBuffer === "undefined") {
throw new TypeError("SharedArrayBuffer is not available");
}
FinalizationRegistry is not supposed to be used during snapshotting so perhaps that's why it's not visible.
I understand that it shouldn't be used, but I still need access to the prototype to be able to create primordials for it.
I just tried it and FinalizationRegistry and WeakRef are there, just not SharedArrayBuffer. I'll investigate that last one.
edit: interestingly, Atomics
is missing too.