diff options
Diffstat (limited to 'tests/wpt/web-platform-tests/common/sab.js')
-rw-r--r-- | tests/wpt/web-platform-tests/common/sab.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/wpt/web-platform-tests/common/sab.js b/tests/wpt/web-platform-tests/common/sab.js index 47d12970d39..a3ea610e165 100644 --- a/tests/wpt/web-platform-tests/common/sab.js +++ b/tests/wpt/web-platform-tests/common/sab.js @@ -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"); } |