@@ -200,7 +200,7 @@ class Blob {
200200 const length = this [ kLength ] ;
201201 return {
202202 data : { handle, type, length } ,
203- deserializeInfo : 'internal/blob:ClonedBlob ' ,
203+ deserializeInfo : 'internal/blob:CloneableBlob ' ,
204204 } ;
205205 }
206206
@@ -397,25 +397,27 @@ class Blob {
397397 }
398398}
399399
400- function ClonedBlob ( ) {
401- return ReflectConstruct ( function ( ) {
400+ class CloneableBlob extends Blob {
401+ static {
402402 markTransferMode ( this , true , false ) ;
403- } , [ ] , Blob ) ;
403+ this [ kDeserialize ] = ( ) => { } ;
404+ }
404405}
405- ClonedBlob . prototype [ kDeserialize ] = ( ) => { } ;
406406
407- function TransferrableBlob ( handle , length , type = '' ) {
407+ CloneableBlob . prototype . constructor = Blob ;
408+
409+ function TransferableBlob ( handle , length , type = '' ) {
408410 markTransferMode ( this , true , false ) ;
409411 this [ kHandle ] = handle ;
410412 this [ kType ] = type ;
411413 this [ kLength ] = length ;
412414}
413415
414- ObjectSetPrototypeOf ( TransferrableBlob . prototype , Blob . prototype ) ;
415- ObjectSetPrototypeOf ( TransferrableBlob , Blob ) ;
416+ ObjectSetPrototypeOf ( TransferableBlob . prototype , Blob . prototype ) ;
417+ ObjectSetPrototypeOf ( TransferableBlob , Blob ) ;
416418
417419function createBlob ( handle , length , type = '' ) {
418- const transferredBlob = new TransferrableBlob ( handle , length , type ) ;
420+ const transferredBlob = new TransferableBlob ( handle , length , type ) ;
419421
420422 // Fix issues like: https://github.com/nodejs/node/pull/49730#discussion_r1331720053
421423 transferredBlob . constructor = Blob ;
@@ -489,7 +491,7 @@ function createBlobFromFilePath(path, options) {
489491
490492module . exports = {
491493 Blob,
492- ClonedBlob ,
494+ CloneableBlob ,
493495 createBlob,
494496 createBlobFromFilePath,
495497 isBlob,
0 commit comments