web-streams-polyfill 3.3.1 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.3
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -11,11 +11,6 @@
11
11
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.WebStreamsPolyfill = {}));
12
12
  })(this, (function (exports) { 'use strict';
13
13
 
14
- /// <reference lib="es2015.symbol" />
15
- const SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ?
16
- Symbol :
17
- description => `Symbol(${description})`;
18
-
19
14
  function noop() {
20
15
  return undefined;
21
16
  }
@@ -208,11 +203,11 @@
208
203
  }
209
204
  }
210
205
 
211
- const AbortSteps = SymbolPolyfill('[[AbortSteps]]');
212
- const ErrorSteps = SymbolPolyfill('[[ErrorSteps]]');
213
- const CancelSteps = SymbolPolyfill('[[CancelSteps]]');
214
- const PullSteps = SymbolPolyfill('[[PullSteps]]');
215
- const ReleaseSteps = SymbolPolyfill('[[ReleaseSteps]]');
206
+ const AbortSteps = Symbol('[[AbortSteps]]');
207
+ const ErrorSteps = Symbol('[[ErrorSteps]]');
208
+ const CancelSteps = Symbol('[[CancelSteps]]');
209
+ const PullSteps = Symbol('[[PullSteps]]');
210
+ const ReleaseSteps = Symbol('[[ReleaseSteps]]');
216
211
 
217
212
  function ReadableStreamReaderGenericInitialize(reader, stream) {
218
213
  reader._ownerReadableStream = stream;
@@ -492,8 +487,8 @@
492
487
  setFunctionName(ReadableStreamDefaultReader.prototype.cancel, 'cancel');
493
488
  setFunctionName(ReadableStreamDefaultReader.prototype.read, 'read');
494
489
  setFunctionName(ReadableStreamDefaultReader.prototype.releaseLock, 'releaseLock');
495
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
496
- Object.defineProperty(ReadableStreamDefaultReader.prototype, SymbolPolyfill.toStringTag, {
490
+ if (typeof Symbol.toStringTag === 'symbol') {
491
+ Object.defineProperty(ReadableStreamDefaultReader.prototype, Symbol.toStringTag, {
497
492
  value: 'ReadableStreamDefaultReader',
498
493
  configurable: true
499
494
  });
@@ -538,144 +533,6 @@
538
533
  return new TypeError(`ReadableStreamDefaultReader.prototype.${name} can only be used on a ReadableStreamDefaultReader`);
539
534
  }
540
535
 
541
- /// <reference lib="es2018.asynciterable" />
542
- let AsyncIteratorPrototype;
543
- if (typeof SymbolPolyfill.asyncIterator === 'symbol') {
544
- // We're running inside a ES2018+ environment, but we're compiling to an older syntax.
545
- // We cannot access %AsyncIteratorPrototype% without non-ES2018 syntax, but we can re-create it.
546
- AsyncIteratorPrototype = {
547
- // 25.1.3.1 %AsyncIteratorPrototype% [ @@asyncIterator ] ( )
548
- // https://tc39.github.io/ecma262/#sec-asynciteratorprototype-asynciterator
549
- [SymbolPolyfill.asyncIterator]() {
550
- return this;
551
- }
552
- };
553
- Object.defineProperty(AsyncIteratorPrototype, SymbolPolyfill.asyncIterator, { enumerable: false });
554
- }
555
-
556
- /// <reference lib="es2018.asynciterable" />
557
- class ReadableStreamAsyncIteratorImpl {
558
- constructor(reader, preventCancel) {
559
- this._ongoingPromise = undefined;
560
- this._isFinished = false;
561
- this._reader = reader;
562
- this._preventCancel = preventCancel;
563
- }
564
- next() {
565
- const nextSteps = () => this._nextSteps();
566
- this._ongoingPromise = this._ongoingPromise ?
567
- transformPromiseWith(this._ongoingPromise, nextSteps, nextSteps) :
568
- nextSteps();
569
- return this._ongoingPromise;
570
- }
571
- return(value) {
572
- const returnSteps = () => this._returnSteps(value);
573
- return this._ongoingPromise ?
574
- transformPromiseWith(this._ongoingPromise, returnSteps, returnSteps) :
575
- returnSteps();
576
- }
577
- _nextSteps() {
578
- if (this._isFinished) {
579
- return Promise.resolve({ value: undefined, done: true });
580
- }
581
- const reader = this._reader;
582
- let resolvePromise;
583
- let rejectPromise;
584
- const promise = newPromise((resolve, reject) => {
585
- resolvePromise = resolve;
586
- rejectPromise = reject;
587
- });
588
- const readRequest = {
589
- _chunkSteps: chunk => {
590
- this._ongoingPromise = undefined;
591
- // This needs to be delayed by one microtask, otherwise we stop pulling too early which breaks a test.
592
- // FIXME Is this a bug in the specification, or in the test?
593
- _queueMicrotask(() => resolvePromise({ value: chunk, done: false }));
594
- },
595
- _closeSteps: () => {
596
- this._ongoingPromise = undefined;
597
- this._isFinished = true;
598
- ReadableStreamReaderGenericRelease(reader);
599
- resolvePromise({ value: undefined, done: true });
600
- },
601
- _errorSteps: reason => {
602
- this._ongoingPromise = undefined;
603
- this._isFinished = true;
604
- ReadableStreamReaderGenericRelease(reader);
605
- rejectPromise(reason);
606
- }
607
- };
608
- ReadableStreamDefaultReaderRead(reader, readRequest);
609
- return promise;
610
- }
611
- _returnSteps(value) {
612
- if (this._isFinished) {
613
- return Promise.resolve({ value, done: true });
614
- }
615
- this._isFinished = true;
616
- const reader = this._reader;
617
- if (!this._preventCancel) {
618
- const result = ReadableStreamReaderGenericCancel(reader, value);
619
- ReadableStreamReaderGenericRelease(reader);
620
- return transformPromiseWith(result, () => ({ value, done: true }));
621
- }
622
- ReadableStreamReaderGenericRelease(reader);
623
- return promiseResolvedWith({ value, done: true });
624
- }
625
- }
626
- const ReadableStreamAsyncIteratorPrototype = {
627
- next() {
628
- if (!IsReadableStreamAsyncIterator(this)) {
629
- return promiseRejectedWith(streamAsyncIteratorBrandCheckException('next'));
630
- }
631
- return this._asyncIteratorImpl.next();
632
- },
633
- return(value) {
634
- if (!IsReadableStreamAsyncIterator(this)) {
635
- return promiseRejectedWith(streamAsyncIteratorBrandCheckException('return'));
636
- }
637
- return this._asyncIteratorImpl.return(value);
638
- }
639
- };
640
- if (AsyncIteratorPrototype !== undefined) {
641
- Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype, AsyncIteratorPrototype);
642
- }
643
- // Abstract operations for the ReadableStream.
644
- function AcquireReadableStreamAsyncIterator(stream, preventCancel) {
645
- const reader = AcquireReadableStreamDefaultReader(stream);
646
- const impl = new ReadableStreamAsyncIteratorImpl(reader, preventCancel);
647
- const iterator = Object.create(ReadableStreamAsyncIteratorPrototype);
648
- iterator._asyncIteratorImpl = impl;
649
- return iterator;
650
- }
651
- function IsReadableStreamAsyncIterator(x) {
652
- if (!typeIsObject(x)) {
653
- return false;
654
- }
655
- if (!Object.prototype.hasOwnProperty.call(x, '_asyncIteratorImpl')) {
656
- return false;
657
- }
658
- try {
659
- // noinspection SuspiciousTypeOfGuard
660
- return x._asyncIteratorImpl instanceof
661
- ReadableStreamAsyncIteratorImpl;
662
- }
663
- catch (_a) {
664
- return false;
665
- }
666
- }
667
- // Helper functions for the ReadableStream.
668
- function streamAsyncIteratorBrandCheckException(name) {
669
- return new TypeError(`ReadableStreamAsyncIterator.${name} can only be used on a ReadableSteamAsyncIterator`);
670
- }
671
-
672
- /// <reference lib="es2015.core" />
673
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Polyfill
674
- const NumberIsNaN = Number.isNaN || function (x) {
675
- // eslint-disable-next-line no-self-compare
676
- return x !== x;
677
- };
678
-
679
536
  /******************************************************************************
680
537
  Copyright (c) Microsoft Corporation.
681
538
 
@@ -740,6 +597,7 @@
740
597
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
741
598
  };
742
599
 
600
+ var _a, _b, _c;
743
601
  function CreateArrayFromList(elements) {
744
602
  // We use arrays to represent lists, so this is basically a no-op.
745
603
  // Do a slice though just in case we happen to depend on the unique-ness.
@@ -797,7 +655,7 @@
797
655
  // we use yield* inside an async generator function to achieve the same result.
798
656
  // Wrap the sync iterator inside a sync iterable, so we can use it with yield*.
799
657
  const syncIterable = {
800
- [SymbolPolyfill.iterator]: () => syncIteratorRecord.iterator
658
+ [Symbol.iterator]: () => syncIteratorRecord.iterator
801
659
  };
802
660
  // Create an async generator function and immediately invoke it.
803
661
  const asyncIterator = (function () {
@@ -809,18 +667,20 @@
809
667
  const nextMethod = asyncIterator.next;
810
668
  return { iterator: asyncIterator, nextMethod, done: false };
811
669
  }
670
+ // Aligns with core-js/modules/es.symbol.async-iterator.js
671
+ const SymbolAsyncIterator = (_c = (_a = Symbol.asyncIterator) !== null && _a !== void 0 ? _a : (_b = Symbol.for) === null || _b === void 0 ? void 0 : _b.call(Symbol, 'Symbol.asyncIterator')) !== null && _c !== void 0 ? _c : '@@asyncIterator';
812
672
  function GetIterator(obj, hint = 'sync', method) {
813
673
  if (method === undefined) {
814
674
  if (hint === 'async') {
815
- method = GetMethod(obj, SymbolPolyfill.asyncIterator);
675
+ method = GetMethod(obj, SymbolAsyncIterator);
816
676
  if (method === undefined) {
817
- const syncMethod = GetMethod(obj, SymbolPolyfill.iterator);
677
+ const syncMethod = GetMethod(obj, Symbol.iterator);
818
678
  const syncIteratorRecord = GetIterator(obj, 'sync', syncMethod);
819
679
  return CreateAsyncFromSyncIterator(syncIteratorRecord);
820
680
  }
821
681
  }
822
682
  else {
823
- method = GetMethod(obj, SymbolPolyfill.iterator);
683
+ method = GetMethod(obj, Symbol.iterator);
824
684
  }
825
685
  }
826
686
  if (method === undefined) {
@@ -847,6 +707,138 @@
847
707
  return iterResult.value;
848
708
  }
849
709
 
710
+ /// <reference lib="es2018.asynciterable" />
711
+ // We cannot access %AsyncIteratorPrototype% without non-ES2018 syntax, but we can re-create it.
712
+ const AsyncIteratorPrototype = {
713
+ // 25.1.3.1 %AsyncIteratorPrototype% [ @@asyncIterator ] ( )
714
+ // https://tc39.github.io/ecma262/#sec-asynciteratorprototype-asynciterator
715
+ [SymbolAsyncIterator]() {
716
+ return this;
717
+ }
718
+ };
719
+ Object.defineProperty(AsyncIteratorPrototype, SymbolAsyncIterator, { enumerable: false });
720
+
721
+ /// <reference lib="es2018.asynciterable" />
722
+ class ReadableStreamAsyncIteratorImpl {
723
+ constructor(reader, preventCancel) {
724
+ this._ongoingPromise = undefined;
725
+ this._isFinished = false;
726
+ this._reader = reader;
727
+ this._preventCancel = preventCancel;
728
+ }
729
+ next() {
730
+ const nextSteps = () => this._nextSteps();
731
+ this._ongoingPromise = this._ongoingPromise ?
732
+ transformPromiseWith(this._ongoingPromise, nextSteps, nextSteps) :
733
+ nextSteps();
734
+ return this._ongoingPromise;
735
+ }
736
+ return(value) {
737
+ const returnSteps = () => this._returnSteps(value);
738
+ return this._ongoingPromise ?
739
+ transformPromiseWith(this._ongoingPromise, returnSteps, returnSteps) :
740
+ returnSteps();
741
+ }
742
+ _nextSteps() {
743
+ if (this._isFinished) {
744
+ return Promise.resolve({ value: undefined, done: true });
745
+ }
746
+ const reader = this._reader;
747
+ let resolvePromise;
748
+ let rejectPromise;
749
+ const promise = newPromise((resolve, reject) => {
750
+ resolvePromise = resolve;
751
+ rejectPromise = reject;
752
+ });
753
+ const readRequest = {
754
+ _chunkSteps: chunk => {
755
+ this._ongoingPromise = undefined;
756
+ // This needs to be delayed by one microtask, otherwise we stop pulling too early which breaks a test.
757
+ // FIXME Is this a bug in the specification, or in the test?
758
+ _queueMicrotask(() => resolvePromise({ value: chunk, done: false }));
759
+ },
760
+ _closeSteps: () => {
761
+ this._ongoingPromise = undefined;
762
+ this._isFinished = true;
763
+ ReadableStreamReaderGenericRelease(reader);
764
+ resolvePromise({ value: undefined, done: true });
765
+ },
766
+ _errorSteps: reason => {
767
+ this._ongoingPromise = undefined;
768
+ this._isFinished = true;
769
+ ReadableStreamReaderGenericRelease(reader);
770
+ rejectPromise(reason);
771
+ }
772
+ };
773
+ ReadableStreamDefaultReaderRead(reader, readRequest);
774
+ return promise;
775
+ }
776
+ _returnSteps(value) {
777
+ if (this._isFinished) {
778
+ return Promise.resolve({ value, done: true });
779
+ }
780
+ this._isFinished = true;
781
+ const reader = this._reader;
782
+ if (!this._preventCancel) {
783
+ const result = ReadableStreamReaderGenericCancel(reader, value);
784
+ ReadableStreamReaderGenericRelease(reader);
785
+ return transformPromiseWith(result, () => ({ value, done: true }));
786
+ }
787
+ ReadableStreamReaderGenericRelease(reader);
788
+ return promiseResolvedWith({ value, done: true });
789
+ }
790
+ }
791
+ const ReadableStreamAsyncIteratorPrototype = {
792
+ next() {
793
+ if (!IsReadableStreamAsyncIterator(this)) {
794
+ return promiseRejectedWith(streamAsyncIteratorBrandCheckException('next'));
795
+ }
796
+ return this._asyncIteratorImpl.next();
797
+ },
798
+ return(value) {
799
+ if (!IsReadableStreamAsyncIterator(this)) {
800
+ return promiseRejectedWith(streamAsyncIteratorBrandCheckException('return'));
801
+ }
802
+ return this._asyncIteratorImpl.return(value);
803
+ }
804
+ };
805
+ Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype, AsyncIteratorPrototype);
806
+ // Abstract operations for the ReadableStream.
807
+ function AcquireReadableStreamAsyncIterator(stream, preventCancel) {
808
+ const reader = AcquireReadableStreamDefaultReader(stream);
809
+ const impl = new ReadableStreamAsyncIteratorImpl(reader, preventCancel);
810
+ const iterator = Object.create(ReadableStreamAsyncIteratorPrototype);
811
+ iterator._asyncIteratorImpl = impl;
812
+ return iterator;
813
+ }
814
+ function IsReadableStreamAsyncIterator(x) {
815
+ if (!typeIsObject(x)) {
816
+ return false;
817
+ }
818
+ if (!Object.prototype.hasOwnProperty.call(x, '_asyncIteratorImpl')) {
819
+ return false;
820
+ }
821
+ try {
822
+ // noinspection SuspiciousTypeOfGuard
823
+ return x._asyncIteratorImpl instanceof
824
+ ReadableStreamAsyncIteratorImpl;
825
+ }
826
+ catch (_a) {
827
+ return false;
828
+ }
829
+ }
830
+ // Helper functions for the ReadableStream.
831
+ function streamAsyncIteratorBrandCheckException(name) {
832
+ return new TypeError(`ReadableStreamAsyncIterator.${name} can only be used on a ReadableSteamAsyncIterator`);
833
+ }
834
+
835
+ /// <reference lib="es2015.core" />
836
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Polyfill
837
+ const NumberIsNaN = Number.isNaN || function (x) {
838
+ // eslint-disable-next-line no-self-compare
839
+ return x !== x;
840
+ };
841
+
850
842
  function IsNonNegativeNumber(v) {
851
843
  if (typeof v !== 'number') {
852
844
  return false;
@@ -957,8 +949,8 @@
957
949
  });
958
950
  setFunctionName(ReadableStreamBYOBRequest.prototype.respond, 'respond');
959
951
  setFunctionName(ReadableStreamBYOBRequest.prototype.respondWithNewView, 'respondWithNewView');
960
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
961
- Object.defineProperty(ReadableStreamBYOBRequest.prototype, SymbolPolyfill.toStringTag, {
952
+ if (typeof Symbol.toStringTag === 'symbol') {
953
+ Object.defineProperty(ReadableStreamBYOBRequest.prototype, Symbol.toStringTag, {
962
954
  value: 'ReadableStreamBYOBRequest',
963
955
  configurable: true
964
956
  });
@@ -1101,8 +1093,8 @@
1101
1093
  setFunctionName(ReadableByteStreamController.prototype.close, 'close');
1102
1094
  setFunctionName(ReadableByteStreamController.prototype.enqueue, 'enqueue');
1103
1095
  setFunctionName(ReadableByteStreamController.prototype.error, 'error');
1104
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
1105
- Object.defineProperty(ReadableByteStreamController.prototype, SymbolPolyfill.toStringTag, {
1096
+ if (typeof Symbol.toStringTag === 'symbol') {
1097
+ Object.defineProperty(ReadableByteStreamController.prototype, Symbol.toStringTag, {
1106
1098
  value: 'ReadableByteStreamController',
1107
1099
  configurable: true
1108
1100
  });
@@ -1790,8 +1782,8 @@
1790
1782
  setFunctionName(ReadableStreamBYOBReader.prototype.cancel, 'cancel');
1791
1783
  setFunctionName(ReadableStreamBYOBReader.prototype.read, 'read');
1792
1784
  setFunctionName(ReadableStreamBYOBReader.prototype.releaseLock, 'releaseLock');
1793
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
1794
- Object.defineProperty(ReadableStreamBYOBReader.prototype, SymbolPolyfill.toStringTag, {
1785
+ if (typeof Symbol.toStringTag === 'symbol') {
1786
+ Object.defineProperty(ReadableStreamBYOBReader.prototype, Symbol.toStringTag, {
1795
1787
  value: 'ReadableStreamBYOBReader',
1796
1788
  configurable: true
1797
1789
  });
@@ -2031,8 +2023,8 @@
2031
2023
  setFunctionName(WritableStream.prototype.abort, 'abort');
2032
2024
  setFunctionName(WritableStream.prototype.close, 'close');
2033
2025
  setFunctionName(WritableStream.prototype.getWriter, 'getWriter');
2034
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
2035
- Object.defineProperty(WritableStream.prototype, SymbolPolyfill.toStringTag, {
2026
+ if (typeof Symbol.toStringTag === 'symbol') {
2027
+ Object.defineProperty(WritableStream.prototype, Symbol.toStringTag, {
2036
2028
  value: 'WritableStream',
2037
2029
  configurable: true
2038
2030
  });
@@ -2437,8 +2429,8 @@
2437
2429
  setFunctionName(WritableStreamDefaultWriter.prototype.close, 'close');
2438
2430
  setFunctionName(WritableStreamDefaultWriter.prototype.releaseLock, 'releaseLock');
2439
2431
  setFunctionName(WritableStreamDefaultWriter.prototype.write, 'write');
2440
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
2441
- Object.defineProperty(WritableStreamDefaultWriter.prototype, SymbolPolyfill.toStringTag, {
2432
+ if (typeof Symbol.toStringTag === 'symbol') {
2433
+ Object.defineProperty(WritableStreamDefaultWriter.prototype, Symbol.toStringTag, {
2442
2434
  value: 'WritableStreamDefaultWriter',
2443
2435
  configurable: true
2444
2436
  });
@@ -2604,8 +2596,8 @@
2604
2596
  signal: { enumerable: true },
2605
2597
  error: { enumerable: true }
2606
2598
  });
2607
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
2608
- Object.defineProperty(WritableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
2599
+ if (typeof Symbol.toStringTag === 'symbol') {
2600
+ Object.defineProperty(WritableStreamDefaultController.prototype, Symbol.toStringTag, {
2609
2601
  value: 'WritableStreamDefaultController',
2610
2602
  configurable: true
2611
2603
  });
@@ -3219,8 +3211,8 @@
3219
3211
  setFunctionName(ReadableStreamDefaultController.prototype.close, 'close');
3220
3212
  setFunctionName(ReadableStreamDefaultController.prototype.enqueue, 'enqueue');
3221
3213
  setFunctionName(ReadableStreamDefaultController.prototype.error, 'error');
3222
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
3223
- Object.defineProperty(ReadableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
3214
+ if (typeof Symbol.toStringTag === 'symbol') {
3215
+ Object.defineProperty(ReadableStreamDefaultController.prototype, Symbol.toStringTag, {
3224
3216
  value: 'ReadableStreamDefaultController',
3225
3217
  configurable: true
3226
3218
  });
@@ -4055,6 +4047,10 @@
4055
4047
  const options = convertIteratorOptions(rawOptions, 'First parameter');
4056
4048
  return AcquireReadableStreamAsyncIterator(this, options.preventCancel);
4057
4049
  }
4050
+ [SymbolAsyncIterator](options) {
4051
+ // Stub implementation, overridden below
4052
+ return this.values(options);
4053
+ }
4058
4054
  /**
4059
4055
  * Creates a new ReadableStream wrapping the provided iterable or async iterable.
4060
4056
  *
@@ -4084,19 +4080,17 @@
4084
4080
  setFunctionName(ReadableStream.prototype.pipeTo, 'pipeTo');
4085
4081
  setFunctionName(ReadableStream.prototype.tee, 'tee');
4086
4082
  setFunctionName(ReadableStream.prototype.values, 'values');
4087
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
4088
- Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.toStringTag, {
4083
+ if (typeof Symbol.toStringTag === 'symbol') {
4084
+ Object.defineProperty(ReadableStream.prototype, Symbol.toStringTag, {
4089
4085
  value: 'ReadableStream',
4090
4086
  configurable: true
4091
4087
  });
4092
4088
  }
4093
- if (typeof SymbolPolyfill.asyncIterator === 'symbol') {
4094
- Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.asyncIterator, {
4095
- value: ReadableStream.prototype.values,
4096
- writable: true,
4097
- configurable: true
4098
- });
4099
- }
4089
+ Object.defineProperty(ReadableStream.prototype, SymbolAsyncIterator, {
4090
+ value: ReadableStream.prototype.values,
4091
+ writable: true,
4092
+ configurable: true
4093
+ });
4100
4094
  // Abstract operations for the ReadableStream.
4101
4095
  // Throws if and only if startAlgorithm throws.
4102
4096
  function CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark = 1, sizeAlgorithm = () => 1) {
@@ -4239,8 +4233,8 @@
4239
4233
  highWaterMark: { enumerable: true },
4240
4234
  size: { enumerable: true }
4241
4235
  });
4242
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
4243
- Object.defineProperty(ByteLengthQueuingStrategy.prototype, SymbolPolyfill.toStringTag, {
4236
+ if (typeof Symbol.toStringTag === 'symbol') {
4237
+ Object.defineProperty(ByteLengthQueuingStrategy.prototype, Symbol.toStringTag, {
4244
4238
  value: 'ByteLengthQueuingStrategy',
4245
4239
  configurable: true
4246
4240
  });
@@ -4299,8 +4293,8 @@
4299
4293
  highWaterMark: { enumerable: true },
4300
4294
  size: { enumerable: true }
4301
4295
  });
4302
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
4303
- Object.defineProperty(CountQueuingStrategy.prototype, SymbolPolyfill.toStringTag, {
4296
+ if (typeof Symbol.toStringTag === 'symbol') {
4297
+ Object.defineProperty(CountQueuingStrategy.prototype, Symbol.toStringTag, {
4304
4298
  value: 'CountQueuingStrategy',
4305
4299
  configurable: true
4306
4300
  });
@@ -4424,8 +4418,8 @@
4424
4418
  readable: { enumerable: true },
4425
4419
  writable: { enumerable: true }
4426
4420
  });
4427
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
4428
- Object.defineProperty(TransformStream.prototype, SymbolPolyfill.toStringTag, {
4421
+ if (typeof Symbol.toStringTag === 'symbol') {
4422
+ Object.defineProperty(TransformStream.prototype, Symbol.toStringTag, {
4429
4423
  value: 'TransformStream',
4430
4424
  configurable: true
4431
4425
  });
@@ -4551,8 +4545,8 @@
4551
4545
  setFunctionName(TransformStreamDefaultController.prototype.enqueue, 'enqueue');
4552
4546
  setFunctionName(TransformStreamDefaultController.prototype.error, 'error');
4553
4547
  setFunctionName(TransformStreamDefaultController.prototype.terminate, 'terminate');
4554
- if (typeof SymbolPolyfill.toStringTag === 'symbol') {
4555
- Object.defineProperty(TransformStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
4548
+ if (typeof Symbol.toStringTag === 'symbol') {
4549
+ Object.defineProperty(TransformStreamDefaultController.prototype, Symbol.toStringTag, {
4556
4550
  value: 'TransformStreamDefaultController',
4557
4551
  configurable: true
4558
4552
  });