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
@@ -74,6 +74,15 @@
|
|
74
74
|
}
|
75
75
|
return !0;
|
76
76
|
}
|
77
|
+
function completeWriting(destination) {
|
78
|
+
currentView &&
|
79
|
+
0 < writtenBytes &&
|
80
|
+
(destination.enqueue(
|
81
|
+
new Uint8Array(currentView.buffer, 0, writtenBytes)
|
82
|
+
),
|
83
|
+
(currentView = null),
|
84
|
+
(writtenBytes = 0));
|
85
|
+
}
|
77
86
|
function stringToChunk(content) {
|
78
87
|
return textEncoder.encode(content);
|
79
88
|
}
|
@@ -883,6 +892,7 @@
|
|
883
892
|
this.onFatalError = onFatalError;
|
884
893
|
this.pendingDebugChunks = 0;
|
885
894
|
this.completedDebugChunks = [];
|
895
|
+
this.debugDestination = null;
|
886
896
|
this.environmentName =
|
887
897
|
void 0 === environmentName
|
888
898
|
? function () {
|
@@ -1396,7 +1406,7 @@
|
|
1396
1406
|
var componentDebugID = task.id;
|
1397
1407
|
componentDebugInfo = Component.displayName || Component.name || "";
|
1398
1408
|
var componentEnv = (0, request.environmentName)();
|
1399
|
-
request.
|
1409
|
+
request.pendingChunks++;
|
1400
1410
|
componentDebugInfo = {
|
1401
1411
|
name: componentDebugInfo,
|
1402
1412
|
env: componentEnv,
|
@@ -2560,10 +2570,16 @@
|
|
2560
2570
|
request.completedDebugChunks.push(id);
|
2561
2571
|
}
|
2562
2572
|
function emitDebugChunk(request, id, debugInfo) {
|
2563
|
-
|
2564
|
-
|
2565
|
-
|
2566
|
-
|
2573
|
+
var json = serializeDebugModel(request, 500, debugInfo);
|
2574
|
+
null !== request.debugDestination
|
2575
|
+
? ((debugInfo = request.nextChunkId++),
|
2576
|
+
(json = debugInfo.toString(16) + ":" + json + "\n"),
|
2577
|
+
request.pendingDebugChunks++,
|
2578
|
+
request.completedDebugChunks.push(stringToChunk(json)),
|
2579
|
+
(id = id.toString(16) + ':D"$' + debugInfo.toString(16) + '"\n'),
|
2580
|
+
request.completedRegularChunks.push(stringToChunk(id)))
|
2581
|
+
: ((id = id.toString(16) + ":D" + json + "\n"),
|
2582
|
+
request.completedRegularChunks.push(stringToChunk(id)));
|
2567
2583
|
}
|
2568
2584
|
function outlineComponentInfo(request, componentInfo) {
|
2569
2585
|
if (!request.writtenDebugObjects.has(componentInfo)) {
|
@@ -2993,7 +3009,7 @@
|
|
2993
3009
|
if ("number" !== typeof info.time)
|
2994
3010
|
if ("string" === typeof info.name)
|
2995
3011
|
outlineComponentInfo(request$jscomp$1, info),
|
2996
|
-
request$jscomp$1.
|
3012
|
+
request$jscomp$1.pendingChunks++,
|
2997
3013
|
emitDebugChunk(request$jscomp$1, task, info);
|
2998
3014
|
else if (info.awaited) {
|
2999
3015
|
var ioInfo = info.awaited;
|
@@ -3052,11 +3068,11 @@
|
|
3052
3068
|
null != info.env && (ioInfo.env = info.env);
|
3053
3069
|
null != info.owner && (ioInfo.owner = info.owner);
|
3054
3070
|
null != request && (ioInfo.stack = request);
|
3055
|
-
request$jscomp$1.
|
3071
|
+
request$jscomp$1.pendingChunks++;
|
3056
3072
|
emitDebugChunk(request$jscomp$1, task, ioInfo);
|
3057
3073
|
}
|
3058
3074
|
} else
|
3059
|
-
request$jscomp$1.
|
3075
|
+
request$jscomp$1.pendingChunks++,
|
3060
3076
|
emitDebugChunk(request$jscomp$1, task, info);
|
3061
3077
|
}
|
3062
3078
|
}
|
@@ -3141,7 +3157,7 @@
|
|
3141
3157
|
task.implicitSlot = !1;
|
3142
3158
|
var currentEnv = (0, request.environmentName)();
|
3143
3159
|
currentEnv !== task.environmentName &&
|
3144
|
-
(request.
|
3160
|
+
(request.pendingChunks++,
|
3145
3161
|
emitDebugChunk(request, task.id, { env: currentEnv }));
|
3146
3162
|
if ("object" === typeof resolvedModel && null !== resolvedModel)
|
3147
3163
|
request.writtenObjects.set(
|
@@ -3206,8 +3222,7 @@
|
|
3206
3222
|
request.pingedTasks = [];
|
3207
3223
|
for (var i = 0; i < pingedTasks.length; i++)
|
3208
3224
|
retryTask(request, pingedTasks[i]);
|
3209
|
-
|
3210
|
-
flushCompletedChunks(request, request.destination);
|
3225
|
+
flushCompletedChunks(request);
|
3211
3226
|
} catch (error) {
|
3212
3227
|
logRecoverableError(request, error, null), fatalError(request, error);
|
3213
3228
|
} finally {
|
@@ -3231,86 +3246,130 @@
|
|
3231
3246
|
request.completedErrorChunks.push(task);
|
3232
3247
|
}
|
3233
3248
|
}
|
3234
|
-
function flushCompletedChunks(request
|
3235
|
-
|
3236
|
-
|
3237
|
-
|
3238
|
-
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3243
|
-
|
3244
|
-
|
3245
|
-
|
3246
|
-
|
3247
|
-
|
3248
|
-
|
3249
|
-
|
3250
|
-
|
3251
|
-
|
3252
|
-
|
3253
|
-
|
3254
|
-
|
3255
|
-
|
3256
|
-
|
3257
|
-
|
3258
|
-
|
3259
|
-
|
3260
|
-
|
3261
|
-
|
3262
|
-
|
3263
|
-
(
|
3264
|
-
|
3265
|
-
|
3266
|
-
|
3267
|
-
|
3268
|
-
|
3269
|
-
|
3270
|
-
|
3271
|
-
|
3272
|
-
|
3273
|
-
|
3274
|
-
|
3275
|
-
|
3276
|
-
)
|
3277
|
-
|
3278
|
-
|
3279
|
-
|
3280
|
-
|
3281
|
-
|
3282
|
-
|
3283
|
-
|
3284
|
-
|
3285
|
-
|
3286
|
-
|
3287
|
-
|
3288
|
-
|
3289
|
-
|
3290
|
-
|
3249
|
+
function flushCompletedChunks(request) {
|
3250
|
+
if (null !== request.debugDestination) {
|
3251
|
+
var debugDestination = request.debugDestination;
|
3252
|
+
currentView = new Uint8Array(2048);
|
3253
|
+
writtenBytes = 0;
|
3254
|
+
try {
|
3255
|
+
for (
|
3256
|
+
var debugChunks = request.completedDebugChunks, i = 0;
|
3257
|
+
i < debugChunks.length;
|
3258
|
+
i++
|
3259
|
+
)
|
3260
|
+
request.pendingDebugChunks--,
|
3261
|
+
writeChunkAndReturn(debugDestination, debugChunks[i]);
|
3262
|
+
debugChunks.splice(0, i);
|
3263
|
+
} finally {
|
3264
|
+
completeWriting(debugDestination);
|
3265
|
+
}
|
3266
|
+
}
|
3267
|
+
debugDestination = request.destination;
|
3268
|
+
if (null !== debugDestination) {
|
3269
|
+
currentView = new Uint8Array(2048);
|
3270
|
+
writtenBytes = 0;
|
3271
|
+
try {
|
3272
|
+
var importsChunks = request.completedImportChunks;
|
3273
|
+
for (
|
3274
|
+
debugChunks = 0;
|
3275
|
+
debugChunks < importsChunks.length;
|
3276
|
+
debugChunks++
|
3277
|
+
)
|
3278
|
+
if (
|
3279
|
+
(request.pendingChunks--,
|
3280
|
+
!writeChunkAndReturn(
|
3281
|
+
debugDestination,
|
3282
|
+
importsChunks[debugChunks]
|
3283
|
+
))
|
3284
|
+
) {
|
3285
|
+
request.destination = null;
|
3286
|
+
debugChunks++;
|
3287
|
+
break;
|
3288
|
+
}
|
3289
|
+
importsChunks.splice(0, debugChunks);
|
3290
|
+
var hintChunks = request.completedHintChunks;
|
3291
|
+
for (debugChunks = 0; debugChunks < hintChunks.length; debugChunks++)
|
3292
|
+
if (
|
3293
|
+
!writeChunkAndReturn(debugDestination, hintChunks[debugChunks])
|
3294
|
+
) {
|
3295
|
+
request.destination = null;
|
3296
|
+
debugChunks++;
|
3297
|
+
break;
|
3298
|
+
}
|
3299
|
+
hintChunks.splice(0, debugChunks);
|
3300
|
+
if (null === request.debugDestination) {
|
3301
|
+
var _debugChunks = request.completedDebugChunks;
|
3302
|
+
for (
|
3303
|
+
debugChunks = 0;
|
3304
|
+
debugChunks < _debugChunks.length;
|
3305
|
+
debugChunks++
|
3306
|
+
)
|
3307
|
+
if (
|
3308
|
+
(request.pendingDebugChunks--,
|
3309
|
+
!writeChunkAndReturn(
|
3310
|
+
debugDestination,
|
3311
|
+
_debugChunks[debugChunks]
|
3312
|
+
))
|
3313
|
+
) {
|
3314
|
+
request.destination = null;
|
3315
|
+
debugChunks++;
|
3316
|
+
break;
|
3317
|
+
}
|
3318
|
+
_debugChunks.splice(0, debugChunks);
|
3291
3319
|
}
|
3292
|
-
|
3293
|
-
|
3294
|
-
|
3295
|
-
|
3296
|
-
|
3297
|
-
|
3298
|
-
|
3299
|
-
|
3300
|
-
|
3301
|
-
|
3320
|
+
var regularChunks = request.completedRegularChunks;
|
3321
|
+
for (
|
3322
|
+
debugChunks = 0;
|
3323
|
+
debugChunks < regularChunks.length;
|
3324
|
+
debugChunks++
|
3325
|
+
)
|
3326
|
+
if (
|
3327
|
+
(request.pendingChunks--,
|
3328
|
+
!writeChunkAndReturn(
|
3329
|
+
debugDestination,
|
3330
|
+
regularChunks[debugChunks]
|
3331
|
+
))
|
3332
|
+
) {
|
3333
|
+
request.destination = null;
|
3334
|
+
debugChunks++;
|
3335
|
+
break;
|
3336
|
+
}
|
3337
|
+
regularChunks.splice(0, debugChunks);
|
3338
|
+
var errorChunks = request.completedErrorChunks;
|
3339
|
+
for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++)
|
3340
|
+
if (
|
3341
|
+
(request.pendingChunks--,
|
3342
|
+
!writeChunkAndReturn(debugDestination, errorChunks[debugChunks]))
|
3343
|
+
) {
|
3344
|
+
request.destination = null;
|
3345
|
+
debugChunks++;
|
3346
|
+
break;
|
3347
|
+
}
|
3348
|
+
errorChunks.splice(0, debugChunks);
|
3349
|
+
} finally {
|
3350
|
+
(request.flushScheduled = !1), completeWriting(debugDestination);
|
3351
|
+
}
|
3302
3352
|
}
|
3303
3353
|
0 === request.pendingChunks &&
|
3304
|
-
|
3305
|
-
|
3306
|
-
|
3307
|
-
|
3308
|
-
|
3309
|
-
|
3310
|
-
|
3311
|
-
|
3312
|
-
|
3313
|
-
|
3354
|
+
((importsChunks = request.debugDestination),
|
3355
|
+
0 === request.pendingDebugChunks
|
3356
|
+
? (null !== importsChunks &&
|
3357
|
+
(importsChunks.close(), (request.debugDestination = null)),
|
3358
|
+
request.status < ABORTING &&
|
3359
|
+
request.cacheController.abort(
|
3360
|
+
Error(
|
3361
|
+
"This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources."
|
3362
|
+
)
|
3363
|
+
),
|
3364
|
+
(request.status = CLOSED),
|
3365
|
+
null !== request.destination &&
|
3366
|
+
(request.destination.close(), (request.destination = null)),
|
3367
|
+
null !== request.debugDestination &&
|
3368
|
+
(request.debugDestination.close(),
|
3369
|
+
(request.debugDestination = null)))
|
3370
|
+
: null !== importsChunks &&
|
3371
|
+
null !== request.destination &&
|
3372
|
+
(request.destination.close(), (request.destination = null)));
|
3314
3373
|
}
|
3315
3374
|
function startWork(request) {
|
3316
3375
|
request.flushScheduled = null !== request.destination;
|
@@ -3326,14 +3385,13 @@
|
|
3326
3385
|
}, 0);
|
3327
3386
|
}
|
3328
3387
|
function enqueueFlush(request) {
|
3329
|
-
!1
|
3330
|
-
0
|
3331
|
-
null
|
3388
|
+
!1 !== request.flushScheduled ||
|
3389
|
+
0 !== request.pingedTasks.length ||
|
3390
|
+
(null === request.destination && null === request.debugDestination) ||
|
3332
3391
|
((request.flushScheduled = !0),
|
3333
3392
|
setTimeout(function () {
|
3334
3393
|
request.flushScheduled = !1;
|
3335
|
-
|
3336
|
-
destination && flushCompletedChunks(request, destination);
|
3394
|
+
flushCompletedChunks(request);
|
3337
3395
|
}, 0));
|
3338
3396
|
}
|
3339
3397
|
function callOnAllReadyIfReady(request) {
|
@@ -3347,7 +3405,7 @@
|
|
3347
3405
|
else if (request.status !== CLOSED && null === request.destination) {
|
3348
3406
|
request.destination = destination;
|
3349
3407
|
try {
|
3350
|
-
flushCompletedChunks(request
|
3408
|
+
flushCompletedChunks(request);
|
3351
3409
|
} catch (error) {
|
3352
3410
|
logRecoverableError(request, error, null), fatalError(request, error);
|
3353
3411
|
}
|
@@ -3360,8 +3418,7 @@
|
|
3360
3418
|
});
|
3361
3419
|
var onAllReady = request.onAllReady;
|
3362
3420
|
onAllReady();
|
3363
|
-
|
3364
|
-
flushCompletedChunks(request, request.destination);
|
3421
|
+
flushCompletedChunks(request);
|
3365
3422
|
} catch (error) {
|
3366
3423
|
logRecoverableError(request, error, null), fatalError(request, error);
|
3367
3424
|
}
|
@@ -3399,8 +3456,7 @@
|
|
3399
3456
|
} else {
|
3400
3457
|
var onAllReady = request.onAllReady;
|
3401
3458
|
onAllReady();
|
3402
|
-
|
3403
|
-
flushCompletedChunks(request, request.destination);
|
3459
|
+
flushCompletedChunks(request);
|
3404
3460
|
}
|
3405
3461
|
} catch (error$2) {
|
3406
3462
|
logRecoverableError(request, error$2, null),
|
@@ -4189,52 +4245,55 @@
|
|
4189
4245
|
throw Error(
|
4190
4246
|
"resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React."
|
4191
4247
|
);
|
4192
|
-
|
4193
|
-
|
4194
|
-
|
4195
|
-
|
4196
|
-
|
4197
|
-
|
4198
|
-
|
4199
|
-
|
4200
|
-
|
4201
|
-
deferredDebugObjects.retained.delete(id),
|
4202
|
-
deferredDebugObjects.existing.delete(retainedValue),
|
4203
|
-
enqueueFlush(request));
|
4204
|
-
}
|
4205
|
-
break;
|
4206
|
-
case 81:
|
4207
|
-
for (command = 0; command < message.length; command++)
|
4208
|
-
(id = message[command]),
|
4209
|
-
(retainedValue = deferredDebugObjects.retained.get(id)),
|
4248
|
+
if ("" === message) closeDebugChannel(request);
|
4249
|
+
else {
|
4250
|
+
var command = message.charCodeAt(0);
|
4251
|
+
message = message.slice(2).split(",").map(fromHex);
|
4252
|
+
switch (command) {
|
4253
|
+
case 82:
|
4254
|
+
for (command = 0; command < message.length; command++) {
|
4255
|
+
var id = message[command],
|
4256
|
+
retainedValue = deferredDebugObjects.retained.get(id);
|
4210
4257
|
void 0 !== retainedValue &&
|
4211
|
-
(
|
4258
|
+
(request.pendingDebugChunks--,
|
4259
|
+
deferredDebugObjects.retained.delete(id),
|
4212
4260
|
deferredDebugObjects.existing.delete(retainedValue),
|
4213
|
-
emitOutlinedDebugModelChunk(
|
4214
|
-
request,
|
4215
|
-
id,
|
4216
|
-
{ objectLimit: 10 },
|
4217
|
-
retainedValue
|
4218
|
-
),
|
4219
4261
|
enqueueFlush(request));
|
4220
|
-
|
4221
|
-
|
4222
|
-
|
4223
|
-
(
|
4224
|
-
(
|
4225
|
-
|
4226
|
-
|
4227
|
-
|
4228
|
-
|
4229
|
-
|
4230
|
-
|
4231
|
-
|
4232
|
-
|
4233
|
-
|
4234
|
-
|
4235
|
-
|
4236
|
-
|
4237
|
-
|
4262
|
+
}
|
4263
|
+
break;
|
4264
|
+
case 81:
|
4265
|
+
for (command = 0; command < message.length; command++)
|
4266
|
+
(id = message[command]),
|
4267
|
+
(retainedValue = deferredDebugObjects.retained.get(id)),
|
4268
|
+
void 0 !== retainedValue &&
|
4269
|
+
(deferredDebugObjects.retained.delete(id),
|
4270
|
+
deferredDebugObjects.existing.delete(retainedValue),
|
4271
|
+
emitOutlinedDebugModelChunk(
|
4272
|
+
request,
|
4273
|
+
id,
|
4274
|
+
{ objectLimit: 10 },
|
4275
|
+
retainedValue
|
4276
|
+
),
|
4277
|
+
enqueueFlush(request));
|
4278
|
+
break;
|
4279
|
+
case 80:
|
4280
|
+
for (command = 0; command < message.length; command++)
|
4281
|
+
(id = message[command]),
|
4282
|
+
(retainedValue = deferredDebugObjects.retained.get(id)),
|
4283
|
+
void 0 !== retainedValue &&
|
4284
|
+
(deferredDebugObjects.retained.delete(id),
|
4285
|
+
emitRequestedDebugThenable(
|
4286
|
+
request,
|
4287
|
+
id,
|
4288
|
+
{ objectLimit: 10 },
|
4289
|
+
retainedValue
|
4290
|
+
));
|
4291
|
+
break;
|
4292
|
+
default:
|
4293
|
+
throw Error(
|
4294
|
+
"Unknown command. The debugChannel was not wired up properly."
|
4295
|
+
);
|
4296
|
+
}
|
4238
4297
|
}
|
4239
4298
|
}
|
4240
4299
|
stringBuffer = _ref[_ref.length - 1];
|
@@ -4867,6 +4926,10 @@
|
|
4867
4926
|
options && options.debugChannel
|
4868
4927
|
? options.debugChannel.readable
|
4869
4928
|
: void 0,
|
4929
|
+
debugChannelWritable =
|
4930
|
+
options && options.debugChannel
|
4931
|
+
? options.debugChannel.writable
|
4932
|
+
: void 0,
|
4870
4933
|
request = createRequest(
|
4871
4934
|
model,
|
4872
4935
|
webpackMap,
|
@@ -4889,6 +4952,30 @@
|
|
4889
4952
|
signal.addEventListener("abort", listener);
|
4890
4953
|
}
|
4891
4954
|
}
|
4955
|
+
void 0 !== debugChannelWritable &&
|
4956
|
+
new ReadableStream(
|
4957
|
+
{
|
4958
|
+
type: "bytes",
|
4959
|
+
pull: function (controller) {
|
4960
|
+
if (13 === request.status)
|
4961
|
+
(request.status = CLOSED),
|
4962
|
+
closeWithError(controller, request.fatalError);
|
4963
|
+
else if (
|
4964
|
+
request.status !== CLOSED &&
|
4965
|
+
null === request.debugDestination
|
4966
|
+
) {
|
4967
|
+
request.debugDestination = controller;
|
4968
|
+
try {
|
4969
|
+
flushCompletedChunks(request);
|
4970
|
+
} catch (error) {
|
4971
|
+
logRecoverableError(request, error, null),
|
4972
|
+
fatalError(request, error);
|
4973
|
+
}
|
4974
|
+
}
|
4975
|
+
}
|
4976
|
+
},
|
4977
|
+
{ highWaterMark: 0 }
|
4978
|
+
).pipeTo(debugChannelWritable);
|
4892
4979
|
void 0 !== debugChannelReadable &&
|
4893
4980
|
startReadingFromDebugChannelReadableStream(
|
4894
4981
|
request,
|
@@ -1819,8 +1819,7 @@ function performWork(request) {
|
|
1819
1819
|
request.pingedTasks = [];
|
1820
1820
|
for (var i = 0; i < pingedTasks.length; i++)
|
1821
1821
|
retryTask(request, pingedTasks[i]);
|
1822
|
-
|
1823
|
-
flushCompletedChunks(request, request.destination);
|
1822
|
+
flushCompletedChunks(request);
|
1824
1823
|
} catch (error) {
|
1825
1824
|
logRecoverableError(request, error, null), fatalError(request, error);
|
1826
1825
|
} finally {
|
@@ -1838,40 +1837,44 @@ function finishAbortedTask(task, request, errorId) {
|
|
1838
1837
|
(task = encodeReferenceChunk(request, task.id, errorId)),
|
1839
1838
|
request.completedErrorChunks.push(task));
|
1840
1839
|
}
|
1841
|
-
function flushCompletedChunks(request
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
request.
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
request.
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1840
|
+
function flushCompletedChunks(request) {
|
1841
|
+
var destination = request.destination;
|
1842
|
+
if (null !== destination) {
|
1843
|
+
currentView = new Uint8Array(2048);
|
1844
|
+
writtenBytes = 0;
|
1845
|
+
try {
|
1846
|
+
for (
|
1847
|
+
var importsChunks = request.completedImportChunks, i = 0;
|
1848
|
+
i < importsChunks.length;
|
1849
|
+
i++
|
1850
|
+
)
|
1851
|
+
request.pendingChunks--,
|
1852
|
+
writeChunkAndReturn(destination, importsChunks[i]);
|
1853
|
+
importsChunks.splice(0, i);
|
1854
|
+
var hintChunks = request.completedHintChunks;
|
1855
|
+
for (i = 0; i < hintChunks.length; i++)
|
1856
|
+
writeChunkAndReturn(destination, hintChunks[i]);
|
1857
|
+
hintChunks.splice(0, i);
|
1858
|
+
var regularChunks = request.completedRegularChunks;
|
1859
|
+
for (i = 0; i < regularChunks.length; i++)
|
1860
|
+
request.pendingChunks--,
|
1861
|
+
writeChunkAndReturn(destination, regularChunks[i]);
|
1862
|
+
regularChunks.splice(0, i);
|
1863
|
+
var errorChunks = request.completedErrorChunks;
|
1864
|
+
for (i = 0; i < errorChunks.length; i++)
|
1865
|
+
request.pendingChunks--,
|
1866
|
+
writeChunkAndReturn(destination, errorChunks[i]);
|
1867
|
+
errorChunks.splice(0, i);
|
1868
|
+
} finally {
|
1869
|
+
(request.flushScheduled = !1),
|
1870
|
+
currentView &&
|
1871
|
+
0 < writtenBytes &&
|
1872
|
+
(destination.enqueue(
|
1873
|
+
new Uint8Array(currentView.buffer, 0, writtenBytes)
|
1874
|
+
),
|
1875
|
+
(currentView = null),
|
1876
|
+
(writtenBytes = 0));
|
1877
|
+
}
|
1875
1878
|
}
|
1876
1879
|
0 === request.pendingChunks &&
|
1877
1880
|
(12 > request.status &&
|
@@ -1881,8 +1884,8 @@ function flushCompletedChunks(request, destination) {
|
|
1881
1884
|
)
|
1882
1885
|
),
|
1883
1886
|
(request.status = 14),
|
1884
|
-
destination
|
1885
|
-
|
1887
|
+
null !== request.destination &&
|
1888
|
+
(request.destination.close(), (request.destination = null)));
|
1886
1889
|
}
|
1887
1890
|
function startWork(request) {
|
1888
1891
|
request.flushScheduled = null !== request.destination;
|
@@ -1904,8 +1907,7 @@ function enqueueFlush(request) {
|
|
1904
1907
|
((request.flushScheduled = !0),
|
1905
1908
|
setTimeout(function () {
|
1906
1909
|
request.flushScheduled = !1;
|
1907
|
-
|
1908
|
-
destination && flushCompletedChunks(request, destination);
|
1910
|
+
flushCompletedChunks(request);
|
1909
1911
|
}, 0));
|
1910
1912
|
}
|
1911
1913
|
function callOnAllReadyIfReady(request) {
|
@@ -1918,7 +1920,7 @@ function startFlowing(request, destination) {
|
|
1918
1920
|
else if (14 !== request.status && null === request.destination) {
|
1919
1921
|
request.destination = destination;
|
1920
1922
|
try {
|
1921
|
-
flushCompletedChunks(request
|
1923
|
+
flushCompletedChunks(request);
|
1922
1924
|
} catch (error) {
|
1923
1925
|
logRecoverableError(request, error, null), fatalError(request, error);
|
1924
1926
|
}
|
@@ -1931,8 +1933,7 @@ function finishAbort(request, abortedTasks, errorId) {
|
|
1931
1933
|
});
|
1932
1934
|
var onAllReady = request.onAllReady;
|
1933
1935
|
onAllReady();
|
1934
|
-
|
1935
|
-
flushCompletedChunks(request, request.destination);
|
1936
|
+
flushCompletedChunks(request);
|
1936
1937
|
} catch (error) {
|
1937
1938
|
logRecoverableError(request, error, null), fatalError(request, error);
|
1938
1939
|
}
|
@@ -1966,8 +1967,7 @@ function abort(request, reason) {
|
|
1966
1967
|
} else {
|
1967
1968
|
var onAllReady = request.onAllReady;
|
1968
1969
|
onAllReady();
|
1969
|
-
|
1970
|
-
flushCompletedChunks(request, request.destination);
|
1970
|
+
flushCompletedChunks(request);
|
1971
1971
|
}
|
1972
1972
|
} catch (error$23) {
|
1973
1973
|
logRecoverableError(request, error$23, null),
|