mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Add {de}serialization steps for ArrayBuffers
This commit is contained in:
committed by
Andreas Kling
parent
a527f55768
commit
642802d339
Notes:
sideshowbarker
2024-07-17 07:08:37 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/642802d339 Pull-request: https://github.com/SerenityOS/serenity/pull/21039
@@ -10,6 +10,21 @@
|
||||
println(structuredClone(Date.UTC(2023, 7, 23)));
|
||||
println(structuredClone(/abc/gimsuy));
|
||||
|
||||
{
|
||||
let arrayBuffer = new ArrayBuffer(6);
|
||||
for (let i = 0; i < arrayBuffer.byteLength; ++i) {
|
||||
arrayBuffer[i] = i;
|
||||
}
|
||||
let arrayClone = structuredClone(arrayBuffer);
|
||||
for (let i = 0; i < arrayBuffer.byteLength; ++i) {
|
||||
if (arrayBuffer[i] !== arrayBuffer[i]) {
|
||||
println("FAILED");
|
||||
}
|
||||
}
|
||||
// FIXME: This should print something like ArrayBuffer { byteLength: 6 }
|
||||
println(arrayClone);
|
||||
}
|
||||
|
||||
try {
|
||||
structuredClone(Symbol("foo"));
|
||||
println("FAILED")
|
||||
|
||||
Reference in New Issue
Block a user