Jsoo: postMessage, read back, conditions for safely doing so

Suppose we have two jsoo programs running and talking to each other via postMessage. (This could be two iframes or a index.html + a webworker).

Under what conditions, can we safetly postMessage an OCaml value and read it on the other side ?

Pre-emptive: “Why don’t you just use json” ? Answer: we have embedded typedArrayBuffers.

See this discussion.

1 Like
  1. Thanks; agreed, it’s basically the same question.

  2. Did you ever solve this ? It was not clear to me from the followups whether you solved it.

Yes, see this message. Basically I had a stub “nil” value against which I was physically testing. You can’t do that in this setting your “nil” will get different addresses in each “process”.

1 Like