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.
- package/cjs/react-server-dom-webpack-client.browser.development.js +240 -94
- package/cjs/react-server-dom-webpack-client.browser.production.js +29 -22
- package/cjs/react-server-dom-webpack-client.edge.development.js +23 -10
- package/cjs/react-server-dom-webpack-client.edge.production.js +17 -12
- package/cjs/react-server-dom-webpack-client.node.development.js +53 -42
- package/cjs/react-server-dom-webpack-client.node.production.js +38 -35
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +53 -42
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +38 -35
- package/cjs/react-server-dom-webpack-server.browser.development.js +228 -141
- package/cjs/react-server-dom-webpack-server.browser.production.js +45 -45
- package/cjs/react-server-dom-webpack-server.edge.development.js +228 -141
- package/cjs/react-server-dom-webpack-server.edge.production.js +45 -45
- package/cjs/react-server-dom-webpack-server.node.development.js +287 -152
- package/cjs/react-server-dom-webpack-server.node.production.js +68 -69
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +287 -152
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +68 -69
- package/package.json +3 -3
@@ -70,6 +70,15 @@
|
|
70
70
|
}
|
71
71
|
return !0;
|
72
72
|
}
|
73
|
+
function completeWriting(destination) {
|
74
|
+
currentView &&
|
75
|
+
0 < writtenBytes &&
|
76
|
+
(destination.enqueue(
|
77
|
+
new Uint8Array(currentView.buffer, 0, writtenBytes)
|
78
|
+
),
|
79
|
+
(currentView = null),
|
80
|
+
(writtenBytes = 0));
|
81
|
+
}
|
73
82
|
function stringToChunk(content) {
|
74
83
|
return textEncoder.encode(content);
|
75
84
|
}
|
@@ -876,6 +885,7 @@
|
|
876
885
|
this.onFatalError = onFatalError;
|
877
886
|
this.pendingDebugChunks = 0;
|
878
887
|
this.completedDebugChunks = [];
|
888
|
+
this.debugDestination = null;
|
879
889
|
this.environmentName =
|
880
890
|
void 0 === environmentName
|
881
891
|
? function () {
|
@@ -1384,7 +1394,7 @@
|
|
1384
1394
|
var componentDebugID = task.id;
|
1385
1395
|
componentDebugInfo = Component.displayName || Component.name || "";
|
1386
1396
|
var componentEnv = (0, request.environmentName)();
|
1387
|
-
request.
|
1397
|
+
request.pendingChunks++;
|
1388
1398
|
componentDebugInfo = {
|
1389
1399
|
name: componentDebugInfo,
|
1390
1400
|
env: componentEnv,
|
@@ -2489,10 +2499,16 @@
|
|
2489
2499
|
request.completedDebugChunks.push(id);
|
2490
2500
|
}
|
2491
2501
|
function emitDebugChunk(request, id, debugInfo) {
|
2492
|
-
|
2493
|
-
|
2494
|
-
|
2495
|
-
|
2502
|
+
var json = serializeDebugModel(request, 500, debugInfo);
|
2503
|
+
null !== request.debugDestination
|
2504
|
+
? ((debugInfo = request.nextChunkId++),
|
2505
|
+
(json = debugInfo.toString(16) + ":" + json + "\n"),
|
2506
|
+
request.pendingDebugChunks++,
|
2507
|
+
request.completedDebugChunks.push(stringToChunk(json)),
|
2508
|
+
(id = id.toString(16) + ':D"$' + debugInfo.toString(16) + '"\n'),
|
2509
|
+
request.completedRegularChunks.push(stringToChunk(id)))
|
2510
|
+
: ((id = id.toString(16) + ":D" + json + "\n"),
|
2511
|
+
request.completedRegularChunks.push(stringToChunk(id)));
|
2496
2512
|
}
|
2497
2513
|
function outlineComponentInfo(request, componentInfo) {
|
2498
2514
|
if (!request.writtenDebugObjects.has(componentInfo)) {
|
@@ -2922,7 +2938,7 @@
|
|
2922
2938
|
if ("number" !== typeof info.time)
|
2923
2939
|
if ("string" === typeof info.name)
|
2924
2940
|
outlineComponentInfo(request$jscomp$1, info),
|
2925
|
-
request$jscomp$1.
|
2941
|
+
request$jscomp$1.pendingChunks++,
|
2926
2942
|
emitDebugChunk(request$jscomp$1, task, info);
|
2927
2943
|
else if (info.awaited) {
|
2928
2944
|
var ioInfo = info.awaited;
|
@@ -2981,11 +2997,11 @@
|
|
2981
2997
|
null != info.env && (ioInfo.env = info.env);
|
2982
2998
|
null != info.owner && (ioInfo.owner = info.owner);
|
2983
2999
|
null != request && (ioInfo.stack = request);
|
2984
|
-
request$jscomp$1.
|
3000
|
+
request$jscomp$1.pendingChunks++;
|
2985
3001
|
emitDebugChunk(request$jscomp$1, task, ioInfo);
|
2986
3002
|
}
|
2987
3003
|
} else
|
2988
|
-
request$jscomp$1.
|
3004
|
+
request$jscomp$1.pendingChunks++,
|
2989
3005
|
emitDebugChunk(request$jscomp$1, task, info);
|
2990
3006
|
}
|
2991
3007
|
}
|
@@ -3070,7 +3086,7 @@
|
|
3070
3086
|
task.implicitSlot = !1;
|
3071
3087
|
var currentEnv = (0, request.environmentName)();
|
3072
3088
|
currentEnv !== task.environmentName &&
|
3073
|
-
(request.
|
3089
|
+
(request.pendingChunks++,
|
3074
3090
|
emitDebugChunk(request, task.id, { env: currentEnv }));
|
3075
3091
|
if ("object" === typeof resolvedModel && null !== resolvedModel)
|
3076
3092
|
request.writtenObjects.set(
|
@@ -3135,8 +3151,7 @@
|
|
3135
3151
|
request.pingedTasks = [];
|
3136
3152
|
for (var i = 0; i < pingedTasks.length; i++)
|
3137
3153
|
retryTask(request, pingedTasks[i]);
|
3138
|
-
|
3139
|
-
flushCompletedChunks(request, request.destination);
|
3154
|
+
flushCompletedChunks(request);
|
3140
3155
|
} catch (error) {
|
3141
3156
|
logRecoverableError(request, error, null), fatalError(request, error);
|
3142
3157
|
} finally {
|
@@ -3160,86 +3175,130 @@
|
|
3160
3175
|
request.completedErrorChunks.push(task);
|
3161
3176
|
}
|
3162
3177
|
}
|
3163
|
-
function flushCompletedChunks(request
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
|
3169
|
-
|
3170
|
-
|
3171
|
-
|
3172
|
-
|
3173
|
-
|
3174
|
-
|
3175
|
-
|
3176
|
-
|
3177
|
-
|
3178
|
-
|
3179
|
-
|
3180
|
-
|
3181
|
-
|
3182
|
-
|
3183
|
-
|
3184
|
-
|
3185
|
-
|
3186
|
-
|
3187
|
-
|
3188
|
-
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3192
|
-
(
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
|
3203
|
-
|
3204
|
-
|
3205
|
-
)
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
3209
|
-
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3178
|
+
function flushCompletedChunks(request) {
|
3179
|
+
if (null !== request.debugDestination) {
|
3180
|
+
var debugDestination = request.debugDestination;
|
3181
|
+
currentView = new Uint8Array(2048);
|
3182
|
+
writtenBytes = 0;
|
3183
|
+
try {
|
3184
|
+
for (
|
3185
|
+
var debugChunks = request.completedDebugChunks, i = 0;
|
3186
|
+
i < debugChunks.length;
|
3187
|
+
i++
|
3188
|
+
)
|
3189
|
+
request.pendingDebugChunks--,
|
3190
|
+
writeChunkAndReturn(debugDestination, debugChunks[i]);
|
3191
|
+
debugChunks.splice(0, i);
|
3192
|
+
} finally {
|
3193
|
+
completeWriting(debugDestination);
|
3194
|
+
}
|
3195
|
+
}
|
3196
|
+
debugDestination = request.destination;
|
3197
|
+
if (null !== debugDestination) {
|
3198
|
+
currentView = new Uint8Array(2048);
|
3199
|
+
writtenBytes = 0;
|
3200
|
+
try {
|
3201
|
+
var importsChunks = request.completedImportChunks;
|
3202
|
+
for (
|
3203
|
+
debugChunks = 0;
|
3204
|
+
debugChunks < importsChunks.length;
|
3205
|
+
debugChunks++
|
3206
|
+
)
|
3207
|
+
if (
|
3208
|
+
(request.pendingChunks--,
|
3209
|
+
!writeChunkAndReturn(
|
3210
|
+
debugDestination,
|
3211
|
+
importsChunks[debugChunks]
|
3212
|
+
))
|
3213
|
+
) {
|
3214
|
+
request.destination = null;
|
3215
|
+
debugChunks++;
|
3216
|
+
break;
|
3217
|
+
}
|
3218
|
+
importsChunks.splice(0, debugChunks);
|
3219
|
+
var hintChunks = request.completedHintChunks;
|
3220
|
+
for (debugChunks = 0; debugChunks < hintChunks.length; debugChunks++)
|
3221
|
+
if (
|
3222
|
+
!writeChunkAndReturn(debugDestination, hintChunks[debugChunks])
|
3223
|
+
) {
|
3224
|
+
request.destination = null;
|
3225
|
+
debugChunks++;
|
3226
|
+
break;
|
3227
|
+
}
|
3228
|
+
hintChunks.splice(0, debugChunks);
|
3229
|
+
if (null === request.debugDestination) {
|
3230
|
+
var _debugChunks = request.completedDebugChunks;
|
3231
|
+
for (
|
3232
|
+
debugChunks = 0;
|
3233
|
+
debugChunks < _debugChunks.length;
|
3234
|
+
debugChunks++
|
3235
|
+
)
|
3236
|
+
if (
|
3237
|
+
(request.pendingDebugChunks--,
|
3238
|
+
!writeChunkAndReturn(
|
3239
|
+
debugDestination,
|
3240
|
+
_debugChunks[debugChunks]
|
3241
|
+
))
|
3242
|
+
) {
|
3243
|
+
request.destination = null;
|
3244
|
+
debugChunks++;
|
3245
|
+
break;
|
3246
|
+
}
|
3247
|
+
_debugChunks.splice(0, debugChunks);
|
3220
3248
|
}
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
|
3228
|
-
|
3229
|
-
|
3230
|
-
|
3249
|
+
var regularChunks = request.completedRegularChunks;
|
3250
|
+
for (
|
3251
|
+
debugChunks = 0;
|
3252
|
+
debugChunks < regularChunks.length;
|
3253
|
+
debugChunks++
|
3254
|
+
)
|
3255
|
+
if (
|
3256
|
+
(request.pendingChunks--,
|
3257
|
+
!writeChunkAndReturn(
|
3258
|
+
debugDestination,
|
3259
|
+
regularChunks[debugChunks]
|
3260
|
+
))
|
3261
|
+
) {
|
3262
|
+
request.destination = null;
|
3263
|
+
debugChunks++;
|
3264
|
+
break;
|
3265
|
+
}
|
3266
|
+
regularChunks.splice(0, debugChunks);
|
3267
|
+
var errorChunks = request.completedErrorChunks;
|
3268
|
+
for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++)
|
3269
|
+
if (
|
3270
|
+
(request.pendingChunks--,
|
3271
|
+
!writeChunkAndReturn(debugDestination, errorChunks[debugChunks]))
|
3272
|
+
) {
|
3273
|
+
request.destination = null;
|
3274
|
+
debugChunks++;
|
3275
|
+
break;
|
3276
|
+
}
|
3277
|
+
errorChunks.splice(0, debugChunks);
|
3278
|
+
} finally {
|
3279
|
+
(request.flushScheduled = !1), completeWriting(debugDestination);
|
3280
|
+
}
|
3231
3281
|
}
|
3232
3282
|
0 === request.pendingChunks &&
|
3233
|
-
|
3234
|
-
|
3235
|
-
|
3236
|
-
|
3237
|
-
|
3238
|
-
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3283
|
+
((importsChunks = request.debugDestination),
|
3284
|
+
0 === request.pendingDebugChunks
|
3285
|
+
? (null !== importsChunks &&
|
3286
|
+
(importsChunks.close(), (request.debugDestination = null)),
|
3287
|
+
request.status < ABORTING &&
|
3288
|
+
request.cacheController.abort(
|
3289
|
+
Error(
|
3290
|
+
"This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources."
|
3291
|
+
)
|
3292
|
+
),
|
3293
|
+
(request.status = CLOSED),
|
3294
|
+
null !== request.destination &&
|
3295
|
+
(request.destination.close(), (request.destination = null)),
|
3296
|
+
null !== request.debugDestination &&
|
3297
|
+
(request.debugDestination.close(),
|
3298
|
+
(request.debugDestination = null)))
|
3299
|
+
: null !== importsChunks &&
|
3300
|
+
null !== request.destination &&
|
3301
|
+
(request.destination.close(), (request.destination = null)));
|
3243
3302
|
}
|
3244
3303
|
function startWork(request) {
|
3245
3304
|
request.flushScheduled = null !== request.destination;
|
@@ -3251,14 +3310,13 @@
|
|
3251
3310
|
});
|
3252
3311
|
}
|
3253
3312
|
function enqueueFlush(request) {
|
3254
|
-
!1
|
3255
|
-
0
|
3256
|
-
null
|
3313
|
+
!1 !== request.flushScheduled ||
|
3314
|
+
0 !== request.pingedTasks.length ||
|
3315
|
+
(null === request.destination && null === request.debugDestination) ||
|
3257
3316
|
((request.flushScheduled = !0),
|
3258
3317
|
scheduleWork(function () {
|
3259
3318
|
request.flushScheduled = !1;
|
3260
|
-
|
3261
|
-
destination && flushCompletedChunks(request, destination);
|
3319
|
+
flushCompletedChunks(request);
|
3262
3320
|
}));
|
3263
3321
|
}
|
3264
3322
|
function callOnAllReadyIfReady(request) {
|
@@ -3272,7 +3330,7 @@
|
|
3272
3330
|
else if (request.status !== CLOSED && null === request.destination) {
|
3273
3331
|
request.destination = destination;
|
3274
3332
|
try {
|
3275
|
-
flushCompletedChunks(request
|
3333
|
+
flushCompletedChunks(request);
|
3276
3334
|
} catch (error) {
|
3277
3335
|
logRecoverableError(request, error, null), fatalError(request, error);
|
3278
3336
|
}
|
@@ -3285,8 +3343,7 @@
|
|
3285
3343
|
});
|
3286
3344
|
var onAllReady = request.onAllReady;
|
3287
3345
|
onAllReady();
|
3288
|
-
|
3289
|
-
flushCompletedChunks(request, request.destination);
|
3346
|
+
flushCompletedChunks(request);
|
3290
3347
|
} catch (error) {
|
3291
3348
|
logRecoverableError(request, error, null), fatalError(request, error);
|
3292
3349
|
}
|
@@ -3324,8 +3381,7 @@
|
|
3324
3381
|
} else {
|
3325
3382
|
var onAllReady = request.onAllReady;
|
3326
3383
|
onAllReady();
|
3327
|
-
|
3328
|
-
flushCompletedChunks(request, request.destination);
|
3384
|
+
flushCompletedChunks(request);
|
3329
3385
|
}
|
3330
3386
|
} catch (error$2) {
|
3331
3387
|
logRecoverableError(request, error$2, null),
|
@@ -4118,52 +4174,55 @@
|
|
4118
4174
|
throw Error(
|
4119
4175
|
"resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React."
|
4120
4176
|
);
|
4121
|
-
|
4122
|
-
|
4123
|
-
|
4124
|
-
|
4125
|
-
|
4126
|
-
|
4127
|
-
|
4128
|
-
|
4129
|
-
|
4130
|
-
deferredDebugObjects.retained.delete(id),
|
4131
|
-
deferredDebugObjects.existing.delete(retainedValue),
|
4132
|
-
enqueueFlush(request));
|
4133
|
-
}
|
4134
|
-
break;
|
4135
|
-
case 81:
|
4136
|
-
for (command = 0; command < message.length; command++)
|
4137
|
-
(id = message[command]),
|
4138
|
-
(retainedValue = deferredDebugObjects.retained.get(id)),
|
4177
|
+
if ("" === message) closeDebugChannel(request);
|
4178
|
+
else {
|
4179
|
+
var command = message.charCodeAt(0);
|
4180
|
+
message = message.slice(2).split(",").map(fromHex);
|
4181
|
+
switch (command) {
|
4182
|
+
case 82:
|
4183
|
+
for (command = 0; command < message.length; command++) {
|
4184
|
+
var id = message[command],
|
4185
|
+
retainedValue = deferredDebugObjects.retained.get(id);
|
4139
4186
|
void 0 !== retainedValue &&
|
4140
|
-
(
|
4187
|
+
(request.pendingDebugChunks--,
|
4188
|
+
deferredDebugObjects.retained.delete(id),
|
4141
4189
|
deferredDebugObjects.existing.delete(retainedValue),
|
4142
|
-
emitOutlinedDebugModelChunk(
|
4143
|
-
request,
|
4144
|
-
id,
|
4145
|
-
{ objectLimit: 10 },
|
4146
|
-
retainedValue
|
4147
|
-
),
|
4148
4190
|
enqueueFlush(request));
|
4149
|
-
|
4150
|
-
|
4151
|
-
|
4152
|
-
(
|
4153
|
-
(
|
4154
|
-
|
4155
|
-
|
4156
|
-
|
4157
|
-
|
4158
|
-
|
4159
|
-
|
4160
|
-
|
4161
|
-
|
4162
|
-
|
4163
|
-
|
4164
|
-
|
4165
|
-
|
4166
|
-
|
4191
|
+
}
|
4192
|
+
break;
|
4193
|
+
case 81:
|
4194
|
+
for (command = 0; command < message.length; command++)
|
4195
|
+
(id = message[command]),
|
4196
|
+
(retainedValue = deferredDebugObjects.retained.get(id)),
|
4197
|
+
void 0 !== retainedValue &&
|
4198
|
+
(deferredDebugObjects.retained.delete(id),
|
4199
|
+
deferredDebugObjects.existing.delete(retainedValue),
|
4200
|
+
emitOutlinedDebugModelChunk(
|
4201
|
+
request,
|
4202
|
+
id,
|
4203
|
+
{ objectLimit: 10 },
|
4204
|
+
retainedValue
|
4205
|
+
),
|
4206
|
+
enqueueFlush(request));
|
4207
|
+
break;
|
4208
|
+
case 80:
|
4209
|
+
for (command = 0; command < message.length; command++)
|
4210
|
+
(id = message[command]),
|
4211
|
+
(retainedValue = deferredDebugObjects.retained.get(id)),
|
4212
|
+
void 0 !== retainedValue &&
|
4213
|
+
(deferredDebugObjects.retained.delete(id),
|
4214
|
+
emitRequestedDebugThenable(
|
4215
|
+
request,
|
4216
|
+
id,
|
4217
|
+
{ objectLimit: 10 },
|
4218
|
+
retainedValue
|
4219
|
+
));
|
4220
|
+
break;
|
4221
|
+
default:
|
4222
|
+
throw Error(
|
4223
|
+
"Unknown command. The debugChannel was not wired up properly."
|
4224
|
+
);
|
4225
|
+
}
|
4167
4226
|
}
|
4168
4227
|
}
|
4169
4228
|
stringBuffer = _ref[_ref.length - 1];
|
@@ -4766,6 +4825,10 @@
|
|
4766
4825
|
options && options.debugChannel
|
4767
4826
|
? options.debugChannel.readable
|
4768
4827
|
: void 0,
|
4828
|
+
debugChannelWritable =
|
4829
|
+
options && options.debugChannel
|
4830
|
+
? options.debugChannel.writable
|
4831
|
+
: void 0,
|
4769
4832
|
request = createRequest(
|
4770
4833
|
model,
|
4771
4834
|
webpackMap,
|
@@ -4788,6 +4851,30 @@
|
|
4788
4851
|
signal.addEventListener("abort", listener);
|
4789
4852
|
}
|
4790
4853
|
}
|
4854
|
+
void 0 !== debugChannelWritable &&
|
4855
|
+
new ReadableStream(
|
4856
|
+
{
|
4857
|
+
type: "bytes",
|
4858
|
+
pull: function (controller) {
|
4859
|
+
if (13 === request.status)
|
4860
|
+
(request.status = CLOSED),
|
4861
|
+
closeWithError(controller, request.fatalError);
|
4862
|
+
else if (
|
4863
|
+
request.status !== CLOSED &&
|
4864
|
+
null === request.debugDestination
|
4865
|
+
) {
|
4866
|
+
request.debugDestination = controller;
|
4867
|
+
try {
|
4868
|
+
flushCompletedChunks(request);
|
4869
|
+
} catch (error) {
|
4870
|
+
logRecoverableError(request, error, null),
|
4871
|
+
fatalError(request, error);
|
4872
|
+
}
|
4873
|
+
}
|
4874
|
+
}
|
4875
|
+
},
|
4876
|
+
{ highWaterMark: 0 }
|
4877
|
+
).pipeTo(debugChannelWritable);
|
4791
4878
|
void 0 !== debugChannelReadable &&
|
4792
4879
|
startReadingFromDebugChannelReadableStream(
|
4793
4880
|
request,
|
@@ -1818,8 +1818,7 @@ function performWork(request) {
|
|
1818
1818
|
request.pingedTasks = [];
|
1819
1819
|
for (var i = 0; i < pingedTasks.length; i++)
|
1820
1820
|
retryTask(request, pingedTasks[i]);
|
1821
|
-
|
1822
|
-
flushCompletedChunks(request, request.destination);
|
1821
|
+
flushCompletedChunks(request);
|
1823
1822
|
} catch (error) {
|
1824
1823
|
logRecoverableError(request, error, null), fatalError(request, error);
|
1825
1824
|
} finally {
|
@@ -1837,40 +1836,44 @@ function finishAbortedTask(task, request, errorId) {
|
|
1837
1836
|
(task = encodeReferenceChunk(request, task.id, errorId)),
|
1838
1837
|
request.completedErrorChunks.push(task));
|
1839
1838
|
}
|
1840
|
-
function flushCompletedChunks(request
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
request.
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
request.
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1839
|
+
function flushCompletedChunks(request) {
|
1840
|
+
var destination = request.destination;
|
1841
|
+
if (null !== destination) {
|
1842
|
+
currentView = new Uint8Array(2048);
|
1843
|
+
writtenBytes = 0;
|
1844
|
+
try {
|
1845
|
+
for (
|
1846
|
+
var importsChunks = request.completedImportChunks, i = 0;
|
1847
|
+
i < importsChunks.length;
|
1848
|
+
i++
|
1849
|
+
)
|
1850
|
+
request.pendingChunks--,
|
1851
|
+
writeChunkAndReturn(destination, importsChunks[i]);
|
1852
|
+
importsChunks.splice(0, i);
|
1853
|
+
var hintChunks = request.completedHintChunks;
|
1854
|
+
for (i = 0; i < hintChunks.length; i++)
|
1855
|
+
writeChunkAndReturn(destination, hintChunks[i]);
|
1856
|
+
hintChunks.splice(0, i);
|
1857
|
+
var regularChunks = request.completedRegularChunks;
|
1858
|
+
for (i = 0; i < regularChunks.length; i++)
|
1859
|
+
request.pendingChunks--,
|
1860
|
+
writeChunkAndReturn(destination, regularChunks[i]);
|
1861
|
+
regularChunks.splice(0, i);
|
1862
|
+
var errorChunks = request.completedErrorChunks;
|
1863
|
+
for (i = 0; i < errorChunks.length; i++)
|
1864
|
+
request.pendingChunks--,
|
1865
|
+
writeChunkAndReturn(destination, errorChunks[i]);
|
1866
|
+
errorChunks.splice(0, i);
|
1867
|
+
} finally {
|
1868
|
+
(request.flushScheduled = !1),
|
1869
|
+
currentView &&
|
1870
|
+
0 < writtenBytes &&
|
1871
|
+
(destination.enqueue(
|
1872
|
+
new Uint8Array(currentView.buffer, 0, writtenBytes)
|
1873
|
+
),
|
1874
|
+
(currentView = null),
|
1875
|
+
(writtenBytes = 0));
|
1876
|
+
}
|
1874
1877
|
}
|
1875
1878
|
0 === request.pendingChunks &&
|
1876
1879
|
(12 > request.status &&
|
@@ -1880,8 +1883,8 @@ function flushCompletedChunks(request, destination) {
|
|
1880
1883
|
)
|
1881
1884
|
),
|
1882
1885
|
(request.status = 14),
|
1883
|
-
destination
|
1884
|
-
|
1886
|
+
null !== request.destination &&
|
1887
|
+
(request.destination.close(), (request.destination = null)));
|
1885
1888
|
}
|
1886
1889
|
function startWork(request) {
|
1887
1890
|
request.flushScheduled = null !== request.destination;
|
@@ -1899,8 +1902,7 @@ function enqueueFlush(request) {
|
|
1899
1902
|
((request.flushScheduled = !0),
|
1900
1903
|
scheduleWork(function () {
|
1901
1904
|
request.flushScheduled = !1;
|
1902
|
-
|
1903
|
-
destination && flushCompletedChunks(request, destination);
|
1905
|
+
flushCompletedChunks(request);
|
1904
1906
|
}));
|
1905
1907
|
}
|
1906
1908
|
function callOnAllReadyIfReady(request) {
|
@@ -1913,7 +1915,7 @@ function startFlowing(request, destination) {
|
|
1913
1915
|
else if (14 !== request.status && null === request.destination) {
|
1914
1916
|
request.destination = destination;
|
1915
1917
|
try {
|
1916
|
-
flushCompletedChunks(request
|
1918
|
+
flushCompletedChunks(request);
|
1917
1919
|
} catch (error) {
|
1918
1920
|
logRecoverableError(request, error, null), fatalError(request, error);
|
1919
1921
|
}
|
@@ -1926,8 +1928,7 @@ function finishAbort(request, abortedTasks, errorId) {
|
|
1926
1928
|
});
|
1927
1929
|
var onAllReady = request.onAllReady;
|
1928
1930
|
onAllReady();
|
1929
|
-
|
1930
|
-
flushCompletedChunks(request, request.destination);
|
1931
|
+
flushCompletedChunks(request);
|
1931
1932
|
} catch (error) {
|
1932
1933
|
logRecoverableError(request, error, null), fatalError(request, error);
|
1933
1934
|
}
|
@@ -1961,8 +1962,7 @@ function abort(request, reason) {
|
|
1961
1962
|
} else {
|
1962
1963
|
var onAllReady = request.onAllReady;
|
1963
1964
|
onAllReady();
|
1964
|
-
|
1965
|
-
flushCompletedChunks(request, request.destination);
|
1965
|
+
flushCompletedChunks(request);
|
1966
1966
|
}
|
1967
1967
|
} catch (error$23) {
|
1968
1968
|
logRecoverableError(request, error$23, null),
|