You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.
As far as I can tell, the nodejs vm (or vm2) does not use the ArrayBuffer or TypedDataView objects that are native to the VM's realm, causing things like v instanceof ArrayBuffer to "incorrectly" fail when running scripts in the VM.
To solve that, I'm currently converting responses to the correct type. On top of that, some functions return node's Buffer type, which we also have to convert.
I'm opening this issue because my solution sucks and it'd be much nicer if this data types correctly converted over.
(FWIW, I'm generally not pleased with having to run rollup on modules to produce a bundle because it fucks up stack traces. We might be able to solve that with some kind of source-map manipulation on stacks.)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
As far as I can tell, the nodejs vm (or vm2) does not use the ArrayBuffer or TypedDataView objects that are native to the VM's realm, causing things like
v instanceof ArrayBuffer
to "incorrectly" fail when running scripts in the VM.To solve that, I'm currently converting responses to the correct type. On top of that, some functions return node's Buffer type, which we also have to convert.
To do that, I'm injecting a frontmatter/preload into the VM scripts: https://github.com/beakerbrowser/bkr/blob/master/lib/run/preload.js
I'm opening this issue because my solution sucks and it'd be much nicer if this data types correctly converted over.
(FWIW, I'm generally not pleased with having to run rollup on modules to produce a bundle because it fucks up stack traces. We might be able to solve that with some kind of source-map manipulation on stacks.)
The text was updated successfully, but these errors were encountered: