cred: isolate scripts in WASI and move RSA signing to AWS-LC
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
|
||||
const u8 = new Uint8Array(1);
|
||||
u8[100] = 123; // Should not throw.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { assert, assertThrows } from "../assert.js";
|
||||
const ab = new ArrayBuffer(1);
|
||||
const u8 = new Uint8Array(ab);
|
||||
assert(!ab.detached);
|
||||
// Detach the ArrayBuffer.
|
||||
ab.transfer();
|
||||
assert(ab.detached);
|
||||
u8[100] = 123; // Doesn't throw.
|
||||
assertThrows(TypeError, () => Object.defineProperty(u8, "100", { value: 123 }));
|
||||
@@ -0,0 +1,7 @@
|
||||
import { assert, assertThrows } from "../assert.js";
|
||||
const ab = new ArrayBuffer(16, { maxByteLength: 32 });
|
||||
const u8 = new Uint8Array(ab, 16);
|
||||
ab.resize(8);
|
||||
assert(ab.byteLength, 8);
|
||||
u8[1] = 123; // Doesn't throw.
|
||||
assertThrows(TypeError, () => Object.defineProperty(u8, "1", { value: 123 }));
|
||||
Reference in New Issue
Block a user