Re: TextDecoderWrapper doesn't always work

2021-07-07 Thread Dan C
The type of data.buffer is still SharedArrayBuffer, but "data.buffer 
instanceof SharedArrayBuffer" is false. Browser is Chrome 91.

P.S. I can't reproduce the issue today after update Chrome to 91.0.4472.124 
in Windows.

-- 
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/2031ffc3-145d-4041-946b-93298ad9dcc5n%40googlegroups.com.


Re: TextDecoderWrapper doesn't always work

2021-07-07 Thread Alon Zakai
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  wrote:

> Hi everyone,
>
> In TextDecoderWrapper.decode
> ,
>  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
> 
> .
>

-- 
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.