ses 0.15.14 → 0.15.17
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/CHANGELOG.md +46 -0
- package/README.md +5 -2
- package/dist/lockdown.cjs +527 -180
- package/dist/lockdown.mjs +527 -180
- package/dist/lockdown.umd.js +527 -180
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +527 -180
- package/dist/ses.mjs +527 -180
- package/dist/ses.umd.js +527 -180
- package/dist/ses.umd.min.js +1 -1
- package/index.d.ts +6 -4
- package/package.json +9 -9
- package/src/commons.js +13 -1
- package/src/compartment-shim.js +3 -1
- package/src/error/console.js +29 -26
- package/src/error/tame-console.js +62 -14
- package/src/error/tame-error-constructor.js +66 -12
- package/src/error/unhandled-rejection.js +122 -0
- package/src/lockdown-shim.js +14 -5
- package/src/module-instance.js +18 -2
- package/src/module-load.js +4 -0
- package/src/transforms.js +8 -8
- package/src/whitelist-intrinsics.js +9 -0
- package/src/whitelist.js +1 -1
package/dist/lockdown.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
(() => {
|
|
3
3
|
const functors = [
|
|
4
4
|
// === functors[0] ===
|
|
5
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { $h_imports([]); /* global globalThis */
|
|
5
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { $h_imports([]); /* global globalThis */
|
|
6
6
|
/* eslint-disable no-restricted-globals */
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -24,6 +24,7 @@ const universalThis= globalThis;$h_once.universalThis(universalThis);
|
|
|
24
24
|
const {
|
|
25
25
|
Array,
|
|
26
26
|
Date,
|
|
27
|
+
FinalizationRegistry,
|
|
27
28
|
Float32Array,
|
|
28
29
|
JSON,
|
|
29
30
|
Map,
|
|
@@ -38,7 +39,7 @@ const {
|
|
|
38
39
|
String,
|
|
39
40
|
WeakMap,
|
|
40
41
|
WeakSet}=
|
|
41
|
-
globalThis;$h_once.Array(Array);$h_once.Date(Date);$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.WeakMap(WeakMap);$h_once.WeakSet(WeakSet);
|
|
42
|
+
globalThis;$h_once.Array(Array);$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.WeakMap(WeakMap);$h_once.WeakSet(WeakSet);
|
|
42
43
|
|
|
43
44
|
const {
|
|
44
45
|
// The feral Error constructor is safe for internal use, but must not be
|
|
@@ -161,7 +162,9 @@ const typedArrayPrototype= getPrototypeOf(Uint8Array.prototype);
|
|
|
161
162
|
* which only lives at
|
|
162
163
|
* http://web.archive.org/web/20160805225710/http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming
|
|
163
164
|
*
|
|
164
|
-
* @
|
|
165
|
+
* @template {Function} F
|
|
166
|
+
* @param {F} fn
|
|
167
|
+
* returns {(thisArg: ThisParameterType<F>, ...args: Parameters<F>) => ReturnType<F>}
|
|
165
168
|
*/$h_once.typedArrayPrototype(typedArrayPrototype);
|
|
166
169
|
const uncurryThis= (fn)=>(thisArg, ...args)=> apply(fn, thisArg, args);$h_once.uncurryThis(uncurryThis);
|
|
167
170
|
|
|
@@ -182,6 +185,8 @@ const iterateArray= uncurryThis(arrayPrototype[iteratorSymbol]);
|
|
|
182
185
|
$h_once.iterateArray(iterateArray);const mapSet=uncurryThis(mapPrototype.set);$h_once.mapSet(mapSet);
|
|
183
186
|
const mapGet= uncurryThis(mapPrototype.get);$h_once.mapGet(mapGet);
|
|
184
187
|
const mapHas= uncurryThis(mapPrototype.has);$h_once.mapHas(mapHas);
|
|
188
|
+
const mapDelete= uncurryThis(mapPrototype.delete);$h_once.mapDelete(mapDelete);
|
|
189
|
+
const mapEntries= uncurryThis(mapPrototype.entries);$h_once.mapEntries(mapEntries);
|
|
185
190
|
const iterateMap= uncurryThis(mapPrototype[iteratorSymbol]);
|
|
186
191
|
//
|
|
187
192
|
$h_once.iterateMap(iterateMap);const setAdd=uncurryThis(setPrototype.add);$h_once.setAdd(setAdd);
|
|
@@ -205,7 +210,8 @@ const stringSplit= uncurryThis(stringPrototype.split);$h_once.stringS
|
|
|
205
210
|
const stringStartsWith= uncurryThis(stringPrototype.startsWith);$h_once.stringStartsWith(stringStartsWith);
|
|
206
211
|
const iterateString= uncurryThis(stringPrototype[iteratorSymbol]);
|
|
207
212
|
//
|
|
208
|
-
$h_once.iterateString(iterateString);const weakmapDelete=uncurryThis(weakmapPrototype.delete)
|
|
213
|
+
$h_once.iterateString(iterateString);const weakmapDelete=uncurryThis(weakmapPrototype.delete);
|
|
214
|
+
/** @type {<K, V>(thisArg: WeakMap<K, V>, ...args: Parameters<WeakMap<K,V>['get']>) => ReturnType<WeakMap<K,V>['get']>} */$h_once.weakmapDelete(weakmapDelete);
|
|
209
215
|
const weakmapGet= uncurryThis(weakmapPrototype.get);$h_once.weakmapGet(weakmapGet);
|
|
210
216
|
const weakmapHas= uncurryThis(weakmapPrototype.has);$h_once.weakmapHas(weakmapHas);
|
|
211
217
|
const weakmapSet= uncurryThis(weakmapPrototype.set);
|
|
@@ -220,13 +226,19 @@ $h_once.functionToString(functionToString);const{all}=Promise;
|
|
|
220
226
|
const promiseAll= (promises)=>apply(all, Promise, [promises]);$h_once.promiseAll(promiseAll);
|
|
221
227
|
const promiseCatch= uncurryThis(promisePrototype.catch);$h_once.promiseCatch(promiseCatch);
|
|
222
228
|
const promiseThen= uncurryThis(promisePrototype.then);
|
|
229
|
+
//
|
|
230
|
+
$h_once.promiseThen(promiseThen);const finalizationRegistryRegister=
|
|
231
|
+
FinalizationRegistry&& uncurryThis(FinalizationRegistry.prototype.register);$h_once.finalizationRegistryRegister(finalizationRegistryRegister);
|
|
232
|
+
const finalizationRegistryUnregister=
|
|
233
|
+
FinalizationRegistry&&
|
|
234
|
+
uncurryThis(FinalizationRegistry.prototype.unregister);
|
|
223
235
|
|
|
224
236
|
/**
|
|
225
237
|
* getConstructorOf()
|
|
226
238
|
* Return the constructor from an instance.
|
|
227
239
|
*
|
|
228
240
|
* @param {Function} fn
|
|
229
|
-
*/$h_once.
|
|
241
|
+
*/$h_once.finalizationRegistryUnregister(finalizationRegistryUnregister);
|
|
230
242
|
const getConstructorOf= (fn)=>
|
|
231
243
|
reflectGet(getPrototypeOf(fn), 'constructor');
|
|
232
244
|
|
|
@@ -287,7 +299,7 @@ const noEvalEvaluate= ()=> {
|
|
|
287
299
|
})
|
|
288
300
|
,
|
|
289
301
|
// === functors[1] ===
|
|
290
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { $h_imports([]); // @ts-check
|
|
302
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { $h_imports([]); // @ts-check
|
|
291
303
|
|
|
292
304
|
/**
|
|
293
305
|
* @typedef {readonly any[]} LogArgs
|
|
@@ -379,7 +391,7 @@ const noEvalEvaluate= ()=> {
|
|
|
379
391
|
})
|
|
380
392
|
,
|
|
381
393
|
// === functors[2] ===
|
|
382
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let Set,String,arrayJoin,arraySlice,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)]],["arrayJoin", [$h_a => (arrayJoin = $h_a)]],["arraySlice", [$h_a => (arraySlice = $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)]]]]]);
|
|
394
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let Set,String,arrayJoin,arraySlice,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)]],["arrayJoin", [$h_a => (arrayJoin = $h_a)]],["arraySlice", [$h_a => (arraySlice = $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)]]]]]);
|
|
383
395
|
|
|
384
396
|
|
|
385
397
|
|
|
@@ -550,7 +562,7 @@ freeze(bestEffortStringify);
|
|
|
550
562
|
})
|
|
551
563
|
,
|
|
552
564
|
// === functors[3] ===
|
|
553
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { $h_imports([]); // @ts-check
|
|
565
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { $h_imports([]); // @ts-check
|
|
554
566
|
|
|
555
567
|
/**
|
|
556
568
|
* @callback BaseAssert
|
|
@@ -903,7 +915,7 @@ freeze(bestEffortStringify);
|
|
|
903
915
|
})
|
|
904
916
|
,
|
|
905
917
|
// === functors[4] ===
|
|
906
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,globalThis,is,isError,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,an,bestEffortStringify;$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)]],["globalThis", [$h_a => (globalThis = $h_a)]],["is", [$h_a => (is = $h_a)]],["isError", [$h_a => (isError = $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)]]]],["./stringify-utils.js", [["an", [$h_a => (an = $h_a)]],["bestEffortStringify", [$h_a => (bestEffortStringify = $h_a)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
918
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,globalThis,is,isError,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,an,bestEffortStringify;$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)]],["globalThis", [$h_a => (globalThis = $h_a)]],["is", [$h_a => (is = $h_a)]],["isError", [$h_a => (isError = $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)]]]],["./stringify-utils.js", [["an", [$h_a => (an = $h_a)]],["bestEffortStringify", [$h_a => (bestEffortStringify = $h_a)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
907
919
|
|
|
908
920
|
|
|
909
921
|
|
|
@@ -1351,7 +1363,7 @@ const assert= makeAssert();$h_once.assert(assert);
|
|
|
1351
1363
|
})
|
|
1352
1364
|
,
|
|
1353
1365
|
// === functors[5] ===
|
|
1354
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let FERAL_FUNCTION,arrayJoin;$h_imports([["./commons.js", [["FERAL_FUNCTION", [$h_a => (FERAL_FUNCTION = $h_a)]],["arrayJoin", [$h_a => (arrayJoin = $h_a)]]]]]);
|
|
1366
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let FERAL_FUNCTION,arrayJoin;$h_imports([["./commons.js", [["FERAL_FUNCTION", [$h_a => (FERAL_FUNCTION = $h_a)]],["arrayJoin", [$h_a => (arrayJoin = $h_a)]]]]]);
|
|
1355
1367
|
|
|
1356
1368
|
/**
|
|
1357
1369
|
* buildOptimizer()
|
|
@@ -1425,7 +1437,7 @@ const makeEvaluateFactory= (constants= [])=> {
|
|
|
1425
1437
|
})
|
|
1426
1438
|
,
|
|
1427
1439
|
// === functors[6] ===
|
|
1428
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { 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)]]]]]);
|
|
1440
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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)]]]]]);
|
|
1429
1441
|
|
|
1430
1442
|
|
|
1431
1443
|
|
|
@@ -1603,7 +1615,7 @@ const getScopeConstants= (globalObject, localObject= {})=> {
|
|
|
1603
1615
|
})
|
|
1604
1616
|
,
|
|
1605
1617
|
// === functors[7] ===
|
|
1606
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let FERAL_EVAL,Proxy,String,TypeError,create,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,immutableObject,objectHasOwnProperty,reflectGet,reflectSet,seal,assert;$h_imports([["./commons.js", [["FERAL_EVAL", [$h_a => (FERAL_EVAL = $h_a)]],["Proxy", [$h_a => (Proxy = $h_a)]],["String", [$h_a => (String = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["create", [$h_a => (create = $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)]],["immutableObject", [$h_a => (immutableObject = $h_a)]],["objectHasOwnProperty", [$h_a => (objectHasOwnProperty = $h_a)]],["reflectGet", [$h_a => (reflectGet = $h_a)]],["reflectSet", [$h_a => (reflectSet = $h_a)]],["seal", [$h_a => (seal = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
1618
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let FERAL_EVAL,Proxy,String,TypeError,create,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,immutableObject,objectHasOwnProperty,reflectGet,reflectSet,seal,assert;$h_imports([["./commons.js", [["FERAL_EVAL", [$h_a => (FERAL_EVAL = $h_a)]],["Proxy", [$h_a => (Proxy = $h_a)]],["String", [$h_a => (String = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["create", [$h_a => (create = $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)]],["immutableObject", [$h_a => (immutableObject = $h_a)]],["objectHasOwnProperty", [$h_a => (objectHasOwnProperty = $h_a)]],["reflectGet", [$h_a => (reflectGet = $h_a)]],["reflectSet", [$h_a => (reflectSet = $h_a)]],["seal", [$h_a => (seal = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
1607
1619
|
|
|
1608
1620
|
|
|
1609
1621
|
|
|
@@ -1817,7 +1829,7 @@ const createScopeHandler= (
|
|
|
1817
1829
|
})
|
|
1818
1830
|
,
|
|
1819
1831
|
// === functors[8] ===
|
|
1820
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { 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)]]]]]);
|
|
1832
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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)]]]]]);
|
|
1821
1833
|
|
|
1822
1834
|
// Captures a key and value of the form #key=value or @key=value
|
|
1823
1835
|
const sourceMetaEntryRegExp=
|
|
@@ -1867,7 +1879,7 @@ const getSourceURL= (src)=>{
|
|
|
1867
1879
|
})
|
|
1868
1880
|
,
|
|
1869
1881
|
// === functors[9] ===
|
|
1870
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,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)]]]],["./get-source-url.js", [["getSourceURL", [$h_a => (getSourceURL = $h_a)]]]]]);
|
|
1882
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,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)]]]],["./get-source-url.js", [["getSourceURL", [$h_a => (getSourceURL = $h_a)]]]]]);
|
|
1871
1883
|
|
|
1872
1884
|
|
|
1873
1885
|
|
|
@@ -1962,8 +1974,8 @@ const rejectHtmlComments= (src)=>{
|
|
|
1962
1974
|
* not change the meaning of the program because it only changes the contents of
|
|
1963
1975
|
* those comments.
|
|
1964
1976
|
*
|
|
1965
|
-
* @param {
|
|
1966
|
-
* @returns {
|
|
1977
|
+
* @param {string} src
|
|
1978
|
+
* @returns {string}
|
|
1967
1979
|
*/$h_once.rejectHtmlComments(rejectHtmlComments);
|
|
1968
1980
|
const evadeHtmlCommentTest= (src)=>{
|
|
1969
1981
|
const replaceFn= (match)=> match[0]=== '<'? '< ! --': '-- >';
|
|
@@ -2004,8 +2016,8 @@ const importPattern= new FERAL_REG_EXP(
|
|
|
2004
2016
|
* something like that from something like importnotreally('power.js') which
|
|
2005
2017
|
* is perfectly safe.
|
|
2006
2018
|
*
|
|
2007
|
-
* @param {
|
|
2008
|
-
* @returns {
|
|
2019
|
+
* @param {string} src
|
|
2020
|
+
* @returns {string}
|
|
2009
2021
|
*/
|
|
2010
2022
|
const rejectImportExpressions= (src)=>{
|
|
2011
2023
|
const lineNumber= getLineNumber(src, importPattern);
|
|
@@ -2031,8 +2043,8 @@ const rejectImportExpressions= (src)=>{
|
|
|
2031
2043
|
* the meaning of the program, depending on the binding, if any, of the lexical
|
|
2032
2044
|
* variable `__import__`.
|
|
2033
2045
|
*
|
|
2034
|
-
* @param {
|
|
2035
|
-
* @returns {
|
|
2046
|
+
* @param {string} src
|
|
2047
|
+
* @returns {string}
|
|
2036
2048
|
*/$h_once.rejectImportExpressions(rejectImportExpressions);
|
|
2037
2049
|
const evadeImportExpressionTest= (src)=>{
|
|
2038
2050
|
const replaceFn= (_, p1, p2)=> `${p1}__import__${p2}`;
|
|
@@ -2075,8 +2087,8 @@ const someDirectEvalPattern= new FERAL_REG_EXP(
|
|
|
2075
2087
|
*
|
|
2076
2088
|
* Exported for unit tests.
|
|
2077
2089
|
*
|
|
2078
|
-
* @param {
|
|
2079
|
-
* @returns {
|
|
2090
|
+
* @param {string} src
|
|
2091
|
+
* @returns {string}
|
|
2080
2092
|
*/
|
|
2081
2093
|
const rejectSomeDirectEvalExpressions= (src)=>{
|
|
2082
2094
|
const lineNumber= getLineNumber(src, someDirectEvalPattern);
|
|
@@ -2121,7 +2133,7 @@ const applyTransforms= (source, transforms)=> {
|
|
|
2121
2133
|
})
|
|
2122
2134
|
,
|
|
2123
2135
|
// === functors[10] ===
|
|
2124
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let WeakSet,apply,immutableObject,proxyRevocable,weaksetAdd,getScopeConstants,createScopeHandler,applyTransforms,mandatoryTransforms,makeEvaluateFactory,assert;$h_imports([["./commons.js", [["WeakSet", [$h_a => (WeakSet = $h_a)]],["apply", [$h_a => (apply = $h_a)]],["immutableObject", [$h_a => (immutableObject = $h_a)]],["proxyRevocable", [$h_a => (proxyRevocable = $h_a)]],["weaksetAdd", [$h_a => (weaksetAdd = $h_a)]]]],["./scope-constants.js", [["getScopeConstants", [$h_a => (getScopeConstants = $h_a)]]]],["./scope-handler.js", [["createScopeHandler", [$h_a => (createScopeHandler = $h_a)]]]],["./transforms.js", [["applyTransforms", [$h_a => (applyTransforms = $h_a)]],["mandatoryTransforms", [$h_a => (mandatoryTransforms = $h_a)]]]],["./make-evaluate-factory.js", [["makeEvaluateFactory", [$h_a => (makeEvaluateFactory = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
2136
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let WeakSet,apply,immutableObject,proxyRevocable,weaksetAdd,getScopeConstants,createScopeHandler,applyTransforms,mandatoryTransforms,makeEvaluateFactory,assert;$h_imports([["./commons.js", [["WeakSet", [$h_a => (WeakSet = $h_a)]],["apply", [$h_a => (apply = $h_a)]],["immutableObject", [$h_a => (immutableObject = $h_a)]],["proxyRevocable", [$h_a => (proxyRevocable = $h_a)]],["weaksetAdd", [$h_a => (weaksetAdd = $h_a)]]]],["./scope-constants.js", [["getScopeConstants", [$h_a => (getScopeConstants = $h_a)]]]],["./scope-handler.js", [["createScopeHandler", [$h_a => (createScopeHandler = $h_a)]]]],["./transforms.js", [["applyTransforms", [$h_a => (applyTransforms = $h_a)]],["mandatoryTransforms", [$h_a => (mandatoryTransforms = $h_a)]]]],["./make-evaluate-factory.js", [["makeEvaluateFactory", [$h_a => (makeEvaluateFactory = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
2125
2137
|
|
|
2126
2138
|
|
|
2127
2139
|
|
|
@@ -2241,7 +2253,7 @@ const makeSafeEvaluator= ({
|
|
|
2241
2253
|
})
|
|
2242
2254
|
,
|
|
2243
2255
|
// === functors[11] ===
|
|
2244
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let TypeError,arrayPush,create,defineProperties,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)]],["defineProperties", [$h_a => (defineProperties = $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)]]]]]);
|
|
2256
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let TypeError,arrayPush,create,defineProperties,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)]],["defineProperties", [$h_a => (defineProperties = $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)]]]]]);
|
|
2245
2257
|
|
|
2246
2258
|
|
|
2247
2259
|
|
|
@@ -2346,7 +2358,7 @@ const compartmentEvaluate= (compartmentFields, source, options)=> {
|
|
|
2346
2358
|
})
|
|
2347
2359
|
,
|
|
2348
2360
|
// === functors[12] ===
|
|
2349
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { $h_imports([]); /**
|
|
2361
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { $h_imports([]); /**
|
|
2350
2362
|
* makeEvalFunction()
|
|
2351
2363
|
* A safe version of the native eval function which relies on
|
|
2352
2364
|
* the safety of safeEvaluate for confinement.
|
|
@@ -2376,7 +2388,7 @@ const makeEvalFunction= (safeEvaluate)=>{
|
|
|
2376
2388
|
})
|
|
2377
2389
|
,
|
|
2378
2390
|
// === functors[13] ===
|
|
2379
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { 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)]]]]]);
|
|
2391
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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)]]]]]);
|
|
2380
2392
|
|
|
2381
2393
|
|
|
2382
2394
|
|
|
@@ -2459,7 +2471,7 @@ const makeFunctionConstructor= (safeEvaluate)=>{
|
|
|
2459
2471
|
})
|
|
2460
2472
|
,
|
|
2461
2473
|
// === functors[14] ===
|
|
2462
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { $h_imports([]); /* eslint-disable no-restricted-globals */
|
|
2474
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { $h_imports([]); /* eslint-disable no-restricted-globals */
|
|
2463
2475
|
/**
|
|
2464
2476
|
* @file Exports {@code whitelist}, a recursively defined
|
|
2465
2477
|
* JSON record enumerating all intrinsics and their properties
|
|
@@ -3017,7 +3029,7 @@ const whitelist= {
|
|
|
3017
3029
|
// Seen on FF Nightly 88.0a1
|
|
3018
3030
|
at: false,
|
|
3019
3031
|
// Seen on FF and XS
|
|
3020
|
-
stack:
|
|
3032
|
+
stack: accessor,
|
|
3021
3033
|
// Superfluously present in some versions of V8.
|
|
3022
3034
|
// https://github.com/tc39/notes/blob/master/meetings/2021-10/oct-26.md#:~:text=However%2C%20Chrome%2093,and%20node%2016.11.
|
|
3023
3035
|
cause: false},
|
|
@@ -3836,7 +3848,7 @@ const whitelist= {
|
|
|
3836
3848
|
})
|
|
3837
3849
|
,
|
|
3838
3850
|
// === functors[15] ===
|
|
3839
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let defineProperty,objectHasOwnProperty,entries,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h_imports([["./commons.js", [["defineProperty", [$h_a => (defineProperty = $h_a)]],["objectHasOwnProperty", [$h_a => (objectHasOwnProperty = $h_a)]],["entries", [$h_a => (entries = $h_a)]]]],["./make-eval-function.js", [["makeEvalFunction", [$h_a => (makeEvalFunction = $h_a)]]]],["./make-function-constructor.js", [["makeFunctionConstructor", [$h_a => (makeFunctionConstructor = $h_a)]]]],["./whitelist.js", [["constantProperties", [$h_a => (constantProperties = $h_a)]],["universalPropertyNames", [$h_a => (universalPropertyNames = $h_a)]]]]]);
|
|
3851
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let defineProperty,objectHasOwnProperty,entries,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h_imports([["./commons.js", [["defineProperty", [$h_a => (defineProperty = $h_a)]],["objectHasOwnProperty", [$h_a => (objectHasOwnProperty = $h_a)]],["entries", [$h_a => (entries = $h_a)]]]],["./make-eval-function.js", [["makeEvalFunction", [$h_a => (makeEvalFunction = $h_a)]]]],["./make-function-constructor.js", [["makeFunctionConstructor", [$h_a => (makeFunctionConstructor = $h_a)]]]],["./whitelist.js", [["constantProperties", [$h_a => (constantProperties = $h_a)]],["universalPropertyNames", [$h_a => (universalPropertyNames = $h_a)]]]]]);
|
|
3840
3852
|
|
|
3841
3853
|
|
|
3842
3854
|
|
|
@@ -3967,7 +3979,7 @@ const setGlobalObjectEvaluators= (
|
|
|
3967
3979
|
})
|
|
3968
3980
|
,
|
|
3969
3981
|
// === functors[16] ===
|
|
3970
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let ReferenceError,TypeError,Map,Set,arrayJoin,arrayMap,arrayPush,create,freeze,mapGet,mapHas,mapSet,setAdd,promiseCatch,promiseThen,values,weakmapGet,assert;$h_imports([["./commons.js", [["ReferenceError", [$h_a => (ReferenceError = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["Map", [$h_a => (Map = $h_a)]],["Set", [$h_a => (Set = $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)]],["mapGet", [$h_a => (mapGet = $h_a)]],["mapHas", [$h_a => (mapHas = $h_a)]],["mapSet", [$h_a => (mapSet = $h_a)]],["setAdd", [$h_a => (setAdd = $h_a)]],["promiseCatch", [$h_a => (promiseCatch = $h_a)]],["promiseThen", [$h_a => (promiseThen = $h_a)]],["values", [$h_a => (values = $h_a)]],["weakmapGet", [$h_a => (weakmapGet = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
3982
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let ReferenceError,TypeError,Map,Set,arrayJoin,arrayMap,arrayPush,create,freeze,mapGet,mapHas,mapSet,setAdd,promiseCatch,promiseThen,values,weakmapGet,assert;$h_imports([["./commons.js", [["ReferenceError", [$h_a => (ReferenceError = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["Map", [$h_a => (Map = $h_a)]],["Set", [$h_a => (Set = $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)]],["mapGet", [$h_a => (mapGet = $h_a)]],["mapHas", [$h_a => (mapHas = $h_a)]],["mapSet", [$h_a => (mapSet = $h_a)]],["setAdd", [$h_a => (setAdd = $h_a)]],["promiseCatch", [$h_a => (promiseCatch = $h_a)]],["promiseThen", [$h_a => (promiseThen = $h_a)]],["values", [$h_a => (values = $h_a)]],["weakmapGet", [$h_a => (weakmapGet = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
3971
3983
|
|
|
3972
3984
|
|
|
3973
3985
|
|
|
@@ -4031,7 +4043,8 @@ const loadRecord= async(
|
|
|
4031
4043
|
staticModuleRecord,
|
|
4032
4044
|
pendingJobs,
|
|
4033
4045
|
moduleLoads,
|
|
4034
|
-
errors
|
|
4046
|
+
errors,
|
|
4047
|
+
importMeta)=>
|
|
4035
4048
|
{
|
|
4036
4049
|
const { resolveHook, moduleRecords}= weakmapGet(
|
|
4037
4050
|
compartmentPrivateFields,
|
|
@@ -4048,7 +4061,8 @@ const loadRecord= async(
|
|
|
4048
4061
|
compartment,
|
|
4049
4062
|
staticModuleRecord,
|
|
4050
4063
|
moduleSpecifier,
|
|
4051
|
-
resolvedImports
|
|
4064
|
+
resolvedImports,
|
|
4065
|
+
importMeta});
|
|
4052
4066
|
|
|
4053
4067
|
|
|
4054
4068
|
// Enqueue jobs to load this module's shallow dependencies.
|
|
@@ -4149,7 +4163,8 @@ const loadWithoutErrorAnnotation= async(
|
|
|
4149
4163
|
const {
|
|
4150
4164
|
compartment: aliasCompartment= compartment,
|
|
4151
4165
|
specifier: aliasSpecifier= moduleSpecifier,
|
|
4152
|
-
record: aliasModuleRecord
|
|
4166
|
+
record: aliasModuleRecord,
|
|
4167
|
+
importMeta}=
|
|
4153
4168
|
staticModuleRecord;
|
|
4154
4169
|
|
|
4155
4170
|
const aliasRecord= await loadRecord(
|
|
@@ -4160,7 +4175,8 @@ const loadWithoutErrorAnnotation= async(
|
|
|
4160
4175
|
aliasModuleRecord,
|
|
4161
4176
|
pendingJobs,
|
|
4162
4177
|
moduleLoads,
|
|
4163
|
-
errors
|
|
4178
|
+
errors,
|
|
4179
|
+
importMeta);
|
|
4164
4180
|
|
|
4165
4181
|
mapSet(moduleRecords, moduleSpecifier, aliasRecord);
|
|
4166
4182
|
return aliasRecord;
|
|
@@ -4295,7 +4311,7 @@ const load= async(
|
|
|
4295
4311
|
})
|
|
4296
4312
|
,
|
|
4297
4313
|
// === functors[17] ===
|
|
4298
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let makeAlias,Proxy,TypeError,create,freeze,mapGet,mapHas,mapSet,ownKeys,reflectGet,reflectGetOwnPropertyDescriptor,reflectHas,reflectIsExtensible,reflectPreventExtensions,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)]],["weakmapSet", [$h_a => (weakmapSet = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
4314
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let makeAlias,Proxy,TypeError,create,freeze,mapGet,mapHas,mapSet,ownKeys,reflectGet,reflectGetOwnPropertyDescriptor,reflectHas,reflectIsExtensible,reflectPreventExtensions,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)]],["weakmapSet", [$h_a => (weakmapSet = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
4299
4315
|
|
|
4300
4316
|
|
|
4301
4317
|
|
|
@@ -4470,7 +4486,8 @@ $h_once.deferExports(deferExports);const getDeferredExports=(
|
|
|
4470
4486
|
})
|
|
4471
4487
|
,
|
|
4472
4488
|
// === functors[18] ===
|
|
4473
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let assert,getDeferredExports,ReferenceError,SyntaxError,TypeError,arrayForEach,arrayIncludes,arrayPush,arraySome,arraySort,create,defineProperty,entries,freeze,isArray,keys,mapGet,weakmapGet,reflectHas,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)]]]],["./compartment-evaluate.js", [["compartmentEvaluate", [$h_a => (compartmentEvaluate = $h_a)]]]]]);
|
|
4489
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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)]]]]]);
|
|
4490
|
+
|
|
4474
4491
|
|
|
4475
4492
|
|
|
4476
4493
|
|
|
@@ -4594,17 +4611,23 @@ $h_once.makeThirdPartyModuleInstance(makeThirdPartyModuleInstance);const make
|
|
|
4594
4611
|
moduleRecord,
|
|
4595
4612
|
importedInstances)=>
|
|
4596
4613
|
{
|
|
4597
|
-
const {
|
|
4614
|
+
const {
|
|
4615
|
+
compartment,
|
|
4616
|
+
moduleSpecifier,
|
|
4617
|
+
staticModuleRecord,
|
|
4618
|
+
importMeta: moduleRecordMeta}=
|
|
4619
|
+
moduleRecord;
|
|
4598
4620
|
const {
|
|
4599
4621
|
reexports: exportAlls= [],
|
|
4600
4622
|
__syncModuleProgram__: functorSource,
|
|
4601
4623
|
__fixedExportMap__: fixedExportMap= {},
|
|
4602
|
-
__liveExportMap__: liveExportMap= {}
|
|
4624
|
+
__liveExportMap__: liveExportMap= {},
|
|
4625
|
+
__needsImportMeta__: needsImportMeta= false}=
|
|
4603
4626
|
staticModuleRecord;
|
|
4604
4627
|
|
|
4605
4628
|
const compartmentFields= weakmapGet(privateFields, compartment);
|
|
4606
4629
|
|
|
4607
|
-
const { __shimTransforms__}= compartmentFields;
|
|
4630
|
+
const { __shimTransforms__, importMetaHook}= compartmentFields;
|
|
4608
4631
|
|
|
4609
4632
|
const { exportsProxy, proxiedExports, activate}= getDeferredExports(
|
|
4610
4633
|
compartment,
|
|
@@ -4630,6 +4653,14 @@ $h_once.makeThirdPartyModuleInstance(makeThirdPartyModuleInstance);const make
|
|
|
4630
4653
|
// both initialize and update live bindings.
|
|
4631
4654
|
const liveVar= create(null);
|
|
4632
4655
|
|
|
4656
|
+
const importMeta= create(null);
|
|
4657
|
+
if( moduleRecordMeta) {
|
|
4658
|
+
assign(importMeta, moduleRecordMeta);
|
|
4659
|
+
}
|
|
4660
|
+
if( needsImportMeta&& importMetaHook) {
|
|
4661
|
+
importMetaHook(moduleSpecifier, importMeta);
|
|
4662
|
+
}
|
|
4663
|
+
|
|
4633
4664
|
// {_localName_: [{get, set, notify}]} used to merge all the export updaters.
|
|
4634
4665
|
const localGetNotify= create(null);
|
|
4635
4666
|
|
|
@@ -4909,7 +4940,8 @@ $h_once.makeThirdPartyModuleInstance(makeThirdPartyModuleInstance);const make
|
|
|
4909
4940
|
freeze({
|
|
4910
4941
|
imports: freeze(imports),
|
|
4911
4942
|
onceVar: freeze(onceVar),
|
|
4912
|
-
liveVar: freeze(liveVar)
|
|
4943
|
+
liveVar: freeze(liveVar),
|
|
4944
|
+
importMeta}));
|
|
4913
4945
|
|
|
4914
4946
|
|
|
4915
4947
|
}catch( e) {
|
|
@@ -4932,7 +4964,7 @@ $h_once.makeThirdPartyModuleInstance(makeThirdPartyModuleInstance);const make
|
|
|
4932
4964
|
})
|
|
4933
4965
|
,
|
|
4934
4966
|
// === functors[19] ===
|
|
4935
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let assert,makeModuleInstance,makeThirdPartyModuleInstance,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)]],["makeThirdPartyModuleInstance", [$h_a => (makeThirdPartyModuleInstance = $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)]]]]]);
|
|
4967
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let assert,makeModuleInstance,makeThirdPartyModuleInstance,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)]],["makeThirdPartyModuleInstance", [$h_a => (makeThirdPartyModuleInstance = $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)]]]]]);
|
|
4936
4968
|
|
|
4937
4969
|
|
|
4938
4970
|
|
|
@@ -5130,7 +5162,7 @@ const instantiate= (
|
|
|
5130
5162
|
})
|
|
5131
5163
|
,
|
|
5132
5164
|
// === functors[20] ===
|
|
5133
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let Map,ReferenceError,TypeError,WeakMap,WeakSet,arrayFilter,arrayJoin,assign,defineProperties,entries,freeze,getOwnPropertyNames,promiseThen,weakmapGet,weakmapSet,weaksetHas,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,isValidIdentifierName,sharedGlobalPropertyNames,load,link,getDeferredExports,assert,compartmentEvaluate,makeSafeEvaluator;$h_imports([["./commons.js", [["Map", [$h_a => (Map = $h_a)]],["ReferenceError", [$h_a => (ReferenceError = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["WeakMap", [$h_a => (WeakMap = $h_a)]],["WeakSet", [$h_a => (WeakSet = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $h_a)]],["arrayJoin", [$h_a => (arrayJoin = $h_a)]],["assign", [$h_a => (assign = $h_a)]],["defineProperties", [$h_a => (defineProperties = $h_a)]],["entries", [$h_a => (entries = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["getOwnPropertyNames", [$h_a => (getOwnPropertyNames = $h_a)]],["promiseThen", [$h_a => (promiseThen = $h_a)]],["weakmapGet", [$h_a => (weakmapGet = $h_a)]],["weakmapSet", [$h_a => (weakmapSet = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h_a => (setGlobalObjectConstantProperties = $h_a)]],["setGlobalObjectMutableProperties", [$h_a => (setGlobalObjectMutableProperties = $h_a)]],["setGlobalObjectEvaluators", [$h_a => (setGlobalObjectEvaluators = $h_a)]]]],["./scope-constants.js", [["isValidIdentifierName", [$h_a => (isValidIdentifierName = $h_a)]]]],["./whitelist.js", [["sharedGlobalPropertyNames", [$h_a => (sharedGlobalPropertyNames = $h_a)]]]],["./module-load.js", [["load", [$h_a => (load = $h_a)]]]],["./module-link.js", [["link", [$h_a => (link = $h_a)]]]],["./module-proxy.js", [["getDeferredExports", [$h_a => (getDeferredExports = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate", [$h_a => (compartmentEvaluate = $h_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h_a => (makeSafeEvaluator = $h_a)]]]]]);
|
|
5165
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let Map,ReferenceError,TypeError,WeakMap,WeakSet,arrayFilter,arrayJoin,assign,defineProperties,entries,freeze,getOwnPropertyNames,promiseThen,weakmapGet,weakmapSet,weaksetHas,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,isValidIdentifierName,sharedGlobalPropertyNames,load,link,getDeferredExports,assert,compartmentEvaluate,makeSafeEvaluator;$h_imports([["./commons.js", [["Map", [$h_a => (Map = $h_a)]],["ReferenceError", [$h_a => (ReferenceError = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["WeakMap", [$h_a => (WeakMap = $h_a)]],["WeakSet", [$h_a => (WeakSet = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $h_a)]],["arrayJoin", [$h_a => (arrayJoin = $h_a)]],["assign", [$h_a => (assign = $h_a)]],["defineProperties", [$h_a => (defineProperties = $h_a)]],["entries", [$h_a => (entries = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["getOwnPropertyNames", [$h_a => (getOwnPropertyNames = $h_a)]],["promiseThen", [$h_a => (promiseThen = $h_a)]],["weakmapGet", [$h_a => (weakmapGet = $h_a)]],["weakmapSet", [$h_a => (weakmapSet = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h_a => (setGlobalObjectConstantProperties = $h_a)]],["setGlobalObjectMutableProperties", [$h_a => (setGlobalObjectMutableProperties = $h_a)]],["setGlobalObjectEvaluators", [$h_a => (setGlobalObjectEvaluators = $h_a)]]]],["./scope-constants.js", [["isValidIdentifierName", [$h_a => (isValidIdentifierName = $h_a)]]]],["./whitelist.js", [["sharedGlobalPropertyNames", [$h_a => (sharedGlobalPropertyNames = $h_a)]]]],["./module-load.js", [["load", [$h_a => (load = $h_a)]]]],["./module-link.js", [["link", [$h_a => (link = $h_a)]]]],["./module-proxy.js", [["getDeferredExports", [$h_a => (getDeferredExports = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate", [$h_a => (compartmentEvaluate = $h_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h_a => (makeSafeEvaluator = $h_a)]]]]]);
|
|
5134
5166
|
|
|
5135
5167
|
|
|
5136
5168
|
|
|
@@ -5346,7 +5378,8 @@ const makeCompartmentConstructor= (
|
|
|
5346
5378
|
globalLexicals: globalLexicalsOption= {},
|
|
5347
5379
|
resolveHook,
|
|
5348
5380
|
importHook,
|
|
5349
|
-
moduleMapHook
|
|
5381
|
+
moduleMapHook,
|
|
5382
|
+
importMetaHook}=
|
|
5350
5383
|
options;
|
|
5351
5384
|
const globalTransforms= [...transforms, ...__shimTransforms__];
|
|
5352
5385
|
|
|
@@ -5438,7 +5471,7 @@ const makeCompartmentConstructor= (
|
|
|
5438
5471
|
assign(globalObject, endowments);
|
|
5439
5472
|
|
|
5440
5473
|
weakmapSet(privateFields, this, {
|
|
5441
|
-
name
|
|
5474
|
+
name: `${name}`,
|
|
5442
5475
|
globalTransforms,
|
|
5443
5476
|
globalObject,
|
|
5444
5477
|
knownScopeProxies,
|
|
@@ -5448,6 +5481,7 @@ const makeCompartmentConstructor= (
|
|
|
5448
5481
|
importHook,
|
|
5449
5482
|
moduleMap,
|
|
5450
5483
|
moduleMapHook,
|
|
5484
|
+
importMetaHook,
|
|
5451
5485
|
moduleRecords,
|
|
5452
5486
|
__shimTransforms__,
|
|
5453
5487
|
deferredExports,
|
|
@@ -5462,7 +5496,7 @@ const makeCompartmentConstructor= (
|
|
|
5462
5496
|
})
|
|
5463
5497
|
,
|
|
5464
5498
|
// === functors[21] ===
|
|
5465
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let TypeError,WeakSet,arrayFilter,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,whitelist;$h_imports([["./commons.js", [["TypeError", [$h_a => (TypeError = $h_a)]],["WeakSet", [$h_a => (WeakSet = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $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)]]]],["./whitelist.js", [["constantProperties", [$h_a => (constantProperties = $h_a)]],["sharedGlobalPropertyNames", [$h_a => (sharedGlobalPropertyNames = $h_a)]],["universalPropertyNames", [$h_a => (universalPropertyNames = $h_a)]],["whitelist", [$h_a => (whitelist = $h_a)]]]]]);
|
|
5499
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let TypeError,WeakSet,arrayFilter,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,whitelist;$h_imports([["./commons.js", [["TypeError", [$h_a => (TypeError = $h_a)]],["WeakSet", [$h_a => (WeakSet = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $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)]]]],["./whitelist.js", [["constantProperties", [$h_a => (constantProperties = $h_a)]],["sharedGlobalPropertyNames", [$h_a => (sharedGlobalPropertyNames = $h_a)]],["universalPropertyNames", [$h_a => (universalPropertyNames = $h_a)]],["whitelist", [$h_a => (whitelist = $h_a)]]]]]);
|
|
5466
5500
|
|
|
5467
5501
|
|
|
5468
5502
|
|
|
@@ -5636,7 +5670,7 @@ const getGlobalIntrinsics= (globalObject)=>{
|
|
|
5636
5670
|
})
|
|
5637
5671
|
,
|
|
5638
5672
|
// === functors[22] ===
|
|
5639
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { $h_imports([]); /**
|
|
5673
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { $h_imports([]); /**
|
|
5640
5674
|
* @file Exports {@code enablements}, a recursively defined
|
|
5641
5675
|
* JSON record defining the optimum set of intrinsics properties
|
|
5642
5676
|
* that need to be "repaired" before hardening is applied on
|
|
@@ -5842,7 +5876,7 @@ const severeEnablements= {
|
|
|
5842
5876
|
})
|
|
5843
5877
|
,
|
|
5844
5878
|
// === functors[23] ===
|
|
5845
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getOwnPropertyNames,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)]],["getOwnPropertyNames", [$h_a => (getOwnPropertyNames = $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)]]]]]);
|
|
5879
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getOwnPropertyNames,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)]],["getOwnPropertyNames", [$h_a => (getOwnPropertyNames = $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)]]]]]);
|
|
5846
5880
|
|
|
5847
5881
|
|
|
5848
5882
|
|
|
@@ -6049,7 +6083,7 @@ function enablePropertyOverrides(
|
|
|
6049
6083
|
})
|
|
6050
6084
|
,
|
|
6051
6085
|
// === functors[24] ===
|
|
6052
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let arrayPush,arraySlice,freeze,assert;$h_imports([["./commons.js", [["arrayPush", [$h_a => (arrayPush = $h_a)]],["arraySlice", [$h_a => (arraySlice = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
6086
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let arrayPush,arraySlice,freeze,assert;$h_imports([["./commons.js", [["arrayPush", [$h_a => (arrayPush = $h_a)]],["arraySlice", [$h_a => (arraySlice = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
6053
6087
|
|
|
6054
6088
|
|
|
6055
6089
|
|
|
@@ -6177,7 +6211,7 @@ freeze(makeEnvironmentCaptor);
|
|
|
6177
6211
|
})
|
|
6178
6212
|
,
|
|
6179
6213
|
// === functors[25] ===
|
|
6180
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let WeakSet,arrayFilter,arrayMap,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,weaksetAdd,weaksetHas;$h_imports([["../commons.js", [["WeakSet", [$h_a => (WeakSet = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $h_a)]],["arrayMap", [$h_a => (arrayMap = $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)]],["weaksetAdd", [$h_a => (weaksetAdd = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
6214
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let WeakSet,arrayFilter,arrayMap,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,weaksetAdd,weaksetHas;$h_imports([["../commons.js", [["WeakSet", [$h_a => (WeakSet = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $h_a)]],["arrayMap", [$h_a => (arrayMap = $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)]],["weaksetAdd", [$h_a => (weaksetAdd = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
6181
6215
|
|
|
6182
6216
|
|
|
6183
6217
|
|
|
@@ -6351,16 +6385,7 @@ const ErrorInfo= {
|
|
|
6351
6385
|
|
|
6352
6386
|
freeze(ErrorInfo);
|
|
6353
6387
|
|
|
6354
|
-
/**
|
|
6355
|
-
* The error annotations are sent to the baseConsole by calling some level
|
|
6356
|
-
* method. The 'debug' level seems best, because the Chrome console classifies
|
|
6357
|
-
* `debug` as verbose and does not show it by default. But we keep it symbolic
|
|
6358
|
-
* so we can change our mind. (On Node, `debug`, `log`, and `info` are aliases
|
|
6359
|
-
* for the same function and so will behave the same there.)
|
|
6360
|
-
*/
|
|
6361
|
-
const BASE_CONSOLE_LEVEL= 'debug';
|
|
6362
|
-
|
|
6363
|
-
/** @type {MakeCausalConsole} */$h_once.BASE_CONSOLE_LEVEL(BASE_CONSOLE_LEVEL);
|
|
6388
|
+
/** @type {MakeCausalConsole} */
|
|
6364
6389
|
const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
6365
6390
|
const {
|
|
6366
6391
|
getStackString,
|
|
@@ -6386,34 +6411,36 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
6386
6411
|
};
|
|
6387
6412
|
|
|
6388
6413
|
/**
|
|
6414
|
+
* @param {LogSeverity} severity
|
|
6389
6415
|
* @param {Error} error
|
|
6390
6416
|
* @param {ErrorInfoKind} kind
|
|
6391
6417
|
* @param {readonly any[]} logArgs
|
|
6392
6418
|
* @param {Array<Error>} subErrorsSink
|
|
6393
6419
|
*/
|
|
6394
|
-
const logErrorInfo= (error, kind, logArgs, subErrorsSink)=> {
|
|
6420
|
+
const logErrorInfo= (severity, error, kind, logArgs, subErrorsSink)=> {
|
|
6395
6421
|
const errorTag= tagError(error);
|
|
6396
6422
|
const errorName=
|
|
6397
6423
|
kind=== ErrorInfo.MESSAGE? `${errorTag}:`: `${errorTag} ${kind}`;
|
|
6398
6424
|
const argTags= extractErrorArgs(logArgs, subErrorsSink);
|
|
6399
6425
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6400
|
-
baseConsole[
|
|
6426
|
+
baseConsole[severity](errorName, ...argTags);
|
|
6401
6427
|
};
|
|
6402
6428
|
|
|
6403
6429
|
/**
|
|
6404
6430
|
* Logs the `subErrors` within a group name mentioning `optTag`.
|
|
6405
6431
|
*
|
|
6432
|
+
* @param {LogSeverity} severity
|
|
6406
6433
|
* @param {Error[]} subErrors
|
|
6407
6434
|
* @param {string | undefined} optTag
|
|
6408
6435
|
* @returns {void}
|
|
6409
6436
|
*/
|
|
6410
|
-
const logSubErrors= (subErrors, optTag= undefined)=> {
|
|
6437
|
+
const logSubErrors= (severity, subErrors, optTag= undefined)=> {
|
|
6411
6438
|
if( subErrors.length=== 0) {
|
|
6412
6439
|
return;
|
|
6413
6440
|
}
|
|
6414
6441
|
if( subErrors.length=== 1&& optTag=== undefined) {
|
|
6415
6442
|
// eslint-disable-next-line no-use-before-define
|
|
6416
|
-
logError(subErrors[0]);
|
|
6443
|
+
logError(severity, subErrors[0]);
|
|
6417
6444
|
return;
|
|
6418
6445
|
}
|
|
6419
6446
|
let label;
|
|
@@ -6430,7 +6457,7 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
6430
6457
|
try {
|
|
6431
6458
|
for( const subError of subErrors) {
|
|
6432
6459
|
// eslint-disable-next-line no-use-before-define
|
|
6433
|
-
logError(subError);
|
|
6460
|
+
logError(severity, subError);
|
|
6434
6461
|
}
|
|
6435
6462
|
}finally {
|
|
6436
6463
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
@@ -6440,19 +6467,20 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
6440
6467
|
|
|
6441
6468
|
const errorsLogged= new WeakSet();
|
|
6442
6469
|
|
|
6443
|
-
/** @type {NoteCallback} */
|
|
6444
|
-
const
|
|
6470
|
+
/** @type {(severity: LogSeverity) => NoteCallback} */
|
|
6471
|
+
const makeNoteCallback= (severity)=>(error, noteLogArgs)=> {
|
|
6445
6472
|
const subErrors= [];
|
|
6446
6473
|
// Annotation arrived after the error has already been logged,
|
|
6447
6474
|
// so just log the annotation immediately, rather than remembering it.
|
|
6448
|
-
logErrorInfo(error, ErrorInfo.NOTE, noteLogArgs, subErrors);
|
|
6449
|
-
logSubErrors(subErrors, tagError(error));
|
|
6475
|
+
logErrorInfo(severity, error, ErrorInfo.NOTE, noteLogArgs, subErrors);
|
|
6476
|
+
logSubErrors(severity, subErrors, tagError(error));
|
|
6450
6477
|
};
|
|
6451
6478
|
|
|
6452
6479
|
/**
|
|
6480
|
+
* @param {LogSeverity} severity
|
|
6453
6481
|
* @param {Error} error
|
|
6454
6482
|
*/
|
|
6455
|
-
const logError= (error)=>{
|
|
6483
|
+
const logError= (severity, error)=> {
|
|
6456
6484
|
if( weaksetHas(errorsLogged, error)) {
|
|
6457
6485
|
return;
|
|
6458
6486
|
}
|
|
@@ -6460,17 +6488,26 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
6460
6488
|
weaksetAdd(errorsLogged, error);
|
|
6461
6489
|
const subErrors= [];
|
|
6462
6490
|
const messageLogArgs= takeMessageLogArgs(error);
|
|
6463
|
-
const noteLogArgsArray= takeNoteLogArgsArray(
|
|
6491
|
+
const noteLogArgsArray= takeNoteLogArgsArray(
|
|
6492
|
+
error,
|
|
6493
|
+
makeNoteCallback(severity));
|
|
6494
|
+
|
|
6464
6495
|
// Show the error's most informative error message
|
|
6465
6496
|
if( messageLogArgs=== undefined) {
|
|
6466
6497
|
// If there is no message log args, then just show the message that
|
|
6467
6498
|
// the error itself carries.
|
|
6468
6499
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6469
|
-
baseConsole[
|
|
6500
|
+
baseConsole[severity]( `${errorTag}:`,error.message);
|
|
6470
6501
|
}else {
|
|
6471
6502
|
// If there is one, we take it to be strictly more informative than the
|
|
6472
6503
|
// message string carried by the error, so show it *instead*.
|
|
6473
|
-
logErrorInfo(
|
|
6504
|
+
logErrorInfo(
|
|
6505
|
+
severity,
|
|
6506
|
+
error,
|
|
6507
|
+
ErrorInfo.MESSAGE,
|
|
6508
|
+
messageLogArgs,
|
|
6509
|
+
subErrors);
|
|
6510
|
+
|
|
6474
6511
|
}
|
|
6475
6512
|
// After the message but before any other annotations, show the stack.
|
|
6476
6513
|
let stackString= getStackString(error);
|
|
@@ -6482,13 +6519,13 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
6482
6519
|
stackString+= '\n';
|
|
6483
6520
|
}
|
|
6484
6521
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6485
|
-
baseConsole[
|
|
6522
|
+
baseConsole[severity](stackString);
|
|
6486
6523
|
// Show the other annotations on error
|
|
6487
6524
|
for( const noteLogArgs of noteLogArgsArray) {
|
|
6488
|
-
logErrorInfo(error, ErrorInfo.NOTE, noteLogArgs, subErrors);
|
|
6525
|
+
logErrorInfo(severity, error, ErrorInfo.NOTE, noteLogArgs, subErrors);
|
|
6489
6526
|
}
|
|
6490
6527
|
// explain all the errors seen in the messages already emitted.
|
|
6491
|
-
logSubErrors(subErrors, errorTag);
|
|
6528
|
+
logSubErrors(severity, subErrors, errorTag);
|
|
6492
6529
|
};
|
|
6493
6530
|
|
|
6494
6531
|
const levelMethods= arrayMap(consoleLevelMethods, ([level, _])=> {
|
|
@@ -6501,7 +6538,7 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
6501
6538
|
// @ts-ignore
|
|
6502
6539
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6503
6540
|
baseConsole[level](...argTags);
|
|
6504
|
-
logSubErrors(subErrors);
|
|
6541
|
+
logSubErrors(level, subErrors);
|
|
6505
6542
|
};
|
|
6506
6543
|
defineProperty(levelMethod, 'name', { value: level});
|
|
6507
6544
|
return [level, freeze(levelMethod)];
|
|
@@ -6560,7 +6597,133 @@ freeze(filterConsole);
|
|
|
6560
6597
|
})
|
|
6561
6598
|
,
|
|
6562
6599
|
// === functors[26] ===
|
|
6563
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let
|
|
6600
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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)]]]]]);
|
|
6601
|
+
|
|
6602
|
+
|
|
6603
|
+
|
|
6604
|
+
|
|
6605
|
+
|
|
6606
|
+
|
|
6607
|
+
|
|
6608
|
+
|
|
6609
|
+
|
|
6610
|
+
|
|
6611
|
+
|
|
6612
|
+
|
|
6613
|
+
|
|
6614
|
+
|
|
6615
|
+
/**
|
|
6616
|
+
* Create rejection-tracking machinery compatible with Node.js and browsers.
|
|
6617
|
+
*
|
|
6618
|
+
* Note that modern browsers *prevent* access to the 'unhandledrejection' and
|
|
6619
|
+
* 'rejectionhandled' events needed:
|
|
6620
|
+
* - in cross-origin mode, like when served from file://
|
|
6621
|
+
* - in the browser console (interactively typed-in code)
|
|
6622
|
+
* - in the debugger
|
|
6623
|
+
*
|
|
6624
|
+
* Then, they just look like: `Uncaught (in promise) Error: ...` and don't
|
|
6625
|
+
* implement the machinery.
|
|
6626
|
+
*
|
|
6627
|
+
* The solution is to serve your web page from an http:// or https:// web server
|
|
6628
|
+
* and execute actual code.
|
|
6629
|
+
*
|
|
6630
|
+
* @param {(reason: unknown) => void} reportReason report the reason for an
|
|
6631
|
+
* unhandled rejection.
|
|
6632
|
+
*/
|
|
6633
|
+
const makeRejectionHandlers= (reportReason)=>{
|
|
6634
|
+
if( FinalizationRegistry=== undefined) {
|
|
6635
|
+
return undefined;
|
|
6636
|
+
}
|
|
6637
|
+
|
|
6638
|
+
/** @typedef {number} ReasonId */
|
|
6639
|
+
let lastReasonId= 0;
|
|
6640
|
+
|
|
6641
|
+
/** @type {Map<ReasonId, unknown>} */
|
|
6642
|
+
const idToReason= new Map();
|
|
6643
|
+
|
|
6644
|
+
/** @type {(() => void) | undefined} */
|
|
6645
|
+
let cancelChecking;
|
|
6646
|
+
|
|
6647
|
+
const removeReasonId= (reasonId)=>{
|
|
6648
|
+
mapDelete(idToReason, reasonId);
|
|
6649
|
+
if( cancelChecking&& idToReason.size=== 0) {
|
|
6650
|
+
// No more unhandled rejections to check, just cancel the check.
|
|
6651
|
+
cancelChecking();
|
|
6652
|
+
cancelChecking= undefined;
|
|
6653
|
+
}
|
|
6654
|
+
};
|
|
6655
|
+
|
|
6656
|
+
/** @type {WeakMap<Promise, ReasonId>} */
|
|
6657
|
+
const promiseToReasonId= new WeakMap();
|
|
6658
|
+
|
|
6659
|
+
/**
|
|
6660
|
+
* Clean up and report the reason for a GCed unhandled rejection.
|
|
6661
|
+
*
|
|
6662
|
+
* @param {ReasonId} heldReasonId
|
|
6663
|
+
*/
|
|
6664
|
+
const finalizeDroppedPromise= (heldReasonId)=>{
|
|
6665
|
+
if( mapHas(idToReason)) {
|
|
6666
|
+
const reason= mapGet(idToReason, heldReasonId);
|
|
6667
|
+
removeReasonId(heldReasonId);
|
|
6668
|
+
reportReason(reason);
|
|
6669
|
+
}
|
|
6670
|
+
};
|
|
6671
|
+
|
|
6672
|
+
/** @type {FinalizationRegistry<ReasonId>} */
|
|
6673
|
+
const promiseToReason= new FinalizationRegistry(finalizeDroppedPromise);
|
|
6674
|
+
|
|
6675
|
+
/**
|
|
6676
|
+
* Track a rejected promise and its corresponding reason if there is no
|
|
6677
|
+
* rejection handler synchronously attached.
|
|
6678
|
+
*
|
|
6679
|
+
* @param {unknown} reason
|
|
6680
|
+
* @param {Promise} pr
|
|
6681
|
+
*/
|
|
6682
|
+
const unhandledRejectionHandler= (reason, pr)=> {
|
|
6683
|
+
lastReasonId+= 1;
|
|
6684
|
+
const reasonId= lastReasonId;
|
|
6685
|
+
|
|
6686
|
+
// Update bookkeeping.
|
|
6687
|
+
mapSet(idToReason, reasonId, reason);
|
|
6688
|
+
weakmapSet(promiseToReasonId, pr, reasonId);
|
|
6689
|
+
finalizationRegistryRegister(promiseToReason, pr, reasonId, pr);
|
|
6690
|
+
};
|
|
6691
|
+
|
|
6692
|
+
/**
|
|
6693
|
+
* Deal with the addition of a handler to a previously rejected promise.
|
|
6694
|
+
*
|
|
6695
|
+
* Just remove it from our list. Let the FinalizationRegistry or
|
|
6696
|
+
* processTermination report any GCed unhandled rejected promises.
|
|
6697
|
+
*
|
|
6698
|
+
* @param {Promise} pr
|
|
6699
|
+
*/
|
|
6700
|
+
const rejectionHandledHandler= (pr)=>{
|
|
6701
|
+
const reasonId= weakmapGet(promiseToReasonId, pr);
|
|
6702
|
+
removeReasonId(reasonId);
|
|
6703
|
+
};
|
|
6704
|
+
|
|
6705
|
+
/**
|
|
6706
|
+
* Report all the unhandled rejections, now that we are abruptly terminating
|
|
6707
|
+
* the agent cluster.
|
|
6708
|
+
*/
|
|
6709
|
+
const processTerminationHandler= ()=> {
|
|
6710
|
+
for( const [reasonId, reason]of mapEntries(idToReason)) {
|
|
6711
|
+
removeReasonId(reasonId);
|
|
6712
|
+
reportReason(reason);
|
|
6713
|
+
}
|
|
6714
|
+
};
|
|
6715
|
+
|
|
6716
|
+
return {
|
|
6717
|
+
rejectionHandledHandler,
|
|
6718
|
+
unhandledRejectionHandler,
|
|
6719
|
+
processTerminationHandler};
|
|
6720
|
+
|
|
6721
|
+
};$h_once.makeRejectionHandlers(makeRejectionHandlers);
|
|
6722
|
+
})
|
|
6723
|
+
,
|
|
6724
|
+
// === functors[27] ===
|
|
6725
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let TypeError,globalThis,defaultHandler,makeCausalConsole,makeRejectionHandlers;$h_imports([["../commons.js", [["TypeError", [$h_a => (TypeError = $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", []]]);
|
|
6726
|
+
|
|
6564
6727
|
|
|
6565
6728
|
|
|
6566
6729
|
|
|
@@ -6579,20 +6742,19 @@ const originalConsole= console;
|
|
|
6579
6742
|
*
|
|
6580
6743
|
* @param {"safe" | "unsafe"} consoleTaming
|
|
6581
6744
|
* @param {"platform" | "exit" | "abort" | "report" | "none"} [errorTrapping]
|
|
6745
|
+
* @param {"report" | "none"} [unhandledRejectionTrapping]
|
|
6582
6746
|
* @param {GetStackString=} optGetStackString
|
|
6583
6747
|
*/
|
|
6584
6748
|
const tameConsole= (
|
|
6585
6749
|
consoleTaming= 'safe',
|
|
6586
6750
|
errorTrapping= 'platform',
|
|
6751
|
+
unhandledRejectionTrapping= 'report',
|
|
6587
6752
|
optGetStackString= undefined)=>
|
|
6588
6753
|
{
|
|
6589
6754
|
if( consoleTaming!== 'safe'&& consoleTaming!== 'unsafe') {
|
|
6590
6755
|
throw new TypeError( `unrecognized consoleTaming ${consoleTaming}`);
|
|
6591
6756
|
}
|
|
6592
6757
|
|
|
6593
|
-
if( consoleTaming=== 'unsafe') {
|
|
6594
|
-
return { console: originalConsole};
|
|
6595
|
-
}
|
|
6596
6758
|
let loggedErrorHandler;
|
|
6597
6759
|
if( optGetStackString=== undefined) {
|
|
6598
6760
|
loggedErrorHandler= defaultHandler;
|
|
@@ -6602,7 +6764,10 @@ const tameConsole= (
|
|
|
6602
6764
|
getStackString: optGetStackString};
|
|
6603
6765
|
|
|
6604
6766
|
}
|
|
6605
|
-
const
|
|
6767
|
+
const ourConsole=
|
|
6768
|
+
consoleTaming=== 'unsafe'?
|
|
6769
|
+
originalConsole:
|
|
6770
|
+
makeCausalConsole(originalConsole, loggedErrorHandler);
|
|
6606
6771
|
|
|
6607
6772
|
// Attach platform-specific error traps such that any error that gets thrown
|
|
6608
6773
|
// at top-of-turn (the bottom of stack) will get logged by our causal
|
|
@@ -6615,47 +6780,92 @@ const tameConsole= (
|
|
|
6615
6780
|
// utter that. That unnecessary shim forces the whole bundle into sloppy mode,
|
|
6616
6781
|
// which in turn breaks SES's strict mode invariant.
|
|
6617
6782
|
|
|
6783
|
+
// Disable the polymorphic check for the rest of this file. It's too noisy
|
|
6784
|
+
// when dealing with platform APIs.
|
|
6785
|
+
/* eslint-disable @endo/no-polymorphic-call */
|
|
6786
|
+
|
|
6618
6787
|
// Node.js
|
|
6619
6788
|
if( errorTrapping!== 'none'&& globalThis.process!== undefined) {
|
|
6620
|
-
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6621
6789
|
globalThis.process.on('uncaughtException', (error)=>{
|
|
6622
6790
|
// causalConsole is born frozen so not vulnerable to method tampering.
|
|
6623
|
-
|
|
6624
|
-
causalConsole.error(error);
|
|
6791
|
+
ourConsole.error(error);
|
|
6625
6792
|
if( errorTrapping=== 'platform'|| errorTrapping=== 'exit') {
|
|
6626
|
-
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6627
6793
|
globalThis.process.exit(globalThis.process.exitCode|| -1);
|
|
6628
6794
|
}else if( errorTrapping=== 'abort') {
|
|
6629
|
-
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6630
6795
|
globalThis.process.abort();
|
|
6631
6796
|
}
|
|
6632
6797
|
});
|
|
6633
6798
|
}
|
|
6634
6799
|
|
|
6800
|
+
if(
|
|
6801
|
+
unhandledRejectionTrapping!== 'none'&&
|
|
6802
|
+
globalThis.process!== undefined)
|
|
6803
|
+
{
|
|
6804
|
+
const handleRejection= (reason)=>{
|
|
6805
|
+
// 'platform' and 'report' just log the reason.
|
|
6806
|
+
ourConsole.error('SES_UNHANDLED_REJECTION:', reason);
|
|
6807
|
+
};
|
|
6808
|
+
// Maybe track unhandled promise rejections.
|
|
6809
|
+
const h= makeRejectionHandlers(handleRejection);
|
|
6810
|
+
if( h) {
|
|
6811
|
+
// Rejection handlers are supported.
|
|
6812
|
+
globalThis.process.on('unhandledRejection', h.unhandledRejectionHandler);
|
|
6813
|
+
globalThis.process.on('rejectionHandled', h.rejectionHandledHandler);
|
|
6814
|
+
globalThis.process.on('exit', h.processTerminationHandler);
|
|
6815
|
+
}
|
|
6816
|
+
}
|
|
6817
|
+
|
|
6635
6818
|
// Browser
|
|
6636
6819
|
if(
|
|
6637
6820
|
errorTrapping!== 'none'&&
|
|
6638
6821
|
globalThis.window!== undefined&&
|
|
6639
6822
|
globalThis.window.addEventListener!== undefined)
|
|
6640
6823
|
{
|
|
6641
|
-
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6642
6824
|
globalThis.window.addEventListener('error', (event)=>{
|
|
6643
|
-
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6644
6825
|
event.preventDefault();
|
|
6645
|
-
//
|
|
6646
|
-
|
|
6826
|
+
// 'platform' and 'report' just log the reason.
|
|
6827
|
+
ourConsole.error(event.error);
|
|
6647
6828
|
if( errorTrapping=== 'exit'|| errorTrapping=== 'abort') {
|
|
6648
6829
|
globalThis.window.location.href= `about:blank`;
|
|
6649
6830
|
}
|
|
6650
6831
|
});
|
|
6651
6832
|
}
|
|
6652
6833
|
|
|
6653
|
-
|
|
6834
|
+
if(
|
|
6835
|
+
unhandledRejectionTrapping!== 'none'&&
|
|
6836
|
+
globalThis.window!== undefined&&
|
|
6837
|
+
globalThis.window.addEventListener!== undefined)
|
|
6838
|
+
{
|
|
6839
|
+
const handleRejection= (reason)=>{
|
|
6840
|
+
ourConsole.error('SES_UNHANDLED_REJECTION:', reason);
|
|
6841
|
+
};
|
|
6842
|
+
|
|
6843
|
+
const h= makeRejectionHandlers(handleRejection);
|
|
6844
|
+
if( h) {
|
|
6845
|
+
// Rejection handlers are supported.
|
|
6846
|
+
globalThis.window.addEventListener('unhandledrejection', (event)=>{
|
|
6847
|
+
event.preventDefault();
|
|
6848
|
+
h.unhandledRejectionHandler(event.reason, event.promise);
|
|
6849
|
+
});
|
|
6850
|
+
|
|
6851
|
+
globalThis.window.addEventListener('rejectionhandled', (event)=>{
|
|
6852
|
+
event.preventDefault();
|
|
6853
|
+
h.rejectionHandledHandler(event.promise);
|
|
6854
|
+
});
|
|
6855
|
+
|
|
6856
|
+
globalThis.window.addEventListener('beforeunload', (_event)=>{
|
|
6857
|
+
h.processTerminationHandler();
|
|
6858
|
+
});
|
|
6859
|
+
}
|
|
6860
|
+
}
|
|
6861
|
+
/* eslint-enable @endo/no-polymorphic-call */
|
|
6862
|
+
|
|
6863
|
+
return { console: ourConsole};
|
|
6654
6864
|
};$h_once.tameConsole(tameConsole);
|
|
6655
6865
|
})
|
|
6656
6866
|
,
|
|
6657
|
-
// === functors[
|
|
6658
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,regexpTest,weakmapGet,weakmapHas,weakmapSet,weaksetAdd,weaksetHas;$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)]],["weakmapHas", [$h_a => (weakmapHas = $h_a)]],["weakmapSet", [$h_a => (weakmapSet = $h_a)]],["weaksetAdd", [$h_a => (weaksetAdd = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]]]);
|
|
6867
|
+
// === functors[28] ===
|
|
6868
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,regexpTest,weakmapGet,weakmapHas,weakmapSet,weaksetAdd,weaksetHas;$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)]],["weakmapHas", [$h_a => (weakmapHas = $h_a)]],["weakmapSet", [$h_a => (weakmapSet = $h_a)]],["weaksetAdd", [$h_a => (weaksetAdd = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]]]);
|
|
6659
6869
|
|
|
6660
6870
|
|
|
6661
6871
|
|
|
@@ -6960,8 +7170,8 @@ const tameV8ErrorConstructor= (
|
|
|
6960
7170
|
};$h_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
|
|
6961
7171
|
})
|
|
6962
7172
|
,
|
|
6963
|
-
// === functors[
|
|
6964
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let FERAL_ERROR,TypeError,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,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)]]]],["../whitelist.js", [["NativeErrors", [$h_a => (NativeErrors = $h_a)]]]],["./tame-v8-error-constructor.js", [["tameV8ErrorConstructor", [$h_a => (tameV8ErrorConstructor = $h_a)]]]]]);
|
|
7173
|
+
// === functors[29] ===
|
|
7174
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let FERAL_ERROR,TypeError,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,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)]]]],["../whitelist.js", [["NativeErrors", [$h_a => (NativeErrors = $h_a)]]]],["./tame-v8-error-constructor.js", [["tameV8ErrorConstructor", [$h_a => (tameV8ErrorConstructor = $h_a)]]]]]);
|
|
6965
7175
|
|
|
6966
7176
|
|
|
6967
7177
|
|
|
@@ -6973,8 +7183,9 @@ const tameV8ErrorConstructor= (
|
|
|
6973
7183
|
|
|
6974
7184
|
|
|
6975
7185
|
|
|
6976
|
-
// Present on at least FF. Proposed by Error-proposal.
|
|
6977
|
-
// so
|
|
7186
|
+
// Present on at least FF and XS. Proposed by Error-proposal. The original
|
|
7187
|
+
// is dangerous, so tameErrorConstructor replaces it with a safe one.
|
|
7188
|
+
// We grab the original here before it gets replaced.
|
|
6978
7189
|
const stackDesc= getOwnPropertyDescriptor(FERAL_ERROR.prototype, 'stack');
|
|
6979
7190
|
const stackGetter= stackDesc&& stackDesc.get;
|
|
6980
7191
|
|
|
@@ -7036,17 +7247,7 @@ function tameErrorConstructor(
|
|
|
7036
7247
|
const InitialError= makeErrorConstructor({ powers: 'original'});
|
|
7037
7248
|
const SharedError= makeErrorConstructor({ powers: 'none'});
|
|
7038
7249
|
defineProperties(ErrorPrototype, {
|
|
7039
|
-
constructor: { value: SharedError}
|
|
7040
|
-
/* TODO
|
|
7041
|
-
stack: {
|
|
7042
|
-
get() {
|
|
7043
|
-
return '';
|
|
7044
|
-
},
|
|
7045
|
-
set(_) {
|
|
7046
|
-
// ignore
|
|
7047
|
-
},
|
|
7048
|
-
},
|
|
7049
|
-
*/});
|
|
7250
|
+
constructor: { value: SharedError}});
|
|
7050
7251
|
|
|
7051
7252
|
|
|
7052
7253
|
for( const NativeError of NativeErrors) {
|
|
@@ -7117,7 +7318,70 @@ function tameErrorConstructor(
|
|
|
7117
7318
|
errorTaming,
|
|
7118
7319
|
stackFiltering);
|
|
7119
7320
|
|
|
7321
|
+
}else if( errorTaming=== 'unsafe') {
|
|
7322
|
+
// v8 has too much magic around their 'stack' own property for it to
|
|
7323
|
+
// coexist cleanly with this accessor. So only install it on non-v8
|
|
7324
|
+
|
|
7325
|
+
// Error.prototype.stack property as proposed at
|
|
7326
|
+
// https://tc39.es/proposal-error-stacks/
|
|
7327
|
+
// with the fix proposed at
|
|
7328
|
+
// https://github.com/tc39/proposal-error-stacks/issues/46
|
|
7329
|
+
// On others, this still protects from the override mistake,
|
|
7330
|
+
// essentially like enable-property-overrides.js would
|
|
7331
|
+
// once this accessor property itself is frozen, as will happen
|
|
7332
|
+
// later during lockdown.
|
|
7333
|
+
//
|
|
7334
|
+
// However, there is here a change from the intent in the current
|
|
7335
|
+
// state of the proposal. If experience tells us whether this change
|
|
7336
|
+
// is a good idea, we should modify the proposal accordingly. There is
|
|
7337
|
+
// much code in the world that assumes `error.stack` is a string. So
|
|
7338
|
+
// where the proposal accommodates secure operation by making the
|
|
7339
|
+
// property optional, we instead accommodate secure operation by
|
|
7340
|
+
// having the secure form always return only the stable part, the
|
|
7341
|
+
// stringified error instance, and omitting all the frame information
|
|
7342
|
+
// rather than omitting the property.
|
|
7343
|
+
defineProperties(ErrorPrototype, {
|
|
7344
|
+
stack: {
|
|
7345
|
+
get() {
|
|
7346
|
+
return initialGetStackString(this);
|
|
7347
|
+
},
|
|
7348
|
+
set(newValue) {
|
|
7349
|
+
defineProperties(this, {
|
|
7350
|
+
stack: {
|
|
7351
|
+
value: newValue,
|
|
7352
|
+
writable: true,
|
|
7353
|
+
enumerable: true,
|
|
7354
|
+
configurable: true}});
|
|
7355
|
+
|
|
7356
|
+
|
|
7357
|
+
}}});
|
|
7358
|
+
|
|
7359
|
+
|
|
7360
|
+
}else {
|
|
7361
|
+
// v8 has too much magic around their 'stack' own property for it to
|
|
7362
|
+
// coexist cleanly with this accessor. So only install it on non-v8
|
|
7363
|
+
defineProperties(ErrorPrototype, {
|
|
7364
|
+
stack: {
|
|
7365
|
+
get() {
|
|
7366
|
+
// https://github.com/tc39/proposal-error-stacks/issues/46
|
|
7367
|
+
// allows this to not add an unpleasant newline. Otherwise
|
|
7368
|
+
// we should fix this.
|
|
7369
|
+
return `${this}`;
|
|
7370
|
+
},
|
|
7371
|
+
set(newValue) {
|
|
7372
|
+
defineProperties(this, {
|
|
7373
|
+
stack: {
|
|
7374
|
+
value: newValue,
|
|
7375
|
+
writable: true,
|
|
7376
|
+
enumerable: true,
|
|
7377
|
+
configurable: true}});
|
|
7378
|
+
|
|
7379
|
+
|
|
7380
|
+
}}});
|
|
7381
|
+
|
|
7382
|
+
|
|
7120
7383
|
}
|
|
7384
|
+
|
|
7121
7385
|
return {
|
|
7122
7386
|
'%InitialGetStackString%': initialGetStackString,
|
|
7123
7387
|
'%InitialError%': InitialError,
|
|
@@ -7126,8 +7390,8 @@ function tameErrorConstructor(
|
|
|
7126
7390
|
}$h_once.default( tameErrorConstructor);
|
|
7127
7391
|
})
|
|
7128
7392
|
,
|
|
7129
|
-
// === functors[
|
|
7130
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,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)]]]],["./compartment-shim.js", [["InertCompartment", [$h_a => (InertCompartment = $h_a)]]]]]);
|
|
7393
|
+
// === functors[30] ===
|
|
7394
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,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)]]]],["./compartment-shim.js", [["InertCompartment", [$h_a => (InertCompartment = $h_a)]]]]]);
|
|
7131
7395
|
|
|
7132
7396
|
|
|
7133
7397
|
|
|
@@ -7267,8 +7531,8 @@ const getAnonymousIntrinsics= ()=> {
|
|
|
7267
7531
|
};$h_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
|
|
7268
7532
|
})
|
|
7269
7533
|
,
|
|
7270
|
-
// === functors[
|
|
7271
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let Set,String,TypeError,WeakMap,WeakSet,apply,arrayForEach,defineProperty,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getPrototypeOf,isInteger,isObject,objectHasOwnProperty,ownKeys,preventExtensions,setAdd,setForEach,setHas,toStringTagSymbol,typedArrayPrototype,weakmapGet,weakmapSet,weaksetAdd,weaksetHas,assert;$h_imports([["./commons.js", [["Set", [$h_a => (Set = $h_a)]],["String", [$h_a => (String = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["WeakMap", [$h_a => (WeakMap = $h_a)]],["WeakSet", [$h_a => (WeakSet = $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)]],["weakmapGet", [$h_a => (weakmapGet = $h_a)]],["weakmapSet", [$h_a => (weakmapSet = $h_a)]],["weaksetAdd", [$h_a => (weaksetAdd = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
7534
|
+
// === functors[31] ===
|
|
7535
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let Set,String,TypeError,WeakMap,WeakSet,apply,arrayForEach,defineProperty,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getPrototypeOf,isInteger,isObject,objectHasOwnProperty,ownKeys,preventExtensions,setAdd,setForEach,setHas,toStringTagSymbol,typedArrayPrototype,weakmapGet,weakmapSet,weaksetAdd,weaksetHas,assert;$h_imports([["./commons.js", [["Set", [$h_a => (Set = $h_a)]],["String", [$h_a => (String = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["WeakMap", [$h_a => (WeakMap = $h_a)]],["WeakSet", [$h_a => (WeakSet = $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)]],["weakmapGet", [$h_a => (weakmapGet = $h_a)]],["weakmapSet", [$h_a => (weakmapSet = $h_a)]],["weaksetAdd", [$h_a => (weaksetAdd = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
7272
7536
|
|
|
7273
7537
|
|
|
7274
7538
|
|
|
@@ -7498,8 +7762,8 @@ const makeHardener= ()=> {
|
|
|
7498
7762
|
};$h_once.makeHardener(makeHardener);
|
|
7499
7763
|
})
|
|
7500
7764
|
,
|
|
7501
|
-
// === functors[
|
|
7502
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { 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)]]]]]);
|
|
7765
|
+
// === functors[32] ===
|
|
7766
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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)]]]]]);
|
|
7503
7767
|
|
|
7504
7768
|
|
|
7505
7769
|
|
|
@@ -7615,8 +7879,8 @@ function tameDateConstructor(dateTaming= 'safe') {
|
|
|
7615
7879
|
}$h_once.default( tameDateConstructor);
|
|
7616
7880
|
})
|
|
7617
7881
|
,
|
|
7618
|
-
// === functors[
|
|
7619
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { 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);
|
|
7882
|
+
// === functors[33] ===
|
|
7883
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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);
|
|
7620
7884
|
|
|
7621
7885
|
|
|
7622
7886
|
|
|
@@ -7664,8 +7928,8 @@ function tameDomains(domainTaming= 'safe') {
|
|
|
7664
7928
|
}
|
|
7665
7929
|
})
|
|
7666
7930
|
,
|
|
7667
|
-
// === functors[
|
|
7668
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf;$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)]]]]]);
|
|
7931
|
+
// === functors[34] ===
|
|
7932
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf;$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)]]]]]);
|
|
7669
7933
|
|
|
7670
7934
|
|
|
7671
7935
|
|
|
@@ -7802,8 +8066,8 @@ function tameFunctionConstructors() {
|
|
|
7802
8066
|
}$h_once.default( tameFunctionConstructors);
|
|
7803
8067
|
})
|
|
7804
8068
|
,
|
|
7805
|
-
// === functors[
|
|
7806
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { 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)]]]]]);
|
|
8069
|
+
// === functors[35] ===
|
|
8070
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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)]]]]]);
|
|
7807
8071
|
|
|
7808
8072
|
|
|
7809
8073
|
|
|
@@ -7855,8 +8119,8 @@ const tameFunctionToString= ()=> {
|
|
|
7855
8119
|
};$h_once.tameFunctionToString(tameFunctionToString);
|
|
7856
8120
|
})
|
|
7857
8121
|
,
|
|
7858
|
-
// === functors[
|
|
7859
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { 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)]]]]]);
|
|
8122
|
+
// === functors[36] ===
|
|
8123
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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)]]]]]);
|
|
7860
8124
|
|
|
7861
8125
|
|
|
7862
8126
|
|
|
@@ -7943,8 +8207,8 @@ function tameLocaleMethods(intrinsics, localeTaming= 'safe') {
|
|
|
7943
8207
|
}$h_once.default( tameLocaleMethods);
|
|
7944
8208
|
})
|
|
7945
8209
|
,
|
|
7946
|
-
// === functors[
|
|
7947
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { 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)]]]]]);
|
|
8210
|
+
// === functors[37] ===
|
|
8211
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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)]]]]]);
|
|
7948
8212
|
|
|
7949
8213
|
|
|
7950
8214
|
|
|
@@ -7972,8 +8236,8 @@ function tameMathObject(mathTaming= 'safe') {
|
|
|
7972
8236
|
}$h_once.default( tameMathObject);
|
|
7973
8237
|
})
|
|
7974
8238
|
,
|
|
7975
|
-
// === functors[
|
|
7976
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { 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)]]]]]);
|
|
8239
|
+
// === functors[38] ===
|
|
8240
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { 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)]]]]]);
|
|
7977
8241
|
|
|
7978
8242
|
|
|
7979
8243
|
|
|
@@ -8027,8 +8291,8 @@ function tameRegExpConstructor(regExpTaming= 'safe') {
|
|
|
8027
8291
|
}$h_once.default( tameRegExpConstructor);
|
|
8028
8292
|
})
|
|
8029
8293
|
,
|
|
8030
|
-
// === functors[
|
|
8031
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let whitelist,FunctionInstance,isAccessorPermit,Map,String,TypeError,arrayFilter,arrayIncludes,arrayMap,entries,getOwnPropertyDescriptor,getPrototypeOf,isObject,mapGet,objectHasOwnProperty,ownKeys,symbolKeyFor;$h_imports([["./whitelist.js", [["whitelist", [$h_a => (whitelist = $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)]],["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)]]]]]);
|
|
8294
|
+
// === functors[39] ===
|
|
8295
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let whitelist,FunctionInstance,isAccessorPermit,Map,String,TypeError,arrayFilter,arrayIncludes,arrayMap,entries,getOwnPropertyDescriptor,getPrototypeOf,isObject,mapGet,objectHasOwnProperty,ownKeys,symbolKeyFor;$h_imports([["./whitelist.js", [["whitelist", [$h_a => (whitelist = $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)]],["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)]]]]]);
|
|
8032
8296
|
|
|
8033
8297
|
|
|
8034
8298
|
|
|
@@ -8315,6 +8579,15 @@ function whitelistIntrinsics(
|
|
|
8315
8579
|
delete obj[prop];
|
|
8316
8580
|
}catch( err) {
|
|
8317
8581
|
if( prop in obj) {
|
|
8582
|
+
if( typeof obj=== 'function'&& prop=== 'prototype') {
|
|
8583
|
+
obj.prototype= undefined;
|
|
8584
|
+
if( obj.prototype=== undefined) {
|
|
8585
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
8586
|
+
console.warn( `Tolerating undeletable ${subPath} === undefined`);
|
|
8587
|
+
// eslint-disable-next-line no-continue
|
|
8588
|
+
continue;
|
|
8589
|
+
}
|
|
8590
|
+
}
|
|
8318
8591
|
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
8319
8592
|
console.error( `failed to delete ${subPath}`,err);
|
|
8320
8593
|
}else {
|
|
@@ -8333,8 +8606,8 @@ function whitelistIntrinsics(
|
|
|
8333
8606
|
}$h_once.default( whitelistIntrinsics);
|
|
8334
8607
|
})
|
|
8335
8608
|
,
|
|
8336
|
-
// === functors[
|
|
8337
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,arrayMap,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,enJoin,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameConsole,tameErrorConstructor,assert,makeAssert,makeEnvironmentCaptor,getAnonymousIntrinsics,makeCompartmentConstructor;$h_imports([["./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)]],["arrayMap", [$h_a => (arrayMap = $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)]]]],["./error/stringify-utils.js", [["enJoin", [$h_a => (enJoin = $h_a)]]]],["./make-hardener.js", [["makeHardener", [$h_a => (makeHardener = $h_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h_a => (makeIntrinsicsCollector = $h_a)]]]],["./whitelist-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)]]]],["./whitelist.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)]]]],["./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)]]]],["./environment-options.js", [["makeEnvironmentCaptor", [$h_a => (makeEnvironmentCaptor = $h_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h_a => (getAnonymousIntrinsics = $h_a)]]]],["./compartment-shim.js", [["makeCompartmentConstructor", [$h_a => (makeCompartmentConstructor = $h_a)]]]]]);
|
|
8609
|
+
// === functors[40] ===
|
|
8610
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,arrayMap,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,enJoin,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameConsole,tameErrorConstructor,assert,makeAssert,makeEnvironmentCaptor,getAnonymousIntrinsics,makeCompartmentConstructor;$h_imports([["./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)]],["arrayMap", [$h_a => (arrayMap = $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)]]]],["./error/stringify-utils.js", [["enJoin", [$h_a => (enJoin = $h_a)]]]],["./make-hardener.js", [["makeHardener", [$h_a => (makeHardener = $h_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h_a => (makeIntrinsicsCollector = $h_a)]]]],["./whitelist-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)]]]],["./whitelist.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)]]]],["./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)]]]],["./environment-options.js", [["makeEnvironmentCaptor", [$h_a => (makeEnvironmentCaptor = $h_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h_a => (getAnonymousIntrinsics = $h_a)]]]],["./compartment-shim.js", [["makeCompartmentConstructor", [$h_a => (makeCompartmentConstructor = $h_a)]]]]]);
|
|
8338
8611
|
|
|
8339
8612
|
|
|
8340
8613
|
|
|
@@ -8496,6 +8769,10 @@ const repairIntrinsics= (options= {})=> {
|
|
|
8496
8769
|
const {
|
|
8497
8770
|
errorTaming= getenv('LOCKDOWN_ERROR_TAMING', 'safe'),
|
|
8498
8771
|
errorTrapping= getenv('LOCKDOWN_ERROR_TRAPPING', 'platform'),
|
|
8772
|
+
unhandledRejectionTrapping= getenv(
|
|
8773
|
+
'LOCKDOWN_UNHANDLED_REJECTION_TRAPPING',
|
|
8774
|
+
'report'),
|
|
8775
|
+
|
|
8499
8776
|
regExpTaming= getenv('LOCKDOWN_REGEXP_TAMING', 'safe'),
|
|
8500
8777
|
localeTaming= getenv('LOCKDOWN_LOCALE_TAMING', 'safe'),
|
|
8501
8778
|
consoleTaming= getenv('LOCKDOWN_CONSOLE_TAMING', 'safe'),
|
|
@@ -8622,18 +8899,23 @@ const repairIntrinsics= (options= {})=> {
|
|
|
8622
8899
|
|
|
8623
8900
|
const intrinsics= finalIntrinsics();
|
|
8624
8901
|
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8902
|
+
/**
|
|
8903
|
+
* Wrap console unless suppressed.
|
|
8904
|
+
* At the moment, the console is considered a host power in the start
|
|
8905
|
+
* compartment, and not a primordial. Hence it is absent from the whilelist
|
|
8906
|
+
* and bypasses the intrinsicsCollector.
|
|
8907
|
+
*
|
|
8908
|
+
* @type {((error: any) => string | undefined) | undefined}
|
|
8909
|
+
*/
|
|
8629
8910
|
let optGetStackString;
|
|
8630
8911
|
if( errorTaming!== 'unsafe') {
|
|
8631
8912
|
optGetStackString= intrinsics['%InitialGetStackString%'];
|
|
8632
8913
|
}
|
|
8633
8914
|
const consoleRecord= tameConsole(
|
|
8634
|
-
// @ts-
|
|
8915
|
+
// @ts-expect-error tameConsole does its own input validation
|
|
8635
8916
|
consoleTaming,
|
|
8636
8917
|
errorTrapping,
|
|
8918
|
+
unhandledRejectionTrapping,
|
|
8637
8919
|
optGetStackString);
|
|
8638
8920
|
|
|
8639
8921
|
globalThis.console= /** @type {Console} */ consoleRecord.console;
|
|
@@ -8745,8 +9027,8 @@ const lockdown= (options= {})=> {
|
|
|
8745
9027
|
};$h_once.lockdown(lockdown);
|
|
8746
9028
|
})
|
|
8747
9029
|
,
|
|
8748
|
-
// === functors[
|
|
8749
|
-
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, }) => { let globalThis,TypeError,assign,tameFunctionToString,getGlobalIntrinsics,lockdown,makeCompartmentConstructor,assert;$h_imports([["./src/commons.js", [["globalThis", [$h_a => (globalThis = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["assign", [$h_a => (assign = $h_a)]]]],["./src/tame-function-tostring.js", [["tameFunctionToString", [$h_a => (tameFunctionToString = $h_a)]]]],["./src/intrinsics.js", [["getGlobalIntrinsics", [$h_a => (getGlobalIntrinsics = $h_a)]]]],["./src/lockdown-shim.js", [["lockdown", [$h_a => (lockdown = $h_a)]]]],["./src/compartment-shim.js", [["makeCompartmentConstructor", [$h_a => (makeCompartmentConstructor = $h_a)]]]],["./src/error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
9030
|
+
// === functors[41] ===
|
|
9031
|
+
(({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => { let globalThis,TypeError,assign,tameFunctionToString,getGlobalIntrinsics,lockdown,makeCompartmentConstructor,assert;$h_imports([["./src/commons.js", [["globalThis", [$h_a => (globalThis = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["assign", [$h_a => (assign = $h_a)]]]],["./src/tame-function-tostring.js", [["tameFunctionToString", [$h_a => (tameFunctionToString = $h_a)]]]],["./src/intrinsics.js", [["getGlobalIntrinsics", [$h_a => (getGlobalIntrinsics = $h_a)]]]],["./src/lockdown-shim.js", [["lockdown", [$h_a => (lockdown = $h_a)]]]],["./src/compartment-shim.js", [["makeCompartmentConstructor", [$h_a => (makeCompartmentConstructor = $h_a)]]]],["./src/error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
8750
9032
|
|
|
8751
9033
|
|
|
8752
9034
|
|
|
@@ -8816,6 +9098,7 @@ assign(globalThis, {
|
|
|
8816
9098
|
globalThis: cell("globalThis"),
|
|
8817
9099
|
Array: cell("Array"),
|
|
8818
9100
|
Date: cell("Date"),
|
|
9101
|
+
FinalizationRegistry: cell("FinalizationRegistry"),
|
|
8819
9102
|
Float32Array: cell("Float32Array"),
|
|
8820
9103
|
JSON: cell("JSON"),
|
|
8821
9104
|
Map: cell("Map"),
|
|
@@ -8899,6 +9182,8 @@ assign(globalThis, {
|
|
|
8899
9182
|
mapSet: cell("mapSet"),
|
|
8900
9183
|
mapGet: cell("mapGet"),
|
|
8901
9184
|
mapHas: cell("mapHas"),
|
|
9185
|
+
mapDelete: cell("mapDelete"),
|
|
9186
|
+
mapEntries: cell("mapEntries"),
|
|
8902
9187
|
iterateMap: cell("iterateMap"),
|
|
8903
9188
|
setAdd: cell("setAdd"),
|
|
8904
9189
|
setDelete: cell("setDelete"),
|
|
@@ -8929,6 +9214,8 @@ assign(globalThis, {
|
|
|
8929
9214
|
promiseAll: cell("promiseAll"),
|
|
8930
9215
|
promiseCatch: cell("promiseCatch"),
|
|
8931
9216
|
promiseThen: cell("promiseThen"),
|
|
9217
|
+
finalizationRegistryRegister: cell("finalizationRegistryRegister"),
|
|
9218
|
+
finalizationRegistryUnregister: cell("finalizationRegistryUnregister"),
|
|
8932
9219
|
getConstructorOf: cell("getConstructorOf"),
|
|
8933
9220
|
immutableObject: cell("immutableObject"),
|
|
8934
9221
|
isObject: cell("isObject"),
|
|
@@ -9044,7 +9331,9 @@ assign(globalThis, {
|
|
|
9044
9331
|
makeCausalConsole: cell("makeCausalConsole"),
|
|
9045
9332
|
filterConsole: cell("filterConsole"),
|
|
9046
9333
|
consoleWhitelist: cell("consoleWhitelist"),
|
|
9047
|
-
|
|
9334
|
+
},
|
|
9335
|
+
{
|
|
9336
|
+
makeRejectionHandlers: cell("makeRejectionHandlers"),
|
|
9048
9337
|
},
|
|
9049
9338
|
{
|
|
9050
9339
|
tameConsole: cell("tameConsole"),
|
|
@@ -9125,6 +9414,7 @@ assign(globalThis, {
|
|
|
9125
9414
|
universalThis: cells[0].globalThis.set,
|
|
9126
9415
|
Array: cells[0].Array.set,
|
|
9127
9416
|
Date: cells[0].Date.set,
|
|
9417
|
+
FinalizationRegistry: cells[0].FinalizationRegistry.set,
|
|
9128
9418
|
Float32Array: cells[0].Float32Array.set,
|
|
9129
9419
|
JSON: cells[0].JSON.set,
|
|
9130
9420
|
Map: cells[0].Map.set,
|
|
@@ -9208,6 +9498,8 @@ assign(globalThis, {
|
|
|
9208
9498
|
mapSet: cells[0].mapSet.set,
|
|
9209
9499
|
mapGet: cells[0].mapGet.set,
|
|
9210
9500
|
mapHas: cells[0].mapHas.set,
|
|
9501
|
+
mapDelete: cells[0].mapDelete.set,
|
|
9502
|
+
mapEntries: cells[0].mapEntries.set,
|
|
9211
9503
|
iterateMap: cells[0].iterateMap.set,
|
|
9212
9504
|
setAdd: cells[0].setAdd.set,
|
|
9213
9505
|
setDelete: cells[0].setDelete.set,
|
|
@@ -9238,6 +9530,8 @@ assign(globalThis, {
|
|
|
9238
9530
|
promiseAll: cells[0].promiseAll.set,
|
|
9239
9531
|
promiseCatch: cells[0].promiseCatch.set,
|
|
9240
9532
|
promiseThen: cells[0].promiseThen.set,
|
|
9533
|
+
finalizationRegistryRegister: cells[0].finalizationRegistryRegister.set,
|
|
9534
|
+
finalizationRegistryUnregister: cells[0].finalizationRegistryUnregister.set,
|
|
9241
9535
|
getConstructorOf: cells[0].getConstructorOf.set,
|
|
9242
9536
|
immutableObject: cells[0].immutableObject.set,
|
|
9243
9537
|
isObject: cells[0].isObject.set,
|
|
@@ -9246,6 +9540,7 @@ assign(globalThis, {
|
|
|
9246
9540
|
FERAL_FUNCTION: cells[0].FERAL_FUNCTION.set,
|
|
9247
9541
|
noEvalEvaluate: cells[0].noEvalEvaluate.set,
|
|
9248
9542
|
},
|
|
9543
|
+
importMeta: {},
|
|
9249
9544
|
});
|
|
9250
9545
|
functors[1]({
|
|
9251
9546
|
imports(entries) {
|
|
@@ -9255,6 +9550,7 @@ assign(globalThis, {
|
|
|
9255
9550
|
},
|
|
9256
9551
|
onceVar: {
|
|
9257
9552
|
},
|
|
9553
|
+
importMeta: {},
|
|
9258
9554
|
});
|
|
9259
9555
|
functors[2]({
|
|
9260
9556
|
imports(entries) {
|
|
@@ -9268,6 +9564,7 @@ assign(globalThis, {
|
|
|
9268
9564
|
bestEffortStringify: cells[2].bestEffortStringify.set,
|
|
9269
9565
|
enJoin: cells[2].enJoin.set,
|
|
9270
9566
|
},
|
|
9567
|
+
importMeta: {},
|
|
9271
9568
|
});
|
|
9272
9569
|
functors[3]({
|
|
9273
9570
|
imports(entries) {
|
|
@@ -9277,6 +9574,7 @@ assign(globalThis, {
|
|
|
9277
9574
|
},
|
|
9278
9575
|
onceVar: {
|
|
9279
9576
|
},
|
|
9577
|
+
importMeta: {},
|
|
9280
9578
|
});
|
|
9281
9579
|
functors[4]({
|
|
9282
9580
|
imports(entries) {
|
|
@@ -9294,6 +9592,7 @@ assign(globalThis, {
|
|
|
9294
9592
|
makeAssert: cells[4].makeAssert.set,
|
|
9295
9593
|
assert: cells[4].assert.set,
|
|
9296
9594
|
},
|
|
9595
|
+
importMeta: {},
|
|
9297
9596
|
});
|
|
9298
9597
|
functors[5]({
|
|
9299
9598
|
imports(entries) {
|
|
@@ -9305,6 +9604,7 @@ assign(globalThis, {
|
|
|
9305
9604
|
onceVar: {
|
|
9306
9605
|
makeEvaluateFactory: cells[5].makeEvaluateFactory.set,
|
|
9307
9606
|
},
|
|
9607
|
+
importMeta: {},
|
|
9308
9608
|
});
|
|
9309
9609
|
functors[6]({
|
|
9310
9610
|
imports(entries) {
|
|
@@ -9317,6 +9617,7 @@ assign(globalThis, {
|
|
|
9317
9617
|
isValidIdentifierName: cells[6].isValidIdentifierName.set,
|
|
9318
9618
|
getScopeConstants: cells[6].getScopeConstants.set,
|
|
9319
9619
|
},
|
|
9620
|
+
importMeta: {},
|
|
9320
9621
|
});
|
|
9321
9622
|
functors[7]({
|
|
9322
9623
|
imports(entries) {
|
|
@@ -9329,6 +9630,7 @@ assign(globalThis, {
|
|
|
9329
9630
|
onceVar: {
|
|
9330
9631
|
createScopeHandler: cells[7].createScopeHandler.set,
|
|
9331
9632
|
},
|
|
9633
|
+
importMeta: {},
|
|
9332
9634
|
});
|
|
9333
9635
|
functors[8]({
|
|
9334
9636
|
imports(entries) {
|
|
@@ -9340,6 +9642,7 @@ assign(globalThis, {
|
|
|
9340
9642
|
onceVar: {
|
|
9341
9643
|
getSourceURL: cells[8].getSourceURL.set,
|
|
9342
9644
|
},
|
|
9645
|
+
importMeta: {},
|
|
9343
9646
|
});
|
|
9344
9647
|
functors[9]({
|
|
9345
9648
|
imports(entries) {
|
|
@@ -9358,6 +9661,7 @@ assign(globalThis, {
|
|
|
9358
9661
|
mandatoryTransforms: cells[9].mandatoryTransforms.set,
|
|
9359
9662
|
applyTransforms: cells[9].applyTransforms.set,
|
|
9360
9663
|
},
|
|
9664
|
+
importMeta: {},
|
|
9361
9665
|
});
|
|
9362
9666
|
functors[10]({
|
|
9363
9667
|
imports(entries) {
|
|
@@ -9374,6 +9678,7 @@ assign(globalThis, {
|
|
|
9374
9678
|
onceVar: {
|
|
9375
9679
|
makeSafeEvaluator: cells[10].makeSafeEvaluator.set,
|
|
9376
9680
|
},
|
|
9681
|
+
importMeta: {},
|
|
9377
9682
|
});
|
|
9378
9683
|
functors[11]({
|
|
9379
9684
|
imports(entries) {
|
|
@@ -9388,6 +9693,7 @@ assign(globalThis, {
|
|
|
9388
9693
|
provideCompartmentEvaluator: cells[11].provideCompartmentEvaluator.set,
|
|
9389
9694
|
compartmentEvaluate: cells[11].compartmentEvaluate.set,
|
|
9390
9695
|
},
|
|
9696
|
+
importMeta: {},
|
|
9391
9697
|
});
|
|
9392
9698
|
functors[12]({
|
|
9393
9699
|
imports(entries) {
|
|
@@ -9398,6 +9704,7 @@ assign(globalThis, {
|
|
|
9398
9704
|
onceVar: {
|
|
9399
9705
|
makeEvalFunction: cells[12].makeEvalFunction.set,
|
|
9400
9706
|
},
|
|
9707
|
+
importMeta: {},
|
|
9401
9708
|
});
|
|
9402
9709
|
functors[13]({
|
|
9403
9710
|
imports(entries) {
|
|
@@ -9410,6 +9717,7 @@ assign(globalThis, {
|
|
|
9410
9717
|
onceVar: {
|
|
9411
9718
|
makeFunctionConstructor: cells[13].makeFunctionConstructor.set,
|
|
9412
9719
|
},
|
|
9720
|
+
importMeta: {},
|
|
9413
9721
|
});
|
|
9414
9722
|
functors[14]({
|
|
9415
9723
|
imports(entries) {
|
|
@@ -9428,6 +9736,7 @@ assign(globalThis, {
|
|
|
9428
9736
|
isAccessorPermit: cells[14].isAccessorPermit.set,
|
|
9429
9737
|
whitelist: cells[14].whitelist.set,
|
|
9430
9738
|
},
|
|
9739
|
+
importMeta: {},
|
|
9431
9740
|
});
|
|
9432
9741
|
functors[15]({
|
|
9433
9742
|
imports(entries) {
|
|
@@ -9444,6 +9753,7 @@ assign(globalThis, {
|
|
|
9444
9753
|
setGlobalObjectMutableProperties: cells[15].setGlobalObjectMutableProperties.set,
|
|
9445
9754
|
setGlobalObjectEvaluators: cells[15].setGlobalObjectEvaluators.set,
|
|
9446
9755
|
},
|
|
9756
|
+
importMeta: {},
|
|
9447
9757
|
});
|
|
9448
9758
|
functors[16]({
|
|
9449
9759
|
imports(entries) {
|
|
@@ -9457,6 +9767,7 @@ assign(globalThis, {
|
|
|
9457
9767
|
makeAlias: cells[16].makeAlias.set,
|
|
9458
9768
|
load: cells[16].load.set,
|
|
9459
9769
|
},
|
|
9770
|
+
importMeta: {},
|
|
9460
9771
|
});
|
|
9461
9772
|
functors[17]({
|
|
9462
9773
|
imports(entries) {
|
|
@@ -9471,6 +9782,7 @@ assign(globalThis, {
|
|
|
9471
9782
|
deferExports: cells[17].deferExports.set,
|
|
9472
9783
|
getDeferredExports: cells[17].getDeferredExports.set,
|
|
9473
9784
|
},
|
|
9785
|
+
importMeta: {},
|
|
9474
9786
|
});
|
|
9475
9787
|
functors[18]({
|
|
9476
9788
|
imports(entries) {
|
|
@@ -9486,6 +9798,7 @@ assign(globalThis, {
|
|
|
9486
9798
|
makeThirdPartyModuleInstance: cells[18].makeThirdPartyModuleInstance.set,
|
|
9487
9799
|
makeModuleInstance: cells[18].makeModuleInstance.set,
|
|
9488
9800
|
},
|
|
9801
|
+
importMeta: {},
|
|
9489
9802
|
});
|
|
9490
9803
|
functors[19]({
|
|
9491
9804
|
imports(entries) {
|
|
@@ -9500,6 +9813,7 @@ assign(globalThis, {
|
|
|
9500
9813
|
link: cells[19].link.set,
|
|
9501
9814
|
instantiate: cells[19].instantiate.set,
|
|
9502
9815
|
},
|
|
9816
|
+
importMeta: {},
|
|
9503
9817
|
});
|
|
9504
9818
|
functors[20]({
|
|
9505
9819
|
imports(entries) {
|
|
@@ -9522,6 +9836,7 @@ assign(globalThis, {
|
|
|
9522
9836
|
CompartmentPrototype: cells[20].CompartmentPrototype.set,
|
|
9523
9837
|
makeCompartmentConstructor: cells[20].makeCompartmentConstructor.set,
|
|
9524
9838
|
},
|
|
9839
|
+
importMeta: {},
|
|
9525
9840
|
});
|
|
9526
9841
|
functors[21]({
|
|
9527
9842
|
imports(entries) {
|
|
@@ -9535,6 +9850,7 @@ assign(globalThis, {
|
|
|
9535
9850
|
makeIntrinsicsCollector: cells[21].makeIntrinsicsCollector.set,
|
|
9536
9851
|
getGlobalIntrinsics: cells[21].getGlobalIntrinsics.set,
|
|
9537
9852
|
},
|
|
9853
|
+
importMeta: {},
|
|
9538
9854
|
});
|
|
9539
9855
|
functors[22]({
|
|
9540
9856
|
imports(entries) {
|
|
@@ -9547,6 +9863,7 @@ assign(globalThis, {
|
|
|
9547
9863
|
moderateEnablements: cells[22].moderateEnablements.set,
|
|
9548
9864
|
severeEnablements: cells[22].severeEnablements.set,
|
|
9549
9865
|
},
|
|
9866
|
+
importMeta: {},
|
|
9550
9867
|
});
|
|
9551
9868
|
functors[23]({
|
|
9552
9869
|
imports(entries) {
|
|
@@ -9559,6 +9876,7 @@ assign(globalThis, {
|
|
|
9559
9876
|
onceVar: {
|
|
9560
9877
|
default: cells[23].default.set,
|
|
9561
9878
|
},
|
|
9879
|
+
importMeta: {},
|
|
9562
9880
|
});
|
|
9563
9881
|
functors[24]({
|
|
9564
9882
|
imports(entries) {
|
|
@@ -9571,6 +9889,7 @@ assign(globalThis, {
|
|
|
9571
9889
|
onceVar: {
|
|
9572
9890
|
makeEnvironmentCaptor: cells[24].makeEnvironmentCaptor.set,
|
|
9573
9891
|
},
|
|
9892
|
+
importMeta: {},
|
|
9574
9893
|
});
|
|
9575
9894
|
functors[25]({
|
|
9576
9895
|
imports(entries) {
|
|
@@ -9586,85 +9905,92 @@ assign(globalThis, {
|
|
|
9586
9905
|
makeCausalConsole: cells[25].makeCausalConsole.set,
|
|
9587
9906
|
filterConsole: cells[25].filterConsole.set,
|
|
9588
9907
|
consoleWhitelist: cells[25].consoleWhitelist.set,
|
|
9589
|
-
BASE_CONSOLE_LEVEL: cells[25].BASE_CONSOLE_LEVEL.set,
|
|
9590
9908
|
},
|
|
9909
|
+
importMeta: {},
|
|
9591
9910
|
});
|
|
9592
9911
|
functors[26]({
|
|
9593
9912
|
imports(entries) {
|
|
9594
9913
|
const map = new Map(entries);
|
|
9595
9914
|
observeImports(map, "../commons.js", 0);
|
|
9596
|
-
observeImports(map, "./assert.js", 4);
|
|
9597
|
-
observeImports(map, "./console.js", 25);
|
|
9598
|
-
observeImports(map, "./internal-types.js", 1);
|
|
9599
|
-
observeImports(map, "./types.js", 3);
|
|
9600
9915
|
},
|
|
9601
9916
|
liveVar: {
|
|
9602
9917
|
},
|
|
9603
9918
|
onceVar: {
|
|
9604
|
-
|
|
9919
|
+
makeRejectionHandlers: cells[26].makeRejectionHandlers.set,
|
|
9605
9920
|
},
|
|
9921
|
+
importMeta: {},
|
|
9606
9922
|
});
|
|
9607
9923
|
functors[27]({
|
|
9608
9924
|
imports(entries) {
|
|
9609
9925
|
const map = new Map(entries);
|
|
9610
9926
|
observeImports(map, "../commons.js", 0);
|
|
9927
|
+
observeImports(map, "./assert.js", 4);
|
|
9928
|
+
observeImports(map, "./console.js", 25);
|
|
9929
|
+
observeImports(map, "./internal-types.js", 1);
|
|
9930
|
+
observeImports(map, "./types.js", 3);
|
|
9931
|
+
observeImports(map, "./unhandled-rejection.js", 26);
|
|
9611
9932
|
},
|
|
9612
9933
|
liveVar: {
|
|
9613
9934
|
},
|
|
9614
9935
|
onceVar: {
|
|
9615
|
-
|
|
9616
|
-
shortenCallSiteString: cells[27].shortenCallSiteString.set,
|
|
9617
|
-
tameV8ErrorConstructor: cells[27].tameV8ErrorConstructor.set,
|
|
9936
|
+
tameConsole: cells[27].tameConsole.set,
|
|
9618
9937
|
},
|
|
9938
|
+
importMeta: {},
|
|
9619
9939
|
});
|
|
9620
9940
|
functors[28]({
|
|
9621
9941
|
imports(entries) {
|
|
9622
9942
|
const map = new Map(entries);
|
|
9623
9943
|
observeImports(map, "../commons.js", 0);
|
|
9624
|
-
observeImports(map, "../whitelist.js", 14);
|
|
9625
|
-
observeImports(map, "./tame-v8-error-constructor.js", 27);
|
|
9626
9944
|
},
|
|
9627
9945
|
liveVar: {
|
|
9628
9946
|
},
|
|
9629
9947
|
onceVar: {
|
|
9630
|
-
|
|
9948
|
+
filterFileName: cells[28].filterFileName.set,
|
|
9949
|
+
shortenCallSiteString: cells[28].shortenCallSiteString.set,
|
|
9950
|
+
tameV8ErrorConstructor: cells[28].tameV8ErrorConstructor.set,
|
|
9631
9951
|
},
|
|
9952
|
+
importMeta: {},
|
|
9632
9953
|
});
|
|
9633
9954
|
functors[29]({
|
|
9634
9955
|
imports(entries) {
|
|
9635
9956
|
const map = new Map(entries);
|
|
9636
|
-
observeImports(map, "
|
|
9637
|
-
observeImports(map, "
|
|
9957
|
+
observeImports(map, "../commons.js", 0);
|
|
9958
|
+
observeImports(map, "../whitelist.js", 14);
|
|
9959
|
+
observeImports(map, "./tame-v8-error-constructor.js", 28);
|
|
9638
9960
|
},
|
|
9639
9961
|
liveVar: {
|
|
9640
9962
|
},
|
|
9641
9963
|
onceVar: {
|
|
9642
|
-
|
|
9964
|
+
default: cells[29].default.set,
|
|
9643
9965
|
},
|
|
9966
|
+
importMeta: {},
|
|
9644
9967
|
});
|
|
9645
9968
|
functors[30]({
|
|
9646
9969
|
imports(entries) {
|
|
9647
9970
|
const map = new Map(entries);
|
|
9648
9971
|
observeImports(map, "./commons.js", 0);
|
|
9649
|
-
observeImports(map, "./
|
|
9972
|
+
observeImports(map, "./compartment-shim.js", 20);
|
|
9650
9973
|
},
|
|
9651
9974
|
liveVar: {
|
|
9652
9975
|
},
|
|
9653
9976
|
onceVar: {
|
|
9654
|
-
|
|
9655
|
-
makeHardener: cells[30].makeHardener.set,
|
|
9977
|
+
getAnonymousIntrinsics: cells[30].getAnonymousIntrinsics.set,
|
|
9656
9978
|
},
|
|
9979
|
+
importMeta: {},
|
|
9657
9980
|
});
|
|
9658
9981
|
functors[31]({
|
|
9659
9982
|
imports(entries) {
|
|
9660
9983
|
const map = new Map(entries);
|
|
9661
9984
|
observeImports(map, "./commons.js", 0);
|
|
9985
|
+
observeImports(map, "./error/assert.js", 4);
|
|
9662
9986
|
},
|
|
9663
9987
|
liveVar: {
|
|
9664
9988
|
},
|
|
9665
9989
|
onceVar: {
|
|
9666
|
-
|
|
9990
|
+
isTypedArray: cells[31].isTypedArray.set,
|
|
9991
|
+
makeHardener: cells[31].makeHardener.set,
|
|
9667
9992
|
},
|
|
9993
|
+
importMeta: {},
|
|
9668
9994
|
});
|
|
9669
9995
|
functors[32]({
|
|
9670
9996
|
imports(entries) {
|
|
@@ -9674,8 +10000,9 @@ assign(globalThis, {
|
|
|
9674
10000
|
liveVar: {
|
|
9675
10001
|
},
|
|
9676
10002
|
onceVar: {
|
|
9677
|
-
|
|
10003
|
+
default: cells[32].default.set,
|
|
9678
10004
|
},
|
|
10005
|
+
importMeta: {},
|
|
9679
10006
|
});
|
|
9680
10007
|
functors[33]({
|
|
9681
10008
|
imports(entries) {
|
|
@@ -9685,8 +10012,9 @@ assign(globalThis, {
|
|
|
9685
10012
|
liveVar: {
|
|
9686
10013
|
},
|
|
9687
10014
|
onceVar: {
|
|
9688
|
-
|
|
10015
|
+
tameDomains: cells[33].tameDomains.set,
|
|
9689
10016
|
},
|
|
10017
|
+
importMeta: {},
|
|
9690
10018
|
});
|
|
9691
10019
|
functors[34]({
|
|
9692
10020
|
imports(entries) {
|
|
@@ -9696,31 +10024,34 @@ assign(globalThis, {
|
|
|
9696
10024
|
liveVar: {
|
|
9697
10025
|
},
|
|
9698
10026
|
onceVar: {
|
|
9699
|
-
|
|
10027
|
+
default: cells[34].default.set,
|
|
9700
10028
|
},
|
|
10029
|
+
importMeta: {},
|
|
9701
10030
|
});
|
|
9702
10031
|
functors[35]({
|
|
9703
10032
|
imports(entries) {
|
|
9704
10033
|
const map = new Map(entries);
|
|
9705
10034
|
observeImports(map, "./commons.js", 0);
|
|
9706
|
-
observeImports(map, "./error/assert.js", 4);
|
|
9707
10035
|
},
|
|
9708
10036
|
liveVar: {
|
|
9709
10037
|
},
|
|
9710
10038
|
onceVar: {
|
|
9711
|
-
|
|
10039
|
+
tameFunctionToString: cells[35].tameFunctionToString.set,
|
|
9712
10040
|
},
|
|
10041
|
+
importMeta: {},
|
|
9713
10042
|
});
|
|
9714
10043
|
functors[36]({
|
|
9715
10044
|
imports(entries) {
|
|
9716
10045
|
const map = new Map(entries);
|
|
9717
10046
|
observeImports(map, "./commons.js", 0);
|
|
10047
|
+
observeImports(map, "./error/assert.js", 4);
|
|
9718
10048
|
},
|
|
9719
10049
|
liveVar: {
|
|
9720
10050
|
},
|
|
9721
10051
|
onceVar: {
|
|
9722
10052
|
default: cells[36].default.set,
|
|
9723
10053
|
},
|
|
10054
|
+
importMeta: {},
|
|
9724
10055
|
});
|
|
9725
10056
|
functors[37]({
|
|
9726
10057
|
imports(entries) {
|
|
@@ -9732,20 +10063,34 @@ assign(globalThis, {
|
|
|
9732
10063
|
onceVar: {
|
|
9733
10064
|
default: cells[37].default.set,
|
|
9734
10065
|
},
|
|
10066
|
+
importMeta: {},
|
|
9735
10067
|
});
|
|
9736
10068
|
functors[38]({
|
|
9737
10069
|
imports(entries) {
|
|
9738
10070
|
const map = new Map(entries);
|
|
9739
10071
|
observeImports(map, "./commons.js", 0);
|
|
9740
|
-
observeImports(map, "./whitelist.js", 14);
|
|
9741
10072
|
},
|
|
9742
10073
|
liveVar: {
|
|
9743
10074
|
},
|
|
9744
10075
|
onceVar: {
|
|
9745
10076
|
default: cells[38].default.set,
|
|
9746
10077
|
},
|
|
10078
|
+
importMeta: {},
|
|
9747
10079
|
});
|
|
9748
10080
|
functors[39]({
|
|
10081
|
+
imports(entries) {
|
|
10082
|
+
const map = new Map(entries);
|
|
10083
|
+
observeImports(map, "./commons.js", 0);
|
|
10084
|
+
observeImports(map, "./whitelist.js", 14);
|
|
10085
|
+
},
|
|
10086
|
+
liveVar: {
|
|
10087
|
+
},
|
|
10088
|
+
onceVar: {
|
|
10089
|
+
default: cells[39].default.set,
|
|
10090
|
+
},
|
|
10091
|
+
importMeta: {},
|
|
10092
|
+
});
|
|
10093
|
+
functors[40]({
|
|
9749
10094
|
imports(entries) {
|
|
9750
10095
|
const map = new Map(entries);
|
|
9751
10096
|
observeImports(map, "./commons.js", 0);
|
|
@@ -9754,43 +10099,45 @@ assign(globalThis, {
|
|
|
9754
10099
|
observeImports(map, "./environment-options.js", 24);
|
|
9755
10100
|
observeImports(map, "./error/assert.js", 4);
|
|
9756
10101
|
observeImports(map, "./error/stringify-utils.js", 2);
|
|
9757
|
-
observeImports(map, "./error/tame-console.js",
|
|
9758
|
-
observeImports(map, "./error/tame-error-constructor.js",
|
|
9759
|
-
observeImports(map, "./get-anonymous-intrinsics.js",
|
|
10102
|
+
observeImports(map, "./error/tame-console.js", 27);
|
|
10103
|
+
observeImports(map, "./error/tame-error-constructor.js", 29);
|
|
10104
|
+
observeImports(map, "./get-anonymous-intrinsics.js", 30);
|
|
9760
10105
|
observeImports(map, "./global-object.js", 15);
|
|
9761
10106
|
observeImports(map, "./intrinsics.js", 21);
|
|
9762
|
-
observeImports(map, "./make-hardener.js",
|
|
10107
|
+
observeImports(map, "./make-hardener.js", 31);
|
|
9763
10108
|
observeImports(map, "./make-safe-evaluator.js", 10);
|
|
9764
|
-
observeImports(map, "./tame-date-constructor.js",
|
|
9765
|
-
observeImports(map, "./tame-domains.js",
|
|
9766
|
-
observeImports(map, "./tame-function-constructors.js",
|
|
9767
|
-
observeImports(map, "./tame-function-tostring.js",
|
|
9768
|
-
observeImports(map, "./tame-locale-methods.js",
|
|
9769
|
-
observeImports(map, "./tame-math-object.js",
|
|
9770
|
-
observeImports(map, "./tame-regexp-constructor.js",
|
|
9771
|
-
observeImports(map, "./whitelist-intrinsics.js",
|
|
10109
|
+
observeImports(map, "./tame-date-constructor.js", 32);
|
|
10110
|
+
observeImports(map, "./tame-domains.js", 33);
|
|
10111
|
+
observeImports(map, "./tame-function-constructors.js", 34);
|
|
10112
|
+
observeImports(map, "./tame-function-tostring.js", 35);
|
|
10113
|
+
observeImports(map, "./tame-locale-methods.js", 36);
|
|
10114
|
+
observeImports(map, "./tame-math-object.js", 37);
|
|
10115
|
+
observeImports(map, "./tame-regexp-constructor.js", 38);
|
|
10116
|
+
observeImports(map, "./whitelist-intrinsics.js", 39);
|
|
9772
10117
|
observeImports(map, "./whitelist.js", 14);
|
|
9773
10118
|
},
|
|
9774
10119
|
liveVar: {
|
|
9775
10120
|
},
|
|
9776
10121
|
onceVar: {
|
|
9777
|
-
repairIntrinsics: cells[
|
|
9778
|
-
lockdown: cells[
|
|
10122
|
+
repairIntrinsics: cells[40].repairIntrinsics.set,
|
|
10123
|
+
lockdown: cells[40].lockdown.set,
|
|
9779
10124
|
},
|
|
10125
|
+
importMeta: {},
|
|
9780
10126
|
});
|
|
9781
|
-
functors[
|
|
10127
|
+
functors[41]({
|
|
9782
10128
|
imports(entries) {
|
|
9783
10129
|
const map = new Map(entries);
|
|
9784
10130
|
observeImports(map, "./src/commons.js", 0);
|
|
9785
10131
|
observeImports(map, "./src/compartment-shim.js", 20);
|
|
9786
10132
|
observeImports(map, "./src/error/assert.js", 4);
|
|
9787
10133
|
observeImports(map, "./src/intrinsics.js", 21);
|
|
9788
|
-
observeImports(map, "./src/lockdown-shim.js",
|
|
9789
|
-
observeImports(map, "./src/tame-function-tostring.js",
|
|
10134
|
+
observeImports(map, "./src/lockdown-shim.js", 40);
|
|
10135
|
+
observeImports(map, "./src/tame-function-tostring.js", 35);
|
|
9790
10136
|
},
|
|
9791
10137
|
liveVar: {
|
|
9792
10138
|
},
|
|
9793
10139
|
onceVar: {
|
|
9794
10140
|
},
|
|
10141
|
+
importMeta: {},
|
|
9795
10142
|
});
|
|
9796
10143
|
})();
|