summaryrefslogtreecommitdiff
path: root/js/dispatch.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-08-16 11:05:24 -0400
committerRyan Dahl <ry@tinyclouds.org>2019-08-16 14:41:08 -0400
commit81f809f2a675ff4ff7f93231ca87a18cb5b4628e (patch)
tree09a8bd8eedc5b03a4399cdfac896b2d445ed8037 /js/dispatch.ts
parent52a66c2796f97f5a08d679389172c39c0652cb16 (diff)
Revert "Remove dead code: legacy read/write ops"
This is causing a segfault for unknown reasons - see #2787. This reverts commit 498f6ad431478f655b136782093e19e29248b24d.
Diffstat (limited to 'js/dispatch.ts')
-rw-r--r--js/dispatch.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/js/dispatch.ts b/js/dispatch.ts
index 6edd2981c..babea5739 100644
--- a/js/dispatch.ts
+++ b/js/dispatch.ts
@@ -32,13 +32,9 @@ function flatbufferRecordFromBuf(buf: Uint8Array): FlatbufferRecord {
}
export function handleAsyncMsgFromRust(opId: number, ui8: Uint8Array): void {
+ const buf32 = new Int32Array(ui8.buffer, ui8.byteOffset, ui8.byteLength / 4);
if (opId !== FLATBUFFER_OP_ID) {
// Fast and new
- const buf32 = new Int32Array(
- ui8.buffer,
- ui8.byteOffset,
- ui8.byteLength / 4
- );
const recordMin = recordFromBufMinimal(opId, buf32);
handleAsyncMsgFromRustMinimal(ui8, recordMin);
} else {