react-server-dom-webpack 19.2.0-canary-96c61b7f-20250709 → 19.2.0-canary-97cdd5d3-20250710

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.
@@ -1853,8 +1853,6 @@
1853
1853
  this._chunks = chunks;
1854
1854
  this._stringDecoder = new TextDecoder();
1855
1855
  this._fromJSON = null;
1856
- this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
1857
- this._buffer = [];
1858
1856
  this._closed = !1;
1859
1857
  this._closedReason = null;
1860
1858
  this._tempRefs = temporaryReferences;
@@ -1882,6 +1880,15 @@
1882
1880
  : debugChannelRegistry.register(this, debugChannel));
1883
1881
  this._fromJSON = createFromJSONCallback(this);
1884
1882
  }
1883
+ function createStreamState() {
1884
+ return {
1885
+ _rowState: 0,
1886
+ _rowID: 0,
1887
+ _rowTag: 0,
1888
+ _rowLength: 0,
1889
+ _buffer: []
1890
+ };
1891
+ }
1885
1892
  function resolveDebugHalt(response, id) {
1886
1893
  var chunks = response._chunks,
1887
1894
  chunk = chunks.get(id);
@@ -2657,6 +2664,96 @@
2657
2664
  : resolveModel(response, id, row);
2658
2665
  }
2659
2666
  }
2667
+ function processBinaryChunk(weakResponse, streamState, chunk) {
2668
+ if (void 0 !== weakResponse.weak.deref()) {
2669
+ var response = unwrapWeakResponse(weakResponse),
2670
+ i = 0,
2671
+ rowState = streamState._rowState;
2672
+ weakResponse = streamState._rowID;
2673
+ for (
2674
+ var rowTag = streamState._rowTag,
2675
+ rowLength = streamState._rowLength,
2676
+ buffer = streamState._buffer,
2677
+ chunkLength = chunk.length;
2678
+ i < chunkLength;
2679
+
2680
+ ) {
2681
+ var lastIdx = -1;
2682
+ switch (rowState) {
2683
+ case 0:
2684
+ lastIdx = chunk[i++];
2685
+ 58 === lastIdx
2686
+ ? (rowState = 1)
2687
+ : (weakResponse =
2688
+ (weakResponse << 4) |
2689
+ (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2690
+ continue;
2691
+ case 1:
2692
+ rowState = chunk[i];
2693
+ 84 === rowState ||
2694
+ 65 === rowState ||
2695
+ 79 === rowState ||
2696
+ 111 === rowState ||
2697
+ 85 === rowState ||
2698
+ 83 === rowState ||
2699
+ 115 === rowState ||
2700
+ 76 === rowState ||
2701
+ 108 === rowState ||
2702
+ 71 === rowState ||
2703
+ 103 === rowState ||
2704
+ 77 === rowState ||
2705
+ 109 === rowState ||
2706
+ 86 === rowState
2707
+ ? ((rowTag = rowState), (rowState = 2), i++)
2708
+ : (64 < rowState && 91 > rowState) ||
2709
+ 35 === rowState ||
2710
+ 114 === rowState ||
2711
+ 120 === rowState
2712
+ ? ((rowTag = rowState), (rowState = 3), i++)
2713
+ : ((rowTag = 0), (rowState = 3));
2714
+ continue;
2715
+ case 2:
2716
+ lastIdx = chunk[i++];
2717
+ 44 === lastIdx
2718
+ ? (rowState = 4)
2719
+ : (rowLength =
2720
+ (rowLength << 4) |
2721
+ (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2722
+ continue;
2723
+ case 3:
2724
+ lastIdx = chunk.indexOf(10, i);
2725
+ break;
2726
+ case 4:
2727
+ (lastIdx = i + rowLength),
2728
+ lastIdx > chunk.length && (lastIdx = -1);
2729
+ }
2730
+ var offset = chunk.byteOffset + i;
2731
+ if (-1 < lastIdx)
2732
+ (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
2733
+ processFullBinaryRow(
2734
+ response,
2735
+ weakResponse,
2736
+ rowTag,
2737
+ buffer,
2738
+ rowLength
2739
+ ),
2740
+ (i = lastIdx),
2741
+ 3 === rowState && i++,
2742
+ (rowLength = weakResponse = rowTag = rowState = 0),
2743
+ (buffer.length = 0);
2744
+ else {
2745
+ chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
2746
+ buffer.push(chunk);
2747
+ rowLength -= chunk.byteLength;
2748
+ break;
2749
+ }
2750
+ }
2751
+ streamState._rowState = rowState;
2752
+ streamState._rowID = weakResponse;
2753
+ streamState._rowTag = rowTag;
2754
+ streamState._rowLength = rowLength;
2755
+ }
2756
+ }
2660
2757
  function createFromJSONCallback(response) {
2661
2758
  return function (key, value) {
2662
2759
  if ("string" === typeof value)
@@ -2737,6 +2834,9 @@
2737
2834
  return value;
2738
2835
  };
2739
2836
  }
2837
+ function close(weakResponse) {
2838
+ reportGlobalError(weakResponse, Error("Connection closed."));
2839
+ }
2740
2840
  function createDebugCallbackFromWritableStream(debugWritable) {
2741
2841
  var textEncoder = new TextEncoder(),
2742
2842
  writer = debugWritable.getWriter();
@@ -2771,104 +2871,138 @@
2771
2871
  debugChannel
2772
2872
  )._weakResponse;
2773
2873
  }
2774
- function startReadingFromStream(response, stream) {
2874
+ function startReadingFromUniversalStream(response$jscomp$0, stream) {
2775
2875
  function progress(_ref) {
2776
2876
  var value = _ref.value;
2777
- if (_ref.done) reportGlobalError(response, Error("Connection closed."));
2877
+ if (_ref.done) close(response$jscomp$0);
2778
2878
  else {
2779
- if (void 0 !== response.weak.deref()) {
2780
- _ref = unwrapWeakResponse(response);
2781
- for (
2782
- var i = 0,
2783
- rowState = _ref._rowState,
2784
- rowID = _ref._rowID,
2785
- rowTag = _ref._rowTag,
2786
- rowLength = _ref._rowLength,
2787
- buffer = _ref._buffer,
2788
- chunkLength = value.length;
2789
- i < chunkLength;
2790
-
2879
+ if (value instanceof ArrayBuffer)
2880
+ processBinaryChunk(
2881
+ response$jscomp$0,
2882
+ streamState,
2883
+ new Uint8Array(value)
2884
+ );
2885
+ else if ("string" === typeof value) {
2886
+ if (
2887
+ ((_ref = streamState), void 0 !== response$jscomp$0.weak.deref())
2791
2888
  ) {
2792
- var lastIdx = -1;
2793
- switch (rowState) {
2794
- case 0:
2795
- lastIdx = value[i++];
2796
- 58 === lastIdx
2797
- ? (rowState = 1)
2798
- : (rowID =
2799
- (rowID << 4) |
2800
- (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2801
- continue;
2802
- case 1:
2803
- rowState = value[i];
2804
- 84 === rowState ||
2805
- 65 === rowState ||
2806
- 79 === rowState ||
2807
- 111 === rowState ||
2808
- 85 === rowState ||
2809
- 83 === rowState ||
2810
- 115 === rowState ||
2811
- 76 === rowState ||
2812
- 108 === rowState ||
2813
- 71 === rowState ||
2814
- 103 === rowState ||
2815
- 77 === rowState ||
2816
- 109 === rowState ||
2817
- 86 === rowState
2818
- ? ((rowTag = rowState), (rowState = 2), i++)
2819
- : (64 < rowState && 91 > rowState) ||
2820
- 35 === rowState ||
2821
- 114 === rowState ||
2822
- 120 === rowState
2823
- ? ((rowTag = rowState), (rowState = 3), i++)
2824
- : ((rowTag = 0), (rowState = 3));
2825
- continue;
2826
- case 2:
2827
- lastIdx = value[i++];
2828
- 44 === lastIdx
2829
- ? (rowState = 4)
2830
- : (rowLength =
2831
- (rowLength << 4) |
2832
- (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2833
- continue;
2834
- case 3:
2835
- lastIdx = value.indexOf(10, i);
2836
- break;
2837
- case 4:
2838
- (lastIdx = i + rowLength),
2839
- lastIdx > value.length && (lastIdx = -1);
2840
- }
2841
- var offset = value.byteOffset + i;
2842
- if (-1 < lastIdx)
2843
- (rowLength = new Uint8Array(value.buffer, offset, lastIdx - i)),
2844
- processFullBinaryRow(_ref, rowID, rowTag, buffer, rowLength),
2845
- (i = lastIdx),
2846
- 3 === rowState && i++,
2847
- (rowLength = rowID = rowTag = rowState = 0),
2848
- (buffer.length = 0);
2849
- else {
2850
- value = new Uint8Array(
2851
- value.buffer,
2852
- offset,
2853
- value.byteLength - i
2854
- );
2855
- buffer.push(value);
2856
- rowLength -= value.byteLength;
2857
- break;
2889
+ for (
2890
+ var response = unwrapWeakResponse(response$jscomp$0),
2891
+ i = 0,
2892
+ rowState = _ref._rowState,
2893
+ rowID = _ref._rowID,
2894
+ rowTag = _ref._rowTag,
2895
+ rowLength = _ref._rowLength,
2896
+ buffer = _ref._buffer,
2897
+ chunkLength = value.length;
2898
+ i < chunkLength;
2899
+
2900
+ ) {
2901
+ var lastIdx = -1;
2902
+ switch (rowState) {
2903
+ case 0:
2904
+ lastIdx = value.charCodeAt(i++);
2905
+ 58 === lastIdx
2906
+ ? (rowState = 1)
2907
+ : (rowID =
2908
+ (rowID << 4) |
2909
+ (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2910
+ continue;
2911
+ case 1:
2912
+ rowState = value.charCodeAt(i);
2913
+ 84 === rowState ||
2914
+ 65 === rowState ||
2915
+ 79 === rowState ||
2916
+ 111 === rowState ||
2917
+ 85 === rowState ||
2918
+ 83 === rowState ||
2919
+ 115 === rowState ||
2920
+ 76 === rowState ||
2921
+ 108 === rowState ||
2922
+ 71 === rowState ||
2923
+ 103 === rowState ||
2924
+ 77 === rowState ||
2925
+ 109 === rowState ||
2926
+ 86 === rowState
2927
+ ? ((rowTag = rowState), (rowState = 2), i++)
2928
+ : (64 < rowState && 91 > rowState) ||
2929
+ 114 === rowState ||
2930
+ 120 === rowState
2931
+ ? ((rowTag = rowState), (rowState = 3), i++)
2932
+ : ((rowTag = 0), (rowState = 3));
2933
+ continue;
2934
+ case 2:
2935
+ lastIdx = value.charCodeAt(i++);
2936
+ 44 === lastIdx
2937
+ ? (rowState = 4)
2938
+ : (rowLength =
2939
+ (rowLength << 4) |
2940
+ (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2941
+ continue;
2942
+ case 3:
2943
+ lastIdx = value.indexOf("\n", i);
2944
+ break;
2945
+ case 4:
2946
+ if (84 !== rowTag)
2947
+ throw Error(
2948
+ "Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams."
2949
+ );
2950
+ if (
2951
+ rowLength < value.length ||
2952
+ value.length > 3 * rowLength
2953
+ )
2954
+ throw Error(
2955
+ "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
2956
+ );
2957
+ lastIdx = value.length;
2958
+ }
2959
+ if (-1 < lastIdx) {
2960
+ if (0 < buffer.length)
2961
+ throw Error(
2962
+ "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
2963
+ );
2964
+ i = value.slice(i, lastIdx);
2965
+ processFullStringRow(response, rowID, rowTag, i);
2966
+ i = lastIdx;
2967
+ 3 === rowState && i++;
2968
+ rowLength = rowID = rowTag = rowState = 0;
2969
+ buffer.length = 0;
2970
+ } else if (value.length !== i)
2971
+ throw Error(
2972
+ "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
2973
+ );
2858
2974
  }
2975
+ _ref._rowState = rowState;
2976
+ _ref._rowID = rowID;
2977
+ _ref._rowTag = rowTag;
2978
+ _ref._rowLength = rowLength;
2859
2979
  }
2860
- _ref._rowState = rowState;
2861
- _ref._rowID = rowID;
2862
- _ref._rowTag = rowTag;
2863
- _ref._rowLength = rowLength;
2864
- }
2980
+ } else processBinaryChunk(response$jscomp$0, streamState, value);
2865
2981
  return reader.read().then(progress).catch(error);
2866
2982
  }
2867
2983
  }
2984
+ function error(e) {
2985
+ reportGlobalError(response$jscomp$0, e);
2986
+ }
2987
+ var streamState = createStreamState(),
2988
+ reader = stream.getReader();
2989
+ reader.read().then(progress).catch(error);
2990
+ }
2991
+ function startReadingFromStream(response, stream, isSecondaryStream) {
2992
+ function progress(_ref2) {
2993
+ var value = _ref2.value;
2994
+ if (_ref2.done) isSecondaryStream || close(response);
2995
+ else
2996
+ return (
2997
+ processBinaryChunk(response, streamState, value),
2998
+ reader.read().then(progress).catch(error)
2999
+ );
3000
+ }
2868
3001
  function error(e) {
2869
3002
  reportGlobalError(response, e);
2870
3003
  }
2871
- var reader = stream.getReader();
3004
+ var streamState = createStreamState(),
3005
+ reader = stream.getReader();
2872
3006
  reader.read().then(progress).catch(error);
2873
3007
  }
2874
3008
  var React = require("react"),
@@ -3064,10 +3198,10 @@
3064
3198
  return hook.checkDCE ? !0 : !1;
3065
3199
  })({
3066
3200
  bundleType: 1,
3067
- version: "19.2.0-canary-96c61b7f-20250709",
3201
+ version: "19.2.0-canary-97cdd5d3-20250710",
3068
3202
  rendererPackageName: "react-server-dom-webpack",
3069
3203
  currentDispatcherRef: ReactSharedInternals,
3070
- reconcilerVersion: "19.2.0-canary-96c61b7f-20250709",
3204
+ reconcilerVersion: "19.2.0-canary-97cdd5d3-20250710",
3071
3205
  getCurrentComponentInfo: function () {
3072
3206
  return currentOwnerInDEV;
3073
3207
  }
@@ -3076,7 +3210,13 @@
3076
3210
  var response = createResponseFromOptions(options);
3077
3211
  promiseForResponse.then(
3078
3212
  function (r) {
3079
- startReadingFromStream(response, r.body);
3213
+ options && options.debugChannel && options.debugChannel.readable
3214
+ ? (startReadingFromUniversalStream(
3215
+ response,
3216
+ options.debugChannel.readable
3217
+ ),
3218
+ startReadingFromStream(response, r.body, !0))
3219
+ : startReadingFromStream(response, r.body, !1);
3080
3220
  },
3081
3221
  function (e) {
3082
3222
  reportGlobalError(response, e);
@@ -3085,9 +3225,15 @@
3085
3225
  return getRoot(response);
3086
3226
  };
3087
3227
  exports.createFromReadableStream = function (stream, options) {
3088
- options = createResponseFromOptions(options);
3089
- startReadingFromStream(options, stream);
3090
- return getRoot(options);
3228
+ var response = createResponseFromOptions(options);
3229
+ options && options.debugChannel && options.debugChannel.readable
3230
+ ? (startReadingFromUniversalStream(
3231
+ response,
3232
+ options.debugChannel.readable
3233
+ ),
3234
+ startReadingFromStream(response, stream, !0))
3235
+ : startReadingFromStream(response, stream, !1);
3236
+ return getRoot(response);
3091
3237
  };
3092
3238
  exports.createServerReference = function (
3093
3239
  id,
@@ -1200,8 +1200,6 @@ function ResponseInstance(
1200
1200
  this._chunks = chunks;
1201
1201
  this._stringDecoder = new TextDecoder();
1202
1202
  this._fromJSON = null;
1203
- this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
1204
- this._buffer = [];
1205
1203
  this._closed = !1;
1206
1204
  this._closedReason = null;
1207
1205
  this._tempRefs = temporaryReferences;
@@ -1666,18 +1664,20 @@ function createResponseFromOptions(options) {
1666
1664
  : void 0
1667
1665
  );
1668
1666
  }
1669
- function startReadingFromStream(response, stream) {
1670
- function progress(_ref) {
1671
- var value = _ref.value;
1672
- if (_ref.done) reportGlobalError(response, Error("Connection closed."));
1667
+ function startReadingFromStream(response, stream, isSecondaryStream) {
1668
+ function progress(_ref2) {
1669
+ var value = _ref2.value;
1670
+ if (_ref2.done)
1671
+ isSecondaryStream ||
1672
+ reportGlobalError(response, Error("Connection closed."));
1673
1673
  else {
1674
1674
  var i = 0,
1675
- rowState = response._rowState;
1676
- _ref = response._rowID;
1675
+ rowState = streamState._rowState;
1676
+ _ref2 = streamState._rowID;
1677
1677
  for (
1678
- var rowTag = response._rowTag,
1679
- rowLength = response._rowLength,
1680
- buffer = response._buffer,
1678
+ var rowTag = streamState._rowTag,
1679
+ rowLength = streamState._rowLength,
1680
+ buffer = streamState._buffer,
1681
1681
  chunkLength = value.length;
1682
1682
  i < chunkLength;
1683
1683
 
@@ -1688,8 +1688,8 @@ function startReadingFromStream(response, stream) {
1688
1688
  lastIdx = value[i++];
1689
1689
  58 === lastIdx
1690
1690
  ? (rowState = 1)
1691
- : (_ref =
1692
- (_ref << 4) | (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
1691
+ : (_ref2 =
1692
+ (_ref2 << 4) | (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
1693
1693
  continue;
1694
1694
  case 1:
1695
1695
  rowState = value[i];
@@ -1732,10 +1732,10 @@ function startReadingFromStream(response, stream) {
1732
1732
  var offset = value.byteOffset + i;
1733
1733
  if (-1 < lastIdx)
1734
1734
  (rowLength = new Uint8Array(value.buffer, offset, lastIdx - i)),
1735
- processFullBinaryRow(response, _ref, rowTag, buffer, rowLength),
1735
+ processFullBinaryRow(response, _ref2, rowTag, buffer, rowLength),
1736
1736
  (i = lastIdx),
1737
1737
  3 === rowState && i++,
1738
- (rowLength = _ref = rowTag = rowState = 0),
1738
+ (rowLength = _ref2 = rowTag = rowState = 0),
1739
1739
  (buffer.length = 0);
1740
1740
  else {
1741
1741
  value = new Uint8Array(value.buffer, offset, value.byteLength - i);
@@ -1744,24 +1744,31 @@ function startReadingFromStream(response, stream) {
1744
1744
  break;
1745
1745
  }
1746
1746
  }
1747
- response._rowState = rowState;
1748
- response._rowID = _ref;
1749
- response._rowTag = rowTag;
1750
- response._rowLength = rowLength;
1747
+ streamState._rowState = rowState;
1748
+ streamState._rowID = _ref2;
1749
+ streamState._rowTag = rowTag;
1750
+ streamState._rowLength = rowLength;
1751
1751
  return reader.read().then(progress).catch(error);
1752
1752
  }
1753
1753
  }
1754
1754
  function error(e) {
1755
1755
  reportGlobalError(response, e);
1756
1756
  }
1757
- var reader = stream.getReader();
1757
+ var streamState = {
1758
+ _rowState: 0,
1759
+ _rowID: 0,
1760
+ _rowTag: 0,
1761
+ _rowLength: 0,
1762
+ _buffer: []
1763
+ },
1764
+ reader = stream.getReader();
1758
1765
  reader.read().then(progress).catch(error);
1759
1766
  }
1760
1767
  exports.createFromFetch = function (promiseForResponse, options) {
1761
1768
  var response = createResponseFromOptions(options);
1762
1769
  promiseForResponse.then(
1763
1770
  function (r) {
1764
- startReadingFromStream(response, r.body);
1771
+ startReadingFromStream(response, r.body, !1);
1765
1772
  },
1766
1773
  function (e) {
1767
1774
  reportGlobalError(response, e);
@@ -1771,7 +1778,7 @@ exports.createFromFetch = function (promiseForResponse, options) {
1771
1778
  };
1772
1779
  exports.createFromReadableStream = function (stream, options) {
1773
1780
  options = createResponseFromOptions(options);
1774
- startReadingFromStream(options, stream);
1781
+ startReadingFromStream(options, stream, !1);
1775
1782
  return getChunk(options, 0);
1776
1783
  };
1777
1784
  exports.createServerReference = function (id, callServer) {
@@ -2067,8 +2067,6 @@
2067
2067
  this._chunks = chunks;
2068
2068
  this._stringDecoder = new TextDecoder();
2069
2069
  this._fromJSON = null;
2070
- this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
2071
- this._buffer = [];
2072
2070
  this._closed = !1;
2073
2071
  this._closedReason = null;
2074
2072
  this._tempRefs = temporaryReferences;
@@ -2978,15 +2976,17 @@
2978
2976
  void 0
2979
2977
  )._weakResponse;
2980
2978
  }
2981
- function startReadingFromStream(response, stream) {
2979
+ function startReadingFromStream(response$jscomp$0, stream) {
2982
2980
  function progress(_ref) {
2983
2981
  var value = _ref.value;
2984
- if (_ref.done) reportGlobalError(response, Error("Connection closed."));
2982
+ if (_ref.done)
2983
+ reportGlobalError(response$jscomp$0, Error("Connection closed."));
2985
2984
  else {
2986
- if (void 0 !== response.weak.deref()) {
2987
- _ref = unwrapWeakResponse(response);
2985
+ _ref = streamState;
2986
+ if (void 0 !== response$jscomp$0.weak.deref()) {
2988
2987
  for (
2989
- var i = 0,
2988
+ var response = unwrapWeakResponse(response$jscomp$0),
2989
+ i = 0,
2990
2990
  rowState = _ref._rowState,
2991
2991
  rowID = _ref._rowID,
2992
2992
  rowTag = _ref._rowTag,
@@ -3048,7 +3048,13 @@
3048
3048
  var offset = value.byteOffset + i;
3049
3049
  if (-1 < lastIdx)
3050
3050
  (rowLength = new Uint8Array(value.buffer, offset, lastIdx - i)),
3051
- processFullBinaryRow(_ref, rowID, rowTag, buffer, rowLength),
3051
+ processFullBinaryRow(
3052
+ response,
3053
+ rowID,
3054
+ rowTag,
3055
+ buffer,
3056
+ rowLength
3057
+ ),
3052
3058
  (i = lastIdx),
3053
3059
  3 === rowState && i++,
3054
3060
  (rowLength = rowID = rowTag = rowState = 0),
@@ -3073,9 +3079,16 @@
3073
3079
  }
3074
3080
  }
3075
3081
  function error(e) {
3076
- reportGlobalError(response, e);
3082
+ reportGlobalError(response$jscomp$0, e);
3077
3083
  }
3078
- var reader = stream.getReader();
3084
+ var streamState = {
3085
+ _rowState: 0,
3086
+ _rowID: 0,
3087
+ _rowTag: 0,
3088
+ _rowLength: 0,
3089
+ _buffer: []
3090
+ },
3091
+ reader = stream.getReader();
3079
3092
  reader.read().then(progress).catch(error);
3080
3093
  }
3081
3094
  var ReactDOM = require("react-dom"),
@@ -1375,8 +1375,6 @@ function ResponseInstance(
1375
1375
  this._chunks = chunks;
1376
1376
  this._stringDecoder = new TextDecoder();
1377
1377
  this._fromJSON = null;
1378
- this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
1379
- this._buffer = [];
1380
1378
  this._closed = !1;
1381
1379
  this._closedReason = null;
1382
1380
  this._tempRefs = temporaryReferences;
@@ -1857,12 +1855,12 @@ function startReadingFromStream(response, stream) {
1857
1855
  if (_ref.done) reportGlobalError(response, Error("Connection closed."));
1858
1856
  else {
1859
1857
  var i = 0,
1860
- rowState = response._rowState;
1861
- _ref = response._rowID;
1858
+ rowState = streamState._rowState;
1859
+ _ref = streamState._rowID;
1862
1860
  for (
1863
- var rowTag = response._rowTag,
1864
- rowLength = response._rowLength,
1865
- buffer = response._buffer,
1861
+ var rowTag = streamState._rowTag,
1862
+ rowLength = streamState._rowLength,
1863
+ buffer = streamState._buffer,
1866
1864
  chunkLength = value.length;
1867
1865
  i < chunkLength;
1868
1866
 
@@ -1929,17 +1927,24 @@ function startReadingFromStream(response, stream) {
1929
1927
  break;
1930
1928
  }
1931
1929
  }
1932
- response._rowState = rowState;
1933
- response._rowID = _ref;
1934
- response._rowTag = rowTag;
1935
- response._rowLength = rowLength;
1930
+ streamState._rowState = rowState;
1931
+ streamState._rowID = _ref;
1932
+ streamState._rowTag = rowTag;
1933
+ streamState._rowLength = rowLength;
1936
1934
  return reader.read().then(progress).catch(error);
1937
1935
  }
1938
1936
  }
1939
1937
  function error(e) {
1940
1938
  reportGlobalError(response, e);
1941
1939
  }
1942
- var reader = stream.getReader();
1940
+ var streamState = {
1941
+ _rowState: 0,
1942
+ _rowID: 0,
1943
+ _rowTag: 0,
1944
+ _rowLength: 0,
1945
+ _buffer: []
1946
+ },
1947
+ reader = stream.getReader();
1943
1948
  reader.read().then(progress).catch(error);
1944
1949
  }
1945
1950
  exports.createFromFetch = function (promiseForResponse, options) {