Skip to content

Commit 2699fe4

Browse files
martenrichterrichardlau
authored andcommitted
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: #64170 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>
1 parent 0854482 commit 2699fe4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/internal/quic/state.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,8 @@ class QuicStreamState {
933933
}
934934

935935
[kInspect](depth, options) {
936-
if (DataViewPrototypeGetByteLength(this.#handle) === 0) {
936+
if (this.#handle === undefined ||
937+
DataViewPrototypeGetByteLength(this.#handle) === 0) {
937938
return 'QuicStreamState { <Closed> }';
938939
}
939940

0 commit comments

Comments
 (0)