Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe0f17c

Browse files
committed
net: use asserts in JS Socket Stream to catch races in future
PR-URL:nodejs/node#49400Reviewed-By: Matteo Collina <matteo.collina@gmail.com>Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parentc17ac8b commitbe0f17c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎graal-nodejs/lib/internal/js_stream_socket.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ class JSStreamSocket extends Socket {
149149
}
150150

151151
consthandle=this._handle;
152+
assert(handle!==null);
152153

153154
process.nextTick(()=>{
154155
// Ensure that write is dispatched asynchronously.
@@ -181,6 +182,8 @@ class JSStreamSocket extends Socket {
181182
}
182183

183184
consthandle=this._handle;
185+
assert(handle!==null);
186+
184187
constself=this;
185188

186189
letpending=bufs.length;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp