[browser][bindings] Fix error with SharedArrayBuffer when used as a backing view...
authorKenneth Pouncey <kjpou@pt.lu>
Fri, 8 Jan 2021 04:33:24 +0000 (05:33 +0100)
committerGitHub <noreply@github.com>
Fri, 8 Jan 2021 04:33:24 +0000 (05:33 +0100)
commitf3c6cb060954f928915bc83343838bbcdacaebf1
treed0f82fab98989015066e90e83cf5f24ac3057d29
parent1b1ff800dae81574d9ecea0d106df9c71a6733da
[browser][bindings] Fix error with SharedArrayBuffer when used as a backing view. (#46625)

* Add code to check for a backing ArrayBuffer as well as a backing SharedBuffer.

- Resolves the error `"Object '...' is not a typed array"`

* Add other Slice methods per documentation of JavaScript docs

- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/slice

* Add tests for SharedArrayBuffer.

* Address review comment about unused usings

* Address review comments.

* Address review comments for unnecessary mod in commit

* Add back whitespace

* Modify comment description as per review comment

* Address support for SharedArrayBuffer which fails under Firefox.

* Revert "Address support for SharedArrayBuffer which fails under Firefox."

This reverts commit f817638f897b2c558c49a80ac47f044683c58911.

* Address support for SharedArrayBuffer which fails under Firefox.  Without all the whitespace changes.
src/libraries/System.Private.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/SharedArrayBuffer.cs
src/libraries/System.Private.Runtime.InteropServices.JavaScript/tests/System.Private.Runtime.InteropServices.JavaScript.Tests.csproj
src/libraries/System.Private.Runtime.InteropServices.JavaScript/tests/System/Runtime/InteropServices/JavaScript/SharedArrayBufferTests.cs [new file with mode: 0644]
src/mono/wasm/runtime/binding_support.js