forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick bugfix for ReadableByteStream
- Loading branch information
1 parent
8c70a89
commit 259c1c8
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
var createBuiltin = $vm.createBuiltin; | ||
|
||
function shouldBe(actual, expected) { | ||
if (actual !== expected) | ||
throw new Error('bad value: ' + actual); | ||
} | ||
|
||
let list = [ | ||
"Int8Array", | ||
"Uint8Array", | ||
"Uint8ClampedArray", | ||
"Int16Array", | ||
"Uint16Array", | ||
"Int32Array", | ||
"Uint32Array", | ||
"Float32Array", | ||
"Float64Array", | ||
"BigInt64Array", | ||
"BigUint64Array", | ||
]; | ||
|
||
for (let constructorName of list) { | ||
let builtin = createBuiltin(`(function (a) { | ||
return @${constructorName}; | ||
})`); | ||
let constructor = builtin(); | ||
shouldBe(constructor.name, constructorName); | ||
shouldBe(constructor, globalThis[constructorName]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters