Skip to content

Commit 69cef00

Browse files
committed
DO NOT PUSH
1 parent ffe3d11 commit 69cef00

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

lib/zlib.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const {
3131
ObjectFreeze,
3232
ObjectKeys,
3333
ObjectSetPrototypeOf,
34+
FunctionPrototypeCall,
3435
Symbol,
3536
Uint32Array,
3637
} = primordials;
@@ -254,7 +255,7 @@ function ZlibBase(opts, mode, handle, { flush, finishFlush, fullFlush }) {
254255
}
255256
}
256257

257-
Transform.call(this, { autoDestroy: true, ...opts });
258+
FunctionPrototypeCall(Transform, this, { autoDestroy: true, ...opts });
258259
this[kError] = null;
259260
this.bytesWritten = 0;
260261
this._handle = handle;
@@ -680,7 +681,7 @@ function Zlib(opts, mode) {
680681
processCallback,
681682
dictionary);
682683

683-
ZlibBase.call(this, opts, mode, handle, zlibDefaultOpts);
684+
FunctionPrototypeCall(ZlibBase, this, opts, mode, handle, zlibDefaultOpts);
684685

685686
this._level = level;
686687
this._strategy = strategy;
@@ -723,7 +724,7 @@ function Deflate(opts) {
723724
if (!(this instanceof Deflate)) {
724725
return deprecateInstantiation(Deflate, 'DEP0184', opts);
725726
}
726-
Zlib.call(this, opts, DEFLATE);
727+
FunctionPrototypeCall(Zlib, this, opts, DEFLATE);
727728
}
728729
ObjectSetPrototypeOf(Deflate.prototype, Zlib.prototype);
729730
ObjectSetPrototypeOf(Deflate, Zlib);
@@ -732,7 +733,7 @@ function Inflate(opts) {
732733
if (!(this instanceof Inflate)) {
733734
return deprecateInstantiation(Inflate, 'DEP0184', opts);
734735
}
735-
Zlib.call(this, opts, INFLATE);
736+
FunctionPrototypeCall(Zlib, this, opts, INFLATE);
736737
}
737738
ObjectSetPrototypeOf(Inflate.prototype, Zlib.prototype);
738739
ObjectSetPrototypeOf(Inflate, Zlib);
@@ -741,7 +742,7 @@ function Gzip(opts) {
741742
if (!(this instanceof Gzip)) {
742743
return deprecateInstantiation(Gzip, 'DEP0184', opts);
743744
}
744-
Zlib.call(this, opts, GZIP);
745+
FunctionPrototypeCall(Zlib, this, opts, GZIP);
745746
}
746747
ObjectSetPrototypeOf(Gzip.prototype, Zlib.prototype);
747748
ObjectSetPrototypeOf(Gzip, Zlib);
@@ -750,7 +751,7 @@ function Gunzip(opts) {
750751
if (!(this instanceof Gunzip)) {
751752
return deprecateInstantiation(Gunzip, 'DEP0184', opts);
752753
}
753-
Zlib.call(this, opts, GUNZIP);
754+
FunctionPrototypeCall(Zlib, this, opts, GUNZIP);
754755
}
755756
ObjectSetPrototypeOf(Gunzip.prototype, Zlib.prototype);
756757
ObjectSetPrototypeOf(Gunzip, Zlib);
@@ -760,7 +761,7 @@ function DeflateRaw(opts) {
760761
if (!(this instanceof DeflateRaw)) {
761762
return deprecateInstantiation(DeflateRaw, 'DEP0184', opts);
762763
}
763-
Zlib.call(this, opts, DEFLATERAW);
764+
FunctionPrototypeCall(Zlib, this, opts, DEFLATERAW);
764765
}
765766
ObjectSetPrototypeOf(DeflateRaw.prototype, Zlib.prototype);
766767
ObjectSetPrototypeOf(DeflateRaw, Zlib);
@@ -769,7 +770,7 @@ function InflateRaw(opts) {
769770
if (!(this instanceof InflateRaw)) {
770771
return deprecateInstantiation(InflateRaw, 'DEP0184', opts);
771772
}
772-
Zlib.call(this, opts, INFLATERAW);
773+
FunctionPrototypeCall(Zlib, this, opts, INFLATERAW);
773774
}
774775
ObjectSetPrototypeOf(InflateRaw.prototype, Zlib.prototype);
775776
ObjectSetPrototypeOf(InflateRaw, Zlib);
@@ -778,7 +779,7 @@ function Unzip(opts) {
778779
if (!(this instanceof Unzip)) {
779780
return deprecateInstantiation(Unzip, 'DEP0184', opts);
780781
}
781-
Zlib.call(this, opts, UNZIP);
782+
FunctionPrototypeCall(Zlib, this, opts, UNZIP);
782783
}
783784
ObjectSetPrototypeOf(Unzip.prototype, Zlib.prototype);
784785
ObjectSetPrototypeOf(Unzip, Zlib);
@@ -836,7 +837,7 @@ function Brotli(opts, mode) {
836837
this._writeState = new Uint32Array(2);
837838
handle.init(brotliInitParamsArray, this._writeState, processCallback);
838839

839-
ZlibBase.call(this, opts, mode, handle, brotliDefaultOpts);
840+
FunctionPrototypeCall(ZlibBase, this, opts, mode, handle, brotliDefaultOpts);
840841
}
841842
ObjectSetPrototypeOf(Brotli.prototype, Zlib.prototype);
842843
ObjectSetPrototypeOf(Brotli, Zlib);
@@ -845,7 +846,7 @@ function BrotliCompress(opts) {
845846
if (!(this instanceof BrotliCompress)) {
846847
return deprecateInstantiation(BrotliCompress, 'DEP0184', opts);
847848
}
848-
Brotli.call(this, opts, BROTLI_ENCODE);
849+
FunctionPrototypeCall(Brotli, this, opts, BROTLI_ENCODE);
849850
}
850851
ObjectSetPrototypeOf(BrotliCompress.prototype, Brotli.prototype);
851852
ObjectSetPrototypeOf(BrotliCompress, Brotli);
@@ -854,7 +855,7 @@ function BrotliDecompress(opts) {
854855
if (!(this instanceof BrotliDecompress)) {
855856
return deprecateInstantiation(BrotliDecompress, 'DEP0184', opts);
856857
}
857-
Brotli.call(this, opts, BROTLI_DECODE);
858+
FunctionPrototypeCall(Brotli, this, opts, BROTLI_DECODE);
858859
}
859860
ObjectSetPrototypeOf(BrotliDecompress.prototype, Brotli.prototype);
860861
ObjectSetPrototypeOf(BrotliDecompress, Brotli);

0 commit comments

Comments
 (0)