mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
Allow deno_buf with null alloc_ptr to be memcpy'd
This is a temporary hack to allow for easier restructuring of the serialization code as we move Flatbuffer stuff from C++ to Rust.
This commit is contained in:
parent
b87e6d5604
commit
b79ce93010
3 changed files with 49 additions and 6 deletions
|
@ -134,3 +134,14 @@ global.ErrorHandling = () => {
|
|||
};
|
||||
eval("\n\n notdefined()\n//# sourceURL=helloworld.js");
|
||||
};
|
||||
|
||||
global.SendNullAllocPtr = () => {
|
||||
deno.recv(msg => {
|
||||
assert(msg instanceof Uint8Array);
|
||||
assert(msg.byteLength === 4);
|
||||
assert(msg[0] === "a".charCodeAt(0));
|
||||
assert(msg[1] === "b".charCodeAt(0));
|
||||
assert(msg[2] === "c".charCodeAt(0));
|
||||
assert(msg[3] === "d".charCodeAt(0));
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue