From 0abf5a412b6407bc3c5b82defdb02c688e17274f Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 1 Sep 2022 16:21:13 +0530 Subject: perf(ext/web): flatten op arguments for text_encoding (#15723) --- ext/web/08_text_encoding.js | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'ext/web/08_text_encoding.js') diff --git a/ext/web/08_text_encoding.js b/ext/web/08_text_encoding.js index 44087b1de..9e0c1f311 100644 --- a/ext/web/08_text_encoding.js +++ b/ext/web/08_text_encoding.js @@ -125,24 +125,22 @@ } if (!options.stream && this.#rid === null) { - return ops.op_encoding_decode_single(input, { - label: this.#encoding, - fatal: this.#fatal, - ignoreBom: this.#ignoreBOM, - }); + return ops.op_encoding_decode_single( + input, + this.#encoding, + this.#fatal, + this.#ignoreBOM, + ); } if (this.#rid === null) { - this.#rid = ops.op_encoding_new_decoder({ - label: this.#encoding, - fatal: this.#fatal, - ignoreBom: this.#ignoreBOM, - }); + this.#rid = ops.op_encoding_new_decoder( + this.#encoding, + this.#fatal, + this.#ignoreBOM, + ); } - return ops.op_encoding_decode(input, { - rid: this.#rid, - stream: options.stream, - }); + return ops.op_encoding_decode(input, this.#rid, options.stream); } finally { if (!options.stream && this.#rid !== null) { core.close(this.#rid); -- cgit v1.2.3