mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
quic: fixes undefined handle in QuicStream kInspect
If the #handle is undefined and not QuicStream, while kInspect is called `DataViewPrototypeGetByteLength` will throw. Signed-off-by: Marten Richter <marten.richter@freenet.de> PR-URL: https://github.com/nodejs/node/pull/64170 Backport-PR-URL: https://github.com/nodejs/node/pull/64675 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Tim Perry <pimterry@gmail.com>
This commit is contained in:
1 parent
3dd04b3ec6
commit
bd477a3202
1 file changed
+2
-1
@@ -933,7 +933,8 @@ class QuicStreamState {
|
||||
}
|
||||
|
||||
[kInspect](depth, options) {
|
||||
if (DataViewPrototypeGetByteLength(this.#handle) === 0) {
|
||||
if (this.#handle === undefined ||
|
||||
DataViewPrototypeGetByteLength(this.#handle) === 0) {
|
||||
return 'QuicStreamState { <Closed> }';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user