Very strange. In that case, what is the type of data.buffer?

The main SharedArrayBuffer is always created in the main thread during
startup. Later growth does not create a new SAB in another thread, it just
grows it, and it updates the views in each thread
using updateGlobalBufferAndViews. Regardless, the buffer of those views
must always be an SAB - if somehow it is just an AB, that would be a
serious browser bug (which is possible, of course).

On Mon, Jul 5, 2021 at 6:21 PM Dan C <danoveroc...@gmail.com> wrote:

> Hi everyone,
>
> In TextDecoderWrapper.decode
> <https://github.com/emscripten-core/emscripten/blob/667d416d84b33b5bdbf47de10a9780b85589117b/src/runtime_strings.js#L27>,
>  we
> currently have a checking whether the input buffer is an SharedArrayBuffer.
> After heap size is increased from INITIAL_MEMORY, "data.buffer instanceof
> SharedArrayBuffer" can evaluate to false when data is a view of the
> SharedArrayBuffer of the heap. I suspect this is because the new
> SharedArrayBuffer was created in a different thread.
>
> Thanks,
> Dan
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/c78e913e-7a0b-4fe3-9573-6e0300c5c2afn%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/c78e913e-7a0b-4fe3-9573-6e0300c5c2afn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpRc6S0WyutSscZREJbxXX%2BU6FhA-ZWeOJmVrepkJCeO1w%40mail.gmail.com.

Reply via email to