Skip to content

Commit

Permalink
Bug 1624254 [wpt PR 22385] - HTML: use Wasm to get a SharedArrayBuffe…
Browse files Browse the repository at this point in the history
…r instance, a=testonly

Automatic update from web-platform-tests
HTML: use Wasm to get a SharedArrayBuffer instance

And verify that the SharedArrayBuffer constructor isn't exposed without COOP+COEP.

For web-platform-tests/wpt#22358.

--

wpt-commits: 288c95a86dd02d0fe28bbfd49a2ee0a7801faa43
wpt-pr: 22385

UltraBlame original commit: 149839b40bf29217aee70e9e6326568db5c2b926
  • Loading branch information
marco-c committed Apr 1, 2020
1 parent e96c485 commit a7d64fa
Show file tree
Hide file tree
Showing 5 changed files with 214 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,66 @@ test
=
>
{
assert_equals
(
globalThis
.
SharedArrayBuffer
undefined
)
;
assert_false
(
"
SharedArrayBuffer
"
in
globalThis
)
;
}
"
SharedArrayBuffer
constructor
does
not
exist
without
COOP
+
COEP
"
)
;
test
(
(
)
=
>
{
const
sab
=
new
SharedArrayBuffer
WebAssembly
.
Memory
(
{
shared
:
true
initial
:
1
maximum
:
1
}
)
.
buffer
;
const
channel
Expand Down Expand Up @@ -63,9 +116,24 @@ const
sab
=
new
SharedArrayBuffer
WebAssembly
.
Memory
(
{
shared
:
true
initial
:
1
maximum
:
1
}
)
.
buffer
;
const
channel
Expand Down Expand Up @@ -131,9 +199,24 @@ const
sab
=
new
SharedArrayBuffer
WebAssembly
.
Memory
(
{
shared
:
true
initial
:
1
maximum
:
1
}
)
.
buffer
;
assert_throws_dom
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,29 @@ key
}
)
;
const
sab
=
new
WebAssembly
.
Memory
(
{
shared
:
true
initial
:
1
maximum
:
1
}
)
.
buffer
;
assert_throws_dom
(
"
Expand All @@ -73,10 +96,7 @@ key
1
property
:
new
SharedArrayBuffer
(
)
sab
}
)
;
Expand Down Expand Up @@ -153,6 +173,29 @@ key
}
)
;
const
sab
=
new
WebAssembly
.
Memory
(
{
shared
:
true
initial
:
1
maximum
:
1
}
)
.
buffer
;
let
getter1Called
=
Expand Down Expand Up @@ -199,10 +242,7 @@ return
;
}
}
new
SharedArrayBuffer
(
)
sab
{
get
x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,29 @@ DataCloneError
=
>
{
const
sab
=
new
WebAssembly
.
Memory
(
{
shared
:
true
initial
:
1
maximum
:
1
}
)
.
buffer
;
new
Notification
(
Expand All @@ -31,10 +54,7 @@ Hi
{
data
:
new
SharedArrayBuffer
(
)
sab
}
)
;
Expand Down Expand Up @@ -65,6 +85,29 @@ test
=
>
{
const
sab
=
new
WebAssembly
.
Memory
(
{
shared
:
true
initial
:
1
maximum
:
1
}
)
.
buffer
;
let
getter1Called
=
Expand Down Expand Up @@ -112,10 +155,7 @@ return
;
}
}
new
SharedArrayBuffer
(
)
sab
{
get
x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,24 @@ const
sab
=
new
SharedArrayBuffer
WebAssembly
.
Memory
(
16
{
shared
:
true
initial
:
1
maximum
:
1
}
)
.
buffer
;
const
ta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,24 @@ const
sab
=
new
SharedArrayBuffer
WebAssembly
.
Memory
(
16
{
shared
:
true
initial
:
1
maximum
:
1
}
)
.
buffer
;
const
ta
Expand Down

0 comments on commit a7d64fa

Please sign in to comment.