mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
http2: refactor to use more primordials
PR-URL: https://github.com/nodejs/node/pull/36357 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
a15addc153
commit
cedf51f3ce
1 file changed
+3
-2
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user