Skip to content

Commit e96773b

Browse files
committed
test: add regression test for serdes readDouble()
Refs: #37978 PR-URL: #38121 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent ca13f7a commit e96773b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/parallel/test-v8-serdes.js

+7
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,10 @@ const hostObject = new (internalBinding('js_stream').JSStream)();
236236
/^TypeError: buffer must be a TypedArray or a DataView$/,
237237
);
238238
}
239+
240+
{
241+
// Regression test for https://github.com/nodejs/node/issues/37978
242+
assert.throws(() => {
243+
new v8.Deserializer(new v8.Serializer().releaseBuffer()).readDouble();
244+
}, /ReadDouble\(\) failed/);
245+
}

0 commit comments

Comments
 (0)