|
8 | 8 | ObjectDefineProperty,
|
9 | 9 | ObjectSetPrototypeOf,
|
10 | 10 | PromiseReject,
|
11 |
| - ReflectConstruct, |
12 | 11 | RegExpPrototypeExec,
|
13 | 12 | RegExpPrototypeSymbolReplace,
|
14 | 13 | StringPrototypeToLowerCase,
|
@@ -200,7 +199,7 @@ class Blob {
|
200 | 199 | const length = this[kLength];
|
201 | 200 | return {
|
202 | 201 | data: { handle, type, length },
|
203 |
| - deserializeInfo: 'internal/blob:ClonedBlob', |
| 202 | + deserializeInfo: 'internal/blob:Blob', |
204 | 203 | };
|
205 | 204 | }
|
206 | 205 |
|
@@ -397,25 +396,18 @@ class Blob {
|
397 | 396 | }
|
398 | 397 | }
|
399 | 398 |
|
400 |
| -function ClonedBlob() { |
401 |
| - return ReflectConstruct(function() { |
402 |
| - markTransferMode(this, true, false); |
403 |
| - }, [], Blob); |
404 |
| -} |
405 |
| -ClonedBlob.prototype[kDeserialize] = () => {}; |
406 |
| - |
407 |
| -function TransferrableBlob(handle, length, type = '') { |
| 399 | +function TransferableBlob(handle, length, type = '') { |
408 | 400 | markTransferMode(this, true, false);
|
409 | 401 | this[kHandle] = handle;
|
410 | 402 | this[kType] = type;
|
411 | 403 | this[kLength] = length;
|
412 | 404 | }
|
413 | 405 |
|
414 |
| -ObjectSetPrototypeOf(TransferrableBlob.prototype, Blob.prototype); |
415 |
| -ObjectSetPrototypeOf(TransferrableBlob, Blob); |
| 406 | +ObjectSetPrototypeOf(TransferableBlob.prototype, Blob.prototype); |
| 407 | +ObjectSetPrototypeOf(TransferableBlob, Blob); |
416 | 408 |
|
417 | 409 | function createBlob(handle, length, type = '') {
|
418 |
| - const transferredBlob = new TransferrableBlob(handle, length, type); |
| 410 | + const transferredBlob = new TransferableBlob(handle, length, type); |
419 | 411 |
|
420 | 412 | // Fix issues like: https://github.com/nodejs/node/pull/49730#discussion_r1331720053
|
421 | 413 | transferredBlob.constructor = Blob;
|
@@ -489,7 +481,6 @@ function createBlobFromFilePath(path, options) {
|
489 | 481 |
|
490 | 482 | module.exports = {
|
491 | 483 | Blob,
|
492 |
| - ClonedBlob, |
493 | 484 | createBlob,
|
494 | 485 | createBlobFromFilePath,
|
495 | 486 | isBlob,
|
|
0 commit comments