From b31cf9fde6ad5398c20370c136695db77df6beeb Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Mon, 1 May 2023 12:47:13 +0200 Subject: refactor(webidl): move prefix & context out of converters options bag (#18931) --- ext/web/14_compression.js | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'ext/web/14_compression.js') 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, -- cgit v1.2.3