mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Update web-platform-tests to revision b'5656a2f4653b5894c500b724778009ca9a26e48c'
This commit is contained in:
parent
cc6026d81e
commit
41d386c907
861 changed files with 3963 additions and 1531 deletions
|
@ -6,14 +6,14 @@ const createBuffer = (() => {
|
|||
} catch(e) {
|
||||
sabConstructor = null;
|
||||
}
|
||||
return (type, length) => {
|
||||
return (type, length, opts) => {
|
||||
if (type === "ArrayBuffer") {
|
||||
return new ArrayBuffer(length);
|
||||
return new ArrayBuffer(length, opts);
|
||||
} else if (type === "SharedArrayBuffer") {
|
||||
if (sabConstructor && sabConstructor.name !== "SharedArrayBuffer") {
|
||||
throw new Error("WebAssembly.Memory does not support shared:true");
|
||||
}
|
||||
return new sabConstructor(length);
|
||||
return new sabConstructor(length, opts);
|
||||
} else {
|
||||
throw new Error("type has to be ArrayBuffer or SharedArrayBuffer");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue