diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index f685329574efe4..4fbee39c99ddf2 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -8,6 +8,7 @@ const { ArrayPrototypeForEach, ArrayPrototypePush, FunctionPrototypeBind, + FunctionPrototypeCall, MathMin, ObjectAssign, ObjectCreate, @@ -2136,7 +2137,7 @@ class Http2Stream extends Duplex { this[kState].didRead = true; } if (!this.pending) { - ReflectApply(streamOnResume, this, []); + FunctionPrototypeCall(streamOnResume, this); } else { this.once('ready', streamOnResume); } @@ -2953,7 +2954,7 @@ function connectionListener(socket) { if (options.allowHTTP1 === true) { socket.server[kIncomingMessage] = options.Http1IncomingMessage; socket.server[kServerResponse] = options.Http1ServerResponse; - return httpConnectionListener.call(this, socket); + return FunctionPrototypeCall(httpConnectionListener, this, socket); } // Let event handler deal with the socket debug('Unknown protocol from %s:%s',