Skip to content

Commit

Permalink
http2: refactor to use more primordials
Browse files Browse the repository at this point in the history
PR-URL: #36357
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
aduh95 authored and jasnell committed Dec 7, 2020
1 parent 4027e36 commit b5bb094
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const {
ArrayPrototypeForEach,
ArrayPrototypePush,
FunctionPrototypeBind,
FunctionPrototypeCall,
MathMin,
ObjectAssign,
ObjectCreate,
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit b5bb094

Please sign in to comment.