src: fix unhandled error in structuredClone

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54764
Fixes: https://github.com/nodejs/node/issues/54602
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Daeyeon Jeong authored and GitHub committed 2024-09-07 23:05:00 +00:00
1 parent 46c6f8ce26
commit eab9729d16
2 files changed
+6 -1

No files matched your search

@@ -26,3 +26,6 @@ assert.strictEqual(structuredClone(undefined, { }), undefined);
assert.deepStrictEqual(cloned, {});
}
const blob = new Blob();
assert.throws(() => structuredClone(blob, { transfer: [blob] }), { name: 'DataCloneError' });