ses 1.7.0 → 1.9.0
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/assert-shim.js +1 -0
- package/compartment-shim.js +1 -0
- package/console-shim.js +1 -0
- package/dist/lockdown.cjs +667 -344
- package/dist/lockdown.mjs +667 -344
- package/dist/lockdown.umd.js +667 -344
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +667 -344
- package/dist/ses.mjs +667 -344
- package/dist/ses.umd.js +667 -344
- package/dist/ses.umd.min.js +1 -1
- package/dist/types.d.cts +6 -0
- package/lockdown-shim.js +1 -0
- package/lockdown.js +1 -0
- package/package.json +22 -18
- package/src/commons.js +20 -2
- package/src/compartment.js +1 -1
- package/src/error/console.js +8 -2
- package/src/error/tame-console.js +7 -4
- package/src/get-anonymous-intrinsics.js +5 -1
- package/src/lockdown-shim.js +2 -2
- package/src/lockdown.js +17 -0
- package/src/permits-intrinsics.js +7 -3
- package/src/permits.js +30 -0
- package/src/shim-arraybuffer-transfer.js +86 -0
- package/src/tame-harden.js +4 -0
- package/src/tame-module-source.js +51 -0
- package/src/tame-regenerator-runtime.js +29 -0
- package/types.d.ts +6 -0
- package/NEWS.md +0 -983
package/dist/lockdown.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ses@1.
|
|
1
|
+
// ses@1.9.0
|
|
2
2
|
'use strict';
|
|
3
3
|
(functors => {
|
|
4
4
|
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
{
|
|
27
27
|
globalThis: cell("globalThis"),
|
|
28
28
|
Array: cell("Array"),
|
|
29
|
+
ArrayBuffer: cell("ArrayBuffer"),
|
|
29
30
|
Date: cell("Date"),
|
|
30
31
|
FinalizationRegistry: cell("FinalizationRegistry"),
|
|
31
32
|
Float32Array: cell("Float32Array"),
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
Set: cell("Set"),
|
|
42
43
|
String: cell("String"),
|
|
43
44
|
Symbol: cell("Symbol"),
|
|
45
|
+
Uint8Array: cell("Uint8Array"),
|
|
44
46
|
WeakMap: cell("WeakMap"),
|
|
45
47
|
WeakSet: cell("WeakSet"),
|
|
46
48
|
FERAL_ERROR: cell("FERAL_ERROR"),
|
|
@@ -90,6 +92,7 @@
|
|
|
90
92
|
reflectSet: cell("reflectSet"),
|
|
91
93
|
isArray: cell("isArray"),
|
|
92
94
|
arrayPrototype: cell("arrayPrototype"),
|
|
95
|
+
arrayBufferPrototype: cell("arrayBufferPrototype"),
|
|
93
96
|
mapPrototype: cell("mapPrototype"),
|
|
94
97
|
proxyRevocable: cell("proxyRevocable"),
|
|
95
98
|
regexpPrototype: cell("regexpPrototype"),
|
|
@@ -100,6 +103,7 @@
|
|
|
100
103
|
functionPrototype: cell("functionPrototype"),
|
|
101
104
|
promisePrototype: cell("promisePrototype"),
|
|
102
105
|
generatorPrototype: cell("generatorPrototype"),
|
|
106
|
+
iteratorPrototype: cell("iteratorPrototype"),
|
|
103
107
|
typedArrayPrototype: cell("typedArrayPrototype"),
|
|
104
108
|
uncurryThis: cell("uncurryThis"),
|
|
105
109
|
objectHasOwnProperty: cell("objectHasOwnProperty"),
|
|
@@ -115,6 +119,9 @@
|
|
|
115
119
|
arraySome: cell("arraySome"),
|
|
116
120
|
arraySort: cell("arraySort"),
|
|
117
121
|
iterateArray: cell("iterateArray"),
|
|
122
|
+
arrayBufferSlice: cell("arrayBufferSlice"),
|
|
123
|
+
arrayBufferGetByteLength: cell("arrayBufferGetByteLength"),
|
|
124
|
+
typedArraySet: cell("typedArraySet"),
|
|
118
125
|
mapSet: cell("mapSet"),
|
|
119
126
|
mapGet: cell("mapGet"),
|
|
120
127
|
mapHas: cell("mapHas"),
|
|
@@ -300,6 +307,9 @@
|
|
|
300
307
|
{
|
|
301
308
|
tameDomains: cell("tameDomains"),
|
|
302
309
|
},
|
|
310
|
+
{
|
|
311
|
+
tameModuleSource: cell("tameModuleSource"),
|
|
312
|
+
},
|
|
303
313
|
{
|
|
304
314
|
consoleLevelMethods: cell("consoleLevelMethods"),
|
|
305
315
|
consoleOtherMethods: cell("consoleOtherMethods"),
|
|
@@ -362,6 +372,12 @@
|
|
|
362
372
|
tameFauxDataProperty: cell("tameFauxDataProperty"),
|
|
363
373
|
tameFauxDataProperties: cell("tameFauxDataProperties"),
|
|
364
374
|
},
|
|
375
|
+
{
|
|
376
|
+
tameRegeneratorRuntime: cell("tameRegeneratorRuntime"),
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
shimArrayBufferTransfer: cell("shimArrayBufferTransfer"),
|
|
380
|
+
},
|
|
365
381
|
{
|
|
366
382
|
repairIntrinsics: cell("repairIntrinsics"),
|
|
367
383
|
},
|
|
@@ -416,6 +432,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
416
432
|
onceVar: {
|
|
417
433
|
universalThis: cells[0].globalThis.set,
|
|
418
434
|
Array: cells[0].Array.set,
|
|
435
|
+
ArrayBuffer: cells[0].ArrayBuffer.set,
|
|
419
436
|
Date: cells[0].Date.set,
|
|
420
437
|
FinalizationRegistry: cells[0].FinalizationRegistry.set,
|
|
421
438
|
Float32Array: cells[0].Float32Array.set,
|
|
@@ -431,6 +448,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
431
448
|
Set: cells[0].Set.set,
|
|
432
449
|
String: cells[0].String.set,
|
|
433
450
|
Symbol: cells[0].Symbol.set,
|
|
451
|
+
Uint8Array: cells[0].Uint8Array.set,
|
|
434
452
|
WeakMap: cells[0].WeakMap.set,
|
|
435
453
|
WeakSet: cells[0].WeakSet.set,
|
|
436
454
|
FERAL_ERROR: cells[0].FERAL_ERROR.set,
|
|
@@ -480,6 +498,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
480
498
|
reflectSet: cells[0].reflectSet.set,
|
|
481
499
|
isArray: cells[0].isArray.set,
|
|
482
500
|
arrayPrototype: cells[0].arrayPrototype.set,
|
|
501
|
+
arrayBufferPrototype: cells[0].arrayBufferPrototype.set,
|
|
483
502
|
mapPrototype: cells[0].mapPrototype.set,
|
|
484
503
|
proxyRevocable: cells[0].proxyRevocable.set,
|
|
485
504
|
regexpPrototype: cells[0].regexpPrototype.set,
|
|
@@ -490,6 +509,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
490
509
|
functionPrototype: cells[0].functionPrototype.set,
|
|
491
510
|
promisePrototype: cells[0].promisePrototype.set,
|
|
492
511
|
generatorPrototype: cells[0].generatorPrototype.set,
|
|
512
|
+
iteratorPrototype: cells[0].iteratorPrototype.set,
|
|
493
513
|
typedArrayPrototype: cells[0].typedArrayPrototype.set,
|
|
494
514
|
uncurryThis: cells[0].uncurryThis.set,
|
|
495
515
|
objectHasOwnProperty: cells[0].objectHasOwnProperty.set,
|
|
@@ -505,6 +525,9 @@ function observeImports(map, importName, importIndex) {
|
|
|
505
525
|
arraySome: cells[0].arraySome.set,
|
|
506
526
|
arraySort: cells[0].arraySort.set,
|
|
507
527
|
iterateArray: cells[0].iterateArray.set,
|
|
528
|
+
arrayBufferSlice: cells[0].arrayBufferSlice.set,
|
|
529
|
+
arrayBufferGetByteLength: cells[0].arrayBufferGetByteLength.set,
|
|
530
|
+
typedArraySet: cells[0].typedArraySet.set,
|
|
508
531
|
mapSet: cells[0].mapSet.set,
|
|
509
532
|
mapGet: cells[0].mapGet.set,
|
|
510
533
|
mapHas: cells[0].mapHas.set,
|
|
@@ -1010,6 +1033,18 @@ function observeImports(map, importName, importIndex) {
|
|
|
1010
1033
|
importMeta: {},
|
|
1011
1034
|
});
|
|
1012
1035
|
functors[34]({
|
|
1036
|
+
imports(entries) {
|
|
1037
|
+
const map = new Map(entries);
|
|
1038
|
+
observeImports(map, "./commons.js", 0);
|
|
1039
|
+
},
|
|
1040
|
+
liveVar: {
|
|
1041
|
+
},
|
|
1042
|
+
onceVar: {
|
|
1043
|
+
tameModuleSource: cells[34].tameModuleSource.set,
|
|
1044
|
+
},
|
|
1045
|
+
importMeta: {},
|
|
1046
|
+
});
|
|
1047
|
+
functors[35]({
|
|
1013
1048
|
imports(entries) {
|
|
1014
1049
|
const map = new Map(entries);
|
|
1015
1050
|
observeImports(map, "../commons.js", 0);
|
|
@@ -1019,17 +1054,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
1019
1054
|
liveVar: {
|
|
1020
1055
|
},
|
|
1021
1056
|
onceVar: {
|
|
1022
|
-
consoleLevelMethods: cells[
|
|
1023
|
-
consoleOtherMethods: cells[
|
|
1024
|
-
makeLoggingConsoleKit: cells[
|
|
1025
|
-
pumpLogToConsole: cells[
|
|
1026
|
-
makeCausalConsole: cells[
|
|
1027
|
-
defineCausalConsoleFromLogger: cells[
|
|
1028
|
-
filterConsole: cells[
|
|
1057
|
+
consoleLevelMethods: cells[35].consoleLevelMethods.set,
|
|
1058
|
+
consoleOtherMethods: cells[35].consoleOtherMethods.set,
|
|
1059
|
+
makeLoggingConsoleKit: cells[35].makeLoggingConsoleKit.set,
|
|
1060
|
+
pumpLogToConsole: cells[35].pumpLogToConsole.set,
|
|
1061
|
+
makeCausalConsole: cells[35].makeCausalConsole.set,
|
|
1062
|
+
defineCausalConsoleFromLogger: cells[35].defineCausalConsoleFromLogger.set,
|
|
1063
|
+
filterConsole: cells[35].filterConsole.set,
|
|
1029
1064
|
},
|
|
1030
1065
|
importMeta: {},
|
|
1031
1066
|
});
|
|
1032
|
-
functors[
|
|
1067
|
+
functors[36]({
|
|
1033
1068
|
imports(entries) {
|
|
1034
1069
|
const map = new Map(entries);
|
|
1035
1070
|
observeImports(map, "../commons.js", 0);
|
|
@@ -1037,28 +1072,28 @@ function observeImports(map, importName, importIndex) {
|
|
|
1037
1072
|
liveVar: {
|
|
1038
1073
|
},
|
|
1039
1074
|
onceVar: {
|
|
1040
|
-
makeRejectionHandlers: cells[
|
|
1075
|
+
makeRejectionHandlers: cells[36].makeRejectionHandlers.set,
|
|
1041
1076
|
},
|
|
1042
1077
|
importMeta: {},
|
|
1043
1078
|
});
|
|
1044
|
-
functors[
|
|
1079
|
+
functors[37]({
|
|
1045
1080
|
imports(entries) {
|
|
1046
1081
|
const map = new Map(entries);
|
|
1047
1082
|
observeImports(map, "../commons.js", 0);
|
|
1048
1083
|
observeImports(map, "./assert.js", 9);
|
|
1049
|
-
observeImports(map, "./console.js",
|
|
1050
|
-
observeImports(map, "./unhandled-rejection.js",
|
|
1084
|
+
observeImports(map, "./console.js", 35);
|
|
1085
|
+
observeImports(map, "./unhandled-rejection.js", 36);
|
|
1051
1086
|
observeImports(map, "./types.js", 5);
|
|
1052
1087
|
observeImports(map, "./internal-types.js", 6);
|
|
1053
1088
|
},
|
|
1054
1089
|
liveVar: {
|
|
1055
1090
|
},
|
|
1056
1091
|
onceVar: {
|
|
1057
|
-
tameConsole: cells[
|
|
1092
|
+
tameConsole: cells[37].tameConsole.set,
|
|
1058
1093
|
},
|
|
1059
1094
|
importMeta: {},
|
|
1060
1095
|
});
|
|
1061
|
-
functors[
|
|
1096
|
+
functors[38]({
|
|
1062
1097
|
imports(entries) {
|
|
1063
1098
|
const map = new Map(entries);
|
|
1064
1099
|
observeImports(map, "../commons.js", 0);
|
|
@@ -1066,27 +1101,27 @@ function observeImports(map, importName, importIndex) {
|
|
|
1066
1101
|
liveVar: {
|
|
1067
1102
|
},
|
|
1068
1103
|
onceVar: {
|
|
1069
|
-
filterFileName: cells[
|
|
1070
|
-
shortenCallSiteString: cells[
|
|
1071
|
-
tameV8ErrorConstructor: cells[
|
|
1104
|
+
filterFileName: cells[38].filterFileName.set,
|
|
1105
|
+
shortenCallSiteString: cells[38].shortenCallSiteString.set,
|
|
1106
|
+
tameV8ErrorConstructor: cells[38].tameV8ErrorConstructor.set,
|
|
1072
1107
|
},
|
|
1073
1108
|
importMeta: {},
|
|
1074
1109
|
});
|
|
1075
|
-
functors[
|
|
1110
|
+
functors[39]({
|
|
1076
1111
|
imports(entries) {
|
|
1077
1112
|
const map = new Map(entries);
|
|
1078
1113
|
observeImports(map, "../commons.js", 0);
|
|
1079
1114
|
observeImports(map, "../permits.js", 11);
|
|
1080
|
-
observeImports(map, "./tame-v8-error-constructor.js",
|
|
1115
|
+
observeImports(map, "./tame-v8-error-constructor.js", 38);
|
|
1081
1116
|
},
|
|
1082
1117
|
liveVar: {
|
|
1083
1118
|
},
|
|
1084
1119
|
onceVar: {
|
|
1085
|
-
default: cells[
|
|
1120
|
+
default: cells[39].default.set,
|
|
1086
1121
|
},
|
|
1087
1122
|
importMeta: {},
|
|
1088
1123
|
});
|
|
1089
|
-
functors[
|
|
1124
|
+
functors[40]({
|
|
1090
1125
|
imports(entries) {
|
|
1091
1126
|
const map = new Map(entries);
|
|
1092
1127
|
observeImports(map, "@endo/env-options", 3);
|
|
@@ -1096,28 +1131,28 @@ function observeImports(map, importName, importIndex) {
|
|
|
1096
1131
|
liveVar: {
|
|
1097
1132
|
},
|
|
1098
1133
|
onceVar: {
|
|
1099
|
-
makeAlias: cells[
|
|
1100
|
-
load: cells[
|
|
1101
|
-
loadNow: cells[
|
|
1134
|
+
makeAlias: cells[40].makeAlias.set,
|
|
1135
|
+
load: cells[40].load.set,
|
|
1136
|
+
loadNow: cells[40].loadNow.set,
|
|
1102
1137
|
},
|
|
1103
1138
|
importMeta: {},
|
|
1104
1139
|
});
|
|
1105
|
-
functors[
|
|
1140
|
+
functors[41]({
|
|
1106
1141
|
imports(entries) {
|
|
1107
1142
|
const map = new Map(entries);
|
|
1108
|
-
observeImports(map, "./module-load.js",
|
|
1143
|
+
observeImports(map, "./module-load.js", 40);
|
|
1109
1144
|
observeImports(map, "./commons.js", 0);
|
|
1110
1145
|
observeImports(map, "./error/assert.js", 9);
|
|
1111
1146
|
},
|
|
1112
1147
|
liveVar: {
|
|
1113
1148
|
},
|
|
1114
1149
|
onceVar: {
|
|
1115
|
-
deferExports: cells[
|
|
1116
|
-
getDeferredExports: cells[
|
|
1150
|
+
deferExports: cells[41].deferExports.set,
|
|
1151
|
+
getDeferredExports: cells[41].getDeferredExports.set,
|
|
1117
1152
|
},
|
|
1118
1153
|
importMeta: {},
|
|
1119
1154
|
});
|
|
1120
|
-
functors[
|
|
1155
|
+
functors[42]({
|
|
1121
1156
|
imports(entries) {
|
|
1122
1157
|
const map = new Map(entries);
|
|
1123
1158
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1127,78 +1162,78 @@ function observeImports(map, importName, importIndex) {
|
|
|
1127
1162
|
liveVar: {
|
|
1128
1163
|
},
|
|
1129
1164
|
onceVar: {
|
|
1130
|
-
provideCompartmentEvaluator: cells[
|
|
1131
|
-
compartmentEvaluate: cells[
|
|
1165
|
+
provideCompartmentEvaluator: cells[42].provideCompartmentEvaluator.set,
|
|
1166
|
+
compartmentEvaluate: cells[42].compartmentEvaluate.set,
|
|
1132
1167
|
},
|
|
1133
1168
|
importMeta: {},
|
|
1134
1169
|
});
|
|
1135
|
-
functors[
|
|
1170
|
+
functors[43]({
|
|
1136
1171
|
imports(entries) {
|
|
1137
1172
|
const map = new Map(entries);
|
|
1138
1173
|
observeImports(map, "./error/assert.js", 9);
|
|
1139
|
-
observeImports(map, "./module-proxy.js",
|
|
1174
|
+
observeImports(map, "./module-proxy.js", 41);
|
|
1140
1175
|
observeImports(map, "./commons.js", 0);
|
|
1141
|
-
observeImports(map, "./compartment-evaluate.js",
|
|
1176
|
+
observeImports(map, "./compartment-evaluate.js", 42);
|
|
1142
1177
|
},
|
|
1143
1178
|
liveVar: {
|
|
1144
1179
|
},
|
|
1145
1180
|
onceVar: {
|
|
1146
|
-
makeVirtualModuleInstance: cells[
|
|
1147
|
-
makeModuleInstance: cells[
|
|
1181
|
+
makeVirtualModuleInstance: cells[43].makeVirtualModuleInstance.set,
|
|
1182
|
+
makeModuleInstance: cells[43].makeModuleInstance.set,
|
|
1148
1183
|
},
|
|
1149
1184
|
importMeta: {},
|
|
1150
1185
|
});
|
|
1151
|
-
functors[
|
|
1186
|
+
functors[44]({
|
|
1152
1187
|
imports(entries) {
|
|
1153
1188
|
const map = new Map(entries);
|
|
1154
1189
|
observeImports(map, "./error/assert.js", 9);
|
|
1155
|
-
observeImports(map, "./module-instance.js",
|
|
1190
|
+
observeImports(map, "./module-instance.js", 43);
|
|
1156
1191
|
observeImports(map, "./commons.js", 0);
|
|
1157
1192
|
},
|
|
1158
1193
|
liveVar: {
|
|
1159
1194
|
},
|
|
1160
1195
|
onceVar: {
|
|
1161
|
-
link: cells[
|
|
1162
|
-
instantiate: cells[
|
|
1196
|
+
link: cells[44].link.set,
|
|
1197
|
+
instantiate: cells[44].instantiate.set,
|
|
1163
1198
|
},
|
|
1164
1199
|
importMeta: {},
|
|
1165
1200
|
});
|
|
1166
|
-
functors[
|
|
1201
|
+
functors[45]({
|
|
1167
1202
|
imports(entries) {
|
|
1168
1203
|
const map = new Map(entries);
|
|
1169
1204
|
observeImports(map, "./commons.js", 0);
|
|
1170
1205
|
observeImports(map, "./global-object.js", 23);
|
|
1171
1206
|
observeImports(map, "./error/assert.js", 9);
|
|
1172
1207
|
observeImports(map, "./permits.js", 11);
|
|
1173
|
-
observeImports(map, "./module-load.js",
|
|
1174
|
-
observeImports(map, "./module-link.js",
|
|
1175
|
-
observeImports(map, "./module-proxy.js",
|
|
1176
|
-
observeImports(map, "./compartment-evaluate.js",
|
|
1208
|
+
observeImports(map, "./module-load.js", 40);
|
|
1209
|
+
observeImports(map, "./module-link.js", 44);
|
|
1210
|
+
observeImports(map, "./module-proxy.js", 41);
|
|
1211
|
+
observeImports(map, "./compartment-evaluate.js", 42);
|
|
1177
1212
|
observeImports(map, "./make-safe-evaluator.js", 31);
|
|
1178
1213
|
},
|
|
1179
1214
|
liveVar: {
|
|
1180
1215
|
},
|
|
1181
1216
|
onceVar: {
|
|
1182
|
-
InertCompartment: cells[
|
|
1183
|
-
CompartmentPrototype: cells[
|
|
1184
|
-
makeCompartmentConstructor: cells[
|
|
1217
|
+
InertCompartment: cells[45].InertCompartment.set,
|
|
1218
|
+
CompartmentPrototype: cells[45].CompartmentPrototype.set,
|
|
1219
|
+
makeCompartmentConstructor: cells[45].makeCompartmentConstructor.set,
|
|
1185
1220
|
},
|
|
1186
1221
|
importMeta: {},
|
|
1187
1222
|
});
|
|
1188
|
-
functors[
|
|
1223
|
+
functors[46]({
|
|
1189
1224
|
imports(entries) {
|
|
1190
1225
|
const map = new Map(entries);
|
|
1191
1226
|
observeImports(map, "./commons.js", 0);
|
|
1192
|
-
observeImports(map, "./compartment.js",
|
|
1227
|
+
observeImports(map, "./compartment.js", 45);
|
|
1193
1228
|
},
|
|
1194
1229
|
liveVar: {
|
|
1195
1230
|
},
|
|
1196
1231
|
onceVar: {
|
|
1197
|
-
getAnonymousIntrinsics: cells[
|
|
1232
|
+
getAnonymousIntrinsics: cells[46].getAnonymousIntrinsics.set,
|
|
1198
1233
|
},
|
|
1199
1234
|
importMeta: {},
|
|
1200
1235
|
});
|
|
1201
|
-
functors[
|
|
1236
|
+
functors[47]({
|
|
1202
1237
|
imports(entries) {
|
|
1203
1238
|
const map = new Map(entries);
|
|
1204
1239
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1206,11 +1241,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1206
1241
|
liveVar: {
|
|
1207
1242
|
},
|
|
1208
1243
|
onceVar: {
|
|
1209
|
-
tameHarden: cells[
|
|
1244
|
+
tameHarden: cells[47].tameHarden.set,
|
|
1210
1245
|
},
|
|
1211
1246
|
importMeta: {},
|
|
1212
1247
|
});
|
|
1213
|
-
functors[
|
|
1248
|
+
functors[48]({
|
|
1214
1249
|
imports(entries) {
|
|
1215
1250
|
const map = new Map(entries);
|
|
1216
1251
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1218,11 +1253,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1218
1253
|
liveVar: {
|
|
1219
1254
|
},
|
|
1220
1255
|
onceVar: {
|
|
1221
|
-
tameSymbolConstructor: cells[
|
|
1256
|
+
tameSymbolConstructor: cells[48].tameSymbolConstructor.set,
|
|
1222
1257
|
},
|
|
1223
1258
|
importMeta: {},
|
|
1224
1259
|
});
|
|
1225
|
-
functors[
|
|
1260
|
+
functors[49]({
|
|
1226
1261
|
imports(entries) {
|
|
1227
1262
|
const map = new Map(entries);
|
|
1228
1263
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1230,12 +1265,36 @@ function observeImports(map, importName, importIndex) {
|
|
|
1230
1265
|
liveVar: {
|
|
1231
1266
|
},
|
|
1232
1267
|
onceVar: {
|
|
1233
|
-
tameFauxDataProperty: cells[
|
|
1234
|
-
tameFauxDataProperties: cells[
|
|
1268
|
+
tameFauxDataProperty: cells[49].tameFauxDataProperty.set,
|
|
1269
|
+
tameFauxDataProperties: cells[49].tameFauxDataProperties.set,
|
|
1235
1270
|
},
|
|
1236
1271
|
importMeta: {},
|
|
1237
1272
|
});
|
|
1238
|
-
functors[
|
|
1273
|
+
functors[50]({
|
|
1274
|
+
imports(entries) {
|
|
1275
|
+
const map = new Map(entries);
|
|
1276
|
+
observeImports(map, "./commons.js", 0);
|
|
1277
|
+
},
|
|
1278
|
+
liveVar: {
|
|
1279
|
+
},
|
|
1280
|
+
onceVar: {
|
|
1281
|
+
tameRegeneratorRuntime: cells[50].tameRegeneratorRuntime.set,
|
|
1282
|
+
},
|
|
1283
|
+
importMeta: {},
|
|
1284
|
+
});
|
|
1285
|
+
functors[51]({
|
|
1286
|
+
imports(entries) {
|
|
1287
|
+
const map = new Map(entries);
|
|
1288
|
+
observeImports(map, "./commons.js", 0);
|
|
1289
|
+
},
|
|
1290
|
+
liveVar: {
|
|
1291
|
+
},
|
|
1292
|
+
onceVar: {
|
|
1293
|
+
shimArrayBufferTransfer: cells[51].shimArrayBufferTransfer.set,
|
|
1294
|
+
},
|
|
1295
|
+
importMeta: {},
|
|
1296
|
+
});
|
|
1297
|
+
functors[52]({
|
|
1239
1298
|
imports(entries) {
|
|
1240
1299
|
const map = new Map(entries);
|
|
1241
1300
|
observeImports(map, "@endo/env-options", 3);
|
|
@@ -1254,28 +1313,31 @@ function observeImports(map, importName, importIndex) {
|
|
|
1254
1313
|
observeImports(map, "./permits.js", 11);
|
|
1255
1314
|
observeImports(map, "./tame-function-tostring.js", 32);
|
|
1256
1315
|
observeImports(map, "./tame-domains.js", 33);
|
|
1257
|
-
observeImports(map, "./
|
|
1258
|
-
observeImports(map, "./error/tame-
|
|
1316
|
+
observeImports(map, "./tame-module-source.js", 34);
|
|
1317
|
+
observeImports(map, "./error/tame-console.js", 37);
|
|
1318
|
+
observeImports(map, "./error/tame-error-constructor.js", 39);
|
|
1259
1319
|
observeImports(map, "./error/assert.js", 9);
|
|
1260
|
-
observeImports(map, "./get-anonymous-intrinsics.js",
|
|
1261
|
-
observeImports(map, "./compartment.js",
|
|
1262
|
-
observeImports(map, "./tame-harden.js",
|
|
1263
|
-
observeImports(map, "./tame-symbol-constructor.js",
|
|
1264
|
-
observeImports(map, "./tame-faux-data-properties.js",
|
|
1320
|
+
observeImports(map, "./get-anonymous-intrinsics.js", 46);
|
|
1321
|
+
observeImports(map, "./compartment.js", 45);
|
|
1322
|
+
observeImports(map, "./tame-harden.js", 47);
|
|
1323
|
+
observeImports(map, "./tame-symbol-constructor.js", 48);
|
|
1324
|
+
observeImports(map, "./tame-faux-data-properties.js", 49);
|
|
1325
|
+
observeImports(map, "./tame-regenerator-runtime.js", 50);
|
|
1326
|
+
observeImports(map, "./shim-arraybuffer-transfer.js", 51);
|
|
1265
1327
|
},
|
|
1266
1328
|
liveVar: {
|
|
1267
1329
|
},
|
|
1268
1330
|
onceVar: {
|
|
1269
|
-
repairIntrinsics: cells[
|
|
1331
|
+
repairIntrinsics: cells[52].repairIntrinsics.set,
|
|
1270
1332
|
},
|
|
1271
1333
|
importMeta: {},
|
|
1272
1334
|
});
|
|
1273
|
-
functors[
|
|
1335
|
+
functors[53]({
|
|
1274
1336
|
imports(entries) {
|
|
1275
1337
|
const map = new Map(entries);
|
|
1276
1338
|
observeImports(map, "./assert-sloppy-mode.js", 1);
|
|
1277
1339
|
observeImports(map, "./commons.js", 0);
|
|
1278
|
-
observeImports(map, "./lockdown.js",
|
|
1340
|
+
observeImports(map, "./lockdown.js", 52);
|
|
1279
1341
|
},
|
|
1280
1342
|
liveVar: {
|
|
1281
1343
|
},
|
|
@@ -1283,11 +1345,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1283
1345
|
},
|
|
1284
1346
|
importMeta: {},
|
|
1285
1347
|
});
|
|
1286
|
-
functors[
|
|
1348
|
+
functors[54]({
|
|
1287
1349
|
imports(entries) {
|
|
1288
1350
|
const map = new Map(entries);
|
|
1289
1351
|
observeImports(map, "./commons.js", 0);
|
|
1290
|
-
observeImports(map, "./compartment.js",
|
|
1352
|
+
observeImports(map, "./compartment.js", 45);
|
|
1291
1353
|
observeImports(map, "./tame-function-tostring.js", 32);
|
|
1292
1354
|
observeImports(map, "./intrinsics.js", 12);
|
|
1293
1355
|
},
|
|
@@ -1297,7 +1359,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1297
1359
|
},
|
|
1298
1360
|
importMeta: {},
|
|
1299
1361
|
});
|
|
1300
|
-
functors[
|
|
1362
|
+
functors[55]({
|
|
1301
1363
|
imports(entries) {
|
|
1302
1364
|
const map = new Map(entries);
|
|
1303
1365
|
observeImports(map, "./commons.js", 0);
|
|
@@ -1309,11 +1371,11 @@ function observeImports(map, importName, importIndex) {
|
|
|
1309
1371
|
},
|
|
1310
1372
|
importMeta: {},
|
|
1311
1373
|
});
|
|
1312
|
-
functors[
|
|
1374
|
+
functors[56]({
|
|
1313
1375
|
imports(entries) {
|
|
1314
1376
|
const map = new Map(entries);
|
|
1315
1377
|
observeImports(map, "./commons.js", 0);
|
|
1316
|
-
observeImports(map, "./error/console.js",
|
|
1378
|
+
observeImports(map, "./error/console.js", 35);
|
|
1317
1379
|
observeImports(map, "./error/assert.js", 9);
|
|
1318
1380
|
},
|
|
1319
1381
|
liveVar: {
|
|
@@ -1322,13 +1384,13 @@ function observeImports(map, importName, importIndex) {
|
|
|
1322
1384
|
},
|
|
1323
1385
|
importMeta: {},
|
|
1324
1386
|
});
|
|
1325
|
-
functors[
|
|
1387
|
+
functors[57]({
|
|
1326
1388
|
imports(entries) {
|
|
1327
1389
|
const map = new Map(entries);
|
|
1328
|
-
observeImports(map, "./src/lockdown-shim.js",
|
|
1329
|
-
observeImports(map, "./src/compartment-shim.js",
|
|
1330
|
-
observeImports(map, "./src/assert-shim.js",
|
|
1331
|
-
observeImports(map, "./src/console-shim.js",
|
|
1390
|
+
observeImports(map, "./src/lockdown-shim.js", 53);
|
|
1391
|
+
observeImports(map, "./src/compartment-shim.js", 54);
|
|
1392
|
+
observeImports(map, "./src/assert-shim.js", 55);
|
|
1393
|
+
observeImports(map, "./src/console-shim.js", 56);
|
|
1332
1394
|
},
|
|
1333
1395
|
liveVar: {
|
|
1334
1396
|
},
|
|
@@ -1339,7 +1401,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1339
1401
|
|
|
1340
1402
|
return cells[cells.length - 1]['*'].get();
|
|
1341
1403
|
})([// === functors[0] ===
|
|
1342
|
-
({ imports: $h
|
|
1404
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /* global globalThis */
|
|
1343
1405
|
/* eslint-disable no-restricted-globals */
|
|
1344
1406
|
|
|
1345
1407
|
/**
|
|
@@ -1355,11 +1417,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1355
1417
|
|
|
1356
1418
|
// We cannot use globalThis as the local name since it would capture the
|
|
1357
1419
|
// lexical name.
|
|
1358
|
-
const universalThis= globalThis;$h
|
|
1420
|
+
const universalThis= globalThis;$h͏_once.universalThis(universalThis);
|
|
1359
1421
|
|
|
1360
1422
|
|
|
1361
1423
|
const {
|
|
1362
1424
|
Array,
|
|
1425
|
+
ArrayBuffer,
|
|
1363
1426
|
Date,
|
|
1364
1427
|
FinalizationRegistry,
|
|
1365
1428
|
Float32Array,
|
|
@@ -1375,9 +1438,10 @@ const {
|
|
|
1375
1438
|
Set,
|
|
1376
1439
|
String,
|
|
1377
1440
|
Symbol,
|
|
1441
|
+
Uint8Array,
|
|
1378
1442
|
WeakMap,
|
|
1379
1443
|
WeakSet}=
|
|
1380
|
-
globalThis;$h
|
|
1444
|
+
globalThis;$h͏_once.Array(Array);$h͏_once.ArrayBuffer(ArrayBuffer);$h͏_once.Date(Date);$h͏_once.FinalizationRegistry(FinalizationRegistry);$h͏_once.Float32Array(Float32Array);$h͏_once.JSON(JSON);$h͏_once.Map(Map);$h͏_once.Math(Math);$h͏_once.Number(Number);$h͏_once.Object(Object);$h͏_once.Promise(Promise);$h͏_once.Proxy(Proxy);$h͏_once.Reflect(Reflect);$h͏_once.FERAL_REG_EXP(FERAL_REG_EXP);$h͏_once.Set(Set);$h͏_once.String(String);$h͏_once.Symbol(Symbol);$h͏_once.Uint8Array(Uint8Array);$h͏_once.WeakMap(WeakMap);$h͏_once.WeakSet(WeakSet);
|
|
1381
1445
|
|
|
1382
1446
|
const {
|
|
1383
1447
|
// The feral Error constructor is safe for internal use, but must not be
|
|
@@ -1389,7 +1453,7 @@ const {
|
|
|
1389
1453
|
SyntaxError,
|
|
1390
1454
|
TypeError,
|
|
1391
1455
|
AggregateError}=
|
|
1392
|
-
globalThis;$h
|
|
1456
|
+
globalThis;$h͏_once.FERAL_ERROR(FERAL_ERROR);$h͏_once.RangeError(RangeError);$h͏_once.ReferenceError(ReferenceError);$h͏_once.SyntaxError(SyntaxError);$h͏_once.TypeError(TypeError);$h͏_once.AggregateError(AggregateError);
|
|
1393
1457
|
|
|
1394
1458
|
const {
|
|
1395
1459
|
assign,
|
|
@@ -1412,7 +1476,7 @@ const {
|
|
|
1412
1476
|
setPrototypeOf,
|
|
1413
1477
|
values,
|
|
1414
1478
|
fromEntries}=
|
|
1415
|
-
Object;$h
|
|
1479
|
+
Object;$h͏_once.assign(assign);$h͏_once.create(create);$h͏_once.defineProperties(defineProperties);$h͏_once.entries(entries);$h͏_once.freeze(freeze);$h͏_once.getOwnPropertyDescriptor(getOwnPropertyDescriptor);$h͏_once.getOwnPropertyDescriptors(getOwnPropertyDescriptors);$h͏_once.getOwnPropertyNames(getOwnPropertyNames);$h͏_once.getPrototypeOf(getPrototypeOf);$h͏_once.is(is);$h͏_once.isFrozen(isFrozen);$h͏_once.isSealed(isSealed);$h͏_once.isExtensible(isExtensible);$h͏_once.keys(keys);$h͏_once.objectPrototype(objectPrototype);$h͏_once.seal(seal);$h͏_once.preventExtensions(preventExtensions);$h͏_once.setPrototypeOf(setPrototypeOf);$h͏_once.values(values);$h͏_once.fromEntries(fromEntries);
|
|
1416
1480
|
|
|
1417
1481
|
const {
|
|
1418
1482
|
species: speciesSymbol,
|
|
@@ -1422,14 +1486,14 @@ const {
|
|
|
1422
1486
|
unscopables: unscopablesSymbol,
|
|
1423
1487
|
keyFor: symbolKeyFor,
|
|
1424
1488
|
for: symbolFor}=
|
|
1425
|
-
Symbol;$h
|
|
1489
|
+
Symbol;$h͏_once.speciesSymbol(speciesSymbol);$h͏_once.toStringTagSymbol(toStringTagSymbol);$h͏_once.iteratorSymbol(iteratorSymbol);$h͏_once.matchAllSymbol(matchAllSymbol);$h͏_once.unscopablesSymbol(unscopablesSymbol);$h͏_once.symbolKeyFor(symbolKeyFor);$h͏_once.symbolFor(symbolFor);
|
|
1426
1490
|
|
|
1427
|
-
const { isInteger}= Number;$h
|
|
1491
|
+
const { isInteger}= Number;$h͏_once.isInteger(isInteger);
|
|
1428
1492
|
|
|
1429
1493
|
const { stringify: stringifyJson}= JSON;
|
|
1430
1494
|
|
|
1431
1495
|
// Needed only for the Safari bug workaround below
|
|
1432
|
-
$h
|
|
1496
|
+
$h͏_once.stringifyJson(stringifyJson);const{defineProperty:originalDefineProperty}=Object;
|
|
1433
1497
|
|
|
1434
1498
|
const defineProperty= (object, prop, descriptor)=> {
|
|
1435
1499
|
// We used to do the following, until we had to reopen Safari bug
|
|
@@ -1450,7 +1514,7 @@ const defineProperty= (object, prop, descriptor)=> {
|
|
|
1450
1514
|
|
|
1451
1515
|
}
|
|
1452
1516
|
return result;
|
|
1453
|
-
};$h
|
|
1517
|
+
};$h͏_once.defineProperty(defineProperty);
|
|
1454
1518
|
|
|
1455
1519
|
const {
|
|
1456
1520
|
apply,
|
|
@@ -1462,24 +1526,29 @@ const {
|
|
|
1462
1526
|
ownKeys,
|
|
1463
1527
|
preventExtensions: reflectPreventExtensions,
|
|
1464
1528
|
set: reflectSet}=
|
|
1465
|
-
Reflect;$h
|
|
1466
|
-
|
|
1467
|
-
const { isArray, prototype: arrayPrototype}= Array;$h
|
|
1468
|
-
const { prototype:
|
|
1469
|
-
const {
|
|
1470
|
-
const {
|
|
1471
|
-
const { prototype:
|
|
1472
|
-
const { prototype:
|
|
1473
|
-
const { prototype:
|
|
1474
|
-
const { prototype:
|
|
1475
|
-
const { prototype:
|
|
1476
|
-
const { prototype:
|
|
1529
|
+
Reflect;$h͏_once.apply(apply);$h͏_once.construct(construct);$h͏_once.reflectGet(reflectGet);$h͏_once.reflectGetOwnPropertyDescriptor(reflectGetOwnPropertyDescriptor);$h͏_once.reflectHas(reflectHas);$h͏_once.reflectIsExtensible(reflectIsExtensible);$h͏_once.ownKeys(ownKeys);$h͏_once.reflectPreventExtensions(reflectPreventExtensions);$h͏_once.reflectSet(reflectSet);
|
|
1530
|
+
|
|
1531
|
+
const { isArray, prototype: arrayPrototype}= Array;$h͏_once.isArray(isArray);$h͏_once.arrayPrototype(arrayPrototype);
|
|
1532
|
+
const { prototype: arrayBufferPrototype}= ArrayBuffer;$h͏_once.arrayBufferPrototype(arrayBufferPrototype);
|
|
1533
|
+
const { prototype: mapPrototype}= Map;$h͏_once.mapPrototype(mapPrototype);
|
|
1534
|
+
const { revocable: proxyRevocable}= Proxy;$h͏_once.proxyRevocable(proxyRevocable);
|
|
1535
|
+
const { prototype: regexpPrototype}= RegExp;$h͏_once.regexpPrototype(regexpPrototype);
|
|
1536
|
+
const { prototype: setPrototype}= Set;$h͏_once.setPrototype(setPrototype);
|
|
1537
|
+
const { prototype: stringPrototype}= String;$h͏_once.stringPrototype(stringPrototype);
|
|
1538
|
+
const { prototype: weakmapPrototype}= WeakMap;$h͏_once.weakmapPrototype(weakmapPrototype);
|
|
1539
|
+
const { prototype: weaksetPrototype}= WeakSet;$h͏_once.weaksetPrototype(weaksetPrototype);
|
|
1540
|
+
const { prototype: functionPrototype}= Function;$h͏_once.functionPrototype(functionPrototype);
|
|
1541
|
+
const { prototype: promisePrototype}= Promise;$h͏_once.promisePrototype(promisePrototype);
|
|
1477
1542
|
const { prototype: generatorPrototype}= getPrototypeOf(
|
|
1478
1543
|
// eslint-disable-next-line no-empty-function, func-names
|
|
1479
|
-
function*() { });$h
|
|
1544
|
+
function*() { });$h͏_once.generatorPrototype(generatorPrototype);
|
|
1545
|
+
|
|
1546
|
+
const iteratorPrototype= getPrototypeOf(
|
|
1547
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
1548
|
+
getPrototypeOf(arrayPrototype.values()));$h͏_once.iteratorPrototype(iteratorPrototype);
|
|
1480
1549
|
|
|
1481
1550
|
|
|
1482
|
-
const typedArrayPrototype= getPrototypeOf(Uint8Array.prototype);$h
|
|
1551
|
+
const typedArrayPrototype= getPrototypeOf(Uint8Array.prototype);$h͏_once.typedArrayPrototype(typedArrayPrototype);
|
|
1483
1552
|
|
|
1484
1553
|
const { bind}= functionPrototype;
|
|
1485
1554
|
|
|
@@ -1495,48 +1564,57 @@ const { bind}= functionPrototype;
|
|
|
1495
1564
|
* @type {<F extends (this: any, ...args: any[]) => any>(fn: F) => ((thisArg: ThisParameterType<F>, ...args: Parameters<F>) => ReturnType<F>)}
|
|
1496
1565
|
*/
|
|
1497
1566
|
const uncurryThis= bind.bind(bind.call); // eslint-disable-line @endo/no-polymorphic-call
|
|
1498
|
-
$h
|
|
1567
|
+
$h͏_once.uncurryThis(uncurryThis);
|
|
1499
1568
|
const objectHasOwnProperty= uncurryThis(objectPrototype.hasOwnProperty);
|
|
1500
1569
|
//
|
|
1501
|
-
$h
|
|
1502
|
-
const arrayForEach= uncurryThis(arrayPrototype.forEach);$h
|
|
1503
|
-
const arrayIncludes= uncurryThis(arrayPrototype.includes);$h
|
|
1570
|
+
$h͏_once.objectHasOwnProperty(objectHasOwnProperty);const arrayFilter=uncurryThis(arrayPrototype.filter);$h͏_once.arrayFilter(arrayFilter);
|
|
1571
|
+
const arrayForEach= uncurryThis(arrayPrototype.forEach);$h͏_once.arrayForEach(arrayForEach);
|
|
1572
|
+
const arrayIncludes= uncurryThis(arrayPrototype.includes);$h͏_once.arrayIncludes(arrayIncludes);
|
|
1504
1573
|
const arrayJoin= uncurryThis(arrayPrototype.join);
|
|
1505
|
-
/** @type {<T, U>(thisArg: readonly T[], callbackfn: (value: T, index: number, array: T[]) => U, cbThisArg?: any) => U[]} */$h
|
|
1506
|
-
const arrayMap= /** @type {any} */ uncurryThis(arrayPrototype.map);$h
|
|
1574
|
+
/** @type {<T, U>(thisArg: readonly T[], callbackfn: (value: T, index: number, array: T[]) => U, cbThisArg?: any) => U[]} */$h͏_once.arrayJoin(arrayJoin);
|
|
1575
|
+
const arrayMap= /** @type {any} */ uncurryThis(arrayPrototype.map);$h͏_once.arrayMap(arrayMap);
|
|
1507
1576
|
const arrayFlatMap= /** @type {any} */
|
|
1508
|
-
uncurryThis(arrayPrototype.flatMap);$h
|
|
1577
|
+
uncurryThis(arrayPrototype.flatMap);$h͏_once.arrayFlatMap(arrayFlatMap);
|
|
1509
1578
|
|
|
1510
1579
|
const arrayPop= uncurryThis(arrayPrototype.pop);
|
|
1511
|
-
/** @type {<T>(thisArg: T[], ...items: T[]) => number} */$h
|
|
1512
|
-
const arrayPush= uncurryThis(arrayPrototype.push);$h
|
|
1513
|
-
const arraySlice= uncurryThis(arrayPrototype.slice);$h
|
|
1514
|
-
const arraySome= uncurryThis(arrayPrototype.some);$h
|
|
1515
|
-
const arraySort= uncurryThis(arrayPrototype.sort);$h
|
|
1580
|
+
/** @type {<T>(thisArg: T[], ...items: T[]) => number} */$h͏_once.arrayPop(arrayPop);
|
|
1581
|
+
const arrayPush= uncurryThis(arrayPrototype.push);$h͏_once.arrayPush(arrayPush);
|
|
1582
|
+
const arraySlice= uncurryThis(arrayPrototype.slice);$h͏_once.arraySlice(arraySlice);
|
|
1583
|
+
const arraySome= uncurryThis(arrayPrototype.some);$h͏_once.arraySome(arraySome);
|
|
1584
|
+
const arraySort= uncurryThis(arrayPrototype.sort);$h͏_once.arraySort(arraySort);
|
|
1516
1585
|
const iterateArray= uncurryThis(arrayPrototype[iteratorSymbol]);
|
|
1517
1586
|
//
|
|
1518
|
-
$h
|
|
1519
|
-
|
|
1520
|
-
const
|
|
1521
|
-
|
|
1522
|
-
|
|
1587
|
+
$h͏_once.iterateArray(iterateArray);const arrayBufferSlice=uncurryThis(arrayBufferPrototype.slice);
|
|
1588
|
+
/** @type {(b: ArrayBuffer) => number} */$h͏_once.arrayBufferSlice(arrayBufferSlice);
|
|
1589
|
+
const arrayBufferGetByteLength= uncurryThis(
|
|
1590
|
+
// @ts-expect-error we know it is there on all conforming platforms
|
|
1591
|
+
getOwnPropertyDescriptor(arrayBufferPrototype, 'byteLength').get);
|
|
1592
|
+
|
|
1593
|
+
//
|
|
1594
|
+
$h͏_once.arrayBufferGetByteLength(arrayBufferGetByteLength);const typedArraySet=uncurryThis(typedArrayPrototype.set);
|
|
1595
|
+
//
|
|
1596
|
+
$h͏_once.typedArraySet(typedArraySet);const mapSet=uncurryThis(mapPrototype.set);$h͏_once.mapSet(mapSet);
|
|
1597
|
+
const mapGet= uncurryThis(mapPrototype.get);$h͏_once.mapGet(mapGet);
|
|
1598
|
+
const mapHas= uncurryThis(mapPrototype.has);$h͏_once.mapHas(mapHas);
|
|
1599
|
+
const mapDelete= uncurryThis(mapPrototype.delete);$h͏_once.mapDelete(mapDelete);
|
|
1600
|
+
const mapEntries= uncurryThis(mapPrototype.entries);$h͏_once.mapEntries(mapEntries);
|
|
1523
1601
|
const iterateMap= uncurryThis(mapPrototype[iteratorSymbol]);
|
|
1524
1602
|
//
|
|
1525
|
-
$h
|
|
1526
|
-
const setDelete= uncurryThis(setPrototype.delete);$h
|
|
1527
|
-
const setForEach= uncurryThis(setPrototype.forEach);$h
|
|
1528
|
-
const setHas= uncurryThis(setPrototype.has);$h
|
|
1603
|
+
$h͏_once.iterateMap(iterateMap);const setAdd=uncurryThis(setPrototype.add);$h͏_once.setAdd(setAdd);
|
|
1604
|
+
const setDelete= uncurryThis(setPrototype.delete);$h͏_once.setDelete(setDelete);
|
|
1605
|
+
const setForEach= uncurryThis(setPrototype.forEach);$h͏_once.setForEach(setForEach);
|
|
1606
|
+
const setHas= uncurryThis(setPrototype.has);$h͏_once.setHas(setHas);
|
|
1529
1607
|
const iterateSet= uncurryThis(setPrototype[iteratorSymbol]);
|
|
1530
1608
|
//
|
|
1531
|
-
$h
|
|
1532
|
-
const regexpExec= uncurryThis(regexpPrototype.exec);$h
|
|
1609
|
+
$h͏_once.iterateSet(iterateSet);const regexpTest=uncurryThis(regexpPrototype.test);$h͏_once.regexpTest(regexpTest);
|
|
1610
|
+
const regexpExec= uncurryThis(regexpPrototype.exec);$h͏_once.regexpExec(regexpExec);
|
|
1533
1611
|
const matchAllRegExp= uncurryThis(regexpPrototype[matchAllSymbol]);
|
|
1534
1612
|
//
|
|
1535
|
-
$h
|
|
1536
|
-
const stringIncludes= uncurryThis(stringPrototype.includes);$h
|
|
1537
|
-
const stringIndexOf= uncurryThis(stringPrototype.indexOf);$h
|
|
1538
|
-
const stringMatch= uncurryThis(stringPrototype.match);$h
|
|
1539
|
-
const generatorNext= uncurryThis(generatorPrototype.next);$h
|
|
1613
|
+
$h͏_once.matchAllRegExp(matchAllRegExp);const stringEndsWith=uncurryThis(stringPrototype.endsWith);$h͏_once.stringEndsWith(stringEndsWith);
|
|
1614
|
+
const stringIncludes= uncurryThis(stringPrototype.includes);$h͏_once.stringIncludes(stringIncludes);
|
|
1615
|
+
const stringIndexOf= uncurryThis(stringPrototype.indexOf);$h͏_once.stringIndexOf(stringIndexOf);
|
|
1616
|
+
const stringMatch= uncurryThis(stringPrototype.match);$h͏_once.stringMatch(stringMatch);
|
|
1617
|
+
const generatorNext= uncurryThis(generatorPrototype.next);$h͏_once.generatorNext(generatorNext);
|
|
1540
1618
|
const generatorThrow= uncurryThis(generatorPrototype.throw);
|
|
1541
1619
|
|
|
1542
1620
|
/**
|
|
@@ -1544,39 +1622,41 @@ const generatorThrow= uncurryThis(generatorPrototype.throw);
|
|
|
1544
1622
|
* ((thisArg: string, searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string) => string) &
|
|
1545
1623
|
* ((thisArg: string, searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string) => string)
|
|
1546
1624
|
* }
|
|
1547
|
-
*/$h
|
|
1625
|
+
*/$h͏_once.generatorThrow(generatorThrow);
|
|
1548
1626
|
const stringReplace= /** @type {any} */
|
|
1549
|
-
uncurryThis(stringPrototype.replace);$h
|
|
1627
|
+
uncurryThis(stringPrototype.replace);$h͏_once.stringReplace(stringReplace);
|
|
1550
1628
|
|
|
1551
|
-
const stringSearch= uncurryThis(stringPrototype.search);$h
|
|
1552
|
-
const stringSlice= uncurryThis(stringPrototype.slice);
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1629
|
+
const stringSearch= uncurryThis(stringPrototype.search);$h͏_once.stringSearch(stringSearch);
|
|
1630
|
+
const stringSlice= uncurryThis(stringPrototype.slice);$h͏_once.stringSlice(stringSlice);
|
|
1631
|
+
const stringSplit=
|
|
1632
|
+
/** @type {(thisArg: string, splitter: string | RegExp | { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number) => string[]} */
|
|
1633
|
+
uncurryThis(stringPrototype.split);$h͏_once.stringSplit(stringSplit);
|
|
1634
|
+
|
|
1635
|
+
const stringStartsWith= uncurryThis(stringPrototype.startsWith);$h͏_once.stringStartsWith(stringStartsWith);
|
|
1556
1636
|
const iterateString= uncurryThis(stringPrototype[iteratorSymbol]);
|
|
1557
1637
|
//
|
|
1558
|
-
$h
|
|
1559
|
-
/** @type {<K extends {}, V>(thisArg: WeakMap<K, V>, ...args: Parameters<WeakMap<K,V>['get']>) => ReturnType<WeakMap<K,V>['get']>} */$h
|
|
1560
|
-
const weakmapGet= uncurryThis(weakmapPrototype.get);$h
|
|
1561
|
-
const weakmapHas= uncurryThis(weakmapPrototype.has);$h
|
|
1638
|
+
$h͏_once.iterateString(iterateString);const weakmapDelete=uncurryThis(weakmapPrototype.delete);
|
|
1639
|
+
/** @type {<K extends {}, V>(thisArg: WeakMap<K, V>, ...args: Parameters<WeakMap<K,V>['get']>) => ReturnType<WeakMap<K,V>['get']>} */$h͏_once.weakmapDelete(weakmapDelete);
|
|
1640
|
+
const weakmapGet= uncurryThis(weakmapPrototype.get);$h͏_once.weakmapGet(weakmapGet);
|
|
1641
|
+
const weakmapHas= uncurryThis(weakmapPrototype.has);$h͏_once.weakmapHas(weakmapHas);
|
|
1562
1642
|
const weakmapSet= uncurryThis(weakmapPrototype.set);
|
|
1563
1643
|
//
|
|
1564
|
-
$h
|
|
1644
|
+
$h͏_once.weakmapSet(weakmapSet);const weaksetAdd=uncurryThis(weaksetPrototype.add);$h͏_once.weaksetAdd(weaksetAdd);
|
|
1565
1645
|
const weaksetHas= uncurryThis(weaksetPrototype.has);
|
|
1566
1646
|
//
|
|
1567
|
-
$h
|
|
1647
|
+
$h͏_once.weaksetHas(weaksetHas);const functionToString=uncurryThis(functionPrototype.toString);$h͏_once.functionToString(functionToString);
|
|
1568
1648
|
const functionBind= uncurryThis(bind);
|
|
1569
1649
|
//
|
|
1570
|
-
$h
|
|
1571
|
-
const promiseAll= (promises)=>apply(all, Promise, [promises]);$h
|
|
1650
|
+
$h͏_once.functionBind(functionBind);const{all}=Promise;
|
|
1651
|
+
const promiseAll= (promises)=>apply(all, Promise, [promises]);$h͏_once.promiseAll(promiseAll);
|
|
1572
1652
|
const promiseCatch= uncurryThis(promisePrototype.catch);
|
|
1573
|
-
/** @type {<T, TResult1 = T, TResult2 = never>(thisArg: T, onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null) => Promise<TResult1 | TResult2>} */$h
|
|
1653
|
+
/** @type {<T, TResult1 = T, TResult2 = never>(thisArg: T, onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null) => Promise<TResult1 | TResult2>} */$h͏_once.promiseCatch(promiseCatch);
|
|
1574
1654
|
const promiseThen= /** @type {any} */
|
|
1575
1655
|
uncurryThis(promisePrototype.then);
|
|
1576
1656
|
|
|
1577
1657
|
//
|
|
1578
|
-
$h
|
|
1579
|
-
FinalizationRegistry&& uncurryThis(FinalizationRegistry.prototype.register);$h
|
|
1658
|
+
$h͏_once.promiseThen(promiseThen);const finalizationRegistryRegister=
|
|
1659
|
+
FinalizationRegistry&& uncurryThis(FinalizationRegistry.prototype.register);$h͏_once.finalizationRegistryRegister(finalizationRegistryRegister);
|
|
1580
1660
|
const finalizationRegistryUnregister=
|
|
1581
1661
|
FinalizationRegistry&&
|
|
1582
1662
|
uncurryThis(FinalizationRegistry.prototype.unregister);
|
|
@@ -1586,14 +1666,14 @@ const finalizationRegistryUnregister=
|
|
|
1586
1666
|
* Return the constructor from an instance.
|
|
1587
1667
|
*
|
|
1588
1668
|
* @param {Function} fn
|
|
1589
|
-
*/$h
|
|
1669
|
+
*/$h͏_once.finalizationRegistryUnregister(finalizationRegistryUnregister);
|
|
1590
1670
|
const getConstructorOf= (fn)=>
|
|
1591
1671
|
reflectGet(getPrototypeOf(fn), 'constructor');
|
|
1592
1672
|
|
|
1593
1673
|
/**
|
|
1594
1674
|
* immutableObject
|
|
1595
1675
|
* An immutable (frozen) empty object that is safe to share.
|
|
1596
|
-
*/$h
|
|
1676
|
+
*/$h͏_once.getConstructorOf(getConstructorOf);
|
|
1597
1677
|
const immutableObject= freeze(create(null));
|
|
1598
1678
|
|
|
1599
1679
|
/**
|
|
@@ -1612,7 +1692,7 @@ const immutableObject= freeze(create(null));
|
|
|
1612
1692
|
* attempting to box a primitive.
|
|
1613
1693
|
*
|
|
1614
1694
|
* @param {any} value
|
|
1615
|
-
*/$h
|
|
1695
|
+
*/$h͏_once.immutableObject(immutableObject);
|
|
1616
1696
|
const isObject= (value)=>Object(value)=== value;
|
|
1617
1697
|
|
|
1618
1698
|
/**
|
|
@@ -1625,19 +1705,19 @@ const isObject= (value)=>Object(value)=== value;
|
|
|
1625
1705
|
* for such a trivial case outside commons.js, we provide a utility function.
|
|
1626
1706
|
*
|
|
1627
1707
|
* @param {any} value
|
|
1628
|
-
*/$h
|
|
1708
|
+
*/$h͏_once.isObject(isObject);
|
|
1629
1709
|
const isError= (value)=>value instanceof FERAL_ERROR;
|
|
1630
1710
|
|
|
1631
1711
|
// The original unsafe untamed eval function, which must not escape.
|
|
1632
1712
|
// Sample at module initialization time, which is before lockdown can
|
|
1633
1713
|
// repair it. Use it only to build powerless abstractions.
|
|
1634
1714
|
// eslint-disable-next-line no-eval
|
|
1635
|
-
$h
|
|
1715
|
+
$h͏_once.isError(isError);const FERAL_EVAL=eval;
|
|
1636
1716
|
|
|
1637
1717
|
// The original unsafe untamed Function constructor, which must not escape.
|
|
1638
1718
|
// Sample at module initialization time, which is before lockdown can
|
|
1639
1719
|
// repair it. Use it only to build powerless abstractions.
|
|
1640
|
-
$h
|
|
1720
|
+
$h͏_once.FERAL_EVAL(FERAL_EVAL);const FERAL_FUNCTION=Function;$h͏_once.FERAL_FUNCTION(FERAL_FUNCTION);
|
|
1641
1721
|
|
|
1642
1722
|
const noEvalEvaluate= ()=> {
|
|
1643
1723
|
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_EVAL.md
|
|
@@ -1645,7 +1725,7 @@ const noEvalEvaluate= ()=> {
|
|
|
1645
1725
|
};
|
|
1646
1726
|
|
|
1647
1727
|
// ////////////////// FERAL_STACK_GETTER FERAL_STACK_SETTER ////////////////////
|
|
1648
|
-
$h
|
|
1728
|
+
$h͏_once.noEvalEvaluate(noEvalEvaluate);
|
|
1649
1729
|
const er1StackDesc= getOwnPropertyDescriptor(Error('er1'), 'stack');
|
|
1650
1730
|
const er2StackDesc= getOwnPropertyDescriptor(TypeError('er2'), 'stack');
|
|
1651
1731
|
|
|
@@ -1699,12 +1779,12 @@ const FERAL_STACK_GETTER= feralStackGetter;
|
|
|
1699
1779
|
* both `undefined`.
|
|
1700
1780
|
*
|
|
1701
1781
|
* @type {((newValue: any) => void) | undefined}
|
|
1702
|
-
*/$h
|
|
1703
|
-
const FERAL_STACK_SETTER= feralStackSetter;$h
|
|
1782
|
+
*/$h͏_once.FERAL_STACK_GETTER(FERAL_STACK_GETTER);
|
|
1783
|
+
const FERAL_STACK_SETTER= feralStackSetter;$h͏_once.FERAL_STACK_SETTER(FERAL_STACK_SETTER);
|
|
1704
1784
|
})()
|
|
1705
1785
|
,
|
|
1706
1786
|
// === functors[1] ===
|
|
1707
|
-
({ imports: $h
|
|
1787
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]]]]]);
|
|
1708
1788
|
|
|
1709
1789
|
/** getThis returns globalThis in sloppy mode or undefined in strict mode. */
|
|
1710
1790
|
function getThis() {
|
|
@@ -1718,7 +1798,7 @@ if( getThis()) {
|
|
|
1718
1798
|
})()
|
|
1719
1799
|
,
|
|
1720
1800
|
// === functors[2] ===
|
|
1721
|
-
({ imports: $h
|
|
1801
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /* global globalThis */
|
|
1722
1802
|
// @ts-check
|
|
1723
1803
|
|
|
1724
1804
|
// `@endo/env-options` needs to be imported quite early, and so should
|
|
@@ -1843,7 +1923,7 @@ const makeEnvironmentCaptor= (aGlobal, dropNames= false)=> {
|
|
|
1843
1923
|
environmentOptionsListHas,
|
|
1844
1924
|
getCapturedEnvironmentOptionNames});
|
|
1845
1925
|
|
|
1846
|
-
};$h
|
|
1926
|
+
};$h͏_once.makeEnvironmentCaptor(makeEnvironmentCaptor);
|
|
1847
1927
|
freeze(makeEnvironmentCaptor);
|
|
1848
1928
|
|
|
1849
1929
|
/**
|
|
@@ -1854,15 +1934,15 @@ const {
|
|
|
1854
1934
|
getEnvironmentOption,
|
|
1855
1935
|
getEnvironmentOptionsList,
|
|
1856
1936
|
environmentOptionsListHas}=
|
|
1857
|
-
makeEnvironmentCaptor(globalThis, true);$h
|
|
1937
|
+
makeEnvironmentCaptor(globalThis, true);$h͏_once.getEnvironmentOption(getEnvironmentOption);$h͏_once.getEnvironmentOptionsList(getEnvironmentOptionsList);$h͏_once.environmentOptionsListHas(environmentOptionsListHas);
|
|
1858
1938
|
})()
|
|
1859
1939
|
,
|
|
1860
1940
|
// === functors[3] ===
|
|
1861
|
-
({ imports: $h
|
|
1941
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([["./src/env-options.js", []]]);
|
|
1862
1942
|
})()
|
|
1863
1943
|
,
|
|
1864
1944
|
// === functors[4] ===
|
|
1865
|
-
({ imports: $h
|
|
1945
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Set,String,isArray,arrayJoin,arraySlice,arraySort,arrayMap,keys,fromEntries,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h͏_imports([["../commons.js", [["Set", [$h͏_a => (Set = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["isArray", [$h͏_a => (isArray = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arraySlice", [$h͏_a => (arraySlice = $h͏_a)]],["arraySort", [$h͏_a => (arraySort = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["keys", [$h͏_a => (keys = $h͏_a)]],["fromEntries", [$h͏_a => (fromEntries = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["isError", [$h͏_a => (isError = $h͏_a)]],["setAdd", [$h͏_a => (setAdd = $h͏_a)]],["setHas", [$h͏_a => (setHas = $h͏_a)]],["stringIncludes", [$h͏_a => (stringIncludes = $h͏_a)]],["stringStartsWith", [$h͏_a => (stringStartsWith = $h͏_a)]],["stringifyJson", [$h͏_a => (stringifyJson = $h͏_a)]],["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]]]]]);
|
|
1866
1946
|
|
|
1867
1947
|
|
|
1868
1948
|
|
|
@@ -1914,14 +1994,14 @@ const enJoin= (terms, conjunction)=> {
|
|
|
1914
1994
|
*
|
|
1915
1995
|
* @param {string} str The noun to prepend
|
|
1916
1996
|
* @returns {string} The noun prepended with a/an
|
|
1917
|
-
*/$h
|
|
1997
|
+
*/$h͏_once.enJoin(enJoin);
|
|
1918
1998
|
const an= (str)=>{
|
|
1919
1999
|
str= `${str}`;
|
|
1920
2000
|
if( str.length>= 1&& stringIncludes('aeiouAEIOU', str[0])) {
|
|
1921
2001
|
return `an ${str}`;
|
|
1922
2002
|
}
|
|
1923
2003
|
return `a ${str}`;
|
|
1924
|
-
};$h
|
|
2004
|
+
};$h͏_once.an(an);
|
|
1925
2005
|
freeze(an);
|
|
1926
2006
|
|
|
1927
2007
|
|
|
@@ -2054,12 +2134,12 @@ const bestEffortStringify= (payload, spaces= undefined)=> {
|
|
|
2054
2134
|
// whenever it is possible for it to.
|
|
2055
2135
|
return '[Something that failed to stringify]';
|
|
2056
2136
|
}
|
|
2057
|
-
};$h
|
|
2137
|
+
};$h͏_once.bestEffortStringify(bestEffortStringify);
|
|
2058
2138
|
freeze(bestEffortStringify);
|
|
2059
2139
|
})()
|
|
2060
2140
|
,
|
|
2061
2141
|
// === functors[5] ===
|
|
2062
|
-
({ imports: $h
|
|
2142
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); // @ts-check
|
|
2063
2143
|
|
|
2064
2144
|
/** @import {GenericErrorConstructor, AssertMakeErrorOptions, DetailsToken, StringablePayload} from '../../types.js' */
|
|
2065
2145
|
|
|
@@ -2121,7 +2201,7 @@ freeze(bestEffortStringify);
|
|
|
2121
2201
|
})()
|
|
2122
2202
|
,
|
|
2123
2203
|
// === functors[6] ===
|
|
2124
|
-
({ imports: $h
|
|
2204
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); // @ts-check
|
|
2125
2205
|
|
|
2126
2206
|
/**
|
|
2127
2207
|
* @typedef {readonly any[]} LogArgs
|
|
@@ -2218,7 +2298,7 @@ freeze(bestEffortStringify);
|
|
|
2218
2298
|
})()
|
|
2219
2299
|
,
|
|
2220
2300
|
// === functors[7] ===
|
|
2221
|
-
({ imports: $h
|
|
2301
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); // @ts-check
|
|
2222
2302
|
/* eslint-disable @endo/no-polymorphic-call */
|
|
2223
2303
|
|
|
2224
2304
|
// eslint-disable-next-line no-restricted-globals
|
|
@@ -2437,12 +2517,12 @@ const makeLRUCacheMap= (keysBudget)=>{
|
|
|
2437
2517
|
'LRUCacheMap'});
|
|
2438
2518
|
|
|
2439
2519
|
return lruCacheMap;
|
|
2440
|
-
};$h
|
|
2520
|
+
};$h͏_once.makeLRUCacheMap(makeLRUCacheMap);
|
|
2441
2521
|
freeze(makeLRUCacheMap);
|
|
2442
2522
|
})()
|
|
2443
2523
|
,
|
|
2444
2524
|
// === functors[8] ===
|
|
2445
|
-
({ imports: $h
|
|
2525
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let makeLRUCacheMap;$h͏_imports([["../make-lru-cachemap.js", [["makeLRUCacheMap", [$h͏_a => (makeLRUCacheMap = $h͏_a)]]]],["./internal-types.js", []]]);
|
|
2446
2526
|
|
|
2447
2527
|
|
|
2448
2528
|
|
|
@@ -2513,12 +2593,12 @@ const makeNoteLogArgsArrayKit= (
|
|
|
2513
2593
|
addLogArgs,
|
|
2514
2594
|
takeLogArgsArray});
|
|
2515
2595
|
|
|
2516
|
-
};$h
|
|
2596
|
+
};$h͏_once.makeNoteLogArgsArrayKit(makeNoteLogArgsArrayKit);
|
|
2517
2597
|
freeze(makeNoteLogArgsArrayKit);
|
|
2518
2598
|
})()
|
|
2519
2599
|
,
|
|
2520
2600
|
// === functors[9] ===
|
|
2521
|
-
({ imports: $h
|
|
2601
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,defineProperty,globalThis,is,isError,regexpTest,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,AggregateError,getOwnPropertyDescriptors,ownKeys,create,objectPrototype,objectHasOwnProperty,an,bestEffortStringify,makeNoteLogArgsArrayKit;$h͏_imports([["../commons.js", [["RangeError", [$h͏_a => (RangeError = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["WeakMap", [$h͏_a => (WeakMap = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arrayPop", [$h͏_a => (arrayPop = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["assign", [$h͏_a => (assign = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["isError", [$h͏_a => (isError = $h͏_a)]],["regexpTest", [$h͏_a => (regexpTest = $h͏_a)]],["stringIndexOf", [$h͏_a => (stringIndexOf = $h͏_a)]],["stringReplace", [$h͏_a => (stringReplace = $h͏_a)]],["stringSlice", [$h͏_a => (stringSlice = $h͏_a)]],["stringStartsWith", [$h͏_a => (stringStartsWith = $h͏_a)]],["weakmapDelete", [$h͏_a => (weakmapDelete = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas", [$h͏_a => (weakmapHas = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]],["AggregateError", [$h͏_a => (AggregateError = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["objectPrototype", [$h͏_a => (objectPrototype = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]]]],["./stringify-utils.js", [["an", [$h͏_a => (an = $h͏_a)]],["bestEffortStringify", [$h͏_a => (bestEffortStringify = $h͏_a)]]]],["./types.js", []],["./internal-types.js", []],["./note-log-args.js", [["makeNoteLogArgsArrayKit", [$h͏_a => (makeNoteLogArgsArrayKit = $h͏_a)]]]]]);
|
|
2522
2602
|
|
|
2523
2603
|
|
|
2524
2604
|
|
|
@@ -2585,7 +2665,7 @@ const quote= (payload, spaces= undefined)=> {
|
|
|
2585
2665
|
|
|
2586
2666
|
weakmapSet(declassifiers, result, payload);
|
|
2587
2667
|
return result;
|
|
2588
|
-
};$h
|
|
2668
|
+
};$h͏_once.quote(quote);
|
|
2589
2669
|
freeze(quote);
|
|
2590
2670
|
|
|
2591
2671
|
const canBeBare= freeze(/^[\w:-]( ?[\w:-])*$/);
|
|
@@ -2602,7 +2682,7 @@ const bare= (payload, spaces= undefined)=> {
|
|
|
2602
2682
|
|
|
2603
2683
|
weakmapSet(declassifiers, result, payload);
|
|
2604
2684
|
return result;
|
|
2605
|
-
};$h
|
|
2685
|
+
};$h͏_once.bare(bare);
|
|
2606
2686
|
freeze(bare);
|
|
2607
2687
|
|
|
2608
2688
|
// /////////////////////////////////////////////////////////////////////////////
|
|
@@ -2688,7 +2768,7 @@ const redactedDetails= (template, ...args)=> {
|
|
|
2688
2768
|
const detailsToken= freeze({ __proto__: DetailsTokenProto});
|
|
2689
2769
|
weakmapSet(hiddenDetailsMap, detailsToken, { template, args});
|
|
2690
2770
|
return (/** @type {DetailsToken} */ /** @type {unknown} */ detailsToken);
|
|
2691
|
-
};$h
|
|
2771
|
+
};$h͏_once.redactedDetails(redactedDetails);
|
|
2692
2772
|
freeze(redactedDetails);
|
|
2693
2773
|
|
|
2694
2774
|
/**
|
|
@@ -2710,7 +2790,7 @@ const unredactedDetails= (template, ...args)=> {
|
|
|
2710
2790
|
weakmapHas(declassifiers, arg)? arg: quote(arg));
|
|
2711
2791
|
|
|
2712
2792
|
return redactedDetails(template, ...args);
|
|
2713
|
-
};$h
|
|
2793
|
+
};$h͏_once.unredactedDetails(unredactedDetails);
|
|
2714
2794
|
freeze(unredactedDetails);
|
|
2715
2795
|
|
|
2716
2796
|
|
|
@@ -2837,7 +2917,7 @@ const sanitizeError= (error)=>{
|
|
|
2837
2917
|
|
|
2838
2918
|
/**
|
|
2839
2919
|
* @type {AssertionUtilities['error']}
|
|
2840
|
-
*/$h
|
|
2920
|
+
*/$h͏_once.sanitizeError(sanitizeError);
|
|
2841
2921
|
const makeError= (
|
|
2842
2922
|
optDetails= redactedDetails `Assert failed`,
|
|
2843
2923
|
errConstructor= globalThis.Error,
|
|
@@ -2890,7 +2970,7 @@ const makeError= (
|
|
|
2890
2970
|
}
|
|
2891
2971
|
// The next line is a particularly fruitful place to put a breakpoint.
|
|
2892
2972
|
return error;
|
|
2893
|
-
};$h
|
|
2973
|
+
};$h͏_once.makeError(makeError);
|
|
2894
2974
|
freeze(makeError);
|
|
2895
2975
|
|
|
2896
2976
|
// /////////////////////////////////////////////////////////////////////////////
|
|
@@ -2931,7 +3011,7 @@ const note= (error, detailsNote)=> {
|
|
|
2931
3011
|
}else {
|
|
2932
3012
|
addLogArgs(error, logArgs);
|
|
2933
3013
|
}
|
|
2934
|
-
};$h
|
|
3014
|
+
};$h͏_once.note(note);
|
|
2935
3015
|
freeze(note);
|
|
2936
3016
|
|
|
2937
3017
|
/**
|
|
@@ -2978,7 +3058,7 @@ const loggedErrorHandler= {
|
|
|
2978
3058
|
}
|
|
2979
3059
|
}
|
|
2980
3060
|
return result|| [];
|
|
2981
|
-
}};$h
|
|
3061
|
+
}};$h͏_once.loggedErrorHandler(loggedErrorHandler);
|
|
2982
3062
|
|
|
2983
3063
|
freeze(loggedErrorHandler);
|
|
2984
3064
|
|
|
@@ -3079,23 +3159,23 @@ const makeAssert= (optRaise= undefined, unredacted= false)=> {
|
|
|
3079
3159
|
makeAssert});
|
|
3080
3160
|
|
|
3081
3161
|
return freeze(assert);
|
|
3082
|
-
};$h
|
|
3162
|
+
};$h͏_once.makeAssert(makeAssert);
|
|
3083
3163
|
freeze(makeAssert);
|
|
3084
3164
|
|
|
3085
3165
|
|
|
3086
3166
|
/** @type {Assert} */
|
|
3087
|
-
const assert= makeAssert();$h
|
|
3167
|
+
const assert= makeAssert();$h͏_once.assert(assert);
|
|
3088
3168
|
|
|
3089
3169
|
|
|
3090
3170
|
// Internal, to obviate polymorphic dispatch, but may become rigorously
|
|
3091
3171
|
// consistent with @endo/error:
|
|
3092
3172
|
|
|
3093
3173
|
/** @type {AssertionFunctions['equal']} */
|
|
3094
|
-
const assertEqual= assert.equal;$h
|
|
3174
|
+
const assertEqual= assert.equal;$h͏_once.assertEqual(assertEqual);
|
|
3095
3175
|
})()
|
|
3096
3176
|
,
|
|
3097
3177
|
// === functors[10] ===
|
|
3098
|
-
({ imports: $h
|
|
3178
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Set,String,TypeError,WeakSet,globalThis,apply,arrayForEach,defineProperty,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getPrototypeOf,isInteger,isObject,objectHasOwnProperty,ownKeys,preventExtensions,setAdd,setForEach,setHas,toStringTagSymbol,typedArrayPrototype,weaksetAdd,weaksetHas,FERAL_STACK_GETTER,FERAL_STACK_SETTER,isError,assert;$h͏_imports([["./commons.js", [["Set", [$h͏_a => (Set = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["arrayForEach", [$h͏_a => (arrayForEach = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["isInteger", [$h͏_a => (isInteger = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["preventExtensions", [$h͏_a => (preventExtensions = $h͏_a)]],["setAdd", [$h͏_a => (setAdd = $h͏_a)]],["setForEach", [$h͏_a => (setForEach = $h͏_a)]],["setHas", [$h͏_a => (setHas = $h͏_a)]],["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]],["typedArrayPrototype", [$h͏_a => (typedArrayPrototype = $h͏_a)]],["weaksetAdd", [$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]],["FERAL_STACK_GETTER", [$h͏_a => (FERAL_STACK_GETTER = $h͏_a)]],["FERAL_STACK_SETTER", [$h͏_a => (FERAL_STACK_SETTER = $h͏_a)]],["isError", [$h͏_a => (isError = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
3099
3179
|
|
|
3100
3180
|
|
|
3101
3181
|
|
|
@@ -3180,7 +3260,7 @@ const isTypedArray= (object)=>{
|
|
|
3180
3260
|
* https://tc39.es/ecma262/#sec-canonicalnumericindexstring
|
|
3181
3261
|
*
|
|
3182
3262
|
* @param {string | symbol} propertyKey
|
|
3183
|
-
*/$h
|
|
3263
|
+
*/$h͏_once.isTypedArray(isTypedArray);
|
|
3184
3264
|
const isCanonicalIntegerIndexString= (propertyKey)=>{
|
|
3185
3265
|
const n= +String(propertyKey);
|
|
3186
3266
|
return isInteger(n)&& String(n)=== propertyKey;
|
|
@@ -3369,11 +3449,11 @@ const makeHardener= ()=> {
|
|
|
3369
3449
|
|
|
3370
3450
|
|
|
3371
3451
|
return harden;
|
|
3372
|
-
};$h
|
|
3452
|
+
};$h͏_once.makeHardener(makeHardener);
|
|
3373
3453
|
})()
|
|
3374
3454
|
,
|
|
3375
3455
|
// === functors[11] ===
|
|
3376
|
-
({ imports: $h
|
|
3456
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let arrayPush;$h͏_imports([["./commons.js", [["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]]]]]);
|
|
3377
3457
|
|
|
3378
3458
|
|
|
3379
3459
|
|
|
@@ -3408,7 +3488,7 @@ const constantProperties= {
|
|
|
3408
3488
|
* Properties of all global objects.
|
|
3409
3489
|
* Must be powerless.
|
|
3410
3490
|
* Maps from property name to the intrinsic name in the whitelist.
|
|
3411
|
-
*/$h
|
|
3491
|
+
*/$h͏_once.constantProperties(constantProperties);
|
|
3412
3492
|
const universalPropertyNames= {
|
|
3413
3493
|
// *** Function Properties of the Global Object
|
|
3414
3494
|
|
|
@@ -3476,8 +3556,12 @@ const universalPropertyNames= {
|
|
|
3476
3556
|
|
|
3477
3557
|
// ESNext
|
|
3478
3558
|
|
|
3559
|
+
// https://github.com/tc39/proposal-source-phase-imports?tab=readme-ov-file#js-module-source
|
|
3560
|
+
ModuleSource: 'ModuleSource',
|
|
3561
|
+
|
|
3479
3562
|
lockdown: 'lockdown',
|
|
3480
3563
|
harden: 'harden',
|
|
3564
|
+
|
|
3481
3565
|
HandledPromise: 'HandledPromise' // TODO: Until Promise.delegate (see below).
|
|
3482
3566
|
};
|
|
3483
3567
|
|
|
@@ -3487,7 +3571,7 @@ const universalPropertyNames= {
|
|
|
3487
3571
|
* start compartment, as well as any compartments created before lockdown.
|
|
3488
3572
|
* These may provide much of the power provided by the original.
|
|
3489
3573
|
* Maps from property name to the intrinsic name in the whitelist.
|
|
3490
|
-
*/$h
|
|
3574
|
+
*/$h͏_once.universalPropertyNames(universalPropertyNames);
|
|
3491
3575
|
const initialGlobalPropertyNames= {
|
|
3492
3576
|
// *** Constructor Properties of the Global Object
|
|
3493
3577
|
|
|
@@ -3521,7 +3605,7 @@ const initialGlobalPropertyNames= {
|
|
|
3521
3605
|
* Those found only on the globals of new compartments created after lockdown,
|
|
3522
3606
|
* which must therefore be powerless.
|
|
3523
3607
|
* Maps from property name to the intrinsic name in the whitelist.
|
|
3524
|
-
*/$h
|
|
3608
|
+
*/$h͏_once.initialGlobalPropertyNames(initialGlobalPropertyNames);
|
|
3525
3609
|
const sharedGlobalPropertyNames= {
|
|
3526
3610
|
// *** Constructor Properties of the Global Object
|
|
3527
3611
|
|
|
@@ -3541,7 +3625,7 @@ const sharedGlobalPropertyNames= {
|
|
|
3541
3625
|
* of the start compartment.
|
|
3542
3626
|
* Maps from property name to the intrinsic name in the whitelist
|
|
3543
3627
|
* (which is currently always the same).
|
|
3544
|
-
*/$h
|
|
3628
|
+
*/$h͏_once.sharedGlobalPropertyNames(sharedGlobalPropertyNames);
|
|
3545
3629
|
const uniqueGlobalPropertyNames= {
|
|
3546
3630
|
// *** Value Properties of the Global Object
|
|
3547
3631
|
|
|
@@ -3566,7 +3650,7 @@ const uniqueGlobalPropertyNames= {
|
|
|
3566
3650
|
|
|
3567
3651
|
// All the "subclasses" of Error. These are collectively represented in the
|
|
3568
3652
|
// ECMAScript spec by the meta variable NativeError.
|
|
3569
|
-
/** @type {GenericErrorConstructor[]} */$h
|
|
3653
|
+
/** @type {GenericErrorConstructor[]} */$h͏_once.uniqueGlobalPropertyNames(uniqueGlobalPropertyNames);
|
|
3570
3654
|
const NativeErrors= [
|
|
3571
3655
|
EvalError,
|
|
3572
3656
|
RangeError,
|
|
@@ -3578,7 +3662,7 @@ const NativeErrors= [
|
|
|
3578
3662
|
// Commented out to accommodate platforms prior to AggregateError.
|
|
3579
3663
|
// Instead, conditional push below.
|
|
3580
3664
|
// AggregateError,
|
|
3581
|
-
];$h
|
|
3665
|
+
];$h͏_once.NativeErrors(NativeErrors);
|
|
3582
3666
|
|
|
3583
3667
|
if( typeof AggregateError!== 'undefined') {
|
|
3584
3668
|
// Conditional, to accommodate platforms prior to AggregateError
|
|
@@ -3644,14 +3728,14 @@ const FunctionInstance= {
|
|
|
3644
3728
|
};
|
|
3645
3729
|
|
|
3646
3730
|
// AsyncFunction Instances
|
|
3647
|
-
$h
|
|
3731
|
+
$h͏_once.FunctionInstance(FunctionInstance);const AsyncFunctionInstance={
|
|
3648
3732
|
// This property is not mentioned in ECMA 262, but is present in V8 and
|
|
3649
3733
|
// necessary for lockdown to succeed.
|
|
3650
3734
|
'[[Proto]]': '%AsyncFunctionPrototype%'};
|
|
3651
3735
|
|
|
3652
3736
|
|
|
3653
3737
|
// Aliases
|
|
3654
|
-
$h
|
|
3738
|
+
$h͏_once.AsyncFunctionInstance(AsyncFunctionInstance);const fn=FunctionInstance;
|
|
3655
3739
|
const asyncFn= AsyncFunctionInstance;
|
|
3656
3740
|
|
|
3657
3741
|
const getter= {
|
|
@@ -3675,7 +3759,7 @@ const isAccessorPermit= (permit)=>{
|
|
|
3675
3759
|
};
|
|
3676
3760
|
|
|
3677
3761
|
// NativeError Object Structure
|
|
3678
|
-
$h
|
|
3762
|
+
$h͏_once.isAccessorPermit(isAccessorPermit);function NativeError(prototype){
|
|
3679
3763
|
return {
|
|
3680
3764
|
// Properties of the NativeError Constructors
|
|
3681
3765
|
'[[Proto]]': '%SharedError%',
|
|
@@ -4880,6 +4964,32 @@ const permitted= {
|
|
|
4880
4964
|
resolve: fn},
|
|
4881
4965
|
|
|
4882
4966
|
|
|
4967
|
+
// https://github.com/tc39/proposal-source-phase-imports?tab=readme-ov-file#js-module-source
|
|
4968
|
+
|
|
4969
|
+
ModuleSource: {
|
|
4970
|
+
'[[Proto]]': '%AbstractModuleSource%',
|
|
4971
|
+
prototype: '%ModuleSourcePrototype%'},
|
|
4972
|
+
|
|
4973
|
+
|
|
4974
|
+
'%ModuleSourcePrototype%': {
|
|
4975
|
+
'[[Proto]]': '%AbstractModuleSourcePrototype%',
|
|
4976
|
+
constructor: 'ModuleSource',
|
|
4977
|
+
'@@toStringTag': 'string',
|
|
4978
|
+
// https://github.com/tc39/proposal-compartments
|
|
4979
|
+
bindings: getter,
|
|
4980
|
+
needsImport: getter,
|
|
4981
|
+
needsImportMeta: getter},
|
|
4982
|
+
|
|
4983
|
+
|
|
4984
|
+
'%AbstractModuleSource%': {
|
|
4985
|
+
'[[Proto]]': '%FunctionPrototype%',
|
|
4986
|
+
prototype: '%AbstractModuleSourcePrototype%'},
|
|
4987
|
+
|
|
4988
|
+
|
|
4989
|
+
'%AbstractModuleSourcePrototype%': {
|
|
4990
|
+
constructor: '%AbstractModuleSource%'},
|
|
4991
|
+
|
|
4992
|
+
|
|
4883
4993
|
Promise: {
|
|
4884
4994
|
// Properties of the Promise Constructor
|
|
4885
4995
|
'[[Proto]]': '%FunctionPrototype%',
|
|
@@ -4989,11 +5099,11 @@ const permitted= {
|
|
|
4989
5099
|
lockdown: fn,
|
|
4990
5100
|
harden: { ...fn, isFake: 'boolean'},
|
|
4991
5101
|
|
|
4992
|
-
'%InitialGetStackString%': fn};$h
|
|
5102
|
+
'%InitialGetStackString%': fn};$h͏_once.permitted(permitted);
|
|
4993
5103
|
})()
|
|
4994
5104
|
,
|
|
4995
5105
|
// === functors[12] ===
|
|
4996
|
-
({ imports: $h
|
|
5106
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,WeakSet,arrayFilter,create,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,permitted;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["values", [$h͏_a => (values = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]]]],["./permits.js", [["constantProperties", [$h͏_a => (constantProperties = $h͏_a)]],["sharedGlobalPropertyNames", [$h͏_a => (sharedGlobalPropertyNames = $h͏_a)]],["universalPropertyNames", [$h͏_a => (universalPropertyNames = $h͏_a)]],["permitted", [$h͏_a => (permitted = $h͏_a)]]]]]);
|
|
4997
5107
|
|
|
4998
5108
|
|
|
4999
5109
|
|
|
@@ -5159,18 +5269,18 @@ const makeIntrinsicsCollector= ()=> {
|
|
|
5159
5269
|
* *original* unsafe (feral, untamed) bindings of these global variables.
|
|
5160
5270
|
*
|
|
5161
5271
|
* @param {object} globalObject
|
|
5162
|
-
*/$h
|
|
5272
|
+
*/$h͏_once.makeIntrinsicsCollector(makeIntrinsicsCollector);
|
|
5163
5273
|
const getGlobalIntrinsics= (globalObject)=>{
|
|
5164
5274
|
const { addIntrinsics, finalIntrinsics}= makeIntrinsicsCollector();
|
|
5165
5275
|
|
|
5166
5276
|
addIntrinsics(sampleGlobals(globalObject, sharedGlobalPropertyNames));
|
|
5167
5277
|
|
|
5168
5278
|
return finalIntrinsics();
|
|
5169
|
-
};$h
|
|
5279
|
+
};$h͏_once.getGlobalIntrinsics(getGlobalIntrinsics);
|
|
5170
5280
|
})()
|
|
5171
5281
|
,
|
|
5172
5282
|
// === functors[13] ===
|
|
5173
|
-
({ imports: $h
|
|
5283
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let permitted,FunctionInstance,isAccessorPermit,Map,String,Symbol,TypeError,arrayFilter,arrayIncludes,arrayMap,entries,getOwnPropertyDescriptor,getPrototypeOf,isObject,mapGet,objectHasOwnProperty,ownKeys,symbolKeyFor;$h͏_imports([["./permits.js", [["permitted", [$h͏_a => (permitted = $h͏_a)]],["FunctionInstance", [$h͏_a => (FunctionInstance = $h͏_a)]],["isAccessorPermit", [$h͏_a => (isAccessorPermit = $h͏_a)]]]],["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["Symbol", [$h͏_a => (Symbol = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes", [$h͏_a => (arrayIncludes = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["symbolKeyFor", [$h͏_a => (symbolKeyFor = $h͏_a)]]]]]);
|
|
5174
5284
|
|
|
5175
5285
|
|
|
5176
5286
|
|
|
@@ -5328,8 +5438,10 @@ function whitelistIntrinsics(
|
|
|
5328
5438
|
return;
|
|
5329
5439
|
}
|
|
5330
5440
|
|
|
5331
|
-
// We can't clean [[
|
|
5332
|
-
throw TypeError(
|
|
5441
|
+
// We can't clean [[Prototype]], therefore abort.
|
|
5442
|
+
throw TypeError(
|
|
5443
|
+
`Unexpected [[Prototype]] at ${path}.__proto__ (expected ${protoName|| '%ObjectPrototype%' })`);
|
|
5444
|
+
|
|
5333
5445
|
}
|
|
5334
5446
|
|
|
5335
5447
|
/*
|
|
@@ -5384,7 +5496,9 @@ function whitelistIntrinsics(
|
|
|
5384
5496
|
}
|
|
5385
5497
|
}
|
|
5386
5498
|
|
|
5387
|
-
throw TypeError(
|
|
5499
|
+
throw TypeError(
|
|
5500
|
+
`Unexpected property ${prop} with permit ${permit} at ${path}`);
|
|
5501
|
+
|
|
5388
5502
|
}
|
|
5389
5503
|
|
|
5390
5504
|
/*
|
|
@@ -5499,11 +5613,11 @@ function whitelistIntrinsics(
|
|
|
5499
5613
|
console.groupEnd();
|
|
5500
5614
|
}
|
|
5501
5615
|
}
|
|
5502
|
-
}$h
|
|
5616
|
+
}$h͏_once.default( whitelistIntrinsics);
|
|
5503
5617
|
})()
|
|
5504
5618
|
,
|
|
5505
5619
|
// === functors[14] ===
|
|
5506
|
-
({ imports: $h
|
|
5620
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf,freeze;$h͏_imports([["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["SyntaxError", [$h͏_a => (SyntaxError = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["setPrototypeOf", [$h͏_a => (setPrototypeOf = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]]]);
|
|
5507
5621
|
|
|
5508
5622
|
|
|
5509
5623
|
|
|
@@ -5638,11 +5752,11 @@ function tameFunctionConstructors() {
|
|
|
5638
5752
|
|
|
5639
5753
|
|
|
5640
5754
|
return newIntrinsics;
|
|
5641
|
-
}$h
|
|
5755
|
+
}$h͏_once.default( tameFunctionConstructors);
|
|
5642
5756
|
})()
|
|
5643
5757
|
,
|
|
5644
5758
|
// === functors[15] ===
|
|
5645
|
-
({ imports: $h
|
|
5759
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Date,TypeError,apply,construct,defineProperties;$h͏_imports([["./commons.js", [["Date", [$h͏_a => (Date = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["construct", [$h͏_a => (construct = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]]]]]);
|
|
5646
5760
|
|
|
5647
5761
|
|
|
5648
5762
|
|
|
@@ -5771,11 +5885,11 @@ function tameDateConstructor(dateTaming= 'safe') {
|
|
|
5771
5885
|
'%InitialDate%': InitialDate,
|
|
5772
5886
|
'%SharedDate%': SharedDate};
|
|
5773
5887
|
|
|
5774
|
-
}$h
|
|
5888
|
+
}$h͏_once.default( tameDateConstructor);
|
|
5775
5889
|
})()
|
|
5776
5890
|
,
|
|
5777
5891
|
// === functors[16] ===
|
|
5778
|
-
({ imports: $h
|
|
5892
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Math,TypeError,create,getOwnPropertyDescriptors,objectPrototype;$h͏_imports([["./commons.js", [["Math", [$h͏_a => (Math = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["objectPrototype", [$h͏_a => (objectPrototype = $h͏_a)]]]]]);
|
|
5779
5893
|
|
|
5780
5894
|
|
|
5781
5895
|
|
|
@@ -5818,11 +5932,11 @@ function tameMathObject(mathTaming= 'safe') {
|
|
|
5818
5932
|
'%InitialMath%': initialMath,
|
|
5819
5933
|
'%SharedMath%': sharedMath};
|
|
5820
5934
|
|
|
5821
|
-
}$h
|
|
5935
|
+
}$h͏_once.default( tameMathObject);
|
|
5822
5936
|
})()
|
|
5823
5937
|
,
|
|
5824
5938
|
// === functors[17] ===
|
|
5825
|
-
({ imports: $h
|
|
5939
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_REG_EXP,TypeError,construct,defineProperties,getOwnPropertyDescriptor,speciesSymbol;$h͏_imports([["./commons.js", [["FERAL_REG_EXP", [$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["construct", [$h͏_a => (construct = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["speciesSymbol", [$h͏_a => (speciesSymbol = $h͏_a)]]]]]);
|
|
5826
5940
|
|
|
5827
5941
|
|
|
5828
5942
|
|
|
@@ -5889,11 +6003,11 @@ function tameRegExpConstructor(regExpTaming= 'safe') {
|
|
|
5889
6003
|
'%InitialRegExp%': InitialRegExp,
|
|
5890
6004
|
'%SharedRegExp%': SharedRegExp};
|
|
5891
6005
|
|
|
5892
|
-
}$h
|
|
6006
|
+
}$h͏_once.default( tameRegExpConstructor);
|
|
5893
6007
|
})()
|
|
5894
6008
|
,
|
|
5895
6009
|
// === functors[18] ===
|
|
5896
|
-
({ imports: $h
|
|
6010
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let toStringTagSymbol,iteratorSymbol;$h͏_imports([["./commons.js", [["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]],["iteratorSymbol", [$h͏_a => (iteratorSymbol = $h͏_a)]]]]]);
|
|
5897
6011
|
|
|
5898
6012
|
/**
|
|
5899
6013
|
* @file Exports {@code enablements}, a recursively defined
|
|
@@ -5982,7 +6096,7 @@ const minEnablements= {
|
|
|
5982
6096
|
|
|
5983
6097
|
/**
|
|
5984
6098
|
* Moderate enablements are usually good enough for legacy compat.
|
|
5985
|
-
*/$h
|
|
6099
|
+
*/$h͏_once.minEnablements(minEnablements);
|
|
5986
6100
|
const moderateEnablements= {
|
|
5987
6101
|
'%ObjectPrototype%': {
|
|
5988
6102
|
toString: true,
|
|
@@ -6076,7 +6190,7 @@ const moderateEnablements= {
|
|
|
6076
6190
|
* https://github.com/endojs/endo/issues/576
|
|
6077
6191
|
*
|
|
6078
6192
|
* They are like the `moderate` enablements except for the entries below.
|
|
6079
|
-
*/$h
|
|
6193
|
+
*/$h͏_once.moderateEnablements(moderateEnablements);
|
|
6080
6194
|
const severeEnablements= {
|
|
6081
6195
|
...moderateEnablements,
|
|
6082
6196
|
|
|
@@ -6133,11 +6247,11 @@ const severeEnablements= {
|
|
|
6133
6247
|
* Needed to work with Immer before https://github.com/immerjs/immer/pull/914
|
|
6134
6248
|
* is accepted.
|
|
6135
6249
|
*/
|
|
6136
|
-
'%SetPrototype%': '*'};$h
|
|
6250
|
+
'%SetPrototype%': '*'};$h͏_once.severeEnablements(severeEnablements);
|
|
6137
6251
|
})()
|
|
6138
6252
|
,
|
|
6139
6253
|
// === functors[19] ===
|
|
6140
|
-
({ imports: $h
|
|
6254
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,isObject,objectHasOwnProperty,ownKeys,setHas,minEnablements,moderateEnablements,severeEnablements;$h͏_imports([["./commons.js", [["Set", [$h͏_a => (Set = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayForEach", [$h͏_a => (arrayForEach = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["setHas", [$h͏_a => (setHas = $h͏_a)]]]],["./enablements.js", [["minEnablements", [$h͏_a => (minEnablements = $h͏_a)]],["moderateEnablements", [$h͏_a => (moderateEnablements = $h͏_a)]],["severeEnablements", [$h͏_a => (severeEnablements = $h͏_a)]]]]]);
|
|
6141
6255
|
|
|
6142
6256
|
|
|
6143
6257
|
|
|
@@ -6344,11 +6458,11 @@ function enablePropertyOverrides(
|
|
|
6344
6458
|
|
|
6345
6459
|
// Do the repair.
|
|
6346
6460
|
enableProperties('root', intrinsics, plan);
|
|
6347
|
-
}$h
|
|
6461
|
+
}$h͏_once.default( enablePropertyOverrides);
|
|
6348
6462
|
})()
|
|
6349
6463
|
,
|
|
6350
6464
|
// === functors[20] ===
|
|
6351
|
-
({ imports: $h
|
|
6465
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Number,String,TypeError,defineProperty,getOwnPropertyNames,isObject,regexpExec,assert;$h͏_imports([["./commons.js", [["Number", [$h͏_a => (Number = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["regexpExec", [$h͏_a => (regexpExec = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
6352
6466
|
|
|
6353
6467
|
|
|
6354
6468
|
|
|
@@ -6428,11 +6542,11 @@ function tameLocaleMethods(intrinsics, localeTaming= 'safe') {
|
|
|
6428
6542
|
defineProperty(Number.prototype, 'toLocaleString', {
|
|
6429
6543
|
value: numberToString});
|
|
6430
6544
|
|
|
6431
|
-
}$h
|
|
6545
|
+
}$h͏_once.default( tameLocaleMethods);
|
|
6432
6546
|
})()
|
|
6433
6547
|
,
|
|
6434
6548
|
// === functors[21] ===
|
|
6435
|
-
({ imports: $h
|
|
6549
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /**
|
|
6436
6550
|
* makeEvalFunction()
|
|
6437
6551
|
* A safe version of the native eval function which relies on
|
|
6438
6552
|
* the safety of safeEvaluate for confinement.
|
|
@@ -6458,11 +6572,11 @@ const makeEvalFunction= (safeEvaluate)=>{
|
|
|
6458
6572
|
eval;
|
|
6459
6573
|
|
|
6460
6574
|
return newEval;
|
|
6461
|
-
};$h
|
|
6575
|
+
};$h͏_once.makeEvalFunction(makeEvalFunction);
|
|
6462
6576
|
})()
|
|
6463
6577
|
,
|
|
6464
6578
|
// === functors[22] ===
|
|
6465
|
-
({ imports: $h
|
|
6579
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_FUNCTION,arrayJoin,arrayPop,defineProperties,getPrototypeOf,assert;$h͏_imports([["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayPop", [$h͏_a => (arrayPop = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
6466
6580
|
|
|
6467
6581
|
|
|
6468
6582
|
|
|
@@ -6539,11 +6653,11 @@ const makeFunctionConstructor= (safeEvaluate)=>{
|
|
|
6539
6653
|
Fail `Function constructor prototype is the same accross compartments`;
|
|
6540
6654
|
|
|
6541
6655
|
return newFunction;
|
|
6542
|
-
};$h
|
|
6656
|
+
};$h͏_once.makeFunctionConstructor(makeFunctionConstructor);
|
|
6543
6657
|
})()
|
|
6544
6658
|
,
|
|
6545
6659
|
// === functors[23] ===
|
|
6546
|
-
({ imports: $h
|
|
6660
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,assign,create,defineProperty,entries,freeze,objectHasOwnProperty,unscopablesSymbol,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["assign", [$h͏_a => (assign = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["unscopablesSymbol", [$h͏_a => (unscopablesSymbol = $h͏_a)]]]],["./make-eval-function.js", [["makeEvalFunction", [$h͏_a => (makeEvalFunction = $h͏_a)]]]],["./make-function-constructor.js", [["makeFunctionConstructor", [$h͏_a => (makeFunctionConstructor = $h͏_a)]]]],["./permits.js", [["constantProperties", [$h͏_a => (constantProperties = $h͏_a)]],["universalPropertyNames", [$h͏_a => (universalPropertyNames = $h͏_a)]]]]]);
|
|
6547
6661
|
|
|
6548
6662
|
|
|
6549
6663
|
|
|
@@ -6594,7 +6708,7 @@ const setGlobalObjectSymbolUnscopables= (globalObject)=>{
|
|
|
6594
6708
|
* `setGlobalObjectMutableProperties`.
|
|
6595
6709
|
*
|
|
6596
6710
|
* @param {object} globalObject
|
|
6597
|
-
*/$h
|
|
6711
|
+
*/$h͏_once.setGlobalObjectSymbolUnscopables(setGlobalObjectSymbolUnscopables);
|
|
6598
6712
|
const setGlobalObjectConstantProperties= (globalObject)=>{
|
|
6599
6713
|
for( const [name, constant]of entries(constantProperties)) {
|
|
6600
6714
|
defineProperty(globalObject, name, {
|
|
@@ -6620,7 +6734,7 @@ const setGlobalObjectConstantProperties= (globalObject)=>{
|
|
|
6620
6734
|
* @param {Function} args.makeCompartmentConstructor
|
|
6621
6735
|
* @param {(object) => void} args.markVirtualizedNativeFunction
|
|
6622
6736
|
* @param {Compartment} [args.parentCompartment]
|
|
6623
|
-
*/$h
|
|
6737
|
+
*/$h͏_once.setGlobalObjectConstantProperties(setGlobalObjectConstantProperties);
|
|
6624
6738
|
const setGlobalObjectMutableProperties= (
|
|
6625
6739
|
globalObject,
|
|
6626
6740
|
{
|
|
@@ -6688,7 +6802,7 @@ const setGlobalObjectMutableProperties= (
|
|
|
6688
6802
|
* @param {object} globalObject
|
|
6689
6803
|
* @param {Function} evaluator
|
|
6690
6804
|
* @param {(object) => void} markVirtualizedNativeFunction
|
|
6691
|
-
*/$h
|
|
6805
|
+
*/$h͏_once.setGlobalObjectMutableProperties(setGlobalObjectMutableProperties);
|
|
6692
6806
|
const setGlobalObjectEvaluators= (
|
|
6693
6807
|
globalObject,
|
|
6694
6808
|
evaluator,
|
|
@@ -6714,11 +6828,11 @@ const setGlobalObjectEvaluators= (
|
|
|
6714
6828
|
configurable: true});
|
|
6715
6829
|
|
|
6716
6830
|
}
|
|
6717
|
-
};$h
|
|
6831
|
+
};$h͏_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
|
|
6718
6832
|
})()
|
|
6719
6833
|
,
|
|
6720
6834
|
// === functors[24] ===
|
|
6721
|
-
({ imports: $h
|
|
6835
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Proxy,String,TypeError,ReferenceError,create,freeze,getOwnPropertyDescriptors,globalThis,immutableObject,assert;$h͏_imports([["./commons.js", [["Proxy", [$h͏_a => (Proxy = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["ReferenceError", [$h͏_a => (ReferenceError = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["immutableObject", [$h͏_a => (immutableObject = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
6722
6836
|
|
|
6723
6837
|
|
|
6724
6838
|
|
|
@@ -6754,7 +6868,7 @@ const alwaysThrowHandler= new Proxy(
|
|
|
6754
6868
|
* scopeTerminatorHandler manages a strictScopeTerminator Proxy which serves as
|
|
6755
6869
|
* the final scope boundary that will always return "undefined" in order
|
|
6756
6870
|
* to prevent access to "start compartment globals".
|
|
6757
|
-
*/$h
|
|
6871
|
+
*/$h͏_once.alwaysThrowHandler(alwaysThrowHandler);
|
|
6758
6872
|
const scopeProxyHandlerProperties= {
|
|
6759
6873
|
get(_shadow, _prop) {
|
|
6760
6874
|
return undefined;
|
|
@@ -6803,17 +6917,17 @@ const scopeProxyHandlerProperties= {
|
|
|
6803
6917
|
const strictScopeTerminatorHandler= freeze(
|
|
6804
6918
|
create(
|
|
6805
6919
|
alwaysThrowHandler,
|
|
6806
|
-
getOwnPropertyDescriptors(scopeProxyHandlerProperties)));$h
|
|
6920
|
+
getOwnPropertyDescriptors(scopeProxyHandlerProperties)));$h͏_once.strictScopeTerminatorHandler(strictScopeTerminatorHandler);
|
|
6807
6921
|
|
|
6808
6922
|
|
|
6809
6923
|
|
|
6810
6924
|
const strictScopeTerminator= new Proxy(
|
|
6811
6925
|
immutableObject,
|
|
6812
|
-
strictScopeTerminatorHandler);$h
|
|
6926
|
+
strictScopeTerminatorHandler);$h͏_once.strictScopeTerminator(strictScopeTerminator);
|
|
6813
6927
|
})()
|
|
6814
6928
|
,
|
|
6815
6929
|
// === functors[25] ===
|
|
6816
|
-
({ imports: $h
|
|
6930
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Proxy,create,freeze,getOwnPropertyDescriptors,immutableObject,reflectSet,strictScopeTerminatorHandler,alwaysThrowHandler;$h͏_imports([["./commons.js", [["Proxy", [$h͏_a => (Proxy = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["immutableObject", [$h͏_a => (immutableObject = $h͏_a)]],["reflectSet", [$h͏_a => (reflectSet = $h͏_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminatorHandler", [$h͏_a => (strictScopeTerminatorHandler = $h͏_a)]],["alwaysThrowHandler", [$h͏_a => (alwaysThrowHandler = $h͏_a)]]]]]);
|
|
6817
6931
|
|
|
6818
6932
|
|
|
6819
6933
|
|
|
@@ -6865,12 +6979,12 @@ const createSloppyGlobalsScopeTerminator= (globalObject)=>{
|
|
|
6865
6979
|
|
|
6866
6980
|
|
|
6867
6981
|
return sloppyGlobalsScopeTerminator;
|
|
6868
|
-
};$h
|
|
6982
|
+
};$h͏_once.createSloppyGlobalsScopeTerminator(createSloppyGlobalsScopeTerminator);
|
|
6869
6983
|
freeze(createSloppyGlobalsScopeTerminator);
|
|
6870
6984
|
})()
|
|
6871
6985
|
,
|
|
6872
6986
|
// === functors[26] ===
|
|
6873
|
-
({ imports: $h
|
|
6987
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_EVAL,create,defineProperties,freeze,assert;$h͏_imports([["./commons.js", [["FERAL_EVAL", [$h͏_a => (FERAL_EVAL = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
6874
6988
|
|
|
6875
6989
|
|
|
6876
6990
|
|
|
@@ -6958,11 +7072,11 @@ const makeEvalScopeKit= ()=> {
|
|
|
6958
7072
|
|
|
6959
7073
|
|
|
6960
7074
|
return evalScopeKit;
|
|
6961
|
-
};$h
|
|
7075
|
+
};$h͏_once.makeEvalScopeKit(makeEvalScopeKit);
|
|
6962
7076
|
})()
|
|
6963
7077
|
,
|
|
6964
7078
|
// === functors[27] ===
|
|
6965
|
-
({ imports: $h
|
|
7079
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_REG_EXP,regexpExec,stringSlice;$h͏_imports([["./commons.js", [["FERAL_REG_EXP", [$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["regexpExec", [$h͏_a => (regexpExec = $h͏_a)]],["stringSlice", [$h͏_a => (stringSlice = $h͏_a)]]]]]);
|
|
6966
7080
|
|
|
6967
7081
|
// Captures a key and value of the form #key=value or @key=value
|
|
6968
7082
|
const sourceMetaEntryRegExp=
|
|
@@ -7011,11 +7125,11 @@ const getSourceURL= (src)=>{
|
|
|
7011
7125
|
}
|
|
7012
7126
|
|
|
7013
7127
|
return sourceURL;
|
|
7014
|
-
};$h
|
|
7128
|
+
};$h͏_once.getSourceURL(getSourceURL);
|
|
7015
7129
|
})()
|
|
7016
7130
|
,
|
|
7017
7131
|
// === functors[28] ===
|
|
7018
|
-
({ imports: $h
|
|
7132
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,freeze,getSourceURL;$h͏_imports([["./commons.js", [["FERAL_REG_EXP", [$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["SyntaxError", [$h͏_a => (SyntaxError = $h͏_a)]],["stringReplace", [$h͏_a => (stringReplace = $h͏_a)]],["stringSearch", [$h͏_a => (stringSearch = $h͏_a)]],["stringSlice", [$h͏_a => (stringSlice = $h͏_a)]],["stringSplit", [$h͏_a => (stringSplit = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]],["./get-source-url.js", [["getSourceURL", [$h͏_a => (getSourceURL = $h͏_a)]]]]]);
|
|
7019
7133
|
|
|
7020
7134
|
|
|
7021
7135
|
|
|
@@ -7114,14 +7228,14 @@ const rejectHtmlComments= (src)=>{
|
|
|
7114
7228
|
*
|
|
7115
7229
|
* @param {string} src
|
|
7116
7230
|
* @returns {string}
|
|
7117
|
-
*/$h
|
|
7231
|
+
*/$h͏_once.rejectHtmlComments(rejectHtmlComments);
|
|
7118
7232
|
const evadeHtmlCommentTest= (src)=>{
|
|
7119
7233
|
const replaceFn= (match)=> match[0]=== '<'? '< ! --': '-- >';
|
|
7120
7234
|
return stringReplace(src, htmlCommentPattern, replaceFn);
|
|
7121
7235
|
};
|
|
7122
7236
|
|
|
7123
7237
|
// /////////////////////////////////////////////////////////////////////////////
|
|
7124
|
-
$h
|
|
7238
|
+
$h͏_once.evadeHtmlCommentTest(evadeHtmlCommentTest);
|
|
7125
7239
|
const importPattern= new FERAL_REG_EXP(
|
|
7126
7240
|
'(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))',
|
|
7127
7241
|
'g');
|
|
@@ -7184,14 +7298,14 @@ const rejectImportExpressions= (src)=>{
|
|
|
7184
7298
|
*
|
|
7185
7299
|
* @param {string} src
|
|
7186
7300
|
* @returns {string}
|
|
7187
|
-
*/$h
|
|
7301
|
+
*/$h͏_once.rejectImportExpressions(rejectImportExpressions);
|
|
7188
7302
|
const evadeImportExpressionTest= (src)=>{
|
|
7189
7303
|
const replaceFn= (_, p1, p2)=> `${p1}__import__${p2}`;
|
|
7190
7304
|
return stringReplace(src, importPattern, replaceFn);
|
|
7191
7305
|
};
|
|
7192
7306
|
|
|
7193
7307
|
// /////////////////////////////////////////////////////////////////////////////
|
|
7194
|
-
$h
|
|
7308
|
+
$h͏_once.evadeImportExpressionTest(evadeImportExpressionTest);
|
|
7195
7309
|
const someDirectEvalPattern= new FERAL_REG_EXP(
|
|
7196
7310
|
'(^|[^.])\\beval(\\s*\\()',
|
|
7197
7311
|
'g');
|
|
@@ -7249,7 +7363,7 @@ const rejectSomeDirectEvalExpressions= (src)=>{
|
|
|
7249
7363
|
*
|
|
7250
7364
|
* @param {string} source
|
|
7251
7365
|
* @returns {string}
|
|
7252
|
-
*/$h
|
|
7366
|
+
*/$h͏_once.rejectSomeDirectEvalExpressions(rejectSomeDirectEvalExpressions);
|
|
7253
7367
|
const mandatoryTransforms= (source)=>{
|
|
7254
7368
|
source= rejectHtmlComments(source);
|
|
7255
7369
|
source= rejectImportExpressions(source);
|
|
@@ -7263,7 +7377,7 @@ const mandatoryTransforms= (source)=>{
|
|
|
7263
7377
|
* @param {string} source
|
|
7264
7378
|
* @param {((str: string) => string)[]} transforms
|
|
7265
7379
|
* @returns {string}
|
|
7266
|
-
*/$h
|
|
7380
|
+
*/$h͏_once.mandatoryTransforms(mandatoryTransforms);
|
|
7267
7381
|
const applyTransforms= (source, transforms)=> {
|
|
7268
7382
|
for( const transform of transforms) {
|
|
7269
7383
|
source= transform(source);
|
|
@@ -7272,18 +7386,18 @@ const applyTransforms= (source, transforms)=> {
|
|
|
7272
7386
|
};
|
|
7273
7387
|
|
|
7274
7388
|
// export all as a frozen object
|
|
7275
|
-
$h
|
|
7389
|
+
$h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
|
|
7276
7390
|
rejectHtmlComments: freeze(rejectHtmlComments),
|
|
7277
7391
|
evadeHtmlCommentTest: freeze(evadeHtmlCommentTest),
|
|
7278
7392
|
rejectImportExpressions: freeze(rejectImportExpressions),
|
|
7279
7393
|
evadeImportExpressionTest: freeze(evadeImportExpressionTest),
|
|
7280
7394
|
rejectSomeDirectEvalExpressions: freeze(rejectSomeDirectEvalExpressions),
|
|
7281
7395
|
mandatoryTransforms: freeze(mandatoryTransforms),
|
|
7282
|
-
applyTransforms: freeze(applyTransforms)});$h
|
|
7396
|
+
applyTransforms: freeze(applyTransforms)});$h͏_once.transforms(transforms);
|
|
7283
7397
|
})()
|
|
7284
7398
|
,
|
|
7285
7399
|
// === functors[29] ===
|
|
7286
|
-
({ imports: $h
|
|
7400
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let arrayFilter,arrayIncludes,getOwnPropertyDescriptor,getOwnPropertyNames,objectHasOwnProperty,regexpTest;$h͏_imports([["./commons.js", [["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes", [$h͏_a => (arrayIncludes = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["regexpTest", [$h͏_a => (regexpTest = $h͏_a)]]]]]);
|
|
7287
7401
|
|
|
7288
7402
|
|
|
7289
7403
|
|
|
@@ -7395,7 +7509,7 @@ const isValidIdentifierName= (name)=>{
|
|
|
7395
7509
|
|
|
7396
7510
|
/*
|
|
7397
7511
|
* isImmutableDataProperty
|
|
7398
|
-
*/$h
|
|
7512
|
+
*/$h͏_once.isValidIdentifierName(isValidIdentifierName);
|
|
7399
7513
|
|
|
7400
7514
|
function isImmutableDataProperty(obj, name) {
|
|
7401
7515
|
const desc= getOwnPropertyDescriptor(obj, name);
|
|
@@ -7462,11 +7576,11 @@ const getScopeConstants= (globalObject, moduleLexicals= {})=> {
|
|
|
7462
7576
|
globalObjectConstants,
|
|
7463
7577
|
moduleLexicalConstants};
|
|
7464
7578
|
|
|
7465
|
-
};$h
|
|
7579
|
+
};$h͏_once.getScopeConstants(getScopeConstants);
|
|
7466
7580
|
})()
|
|
7467
7581
|
,
|
|
7468
7582
|
// === functors[30] ===
|
|
7469
|
-
({ imports: $h
|
|
7583
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_FUNCTION,arrayJoin,apply,getScopeConstants;$h͏_imports([["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]]]],["./scope-constants.js", [["getScopeConstants", [$h͏_a => (getScopeConstants = $h͏_a)]]]]]);
|
|
7470
7584
|
|
|
7471
7585
|
|
|
7472
7586
|
|
|
@@ -7575,11 +7689,11 @@ const makeEvaluate= (context)=>{
|
|
|
7575
7689
|
`);
|
|
7576
7690
|
|
|
7577
7691
|
return apply(evaluateFactory, context, []);
|
|
7578
|
-
};$h
|
|
7692
|
+
};$h͏_once.makeEvaluate(makeEvaluate);
|
|
7579
7693
|
})()
|
|
7580
7694
|
,
|
|
7581
7695
|
// === functors[31] ===
|
|
7582
|
-
({ imports: $h
|
|
7696
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let apply,freeze,strictScopeTerminator,createSloppyGlobalsScopeTerminator,makeEvalScopeKit,applyTransforms,mandatoryTransforms,makeEvaluate,assert;$h͏_imports([["./commons.js", [["apply", [$h͏_a => (apply = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminator", [$h͏_a => (strictScopeTerminator = $h͏_a)]]]],["./sloppy-globals-scope-terminator.js", [["createSloppyGlobalsScopeTerminator", [$h͏_a => (createSloppyGlobalsScopeTerminator = $h͏_a)]]]],["./eval-scope.js", [["makeEvalScopeKit", [$h͏_a => (makeEvalScopeKit = $h͏_a)]]]],["./transforms.js", [["applyTransforms", [$h͏_a => (applyTransforms = $h͏_a)]],["mandatoryTransforms", [$h͏_a => (mandatoryTransforms = $h͏_a)]]]],["./make-evaluate.js", [["makeEvaluate", [$h͏_a => (makeEvaluate = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
7583
7697
|
|
|
7584
7698
|
|
|
7585
7699
|
|
|
@@ -7688,11 +7802,11 @@ const makeSafeEvaluator= ({
|
|
|
7688
7802
|
};
|
|
7689
7803
|
|
|
7690
7804
|
return { safeEvaluate};
|
|
7691
|
-
};$h
|
|
7805
|
+
};$h͏_once.makeSafeEvaluator(makeSafeEvaluator);
|
|
7692
7806
|
})()
|
|
7693
7807
|
,
|
|
7694
7808
|
// === functors[32] ===
|
|
7695
|
-
({ imports: $h
|
|
7809
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let WeakSet,defineProperty,freeze,functionPrototype,functionToString,stringEndsWith,weaksetAdd,weaksetHas;$h͏_imports([["./commons.js", [["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["functionPrototype", [$h͏_a => (functionPrototype = $h͏_a)]],["functionToString", [$h͏_a => (functionToString = $h͏_a)]],["stringEndsWith", [$h͏_a => (stringEndsWith = $h͏_a)]],["weaksetAdd", [$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]]]]]);
|
|
7696
7810
|
|
|
7697
7811
|
|
|
7698
7812
|
|
|
@@ -7741,11 +7855,11 @@ const tameFunctionToString= ()=> {
|
|
|
7741
7855
|
|
|
7742
7856
|
}
|
|
7743
7857
|
return markVirtualizedNativeFunction;
|
|
7744
|
-
};$h
|
|
7858
|
+
};$h͏_once.tameFunctionToString(tameFunctionToString);
|
|
7745
7859
|
})()
|
|
7746
7860
|
,
|
|
7747
7861
|
// === functors[33] ===
|
|
7748
|
-
({ imports: $h
|
|
7862
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,globalThis,getOwnPropertyDescriptor,defineProperty;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]]]]]);Object.defineProperty(tameDomains, 'name', {value: "tameDomains"});$h͏_once.tameDomains(tameDomains);
|
|
7749
7863
|
|
|
7750
7864
|
|
|
7751
7865
|
|
|
@@ -7793,7 +7907,61 @@ function tameDomains(domainTaming= 'safe') {
|
|
|
7793
7907
|
})()
|
|
7794
7908
|
,
|
|
7795
7909
|
// === functors[34] ===
|
|
7796
|
-
({ imports: $h
|
|
7910
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let functionPrototype,getPrototypeOf,globalThis,objectPrototype,setPrototypeOf;$h͏_imports([["./commons.js", [["functionPrototype", [$h͏_a => (functionPrototype = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["objectPrototype", [$h͏_a => (objectPrototype = $h͏_a)]],["setPrototypeOf", [$h͏_a => (setPrototypeOf = $h͏_a)]]]]]);
|
|
7911
|
+
|
|
7912
|
+
|
|
7913
|
+
|
|
7914
|
+
|
|
7915
|
+
|
|
7916
|
+
|
|
7917
|
+
|
|
7918
|
+
const tameModuleSource= ()=> {
|
|
7919
|
+
const newIntrinsics= {};
|
|
7920
|
+
|
|
7921
|
+
const ModuleSource= globalThis.ModuleSource;
|
|
7922
|
+
if( ModuleSource!== undefined) {
|
|
7923
|
+
newIntrinsics.ModuleSource= ModuleSource;
|
|
7924
|
+
|
|
7925
|
+
// We introduce ModuleSource.[[Proto]] === AbstractModuleSource
|
|
7926
|
+
// and ModuleSource.prototype.[[Proto]] === AbstractModuleSource.prototype
|
|
7927
|
+
// if that layer is absent because the permitting system can more
|
|
7928
|
+
// gracefully tolerate the absence of an expected prototype than the
|
|
7929
|
+
// presence of an unexpected prototype,.
|
|
7930
|
+
function AbstractModuleSource() {
|
|
7931
|
+
// no-op safe to super()
|
|
7932
|
+
}
|
|
7933
|
+
|
|
7934
|
+
const ModuleSourceProto= getPrototypeOf(ModuleSource);
|
|
7935
|
+
if( ModuleSourceProto=== functionPrototype) {
|
|
7936
|
+
setPrototypeOf(ModuleSource, AbstractModuleSource);
|
|
7937
|
+
newIntrinsics['%AbstractModuleSource%']= AbstractModuleSource;
|
|
7938
|
+
newIntrinsics['%AbstractModuleSourcePrototype%']=
|
|
7939
|
+
AbstractModuleSource.prototype;
|
|
7940
|
+
}else {
|
|
7941
|
+
newIntrinsics['%AbstractModuleSource%']= ModuleSourceProto;
|
|
7942
|
+
newIntrinsics['%AbstractModuleSourcePrototype%']=
|
|
7943
|
+
ModuleSourceProto.prototype;
|
|
7944
|
+
}
|
|
7945
|
+
|
|
7946
|
+
const ModuleSourcePrototype= ModuleSource.prototype;
|
|
7947
|
+
if( ModuleSourcePrototype!== undefined) {
|
|
7948
|
+
newIntrinsics['%ModuleSourcePrototype%']= ModuleSourcePrototype;
|
|
7949
|
+
|
|
7950
|
+
// ModuleSource.prototype.__proto__ should be the
|
|
7951
|
+
// AbstractModuleSource.prototype.
|
|
7952
|
+
const ModuleSourcePrototypeProto= getPrototypeOf(ModuleSourcePrototype);
|
|
7953
|
+
if( ModuleSourcePrototypeProto=== objectPrototype) {
|
|
7954
|
+
setPrototypeOf(ModuleSource.prototype, AbstractModuleSource.prototype);
|
|
7955
|
+
}
|
|
7956
|
+
}
|
|
7957
|
+
}
|
|
7958
|
+
|
|
7959
|
+
return newIntrinsics;
|
|
7960
|
+
};$h͏_once.tameModuleSource(tameModuleSource);
|
|
7961
|
+
})()
|
|
7962
|
+
,
|
|
7963
|
+
// === functors[35] ===
|
|
7964
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let WeakSet,arrayFilter,arrayFlatMap,arrayMap,arrayPop,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,stringIncludes,stringSplit,weaksetAdd,weaksetHas;$h͏_imports([["../commons.js", [["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayFlatMap", [$h͏_a => (arrayFlatMap = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arrayPop", [$h͏_a => (arrayPop = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["fromEntries", [$h͏_a => (fromEntries = $h͏_a)]],["isError", [$h͏_a => (isError = $h͏_a)]],["stringEndsWith", [$h͏_a => (stringEndsWith = $h͏_a)]],["stringIncludes", [$h͏_a => (stringIncludes = $h͏_a)]],["stringSplit", [$h͏_a => (stringSplit = $h͏_a)]],["weaksetAdd", [$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
7797
7965
|
|
|
7798
7966
|
|
|
7799
7967
|
|
|
@@ -7877,7 +8045,7 @@ const consoleLevelMethods= freeze([
|
|
|
7877
8045
|
* platform console implementations when they all agree.
|
|
7878
8046
|
*
|
|
7879
8047
|
* @type {readonly [ConsoleProps, LogSeverity | undefined][]}
|
|
7880
|
-
*/$h
|
|
8048
|
+
*/$h͏_once.consoleLevelMethods(consoleLevelMethods);
|
|
7881
8049
|
const consoleOtherMethods= freeze([
|
|
7882
8050
|
['assert', 'error'], // (value, fmt?, ...args)
|
|
7883
8051
|
['timeLog', 'log'], // (label?, ...args) no fmt string
|
|
@@ -7901,7 +8069,7 @@ const consoleOtherMethods= freeze([
|
|
|
7901
8069
|
['timeStamp', undefined] // (label?)
|
|
7902
8070
|
]);
|
|
7903
8071
|
|
|
7904
|
-
/** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */$h
|
|
8072
|
+
/** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */$h͏_once.consoleOtherMethods(consoleOtherMethods);
|
|
7905
8073
|
const consoleWhitelist= freeze([
|
|
7906
8074
|
...consoleLevelMethods,
|
|
7907
8075
|
...consoleOtherMethods]);
|
|
@@ -7976,7 +8144,7 @@ const makeLoggingConsoleKit= (
|
|
|
7976
8144
|
const typedLoggingConsole= /** @type {VirtualConsole} */ loggingConsole;
|
|
7977
8145
|
|
|
7978
8146
|
return freeze({ loggingConsole: typedLoggingConsole, takeLog});
|
|
7979
|
-
};$h
|
|
8147
|
+
};$h͏_once.makeLoggingConsoleKit(makeLoggingConsoleKit);
|
|
7980
8148
|
freeze(makeLoggingConsoleKit);
|
|
7981
8149
|
|
|
7982
8150
|
/**
|
|
@@ -7996,7 +8164,7 @@ const pumpLogToConsole= (log, baseConsole)=> {
|
|
|
7996
8164
|
};
|
|
7997
8165
|
// //////////////////////////// Causal Console /////////////////////////////////
|
|
7998
8166
|
|
|
7999
|
-
/** @type {ErrorInfo} */$h
|
|
8167
|
+
/** @type {ErrorInfo} */$h͏_once.pumpLogToConsole(pumpLogToConsole);
|
|
8000
8168
|
const ErrorInfo= {
|
|
8001
8169
|
NOTE: 'ERROR_NOTE:',
|
|
8002
8170
|
MESSAGE: 'ERROR_MESSAGE:',
|
|
@@ -8163,8 +8331,10 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
8163
8331
|
const levelMethod= (...logArgs)=> {
|
|
8164
8332
|
const subErrors= [];
|
|
8165
8333
|
const argTags= extractErrorArgs(logArgs, subErrors);
|
|
8166
|
-
|
|
8167
|
-
|
|
8334
|
+
if( baseConsole[level]) {
|
|
8335
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
8336
|
+
baseConsole[level](...argTags);
|
|
8337
|
+
}
|
|
8168
8338
|
// @ts-expect-error ConsoleProp vs LogSeverity mismatch
|
|
8169
8339
|
logSubErrors(level, subErrors);
|
|
8170
8340
|
};
|
|
@@ -8191,7 +8361,7 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
8191
8361
|
|
|
8192
8362
|
const causalConsole= fromEntries([...levelMethods, ...otherMethods]);
|
|
8193
8363
|
return (/** @type {VirtualConsole} */ freeze(causalConsole));
|
|
8194
|
-
};$h
|
|
8364
|
+
};$h͏_once.makeCausalConsole(makeCausalConsole);
|
|
8195
8365
|
freeze(makeCausalConsole);
|
|
8196
8366
|
|
|
8197
8367
|
/**
|
|
@@ -8271,12 +8441,16 @@ const defineCausalConsoleFromLogger= (loggedErrorHandler)=>{
|
|
|
8271
8441
|
// the host console will separate them with additional spaces.
|
|
8272
8442
|
arrayPush(indents, ' ');
|
|
8273
8443
|
});
|
|
8444
|
+
}else {
|
|
8445
|
+
baseConsole[name]= ()=> { };
|
|
8274
8446
|
}
|
|
8275
8447
|
}
|
|
8276
8448
|
if( baseConsole.groupEnd) {
|
|
8277
8449
|
baseConsole.groupEnd= makeNamed('groupEnd', (...args)=> {
|
|
8278
8450
|
arrayPop(indents);
|
|
8279
8451
|
});
|
|
8452
|
+
}else {
|
|
8453
|
+
baseConsole.groupEnd= ()=> { };
|
|
8280
8454
|
}
|
|
8281
8455
|
harden(baseConsole);
|
|
8282
8456
|
const causalConsole= makeCausalConsole(
|
|
@@ -8286,7 +8460,7 @@ const defineCausalConsoleFromLogger= (loggedErrorHandler)=>{
|
|
|
8286
8460
|
return (/** @type {VirtualConsole} */ causalConsole);
|
|
8287
8461
|
};
|
|
8288
8462
|
return freeze(makeCausalConsoleFromLogger);
|
|
8289
|
-
};$h
|
|
8463
|
+
};$h͏_once.defineCausalConsoleFromLogger(defineCausalConsoleFromLogger);
|
|
8290
8464
|
freeze(defineCausalConsoleFromLogger);
|
|
8291
8465
|
|
|
8292
8466
|
// ///////////////////////// Filter Console ////////////////////////////////////
|
|
@@ -8314,12 +8488,12 @@ const filterConsole= (baseConsole, filter, _topic= undefined)=> {
|
|
|
8314
8488
|
});
|
|
8315
8489
|
const filteringConsole= fromEntries(methods);
|
|
8316
8490
|
return (/** @type {VirtualConsole} */ freeze(filteringConsole));
|
|
8317
|
-
};$h
|
|
8491
|
+
};$h͏_once.filterConsole(filterConsole);
|
|
8318
8492
|
freeze(filterConsole);
|
|
8319
8493
|
})()
|
|
8320
8494
|
,
|
|
8321
|
-
// === functors[
|
|
8322
|
-
({ imports: $h
|
|
8495
|
+
// === functors[36] ===
|
|
8496
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FinalizationRegistry,Map,mapGet,mapDelete,WeakMap,mapSet,finalizationRegistryRegister,weakmapSet,weakmapGet,mapEntries,mapHas;$h͏_imports([["../commons.js", [["FinalizationRegistry", [$h͏_a => (FinalizationRegistry = $h͏_a)]],["Map", [$h͏_a => (Map = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["mapDelete", [$h͏_a => (mapDelete = $h͏_a)]],["WeakMap", [$h͏_a => (WeakMap = $h͏_a)]],["mapSet", [$h͏_a => (mapSet = $h͏_a)]],["finalizationRegistryRegister", [$h͏_a => (finalizationRegistryRegister = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["mapEntries", [$h͏_a => (mapEntries = $h͏_a)]],["mapHas", [$h͏_a => (mapHas = $h͏_a)]]]]]);
|
|
8323
8497
|
|
|
8324
8498
|
|
|
8325
8499
|
|
|
@@ -8440,11 +8614,11 @@ const makeRejectionHandlers= (reportReason)=>{
|
|
|
8440
8614
|
unhandledRejectionHandler,
|
|
8441
8615
|
processTerminationHandler};
|
|
8442
8616
|
|
|
8443
|
-
};$h
|
|
8617
|
+
};$h͏_once.makeRejectionHandlers(makeRejectionHandlers);
|
|
8444
8618
|
})()
|
|
8445
8619
|
,
|
|
8446
|
-
// === functors[
|
|
8447
|
-
({ imports: $h
|
|
8620
|
+
// === functors[37] ===
|
|
8621
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,apply,defineProperty,freeze,globalThis,defaultHandler,makeCausalConsole,makeRejectionHandlers;$h͏_imports([["../commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./assert.js", [["loggedErrorHandler", [$h͏_a => (defaultHandler = $h͏_a)]]]],["./console.js", [["makeCausalConsole", [$h͏_a => (makeCausalConsole = $h͏_a)]]]],["./unhandled-rejection.js", [["makeRejectionHandlers", [$h͏_a => (makeRejectionHandlers = $h͏_a)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
8448
8622
|
|
|
8449
8623
|
|
|
8450
8624
|
|
|
@@ -8566,8 +8740,8 @@ const tameConsole= (
|
|
|
8566
8740
|
}
|
|
8567
8741
|
|
|
8568
8742
|
globalProcess.on('uncaughtException', (error)=>{
|
|
8569
|
-
//
|
|
8570
|
-
ourConsole.error(error);
|
|
8743
|
+
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNCAUGHT_EXCEPTION.md
|
|
8744
|
+
ourConsole.error('SES_UNCAUGHT_EXCEPTION:', error);
|
|
8571
8745
|
if( terminate) {
|
|
8572
8746
|
terminate();
|
|
8573
8747
|
}
|
|
@@ -8579,8 +8753,9 @@ const tameConsole= (
|
|
|
8579
8753
|
typeof globalProcess.on=== 'function')
|
|
8580
8754
|
{
|
|
8581
8755
|
const handleRejection= (reason)=>{
|
|
8582
|
-
//
|
|
8756
|
+
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNHANDLED_REJECTION.md
|
|
8583
8757
|
ourConsole.error('SES_UNHANDLED_REJECTION:', reason);
|
|
8758
|
+
// 'platform' and 'report' just log the reason.
|
|
8584
8759
|
};
|
|
8585
8760
|
// Maybe track unhandled promise rejections.
|
|
8586
8761
|
const h= makeRejectionHandlers(handleRejection);
|
|
@@ -8601,8 +8776,9 @@ const tameConsole= (
|
|
|
8601
8776
|
{
|
|
8602
8777
|
globalWindow.addEventListener('error', (event)=>{
|
|
8603
8778
|
event.preventDefault();
|
|
8779
|
+
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNCAUGHT_EXCEPTION.md
|
|
8780
|
+
ourConsole.error('SES_UNCAUGHT_EXCEPTION:', event.error);
|
|
8604
8781
|
// 'platform' and 'report' just log the reason.
|
|
8605
|
-
ourConsole.error(event.error);
|
|
8606
8782
|
if( errorTrapping=== 'exit'|| errorTrapping=== 'abort') {
|
|
8607
8783
|
globalWindow.location.href= `about:blank`;
|
|
8608
8784
|
}
|
|
@@ -8614,6 +8790,7 @@ const tameConsole= (
|
|
|
8614
8790
|
typeof globalWindow.addEventListener=== 'function')
|
|
8615
8791
|
{
|
|
8616
8792
|
const handleRejection= (reason)=>{
|
|
8793
|
+
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNHANDLED_REJECTION.md
|
|
8617
8794
|
ourConsole.error('SES_UNHANDLED_REJECTION:', reason);
|
|
8618
8795
|
};
|
|
8619
8796
|
|
|
@@ -8638,11 +8815,11 @@ const tameConsole= (
|
|
|
8638
8815
|
/* eslint-enable @endo/no-polymorphic-call */
|
|
8639
8816
|
|
|
8640
8817
|
return { console: ourConsole};
|
|
8641
|
-
};$h
|
|
8818
|
+
};$h͏_once.tameConsole(tameConsole);
|
|
8642
8819
|
})()
|
|
8643
8820
|
,
|
|
8644
|
-
// === functors[
|
|
8645
|
-
({ imports: $h
|
|
8821
|
+
// === functors[38] ===
|
|
8822
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,regexpTest,weakmapGet,weakmapSet,weaksetAdd,weaksetHas,TypeError;$h͏_imports([["../commons.js", [["WeakMap", [$h͏_a => (WeakMap = $h͏_a)]],["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arraySlice", [$h͏_a => (arraySlice = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["fromEntries", [$h͏_a => (fromEntries = $h͏_a)]],["reflectSet", [$h͏_a => (reflectSet = $h͏_a)]],["regexpExec", [$h͏_a => (regexpExec = $h͏_a)]],["regexpTest", [$h͏_a => (regexpTest = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]],["weaksetAdd", [$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]]]]]);
|
|
8646
8823
|
|
|
8647
8824
|
|
|
8648
8825
|
|
|
@@ -8764,7 +8941,7 @@ const filterFileName= (fileName)=>{
|
|
|
8764
8941
|
//
|
|
8765
8942
|
// See thread starting at
|
|
8766
8943
|
// https://github.com/Agoric/agoric-sdk/issues/2326#issuecomment-773020389
|
|
8767
|
-
$h
|
|
8944
|
+
$h͏_once.filterFileName(filterFileName);const CALLSITE_ELLIPSES_PATTERN=/^((?:.*[( ])?)[:/\w_-]*\/\.\.\.\/(.+)$/;
|
|
8768
8945
|
|
|
8769
8946
|
// The ad-hoc rule of the current pattern is that any likely-file-path or
|
|
8770
8947
|
// likely url-path prefix, ending in a `/` and prior to `package/` should get
|
|
@@ -8801,7 +8978,7 @@ const shortenCallSiteString= (callSiteString)=>{
|
|
|
8801
8978
|
}
|
|
8802
8979
|
}
|
|
8803
8980
|
return callSiteString;
|
|
8804
|
-
};$h
|
|
8981
|
+
};$h͏_once.shortenCallSiteString(shortenCallSiteString);
|
|
8805
8982
|
|
|
8806
8983
|
const tameV8ErrorConstructor= (
|
|
8807
8984
|
OriginalError,
|
|
@@ -8984,11 +9161,11 @@ const tameV8ErrorConstructor= (
|
|
|
8984
9161
|
|
|
8985
9162
|
|
|
8986
9163
|
return tamedMethods.getStackString;
|
|
8987
|
-
};$h
|
|
9164
|
+
};$h͏_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
|
|
8988
9165
|
})()
|
|
8989
9166
|
,
|
|
8990
|
-
// === functors[
|
|
8991
|
-
({ imports: $h
|
|
9167
|
+
// === functors[39] ===
|
|
9168
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_ERROR,TypeError,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,defineProperty,getOwnPropertyDescriptors,NativeErrors,tameV8ErrorConstructor;$h͏_imports([["../commons.js", [["FERAL_ERROR", [$h͏_a => (FERAL_ERROR = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["construct", [$h͏_a => (construct = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["setPrototypeOf", [$h͏_a => (setPrototypeOf = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]]]],["../permits.js", [["NativeErrors", [$h͏_a => (NativeErrors = $h͏_a)]]]],["./tame-v8-error-constructor.js", [["tameV8ErrorConstructor", [$h͏_a => (tameV8ErrorConstructor = $h͏_a)]]]]]);
|
|
8992
9169
|
|
|
8993
9170
|
|
|
8994
9171
|
|
|
@@ -9282,11 +9459,11 @@ function tameErrorConstructor(
|
|
|
9282
9459
|
'%InitialError%': InitialError,
|
|
9283
9460
|
'%SharedError%': SharedError};
|
|
9284
9461
|
|
|
9285
|
-
}$h
|
|
9462
|
+
}$h͏_once.default( tameErrorConstructor);
|
|
9286
9463
|
})()
|
|
9287
9464
|
,
|
|
9288
|
-
// === functors[
|
|
9289
|
-
({ imports: $h
|
|
9465
|
+
// === functors[40] ===
|
|
9466
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let getenv,Map,Set,TypeError,arrayJoin,arrayMap,arrayPush,create,freeze,generatorNext,generatorThrow,getOwnPropertyNames,isObject,mapGet,mapHas,mapSet,promiseThen,setAdd,values,weakmapGet,weakmapHas,makeError,annotateError,q,b,X;$h͏_imports([["@endo/env-options", [["getEnvironmentOption", [$h͏_a => (getenv = $h͏_a)]]]],["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["Set", [$h͏_a => (Set = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["generatorNext", [$h͏_a => (generatorNext = $h͏_a)]],["generatorThrow", [$h͏_a => (generatorThrow = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["mapHas", [$h͏_a => (mapHas = $h͏_a)]],["mapSet", [$h͏_a => (mapSet = $h͏_a)]],["promiseThen", [$h͏_a => (promiseThen = $h͏_a)]],["setAdd", [$h͏_a => (setAdd = $h͏_a)]],["values", [$h͏_a => (values = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas", [$h͏_a => (weakmapHas = $h͏_a)]]]],["./error/assert.js", [["makeError", [$h͏_a => (makeError = $h͏_a)]],["annotateError", [$h͏_a => (annotateError = $h͏_a)]],["q", [$h͏_a => (q = $h͏_a)]],["b", [$h͏_a => (b = $h͏_a)]],["X", [$h͏_a => (X = $h͏_a)]]]]]);
|
|
9290
9467
|
|
|
9291
9468
|
|
|
9292
9469
|
|
|
@@ -9353,7 +9530,7 @@ const makeAlias= (compartment, specifier)=>
|
|
|
9353
9530
|
|
|
9354
9531
|
// `resolveAll` pre-computes resolutions of all imports within the compartment
|
|
9355
9532
|
// in which a module was loaded.
|
|
9356
|
-
$h
|
|
9533
|
+
$h͏_once.makeAlias(makeAlias);const resolveAll=(imports,resolveHook,fullReferrerSpecifier)=>{
|
|
9357
9534
|
const resolvedImports= create(null);
|
|
9358
9535
|
for( const importSpecifier of imports) {
|
|
9359
9536
|
const fullSpecifier= resolveHook(importSpecifier, fullReferrerSpecifier);
|
|
@@ -9893,7 +10070,7 @@ const load= async(
|
|
|
9893
10070
|
* The module records refer to each other by a reference to the dependency's
|
|
9894
10071
|
* compartment and the specifier of the module within its own compartment.
|
|
9895
10072
|
* This graph is then ready to be synchronously linked and executed.
|
|
9896
|
-
*/$h
|
|
10073
|
+
*/$h͏_once.load(load);
|
|
9897
10074
|
const loadNow= (
|
|
9898
10075
|
compartmentPrivateFields,
|
|
9899
10076
|
moduleAliases,
|
|
@@ -9935,11 +10112,11 @@ const loadNow= (
|
|
|
9935
10112
|
compartmentName)
|
|
9936
10113
|
}`});
|
|
9937
10114
|
|
|
9938
|
-
};$h
|
|
10115
|
+
};$h͏_once.loadNow(loadNow);
|
|
9939
10116
|
})()
|
|
9940
10117
|
,
|
|
9941
|
-
// === functors[
|
|
9942
|
-
({ imports: $h
|
|
10118
|
+
// === functors[41] ===
|
|
10119
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let makeAlias,Proxy,TypeError,create,freeze,mapGet,mapHas,mapSet,ownKeys,reflectGet,reflectGetOwnPropertyDescriptor,reflectHas,reflectIsExtensible,reflectPreventExtensions,toStringTagSymbol,weakmapSet,assert;$h͏_imports([["./module-load.js", [["makeAlias", [$h͏_a => (makeAlias = $h͏_a)]]]],["./commons.js", [["Proxy", [$h͏_a => (Proxy = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["mapHas", [$h͏_a => (mapHas = $h͏_a)]],["mapSet", [$h͏_a => (mapSet = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["reflectGet", [$h͏_a => (reflectGet = $h͏_a)]],["reflectGetOwnPropertyDescriptor", [$h͏_a => (reflectGetOwnPropertyDescriptor = $h͏_a)]],["reflectHas", [$h͏_a => (reflectHas = $h͏_a)]],["reflectIsExtensible", [$h͏_a => (reflectIsExtensible = $h͏_a)]],["reflectPreventExtensions", [$h͏_a => (reflectPreventExtensions = $h͏_a)]],["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
9943
10120
|
|
|
9944
10121
|
|
|
9945
10122
|
|
|
@@ -10120,7 +10297,7 @@ const deferExports= ()=> {
|
|
|
10120
10297
|
* @param {string} specifier - The module specifier to retrieve deferred exports for.
|
|
10121
10298
|
* @returns {DeferredExports} - The deferred exports for the module specifier of
|
|
10122
10299
|
* the compartment.
|
|
10123
|
-
*/$h
|
|
10300
|
+
*/$h͏_once.deferExports(deferExports);
|
|
10124
10301
|
const getDeferredExports= (
|
|
10125
10302
|
compartment,
|
|
10126
10303
|
compartmentPrivateFields,
|
|
@@ -10138,11 +10315,11 @@ const getDeferredExports= (
|
|
|
10138
10315
|
mapSet(deferredExports, specifier, deferred);
|
|
10139
10316
|
}
|
|
10140
10317
|
return mapGet(deferredExports, specifier);
|
|
10141
|
-
};$h
|
|
10318
|
+
};$h͏_once.getDeferredExports(getDeferredExports);
|
|
10142
10319
|
})()
|
|
10143
10320
|
,
|
|
10144
|
-
// === functors[
|
|
10145
|
-
({ imports: $h
|
|
10321
|
+
// === functors[42] ===
|
|
10322
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,arrayPush,create,getOwnPropertyDescriptors,evadeHtmlCommentTest,evadeImportExpressionTest,rejectSomeDirectEvalExpressions,makeSafeEvaluator;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]]]],["./transforms.js", [["evadeHtmlCommentTest", [$h͏_a => (evadeHtmlCommentTest = $h͏_a)]],["evadeImportExpressionTest", [$h͏_a => (evadeImportExpressionTest = $h͏_a)]],["rejectSomeDirectEvalExpressions", [$h͏_a => (rejectSomeDirectEvalExpressions = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h͏_a => (makeSafeEvaluator = $h͏_a)]]]]]);
|
|
10146
10323
|
|
|
10147
10324
|
|
|
10148
10325
|
|
|
@@ -10198,7 +10375,7 @@ const provideCompartmentEvaluator= (compartmentFields, options)=> {
|
|
|
10198
10375
|
}
|
|
10199
10376
|
|
|
10200
10377
|
return { safeEvaluate};
|
|
10201
|
-
};$h
|
|
10378
|
+
};$h͏_once.provideCompartmentEvaluator(provideCompartmentEvaluator);
|
|
10202
10379
|
|
|
10203
10380
|
const compartmentEvaluate= (compartmentFields, source, options)=> {
|
|
10204
10381
|
// Perform this check first to avoid unnecessary sanitizing.
|
|
@@ -10234,11 +10411,11 @@ const compartmentEvaluate= (compartmentFields, source, options)=> {
|
|
|
10234
10411
|
return safeEvaluate(source, {
|
|
10235
10412
|
localTransforms});
|
|
10236
10413
|
|
|
10237
|
-
};$h
|
|
10414
|
+
};$h͏_once.compartmentEvaluate(compartmentEvaluate);
|
|
10238
10415
|
})()
|
|
10239
10416
|
,
|
|
10240
|
-
// === functors[
|
|
10241
|
-
({ imports: $h
|
|
10417
|
+
// === functors[43] ===
|
|
10418
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let assert,getDeferredExports,ReferenceError,SyntaxError,TypeError,arrayForEach,arrayIncludes,arrayPush,arraySome,arraySort,create,defineProperty,entries,freeze,isArray,keys,mapGet,weakmapGet,reflectHas,assign,compartmentEvaluate;$h͏_imports([["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]],["./module-proxy.js", [["getDeferredExports", [$h͏_a => (getDeferredExports = $h͏_a)]]]],["./commons.js", [["ReferenceError", [$h͏_a => (ReferenceError = $h͏_a)]],["SyntaxError", [$h͏_a => (SyntaxError = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayForEach", [$h͏_a => (arrayForEach = $h͏_a)]],["arrayIncludes", [$h͏_a => (arrayIncludes = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["arraySome", [$h͏_a => (arraySome = $h͏_a)]],["arraySort", [$h͏_a => (arraySort = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["isArray", [$h͏_a => (isArray = $h͏_a)]],["keys", [$h͏_a => (keys = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["reflectHas", [$h͏_a => (reflectHas = $h͏_a)]],["assign", [$h͏_a => (assign = $h͏_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate", [$h͏_a => (compartmentEvaluate = $h͏_a)]]]]]);
|
|
10242
10419
|
|
|
10243
10420
|
|
|
10244
10421
|
|
|
@@ -10353,7 +10530,7 @@ const makeVirtualModuleInstance= (
|
|
|
10353
10530
|
// an idempotent execute function.
|
|
10354
10531
|
// The module exports namespace is a proxy to the proxied exports namespace
|
|
10355
10532
|
// that the execution of the module instance populates.
|
|
10356
|
-
$h
|
|
10533
|
+
$h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleInstance=(
|
|
10357
10534
|
privateFields,
|
|
10358
10535
|
moduleAliases,
|
|
10359
10536
|
moduleRecord,
|
|
@@ -10721,11 +10898,11 @@ $h_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModule
|
|
|
10721
10898
|
exportsProxy,
|
|
10722
10899
|
execute});
|
|
10723
10900
|
|
|
10724
|
-
};$h
|
|
10901
|
+
};$h͏_once.makeModuleInstance(makeModuleInstance);
|
|
10725
10902
|
})()
|
|
10726
10903
|
,
|
|
10727
|
-
// === functors[
|
|
10728
|
-
({ imports: $h
|
|
10904
|
+
// === functors[44] ===
|
|
10905
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let assert,makeModuleInstance,makeVirtualModuleInstance,Map,ReferenceError,TypeError,entries,isArray,isObject,mapGet,mapHas,mapSet,weakmapGet;$h͏_imports([["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]],["./module-instance.js", [["makeModuleInstance", [$h͏_a => (makeModuleInstance = $h͏_a)]],["makeVirtualModuleInstance", [$h͏_a => (makeVirtualModuleInstance = $h͏_a)]]]],["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["ReferenceError", [$h͏_a => (ReferenceError = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["isArray", [$h͏_a => (isArray = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["mapHas", [$h͏_a => (mapHas = $h͏_a)]],["mapSet", [$h͏_a => (mapSet = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]]]]]);
|
|
10729
10906
|
|
|
10730
10907
|
|
|
10731
10908
|
|
|
@@ -10778,7 +10955,7 @@ const link= (
|
|
|
10778
10955
|
// compartment, denoted by moduleRecord.compartment.
|
|
10779
10956
|
// eslint-disable-next-line no-use-before-define
|
|
10780
10957
|
return instantiate(compartmentPrivateFields, moduleAliases, moduleRecord);
|
|
10781
|
-
};$h
|
|
10958
|
+
};$h͏_once.link(link);
|
|
10782
10959
|
|
|
10783
10960
|
function mayBePrecompiledModuleSource(moduleSource) {
|
|
10784
10961
|
return typeof moduleSource.__syncModuleProgram__=== 'string';
|
|
@@ -10885,11 +11062,11 @@ const instantiate= (
|
|
|
10885
11062
|
}
|
|
10886
11063
|
|
|
10887
11064
|
return moduleInstance;
|
|
10888
|
-
};$h
|
|
11065
|
+
};$h͏_once.instantiate(instantiate);
|
|
10889
11066
|
})()
|
|
10890
11067
|
,
|
|
10891
|
-
// === functors[
|
|
10892
|
-
({ imports: $h
|
|
11068
|
+
// === functors[45] ===
|
|
11069
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Map,TypeError,WeakMap,assign,defineProperties,promiseThen,toStringTagSymbol,weakmapGet,weakmapSet,setGlobalObjectSymbolUnscopables,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,assert,assertEqual,sharedGlobalPropertyNames,load,loadNow,link,getDeferredExports,compartmentEvaluate,makeSafeEvaluator;$h͏_imports([["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["WeakMap", [$h͏_a => (WeakMap = $h͏_a)]],["assign", [$h͏_a => (assign = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["promiseThen", [$h͏_a => (promiseThen = $h͏_a)]],["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectSymbolUnscopables", [$h͏_a => (setGlobalObjectSymbolUnscopables = $h͏_a)]],["setGlobalObjectConstantProperties", [$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties", [$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators", [$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]],["assertEqual", [$h͏_a => (assertEqual = $h͏_a)]]]],["./permits.js", [["sharedGlobalPropertyNames", [$h͏_a => (sharedGlobalPropertyNames = $h͏_a)]]]],["./module-load.js", [["load", [$h͏_a => (load = $h͏_a)]],["loadNow", [$h͏_a => (loadNow = $h͏_a)]]]],["./module-link.js", [["link", [$h͏_a => (link = $h͏_a)]]]],["./module-proxy.js", [["getDeferredExports", [$h͏_a => (getDeferredExports = $h͏_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate", [$h͏_a => (compartmentEvaluate = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h͏_a => (makeSafeEvaluator = $h͏_a)]]]]]);
|
|
10893
11070
|
|
|
10894
11071
|
|
|
10895
11072
|
|
|
@@ -10944,7 +11121,7 @@ const InertCompartment= function Compartment(
|
|
|
10944
11121
|
/**
|
|
10945
11122
|
* @param {Compartment} compartment
|
|
10946
11123
|
* @param {string} specifier
|
|
10947
|
-
*/$h
|
|
11124
|
+
*/$h͏_once.InertCompartment(InertCompartment);
|
|
10948
11125
|
const compartmentImportNow= (compartment, specifier)=> {
|
|
10949
11126
|
const { execute, exportsProxy}= link(
|
|
10950
11127
|
privateFields,
|
|
@@ -11044,7 +11221,7 @@ const CompartmentPrototype= {
|
|
|
11044
11221
|
// This causes `String(new Compartment())` to evaluate to `[object Compartment]`.
|
|
11045
11222
|
// The descriptor follows the conventions of other globals with @@toStringTag
|
|
11046
11223
|
// properties, e.g. Math.
|
|
11047
|
-
$h
|
|
11224
|
+
$h͏_once.CompartmentPrototype(CompartmentPrototype);defineProperties(CompartmentPrototype,{
|
|
11048
11225
|
[toStringTagSymbol]: {
|
|
11049
11226
|
value: 'Compartment',
|
|
11050
11227
|
writable: false,
|
|
@@ -11211,11 +11388,11 @@ const makeCompartmentConstructor= (
|
|
|
11211
11388
|
Compartment.prototype= CompartmentPrototype;
|
|
11212
11389
|
|
|
11213
11390
|
return Compartment;
|
|
11214
|
-
};$h
|
|
11391
|
+
};$h͏_once.makeCompartmentConstructor(makeCompartmentConstructor);
|
|
11215
11392
|
})()
|
|
11216
11393
|
,
|
|
11217
|
-
// === functors[
|
|
11218
|
-
({ imports: $h
|
|
11394
|
+
// === functors[46] ===
|
|
11395
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,InertCompartment;$h͏_imports([["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["Float32Array", [$h͏_a => (Float32Array = $h͏_a)]],["Map", [$h͏_a => (Map = $h͏_a)]],["Set", [$h͏_a => (Set = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["iterateArray", [$h͏_a => (iterateArray = $h͏_a)]],["iterateMap", [$h͏_a => (iterateMap = $h͏_a)]],["iterateSet", [$h͏_a => (iterateSet = $h͏_a)]],["iterateString", [$h͏_a => (iterateString = $h͏_a)]],["matchAllRegExp", [$h͏_a => (matchAllRegExp = $h͏_a)]],["matchAllSymbol", [$h͏_a => (matchAllSymbol = $h͏_a)]],["regexpPrototype", [$h͏_a => (regexpPrototype = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./compartment.js", [["InertCompartment", [$h͏_a => (InertCompartment = $h͏_a)]]]]]);
|
|
11219
11396
|
|
|
11220
11397
|
|
|
11221
11398
|
|
|
@@ -11359,7 +11536,11 @@ const getAnonymousIntrinsics= ()=> {
|
|
|
11359
11536
|
|
|
11360
11537
|
intrinsics['%WrapForValidIteratorPrototype%']= getPrototypeOf(
|
|
11361
11538
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
11362
|
-
globalThis.Iterator.from({
|
|
11539
|
+
globalThis.Iterator.from({
|
|
11540
|
+
next() {
|
|
11541
|
+
return { value: undefined};
|
|
11542
|
+
}}));
|
|
11543
|
+
|
|
11363
11544
|
|
|
11364
11545
|
}
|
|
11365
11546
|
|
|
@@ -11375,13 +11556,16 @@ const getAnonymousIntrinsics= ()=> {
|
|
|
11375
11556
|
}
|
|
11376
11557
|
|
|
11377
11558
|
return intrinsics;
|
|
11378
|
-
};$h
|
|
11559
|
+
};$h͏_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
|
|
11379
11560
|
})()
|
|
11380
11561
|
,
|
|
11381
|
-
// === functors[
|
|
11382
|
-
({ imports: $h
|
|
11562
|
+
// === functors[47] ===
|
|
11563
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,freeze;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]]]);
|
|
11564
|
+
|
|
11383
11565
|
|
|
11566
|
+
/** @import {Harden} from '../types.js'; */
|
|
11384
11567
|
|
|
11568
|
+
/** @type {(safeHarden: Harden, hardenTaming: 'safe' | 'unsafe') => Harden} */
|
|
11385
11569
|
const tameHarden= (safeHarden, hardenTaming)=> {
|
|
11386
11570
|
if( hardenTaming!== 'safe'&& hardenTaming!== 'unsafe') {
|
|
11387
11571
|
throw TypeError( `unrecognized fakeHardenOption ${hardenTaming}`);
|
|
@@ -11397,6 +11581,7 @@ const tameHarden= (safeHarden, hardenTaming)=> {
|
|
|
11397
11581
|
Object.isSealed= ()=> true;
|
|
11398
11582
|
Reflect.isExtensible= ()=> false;
|
|
11399
11583
|
|
|
11584
|
+
// @ts-expect-error secret property
|
|
11400
11585
|
if( safeHarden.isFake) {
|
|
11401
11586
|
// The "safe" hardener is already a fake hardener.
|
|
11402
11587
|
// Just use it.
|
|
@@ -11406,12 +11591,12 @@ const tameHarden= (safeHarden, hardenTaming)=> {
|
|
|
11406
11591
|
const fakeHarden= (arg)=>arg;
|
|
11407
11592
|
fakeHarden.isFake= true;
|
|
11408
11593
|
return freeze(fakeHarden);
|
|
11409
|
-
};$h
|
|
11594
|
+
};$h͏_once.tameHarden(tameHarden);
|
|
11410
11595
|
freeze(tameHarden);
|
|
11411
11596
|
})()
|
|
11412
11597
|
,
|
|
11413
|
-
// === functors[
|
|
11414
|
-
({ imports: $h
|
|
11598
|
+
// === functors[48] ===
|
|
11599
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Symbol,entries,fromEntries,getOwnPropertyDescriptors,defineProperties,arrayMap,functionBind;$h͏_imports([["./commons.js", [["Symbol", [$h͏_a => (Symbol = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["fromEntries", [$h͏_a => (fromEntries = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["functionBind", [$h͏_a => (functionBind = $h͏_a)]]]]]);
|
|
11415
11600
|
|
|
11416
11601
|
|
|
11417
11602
|
|
|
@@ -11474,11 +11659,11 @@ const tameSymbolConstructor= ()=> {
|
|
|
11474
11659
|
defineProperties(SharedSymbol, descs);
|
|
11475
11660
|
|
|
11476
11661
|
return { '%SharedSymbol%': SharedSymbol};
|
|
11477
|
-
};$h
|
|
11662
|
+
};$h͏_once.tameSymbolConstructor(tameSymbolConstructor);
|
|
11478
11663
|
})()
|
|
11479
11664
|
,
|
|
11480
|
-
// === functors[
|
|
11481
|
-
({ imports: $h
|
|
11665
|
+
// === functors[49] ===
|
|
11666
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let getOwnPropertyDescriptor,apply,defineProperty,toStringTagSymbol;$h͏_imports([["./commons.js", [["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]]]]]);
|
|
11482
11667
|
|
|
11483
11668
|
|
|
11484
11669
|
|
|
@@ -11673,7 +11858,7 @@ const tameFauxDataProperty= (obj, prop, expectedValue)=> {
|
|
|
11673
11858
|
* turned back to faux data properties.
|
|
11674
11859
|
*
|
|
11675
11860
|
* @param {Record<any,any>} intrinsics
|
|
11676
|
-
*/$h
|
|
11861
|
+
*/$h͏_once.tameFauxDataProperty(tameFauxDataProperty);
|
|
11677
11862
|
const tameFauxDataProperties= (intrinsics)=>{
|
|
11678
11863
|
// https://github.com/tc39/proposal-iterator-helpers
|
|
11679
11864
|
tameFauxDataProperty(
|
|
@@ -11687,11 +11872,135 @@ const tameFauxDataProperties= (intrinsics)=>{
|
|
|
11687
11872
|
toStringTagSymbol,
|
|
11688
11873
|
'Iterator');
|
|
11689
11874
|
|
|
11690
|
-
};$h
|
|
11875
|
+
};$h͏_once.tameFauxDataProperties(tameFauxDataProperties);
|
|
11691
11876
|
})()
|
|
11692
11877
|
,
|
|
11693
|
-
// === functors[
|
|
11694
|
-
({ imports: $h
|
|
11878
|
+
// === functors[50] ===
|
|
11879
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let defineProperty,iteratorPrototype,iteratorSymbol,objectHasOwnProperty;$h͏_imports([["./commons.js", [["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["iteratorPrototype", [$h͏_a => (iteratorPrototype = $h͏_a)]],["iteratorSymbol", [$h͏_a => (iteratorSymbol = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]]]]]);
|
|
11880
|
+
|
|
11881
|
+
|
|
11882
|
+
|
|
11883
|
+
|
|
11884
|
+
|
|
11885
|
+
|
|
11886
|
+
const tameRegeneratorRuntime= ()=> {
|
|
11887
|
+
const iter= iteratorPrototype[iteratorSymbol];
|
|
11888
|
+
defineProperty(iteratorPrototype, iteratorSymbol, {
|
|
11889
|
+
configurable: true,
|
|
11890
|
+
get() {
|
|
11891
|
+
return iter;
|
|
11892
|
+
},
|
|
11893
|
+
set(value) {
|
|
11894
|
+
// ignore the assignment on IteratorPrototype
|
|
11895
|
+
if( this=== iteratorPrototype) return;
|
|
11896
|
+
if( objectHasOwnProperty(this, iteratorSymbol)) {
|
|
11897
|
+
this[iteratorSymbol]= value;
|
|
11898
|
+
}
|
|
11899
|
+
defineProperty(this, iteratorSymbol, {
|
|
11900
|
+
value,
|
|
11901
|
+
writable: true,
|
|
11902
|
+
enumerable: true,
|
|
11903
|
+
configurable: true});
|
|
11904
|
+
|
|
11905
|
+
}});
|
|
11906
|
+
|
|
11907
|
+
};$h͏_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
|
|
11908
|
+
})()
|
|
11909
|
+
,
|
|
11910
|
+
// === functors[51] ===
|
|
11911
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let ArrayBuffer,arrayBufferPrototype,arrayBufferSlice,arrayBufferGetByteLength,Uint8Array,typedArraySet,globalThis,TypeError,defineProperty;$h͏_imports([["./commons.js", [["ArrayBuffer", [$h͏_a => (ArrayBuffer = $h͏_a)]],["arrayBufferPrototype", [$h͏_a => (arrayBufferPrototype = $h͏_a)]],["arrayBufferSlice", [$h͏_a => (arrayBufferSlice = $h͏_a)]],["arrayBufferGetByteLength", [$h͏_a => (arrayBufferGetByteLength = $h͏_a)]],["Uint8Array", [$h͏_a => (Uint8Array = $h͏_a)]],["typedArraySet", [$h͏_a => (typedArraySet = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]]]]]);
|
|
11912
|
+
|
|
11913
|
+
|
|
11914
|
+
|
|
11915
|
+
|
|
11916
|
+
|
|
11917
|
+
|
|
11918
|
+
|
|
11919
|
+
|
|
11920
|
+
|
|
11921
|
+
|
|
11922
|
+
|
|
11923
|
+
const shimArrayBufferTransfer= ()=> {
|
|
11924
|
+
// @ts-expect-error TODO extend ArrayBuffer type to include transfer, etc.
|
|
11925
|
+
if( typeof arrayBufferPrototype.transfer=== 'function') {
|
|
11926
|
+
// Assume already exists so does not need to be shimmed.
|
|
11927
|
+
// Such conditional shimming is ok in this case since ArrayBuffer.p.transfer
|
|
11928
|
+
// is already officially part of JS.
|
|
11929
|
+
//
|
|
11930
|
+
// Empty object because this shim has nothing for `addIntrinsics` to add.
|
|
11931
|
+
return {};
|
|
11932
|
+
}
|
|
11933
|
+
const clone= globalThis.structuredClone;
|
|
11934
|
+
if( typeof clone!== 'function') {
|
|
11935
|
+
// On a platform with neither `Array.prototype.transfer`
|
|
11936
|
+
// nor `structuredClone`, this shim does nothing.
|
|
11937
|
+
// For example, Node <= 16 has neither.
|
|
11938
|
+
//
|
|
11939
|
+
// Empty object because this shim has nothing for `addIntrinsics` to add.
|
|
11940
|
+
return {};
|
|
11941
|
+
// TODO Rather than doing nothing, should the endo ses-shim throw
|
|
11942
|
+
// in this case?
|
|
11943
|
+
// throw TypeError(
|
|
11944
|
+
// `Can only shim missing ArrayBuffer.prototype.transfer on a platform with "structuredClone"`,
|
|
11945
|
+
// );
|
|
11946
|
+
// For example, endo no longer supports Node <= 16. All browsers have
|
|
11947
|
+
// `structuredClone`. XS has `Array.prototype.transfer`. Are there still
|
|
11948
|
+
// any platforms without both that Endo should still support?
|
|
11949
|
+
// What about Hermes?
|
|
11950
|
+
}
|
|
11951
|
+
|
|
11952
|
+
/**
|
|
11953
|
+
* @type {ThisType<ArrayBuffer>}
|
|
11954
|
+
*/
|
|
11955
|
+
const methods= {
|
|
11956
|
+
/**
|
|
11957
|
+
* @param {number} [newLength]
|
|
11958
|
+
*/
|
|
11959
|
+
transfer(newLength= undefined) {
|
|
11960
|
+
// Using this builtin getter also ensures that `this` is a genuine
|
|
11961
|
+
// ArrayBuffer.
|
|
11962
|
+
const oldLength= arrayBufferGetByteLength(this);
|
|
11963
|
+
if( newLength=== undefined|| newLength=== oldLength) {
|
|
11964
|
+
return clone(this, { transfer: [this]});
|
|
11965
|
+
}
|
|
11966
|
+
if( typeof newLength!== 'number') {
|
|
11967
|
+
throw TypeError( `transfer newLength if provided must be a number`);
|
|
11968
|
+
}
|
|
11969
|
+
if( newLength> oldLength) {
|
|
11970
|
+
const result= new ArrayBuffer(newLength);
|
|
11971
|
+
const taOld= new Uint8Array(this);
|
|
11972
|
+
const taNew= new Uint8Array(result);
|
|
11973
|
+
typedArraySet(taNew, taOld);
|
|
11974
|
+
// Using clone only to detach, and only after the copy succeeds
|
|
11975
|
+
clone(this, { transfer: [this]});
|
|
11976
|
+
return result;
|
|
11977
|
+
}else {
|
|
11978
|
+
const result= arrayBufferSlice(this, 0, newLength);
|
|
11979
|
+
// Using clone only to detach, and only after the slice succeeds
|
|
11980
|
+
clone(this, { transfer: [this]});
|
|
11981
|
+
return result;
|
|
11982
|
+
}
|
|
11983
|
+
}};
|
|
11984
|
+
|
|
11985
|
+
|
|
11986
|
+
defineProperty(arrayBufferPrototype, 'transfer', {
|
|
11987
|
+
// @ts-expect-error
|
|
11988
|
+
value: methods.transfer,
|
|
11989
|
+
writable: true,
|
|
11990
|
+
enumerable: false,
|
|
11991
|
+
configurable: true});
|
|
11992
|
+
|
|
11993
|
+
|
|
11994
|
+
// Empty object because this shim has nothing for `addIntrinsics` to add.
|
|
11995
|
+
return {};
|
|
11996
|
+
};$h͏_once.shimArrayBufferTransfer(shimArrayBufferTransfer);
|
|
11997
|
+
})()
|
|
11998
|
+
,
|
|
11999
|
+
// === functors[52] ===
|
|
12000
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let getenv,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameModuleSource,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor,tameFauxDataProperties,tameRegeneratorRuntime,shimArrayBufferTransfer;$h͏_imports([["@endo/env-options", [["getEnvironmentOption", [$h͏_a => (getenv = $h͏_a)]]]],["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["FERAL_EVAL", [$h͏_a => (FERAL_EVAL = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["stringSplit", [$h͏_a => (stringSplit = $h͏_a)]],["noEvalEvaluate", [$h͏_a => (noEvalEvaluate = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./make-hardener.js", [["makeHardener", [$h͏_a => (makeHardener = $h͏_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h͏_a => (makeIntrinsicsCollector = $h͏_a)]]]],["./permits-intrinsics.js", [["default", [$h͏_a => (whitelistIntrinsics = $h͏_a)]]]],["./tame-function-constructors.js", [["default", [$h͏_a => (tameFunctionConstructors = $h͏_a)]]]],["./tame-date-constructor.js", [["default", [$h͏_a => (tameDateConstructor = $h͏_a)]]]],["./tame-math-object.js", [["default", [$h͏_a => (tameMathObject = $h͏_a)]]]],["./tame-regexp-constructor.js", [["default", [$h͏_a => (tameRegExpConstructor = $h͏_a)]]]],["./enable-property-overrides.js", [["default", [$h͏_a => (enablePropertyOverrides = $h͏_a)]]]],["./tame-locale-methods.js", [["default", [$h͏_a => (tameLocaleMethods = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties", [$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators", [$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h͏_a => (makeSafeEvaluator = $h͏_a)]]]],["./permits.js", [["initialGlobalPropertyNames", [$h͏_a => (initialGlobalPropertyNames = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./tame-domains.js", [["tameDomains", [$h͏_a => (tameDomains = $h͏_a)]]]],["./tame-module-source.js", [["tameModuleSource", [$h͏_a => (tameModuleSource = $h͏_a)]]]],["./error/tame-console.js", [["tameConsole", [$h͏_a => (tameConsole = $h͏_a)]]]],["./error/tame-error-constructor.js", [["default", [$h͏_a => (tameErrorConstructor = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]],["makeAssert", [$h͏_a => (makeAssert = $h͏_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h͏_a => (getAnonymousIntrinsics = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-harden.js", [["tameHarden", [$h͏_a => (tameHarden = $h͏_a)]]]],["./tame-symbol-constructor.js", [["tameSymbolConstructor", [$h͏_a => (tameSymbolConstructor = $h͏_a)]]]],["./tame-faux-data-properties.js", [["tameFauxDataProperties", [$h͏_a => (tameFauxDataProperties = $h͏_a)]]]],["./tame-regenerator-runtime.js", [["tameRegeneratorRuntime", [$h͏_a => (tameRegeneratorRuntime = $h͏_a)]]]],["./shim-arraybuffer-transfer.js", [["shimArrayBufferTransfer", [$h͏_a => (shimArrayBufferTransfer = $h͏_a)]]]]]);
|
|
12001
|
+
|
|
12002
|
+
|
|
12003
|
+
|
|
11695
12004
|
|
|
11696
12005
|
|
|
11697
12006
|
|
|
@@ -11873,12 +12182,20 @@ const repairIntrinsics= (options= {})=> {
|
|
|
11873
12182
|
/** @param {string} debugName */
|
|
11874
12183
|
(debugName)=>debugName!== ''),
|
|
11875
12184
|
|
|
12185
|
+
legacyRegeneratorRuntimeTaming= getenv(
|
|
12186
|
+
'LOCKDOWN_LEGACY_REGENERATOR_RUNTIME_TAMING',
|
|
12187
|
+
'safe'),
|
|
12188
|
+
|
|
11876
12189
|
__hardenTaming__= getenv('LOCKDOWN_HARDEN_TAMING', 'safe'),
|
|
11877
12190
|
dateTaming= 'safe', // deprecated
|
|
11878
12191
|
mathTaming= 'safe', // deprecated
|
|
11879
12192
|
...extraOptions}=
|
|
11880
12193
|
options;
|
|
11881
12194
|
|
|
12195
|
+
legacyRegeneratorRuntimeTaming=== 'safe'||
|
|
12196
|
+
legacyRegeneratorRuntimeTaming=== 'unsafe-ignore'||
|
|
12197
|
+
Fail `lockdown(): non supported option legacyRegeneratorRuntimeTaming: ${q(legacyRegeneratorRuntimeTaming)}`;
|
|
12198
|
+
|
|
11882
12199
|
evalTaming=== 'unsafeEval'||
|
|
11883
12200
|
evalTaming=== 'safeEval'||
|
|
11884
12201
|
evalTaming=== 'noEval'||
|
|
@@ -11957,6 +12274,7 @@ const repairIntrinsics= (options= {})=> {
|
|
|
11957
12274
|
const { addIntrinsics, completePrototypes, finalIntrinsics}=
|
|
11958
12275
|
makeIntrinsicsCollector();
|
|
11959
12276
|
|
|
12277
|
+
// @ts-expect-error __hardenTaming__ could be any string
|
|
11960
12278
|
const tamedHarden= tameHarden(safeHarden, __hardenTaming__);
|
|
11961
12279
|
addIntrinsics({ harden: tamedHarden});
|
|
11962
12280
|
|
|
@@ -11967,6 +12285,8 @@ const repairIntrinsics= (options= {})=> {
|
|
|
11967
12285
|
addIntrinsics(tameMathObject(mathTaming));
|
|
11968
12286
|
addIntrinsics(tameRegExpConstructor(regExpTaming));
|
|
11969
12287
|
addIntrinsics(tameSymbolConstructor());
|
|
12288
|
+
addIntrinsics(shimArrayBufferTransfer());
|
|
12289
|
+
addIntrinsics(tameModuleSource());
|
|
11970
12290
|
|
|
11971
12291
|
addIntrinsics(getAnonymousIntrinsics());
|
|
11972
12292
|
|
|
@@ -12105,6 +12425,9 @@ const repairIntrinsics= (options= {})=> {
|
|
|
12105
12425
|
// clear yet which is better.
|
|
12106
12426
|
// @ts-ignore enablePropertyOverrides does its own input validation
|
|
12107
12427
|
enablePropertyOverrides(intrinsics, overrideTaming, overrideDebug);
|
|
12428
|
+
if( legacyRegeneratorRuntimeTaming=== 'unsafe-ignore') {
|
|
12429
|
+
tameRegeneratorRuntime();
|
|
12430
|
+
}
|
|
12108
12431
|
|
|
12109
12432
|
// Finally register and optionally freeze all the intrinsics. This
|
|
12110
12433
|
// must be the operation that modifies the intrinsics.
|
|
@@ -12134,11 +12457,11 @@ const repairIntrinsics= (options= {})=> {
|
|
|
12134
12457
|
};
|
|
12135
12458
|
|
|
12136
12459
|
return hardenIntrinsics;
|
|
12137
|
-
};$h
|
|
12460
|
+
};$h͏_once.repairIntrinsics(repairIntrinsics);
|
|
12138
12461
|
})()
|
|
12139
12462
|
,
|
|
12140
|
-
// === functors[
|
|
12141
|
-
({ imports: $h
|
|
12463
|
+
// === functors[53] ===
|
|
12464
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let globalThis,repairIntrinsics;$h͏_imports([["./assert-sloppy-mode.js", []],["./commons.js", [["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./lockdown.js", [["repairIntrinsics", [$h͏_a => (repairIntrinsics = $h͏_a)]]]]]);
|
|
12142
12465
|
|
|
12143
12466
|
|
|
12144
12467
|
|
|
@@ -12150,7 +12473,7 @@ const repairIntrinsics= (options= {})=> {
|
|
|
12150
12473
|
/** @import {LockdownOptions} from '../types.js' */
|
|
12151
12474
|
|
|
12152
12475
|
/**
|
|
12153
|
-
* @param {LockdownOptions} options
|
|
12476
|
+
* @param {LockdownOptions} [options]
|
|
12154
12477
|
*/
|
|
12155
12478
|
globalThis.lockdown= (options)=>{
|
|
12156
12479
|
const hardenIntrinsics= repairIntrinsics(options);
|
|
@@ -12158,7 +12481,7 @@ globalThis.lockdown= (options)=>{
|
|
|
12158
12481
|
};
|
|
12159
12482
|
|
|
12160
12483
|
/**
|
|
12161
|
-
* @param {LockdownOptions} options
|
|
12484
|
+
* @param {LockdownOptions} [options]
|
|
12162
12485
|
*/
|
|
12163
12486
|
globalThis.repairIntrinsics= (options)=>{
|
|
12164
12487
|
const hardenIntrinsics= repairIntrinsics(options);
|
|
@@ -12177,8 +12500,8 @@ globalThis.repairIntrinsics= (options)=>{
|
|
|
12177
12500
|
};
|
|
12178
12501
|
})()
|
|
12179
12502
|
,
|
|
12180
|
-
// === functors[
|
|
12181
|
-
({ imports: $h
|
|
12503
|
+
// === functors[54] ===
|
|
12504
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let globalThis,makeCompartmentConstructor,tameFunctionToString,getGlobalIntrinsics;$h͏_imports([["./commons.js", [["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./intrinsics.js", [["getGlobalIntrinsics", [$h͏_a => (getGlobalIntrinsics = $h͏_a)]]]]]);
|
|
12182
12505
|
|
|
12183
12506
|
|
|
12184
12507
|
|
|
@@ -12194,15 +12517,15 @@ globalThis.Compartment= makeCompartmentConstructor(
|
|
|
12194
12517
|
markVirtualizedNativeFunction);
|
|
12195
12518
|
})()
|
|
12196
12519
|
,
|
|
12197
|
-
// === functors[
|
|
12198
|
-
({ imports: $h
|
|
12520
|
+
// === functors[55] ===
|
|
12521
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let globalThis,assert;$h͏_imports([["./commons.js", [["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
|
|
12199
12522
|
|
|
12200
12523
|
|
|
12201
12524
|
globalThis.assert= assert;
|
|
12202
12525
|
})()
|
|
12203
12526
|
,
|
|
12204
|
-
// === functors[
|
|
12205
|
-
({ imports: $h
|
|
12527
|
+
// === functors[56] ===
|
|
12528
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let symbolFor,globalThis,defineCausalConsoleFromLogger,loggedErrorHandler;$h͏_imports([["./commons.js", [["symbolFor", [$h͏_a => (symbolFor = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./error/console.js", [["defineCausalConsoleFromLogger", [$h͏_a => (defineCausalConsoleFromLogger = $h͏_a)]]]],["./error/assert.js", [["loggedErrorHandler", [$h͏_a => (loggedErrorHandler = $h͏_a)]]]]]);
|
|
12206
12529
|
|
|
12207
12530
|
|
|
12208
12531
|
|
|
@@ -12254,8 +12577,8 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA]=
|
|
|
12254
12577
|
makeCausalConsoleFromLoggerForSesAva;
|
|
12255
12578
|
})()
|
|
12256
12579
|
,
|
|
12257
|
-
// === functors[
|
|
12258
|
-
({ imports: $h
|
|
12580
|
+
// === functors[57] ===
|
|
12581
|
+
({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([["./src/lockdown-shim.js", []],["./src/compartment-shim.js", []],["./src/assert-shim.js", []],["./src/console-shim.js", []]]);
|
|
12259
12582
|
})()
|
|
12260
12583
|
,
|
|
12261
12584
|
]);
|