Skip to content

Commit

Permalink
about WebAssembly.Memory
Browse files Browse the repository at this point in the history
  • Loading branch information
oligamiq committed Sep 18, 2024
1 parent 81c6523 commit e5ca52a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wasi_farm/farm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export class WASIFarm {

this.fds = new_fds;

// WebAssembly.Memory can be used to create a SharedArrayBuffer, but it cannot be transferred by postMessage.
// Uncaught (in promise) DataCloneError:
// Failed to execute 'postMessage' on 'Worker':
// SharedArrayBuffer transfer requires self.crossOriginIsolated.
try {
new SharedArrayBuffer(4);
this.can_array_buffer = true;
Expand Down

0 comments on commit e5ca52a

Please sign in to comment.