diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-09-01 16:21:13 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-01 16:21:13 +0530 |
commit | 0abf5a412b6407bc3c5b82defdb02c688e17274f (patch) | |
tree | 88bb55ebd85196fa3cb2e75f03c1ce0c6529eeb7 /ext/web/08_text_encoding.js | |
parent | 73b4597dec5b4dd27b64a6a117945ced99ffe6c6 (diff) |
perf(ext/web): flatten op arguments for text_encoding (#15723)
Diffstat (limited to 'ext/web/08_text_encoding.js')
-rw-r--r-- | ext/web/08_text_encoding.js | 26 |
1 files changed, 12 insertions, 14 deletions
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); |