Skip to content

Commit cedf51f

Browse files
aduh95danielleadams
authored andcommitted
http2: refactor to use more primordials
PR-URL: #36357 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent a15addc commit cedf51f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/internal/http2/core.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const {
88
ArrayPrototypeForEach,
99
ArrayPrototypePush,
1010
FunctionPrototypeBind,
11+
FunctionPrototypeCall,
1112
MathMin,
1213
ObjectAssign,
1314
ObjectCreate,
@@ -2136,7 +2137,7 @@ class Http2Stream extends Duplex {
21362137
this[kState].didRead = true;
21372138
}
21382139
if (!this.pending) {
2139-
ReflectApply(streamOnResume, this, []);
2140+
FunctionPrototypeCall(streamOnResume, this);
21402141
} else {
21412142
this.once('ready', streamOnResume);
21422143
}
@@ -2953,7 +2954,7 @@ function connectionListener(socket) {
29532954
if (options.allowHTTP1 === true) {
29542955
socket.server[kIncomingMessage] = options.Http1IncomingMessage;
29552956
socket.server[kServerResponse] = options.Http1ServerResponse;
2956-
return httpConnectionListener.call(this, socket);
2957+
return FunctionPrototypeCall(httpConnectionListener, this, socket);
29572958
}
29582959
// Let event handler deal with the socket
29592960
debug('Unknown protocol from %s:%s',

0 commit comments

Comments
 (0)