diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2023-05-01 12:47:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-01 10:47:13 +0000 |
commit | b31cf9fde6ad5398c20370c136695db77df6beeb (patch) | |
tree | 23ef5cd5d6e9342abefdc37332cc12d9bce3f245 /ext/web/14_compression.js | |
parent | d856bfd336137e1bcf81a0db9e8ad2b418ba711e (diff) |
refactor(webidl): move prefix & context out of converters options bag (#18931)
Diffstat (limited to 'ext/web/14_compression.js')
-rw-r--r-- | ext/web/14_compression.js | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/ext/web/14_compression.js b/ext/web/14_compression.js index 1731b3bf3..2ba7746bd 100644 --- a/ext/web/14_compression.js +++ b/ext/web/14_compression.js @@ -29,19 +29,13 @@ class CompressionStream { constructor(format) { const prefix = "Failed to construct 'CompressionStream'"; webidl.requiredArguments(arguments.length, 1, prefix); - format = webidl.converters.CompressionFormat(format, { - prefix, - context: "Argument 1", - }); + format = webidl.converters.CompressionFormat(format, prefix, "Argument 1"); const rid = ops.op_compression_new(format, false); this.#transform = new TransformStream({ transform(chunk, controller) { - chunk = webidl.converters.BufferSource(chunk, { - prefix, - context: "chunk", - }); + chunk = webidl.converters.BufferSource(chunk, prefix, "chunk"); const output = ops.op_compression_write( rid, chunk, @@ -77,19 +71,13 @@ class DecompressionStream { constructor(format) { const prefix = "Failed to construct 'DecompressionStream'"; webidl.requiredArguments(arguments.length, 1, prefix); - format = webidl.converters.CompressionFormat(format, { - prefix, - context: "Argument 1", - }); + format = webidl.converters.CompressionFormat(format, prefix, "Argument 1"); const rid = ops.op_compression_new(format, true); this.#transform = new TransformStream({ transform(chunk, controller) { - chunk = webidl.converters.BufferSource(chunk, { - prefix, - context: "chunk", - }); + chunk = webidl.converters.BufferSource(chunk, prefix, "chunk"); const output = ops.op_compression_write( rid, chunk, |