ses 0.15.15 → 0.15.18

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/dist/ses.mjs 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
- * @param {(thisArg: Object, ...args: any[]) => any} fn
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);$h‍_once.weakmapDelete(weakmapDelete);
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.promiseThen(promiseThen);
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 { string } src
1966
- * @returns { string }
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 { string } src
2008
- * @returns { string }
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 { string } src
2035
- * @returns { string }
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 { string } src
2079
- * @returns { string }
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: false,
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 { compartment, moduleSpecifier, staticModuleRecord}= moduleRecord;
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,freeze,assert;$h‍_imports([["./commons.js", [["arrayPush", [$h‍_a => (arrayPush = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
6053
6087
 
6054
6088
 
6055
6089
 
@@ -6167,17 +6201,17 @@ const makeEnvironmentCaptor= (aGlobal)=>{
6167
6201
  freeze(getEnvironmentOption);
6168
6202
 
6169
6203
  const getCapturedEnvironmentOptionNames= ()=> {
6170
- return freeze(arraySlice(capturedEnvironmentOptionNames));
6204
+ return freeze([...capturedEnvironmentOptionNames]);
6171
6205
  };
6172
6206
  freeze(getCapturedEnvironmentOptionNames);
6173
6207
 
6174
- return { getEnvironmentOption, getCapturedEnvironmentOptionNames};
6208
+ return freeze({ getEnvironmentOption, getCapturedEnvironmentOptionNames});
6175
6209
  };$h‍_once.makeEnvironmentCaptor(makeEnvironmentCaptor);
6176
6210
  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[BASE_CONSOLE_LEVEL](errorName, ...argTags);
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 noteCallback= (error, noteLogArgs)=> {
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(error, noteCallback);
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[BASE_CONSOLE_LEVEL]( `${errorTag}:`,error.message);
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(error, ErrorInfo.MESSAGE, messageLogArgs, subErrors);
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[BASE_CONSOLE_LEVEL](stackString);
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 TypeError,globalThis,defaultHandler,makeCausalConsole;$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)]]]],["./types.js", []],["./internal-types.js", []]]);
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 causalConsole= makeCausalConsole(originalConsole, loggedErrorHandler);
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,48 +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
- // eslint-disable-next-line @endo/no-polymorphic-call
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
- // eslint-disable-next-line @endo/no-polymorphic-call
6646
- causalConsole.error(event.error);
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
- return { console: causalConsole};
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[27] ===
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)]]]]]);
6659
-
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,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)]],["weakmapSet", [$h‍_a => (weakmapSet = $h‍_a)]],["weaksetAdd", [$h‍_a => (weaksetAdd = $h‍_a)]],["weaksetHas", [$h‍_a => (weaksetHas = $h‍_a)]]]]]);
6660
6869
 
6661
6870
 
6662
6871
 
@@ -6822,6 +7031,9 @@ const tameV8ErrorConstructor= (
6822
7031
  errorTaming,
6823
7032
  stackFiltering)=>
6824
7033
  {
7034
+ // TODO: Proper CallSite types
7035
+ /** @typedef {{}} CallSite */
7036
+
6825
7037
  const originalCaptureStackTrace= OriginalError.captureStackTrace;
6826
7038
 
6827
7039
  // const callSiteFilter = _callSite => true;
@@ -6847,9 +7059,23 @@ const tameV8ErrorConstructor= (
6847
7059
  '');
6848
7060
 
6849
7061
 
6850
- // Mapping from error instance to the structured stack trace capturing the
6851
- // stack for that instance.
6852
- const ssts= new WeakMap();
7062
+ /**
7063
+ * @typedef {object} StructuredStackInfo
7064
+ * @property {CallSite[]} callSites
7065
+ * @property {undefined} [stackString]
7066
+ */
7067
+
7068
+ /**
7069
+ * @typedef {object} ParsedStackInfo
7070
+ * @property {undefined} [callSites]
7071
+ * @property {string} stackString
7072
+ */
7073
+
7074
+ // Mapping from error instance to the stack for that instance.
7075
+ // The stack info is either the structured stack trace
7076
+ // or the generated tamed stack string
7077
+ /** @type {WeakMap<Error, ParsedStackInfo | StructuredStackInfo} */
7078
+ const stackInfos= new WeakMap();
6853
7079
 
6854
7080
  // Use concise methods to obtain named functions without constructors.
6855
7081
  const tamedMethods= {
@@ -6871,23 +7097,41 @@ const tameV8ErrorConstructor= (
6871
7097
  // string associated with an error.
6872
7098
  // See https://tc39.es/proposal-error-stacks/
6873
7099
  getStackString(error) {
6874
- if( !weakmapHas(ssts, error)) {
7100
+ let stackInfo= weakmapGet(stackInfos, error);
7101
+
7102
+ if( stackInfo=== undefined) {
7103
+ // The following will call `prepareStackTrace()` synchronously
7104
+ // which will populate stackInfos
6875
7105
  // eslint-disable-next-line no-void
6876
7106
  void error.stack;
7107
+ stackInfo= weakmapGet(stackInfos, error);
7108
+ if( !stackInfo) {
7109
+ stackInfo= { stackString: ''};
7110
+ weakmapSet(stackInfos, error, stackInfo);
7111
+ }
6877
7112
  }
6878
- const sst= weakmapGet(ssts, error);
6879
- if( !sst) {
6880
- return '';
7113
+
7114
+ // prepareStackTrace() may generate the stackString
7115
+ // if errorTaming === 'unsafe'
7116
+
7117
+ if( stackInfo.stackString!== undefined) {
7118
+ return stackInfo.stackString;
6881
7119
  }
6882
- return stackStringFromSST(error, sst);
7120
+
7121
+ const stackString= stackStringFromSST(error, stackInfo.callSites);
7122
+ weakmapSet(stackInfos, error, { stackString});
7123
+
7124
+ return stackString;
6883
7125
  },
6884
7126
  prepareStackTrace(error, sst) {
6885
- weakmapSet(ssts, error, sst);
6886
7127
  if( errorTaming=== 'unsafe') {
6887
7128
  const stackString= stackStringFromSST(error, sst);
7129
+ weakmapSet(stackInfos, error, { stackString});
6888
7130
  return `${error}${stackString}`;
7131
+ }else {
7132
+ weakmapSet(stackInfos, error, { callSites: sst});
7133
+ return '';
6889
7134
  }
6890
- return '';
6891
7135
  }};
6892
7136
 
6893
7137
 
@@ -6922,7 +7166,7 @@ const tameV8ErrorConstructor= (
6922
7166
  // Use concise methods to obtain named functions without constructors.
6923
7167
  const systemMethods= {
6924
7168
  prepareStackTrace(error, sst) {
6925
- weakmapSet(ssts, error, sst);
7169
+ weakmapSet(stackInfos, error, { callSites: sst});
6926
7170
  return inputPrepareFn(error, safeV8SST(sst));
6927
7171
  }};
6928
7172
 
@@ -6960,8 +7204,8 @@ const tameV8ErrorConstructor= (
6960
7204
  };$h‍_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
6961
7205
  })
6962
7206
  ,
6963
- // === functors[28] ===
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)]]]]]);
7207
+ // === functors[29] ===
7208
+ (({ 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
7209
 
6966
7210
 
6967
7211
 
@@ -6973,8 +7217,9 @@ const tameV8ErrorConstructor= (
6973
7217
 
6974
7218
 
6975
7219
 
6976
- // Present on at least FF. Proposed by Error-proposal. Not on SES whitelist
6977
- // so grab it before it is removed.
7220
+ // Present on at least FF and XS. Proposed by Error-proposal. The original
7221
+ // is dangerous, so tameErrorConstructor replaces it with a safe one.
7222
+ // We grab the original here before it gets replaced.
6978
7223
  const stackDesc= getOwnPropertyDescriptor(FERAL_ERROR.prototype, 'stack');
6979
7224
  const stackGetter= stackDesc&& stackDesc.get;
6980
7225
 
@@ -7036,17 +7281,7 @@ function tameErrorConstructor(
7036
7281
  const InitialError= makeErrorConstructor({ powers: 'original'});
7037
7282
  const SharedError= makeErrorConstructor({ powers: 'none'});
7038
7283
  defineProperties(ErrorPrototype, {
7039
- constructor: { value: SharedError}
7040
- /* TODO
7041
- stack: {
7042
- get() {
7043
- return '';
7044
- },
7045
- set(_) {
7046
- // ignore
7047
- },
7048
- },
7049
- */});
7284
+ constructor: { value: SharedError}});
7050
7285
 
7051
7286
 
7052
7287
  for( const NativeError of NativeErrors) {
@@ -7117,7 +7352,70 @@ function tameErrorConstructor(
7117
7352
  errorTaming,
7118
7353
  stackFiltering);
7119
7354
 
7355
+ }else if( errorTaming=== 'unsafe') {
7356
+ // v8 has too much magic around their 'stack' own property for it to
7357
+ // coexist cleanly with this accessor. So only install it on non-v8
7358
+
7359
+ // Error.prototype.stack property as proposed at
7360
+ // https://tc39.es/proposal-error-stacks/
7361
+ // with the fix proposed at
7362
+ // https://github.com/tc39/proposal-error-stacks/issues/46
7363
+ // On others, this still protects from the override mistake,
7364
+ // essentially like enable-property-overrides.js would
7365
+ // once this accessor property itself is frozen, as will happen
7366
+ // later during lockdown.
7367
+ //
7368
+ // However, there is here a change from the intent in the current
7369
+ // state of the proposal. If experience tells us whether this change
7370
+ // is a good idea, we should modify the proposal accordingly. There is
7371
+ // much code in the world that assumes `error.stack` is a string. So
7372
+ // where the proposal accommodates secure operation by making the
7373
+ // property optional, we instead accommodate secure operation by
7374
+ // having the secure form always return only the stable part, the
7375
+ // stringified error instance, and omitting all the frame information
7376
+ // rather than omitting the property.
7377
+ defineProperties(ErrorPrototype, {
7378
+ stack: {
7379
+ get() {
7380
+ return initialGetStackString(this);
7381
+ },
7382
+ set(newValue) {
7383
+ defineProperties(this, {
7384
+ stack: {
7385
+ value: newValue,
7386
+ writable: true,
7387
+ enumerable: true,
7388
+ configurable: true}});
7389
+
7390
+
7391
+ }}});
7392
+
7393
+
7394
+ }else {
7395
+ // v8 has too much magic around their 'stack' own property for it to
7396
+ // coexist cleanly with this accessor. So only install it on non-v8
7397
+ defineProperties(ErrorPrototype, {
7398
+ stack: {
7399
+ get() {
7400
+ // https://github.com/tc39/proposal-error-stacks/issues/46
7401
+ // allows this to not add an unpleasant newline. Otherwise
7402
+ // we should fix this.
7403
+ return `${this}`;
7404
+ },
7405
+ set(newValue) {
7406
+ defineProperties(this, {
7407
+ stack: {
7408
+ value: newValue,
7409
+ writable: true,
7410
+ enumerable: true,
7411
+ configurable: true}});
7412
+
7413
+
7414
+ }}});
7415
+
7416
+
7120
7417
  }
7418
+
7121
7419
  return {
7122
7420
  '%InitialGetStackString%': initialGetStackString,
7123
7421
  '%InitialError%': InitialError,
@@ -7126,8 +7424,8 @@ function tameErrorConstructor(
7126
7424
  }$h‍_once.default( tameErrorConstructor);
7127
7425
  })
7128
7426
  ,
7129
- // === functors[29] ===
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)]]]]]);
7427
+ // === functors[30] ===
7428
+ (({ 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
7429
 
7132
7430
 
7133
7431
 
@@ -7267,8 +7565,8 @@ const getAnonymousIntrinsics= ()=> {
7267
7565
  };$h‍_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
7268
7566
  })
7269
7567
  ,
7270
- // === functors[30] ===
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)]]]]]);
7568
+ // === functors[31] ===
7569
+ (({ 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
7570
 
7273
7571
 
7274
7572
 
@@ -7498,8 +7796,8 @@ const makeHardener= ()=> {
7498
7796
  };$h‍_once.makeHardener(makeHardener);
7499
7797
  })
7500
7798
  ,
7501
- // === functors[31] ===
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)]]]]]);
7799
+ // === functors[32] ===
7800
+ (({ 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
7801
 
7504
7802
 
7505
7803
 
@@ -7615,8 +7913,8 @@ function tameDateConstructor(dateTaming= 'safe') {
7615
7913
  }$h‍_once.default( tameDateConstructor);
7616
7914
  })
7617
7915
  ,
7618
- // === functors[32] ===
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);
7916
+ // === functors[33] ===
7917
+ (({ 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
7918
 
7621
7919
 
7622
7920
 
@@ -7664,8 +7962,8 @@ function tameDomains(domainTaming= 'safe') {
7664
7962
  }
7665
7963
  })
7666
7964
  ,
7667
- // === functors[33] ===
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)]]]]]);
7965
+ // === functors[34] ===
7966
+ (({ 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
7967
 
7670
7968
 
7671
7969
 
@@ -7716,7 +8014,7 @@ function tameFunctionConstructors() {
7716
8014
  FERAL_FUNCTION.prototype.constructor('return 1');
7717
8015
  }catch( ignore) {
7718
8016
  // Throws, no need to patch.
7719
- return {};
8017
+ return harden({});
7720
8018
  }
7721
8019
 
7722
8020
  const newIntrinsics= {};
@@ -7802,8 +8100,8 @@ function tameFunctionConstructors() {
7802
8100
  }$h‍_once.default( tameFunctionConstructors);
7803
8101
  })
7804
8102
  ,
7805
- // === functors[34] ===
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)]]]]]);
8103
+ // === functors[35] ===
8104
+ (({ 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
8105
 
7808
8106
 
7809
8107
 
@@ -7855,8 +8153,8 @@ const tameFunctionToString= ()=> {
7855
8153
  };$h‍_once.tameFunctionToString(tameFunctionToString);
7856
8154
  })
7857
8155
  ,
7858
- // === functors[35] ===
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)]]]]]);
8156
+ // === functors[36] ===
8157
+ (({ 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
8158
 
7861
8159
 
7862
8160
 
@@ -7943,8 +8241,8 @@ function tameLocaleMethods(intrinsics, localeTaming= 'safe') {
7943
8241
  }$h‍_once.default( tameLocaleMethods);
7944
8242
  })
7945
8243
  ,
7946
- // === functors[36] ===
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)]]]]]);
8244
+ // === functors[37] ===
8245
+ (({ 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
8246
 
7949
8247
 
7950
8248
 
@@ -7972,8 +8270,8 @@ function tameMathObject(mathTaming= 'safe') {
7972
8270
  }$h‍_once.default( tameMathObject);
7973
8271
  })
7974
8272
  ,
7975
- // === functors[37] ===
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)]]]]]);
8273
+ // === functors[38] ===
8274
+ (({ 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
8275
 
7978
8276
 
7979
8277
 
@@ -8027,8 +8325,8 @@ function tameRegExpConstructor(regExpTaming= 'safe') {
8027
8325
  }$h‍_once.default( tameRegExpConstructor);
8028
8326
  })
8029
8327
  ,
8030
- // === functors[38] ===
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)]]]]]);
8328
+ // === functors[39] ===
8329
+ (({ 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
8330
 
8033
8331
 
8034
8332
 
@@ -8315,6 +8613,15 @@ function whitelistIntrinsics(
8315
8613
  delete obj[prop];
8316
8614
  }catch( err) {
8317
8615
  if( prop in obj) {
8616
+ if( typeof obj=== 'function'&& prop=== 'prototype') {
8617
+ obj.prototype= undefined;
8618
+ if( obj.prototype=== undefined) {
8619
+ // eslint-disable-next-line @endo/no-polymorphic-call
8620
+ console.warn( `Tolerating undeletable ${subPath} === undefined`);
8621
+ // eslint-disable-next-line no-continue
8622
+ continue;
8623
+ }
8624
+ }
8318
8625
  // eslint-disable-next-line @endo/no-polymorphic-call
8319
8626
  console.error( `failed to delete ${subPath}`,err);
8320
8627
  }else {
@@ -8333,8 +8640,8 @@ function whitelistIntrinsics(
8333
8640
  }$h‍_once.default( whitelistIntrinsics);
8334
8641
  })
8335
8642
  ,
8336
- // === functors[39] ===
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)]]]]]);
8643
+ // === functors[40] ===
8644
+ (({ 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
8645
 
8339
8646
 
8340
8647
 
@@ -8496,6 +8803,10 @@ const repairIntrinsics= (options= {})=> {
8496
8803
  const {
8497
8804
  errorTaming= getenv('LOCKDOWN_ERROR_TAMING', 'safe'),
8498
8805
  errorTrapping= getenv('LOCKDOWN_ERROR_TRAPPING', 'platform'),
8806
+ unhandledRejectionTrapping= getenv(
8807
+ 'LOCKDOWN_UNHANDLED_REJECTION_TRAPPING',
8808
+ 'report'),
8809
+
8499
8810
  regExpTaming= getenv('LOCKDOWN_REGEXP_TAMING', 'safe'),
8500
8811
  localeTaming= getenv('LOCKDOWN_LOCALE_TAMING', 'safe'),
8501
8812
  consoleTaming= getenv('LOCKDOWN_CONSOLE_TAMING', 'safe'),
@@ -8508,10 +8819,6 @@ const repairIntrinsics= (options= {})=> {
8508
8819
  /** @param {string} debugName */
8509
8820
  (debugName)=>debugName!== ''),
8510
8821
 
8511
- __allowUnsafeMonkeyPatching__= getenv(
8512
- '__LOCKDOWN_ALLOW_UNSAFE_MONKEY_PATCHING__',
8513
- 'safe'),
8514
-
8515
8822
  dateTaming= 'safe', // deprecated
8516
8823
  mathTaming= 'safe', // deprecated
8517
8824
  ...extraOptions}=
@@ -8622,18 +8929,23 @@ const repairIntrinsics= (options= {})=> {
8622
8929
 
8623
8930
  const intrinsics= finalIntrinsics();
8624
8931
 
8625
- // Wrap console unless suppressed.
8626
- // At the moment, the console is considered a host power in the start
8627
- // compartment, and not a primordial. Hence it is absent from the whilelist
8628
- // and bypasses the intrinsicsCollector.
8932
+ /**
8933
+ * Wrap console unless suppressed.
8934
+ * At the moment, the console is considered a host power in the start
8935
+ * compartment, and not a primordial. Hence it is absent from the whilelist
8936
+ * and bypasses the intrinsicsCollector.
8937
+ *
8938
+ * @type {((error: any) => string | undefined) | undefined}
8939
+ */
8629
8940
  let optGetStackString;
8630
8941
  if( errorTaming!== 'unsafe') {
8631
8942
  optGetStackString= intrinsics['%InitialGetStackString%'];
8632
8943
  }
8633
8944
  const consoleRecord= tameConsole(
8634
- // @ts-ignore tameConsole does its own input validation
8945
+ // @ts-expect-error tameConsole does its own input validation
8635
8946
  consoleTaming,
8636
8947
  errorTrapping,
8948
+ unhandledRejectionTrapping,
8637
8949
  optGetStackString);
8638
8950
 
8639
8951
  globalThis.console= /** @type {Console} */ consoleRecord.console;
@@ -8713,11 +9025,9 @@ const repairIntrinsics= (options= {})=> {
8713
9025
  // @ts-ignore enablePropertyOverrides does its own input validation
8714
9026
  enablePropertyOverrides(intrinsics, overrideTaming, overrideDebug);
8715
9027
 
8716
- if( __allowUnsafeMonkeyPatching__!== 'unsafe') {
8717
- // Finally register and optionally freeze all the intrinsics. This
8718
- // must be the operation that modifies the intrinsics.
8719
- harden(intrinsics);
8720
- }
9028
+ // Finally register and optionally freeze all the intrinsics. This
9029
+ // must be the operation that modifies the intrinsics.
9030
+ harden(intrinsics);
8721
9031
 
8722
9032
  // Reveal harden after lockdown.
8723
9033
  // Harden is dangerous before lockdown because hardening just
@@ -8745,8 +9055,8 @@ const lockdown= (options= {})=> {
8745
9055
  };$h‍_once.lockdown(lockdown);
8746
9056
  })
8747
9057
  ,
8748
- // === functors[40] ===
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)]]]]]);
9058
+ // === functors[41] ===
9059
+ (({ 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
9060
 
8751
9061
 
8752
9062
 
@@ -8816,6 +9126,7 @@ assign(globalThis, {
8816
9126
  globalThis: cell("globalThis"),
8817
9127
  Array: cell("Array"),
8818
9128
  Date: cell("Date"),
9129
+ FinalizationRegistry: cell("FinalizationRegistry"),
8819
9130
  Float32Array: cell("Float32Array"),
8820
9131
  JSON: cell("JSON"),
8821
9132
  Map: cell("Map"),
@@ -8899,6 +9210,8 @@ assign(globalThis, {
8899
9210
  mapSet: cell("mapSet"),
8900
9211
  mapGet: cell("mapGet"),
8901
9212
  mapHas: cell("mapHas"),
9213
+ mapDelete: cell("mapDelete"),
9214
+ mapEntries: cell("mapEntries"),
8902
9215
  iterateMap: cell("iterateMap"),
8903
9216
  setAdd: cell("setAdd"),
8904
9217
  setDelete: cell("setDelete"),
@@ -8929,6 +9242,8 @@ assign(globalThis, {
8929
9242
  promiseAll: cell("promiseAll"),
8930
9243
  promiseCatch: cell("promiseCatch"),
8931
9244
  promiseThen: cell("promiseThen"),
9245
+ finalizationRegistryRegister: cell("finalizationRegistryRegister"),
9246
+ finalizationRegistryUnregister: cell("finalizationRegistryUnregister"),
8932
9247
  getConstructorOf: cell("getConstructorOf"),
8933
9248
  immutableObject: cell("immutableObject"),
8934
9249
  isObject: cell("isObject"),
@@ -9044,7 +9359,9 @@ assign(globalThis, {
9044
9359
  makeCausalConsole: cell("makeCausalConsole"),
9045
9360
  filterConsole: cell("filterConsole"),
9046
9361
  consoleWhitelist: cell("consoleWhitelist"),
9047
- BASE_CONSOLE_LEVEL: cell("BASE_CONSOLE_LEVEL"),
9362
+ },
9363
+ {
9364
+ makeRejectionHandlers: cell("makeRejectionHandlers"),
9048
9365
  },
9049
9366
  {
9050
9367
  tameConsole: cell("tameConsole"),
@@ -9125,6 +9442,7 @@ assign(globalThis, {
9125
9442
  universalThis: cells[0].globalThis.set,
9126
9443
  Array: cells[0].Array.set,
9127
9444
  Date: cells[0].Date.set,
9445
+ FinalizationRegistry: cells[0].FinalizationRegistry.set,
9128
9446
  Float32Array: cells[0].Float32Array.set,
9129
9447
  JSON: cells[0].JSON.set,
9130
9448
  Map: cells[0].Map.set,
@@ -9208,6 +9526,8 @@ assign(globalThis, {
9208
9526
  mapSet: cells[0].mapSet.set,
9209
9527
  mapGet: cells[0].mapGet.set,
9210
9528
  mapHas: cells[0].mapHas.set,
9529
+ mapDelete: cells[0].mapDelete.set,
9530
+ mapEntries: cells[0].mapEntries.set,
9211
9531
  iterateMap: cells[0].iterateMap.set,
9212
9532
  setAdd: cells[0].setAdd.set,
9213
9533
  setDelete: cells[0].setDelete.set,
@@ -9238,6 +9558,8 @@ assign(globalThis, {
9238
9558
  promiseAll: cells[0].promiseAll.set,
9239
9559
  promiseCatch: cells[0].promiseCatch.set,
9240
9560
  promiseThen: cells[0].promiseThen.set,
9561
+ finalizationRegistryRegister: cells[0].finalizationRegistryRegister.set,
9562
+ finalizationRegistryUnregister: cells[0].finalizationRegistryUnregister.set,
9241
9563
  getConstructorOf: cells[0].getConstructorOf.set,
9242
9564
  immutableObject: cells[0].immutableObject.set,
9243
9565
  isObject: cells[0].isObject.set,
@@ -9246,6 +9568,7 @@ assign(globalThis, {
9246
9568
  FERAL_FUNCTION: cells[0].FERAL_FUNCTION.set,
9247
9569
  noEvalEvaluate: cells[0].noEvalEvaluate.set,
9248
9570
  },
9571
+ importMeta: {},
9249
9572
  });
9250
9573
  functors[1]({
9251
9574
  imports(entries) {
@@ -9255,6 +9578,7 @@ assign(globalThis, {
9255
9578
  },
9256
9579
  onceVar: {
9257
9580
  },
9581
+ importMeta: {},
9258
9582
  });
9259
9583
  functors[2]({
9260
9584
  imports(entries) {
@@ -9268,6 +9592,7 @@ assign(globalThis, {
9268
9592
  bestEffortStringify: cells[2].bestEffortStringify.set,
9269
9593
  enJoin: cells[2].enJoin.set,
9270
9594
  },
9595
+ importMeta: {},
9271
9596
  });
9272
9597
  functors[3]({
9273
9598
  imports(entries) {
@@ -9277,6 +9602,7 @@ assign(globalThis, {
9277
9602
  },
9278
9603
  onceVar: {
9279
9604
  },
9605
+ importMeta: {},
9280
9606
  });
9281
9607
  functors[4]({
9282
9608
  imports(entries) {
@@ -9294,6 +9620,7 @@ assign(globalThis, {
9294
9620
  makeAssert: cells[4].makeAssert.set,
9295
9621
  assert: cells[4].assert.set,
9296
9622
  },
9623
+ importMeta: {},
9297
9624
  });
9298
9625
  functors[5]({
9299
9626
  imports(entries) {
@@ -9305,6 +9632,7 @@ assign(globalThis, {
9305
9632
  onceVar: {
9306
9633
  makeEvaluateFactory: cells[5].makeEvaluateFactory.set,
9307
9634
  },
9635
+ importMeta: {},
9308
9636
  });
9309
9637
  functors[6]({
9310
9638
  imports(entries) {
@@ -9317,6 +9645,7 @@ assign(globalThis, {
9317
9645
  isValidIdentifierName: cells[6].isValidIdentifierName.set,
9318
9646
  getScopeConstants: cells[6].getScopeConstants.set,
9319
9647
  },
9648
+ importMeta: {},
9320
9649
  });
9321
9650
  functors[7]({
9322
9651
  imports(entries) {
@@ -9329,6 +9658,7 @@ assign(globalThis, {
9329
9658
  onceVar: {
9330
9659
  createScopeHandler: cells[7].createScopeHandler.set,
9331
9660
  },
9661
+ importMeta: {},
9332
9662
  });
9333
9663
  functors[8]({
9334
9664
  imports(entries) {
@@ -9340,6 +9670,7 @@ assign(globalThis, {
9340
9670
  onceVar: {
9341
9671
  getSourceURL: cells[8].getSourceURL.set,
9342
9672
  },
9673
+ importMeta: {},
9343
9674
  });
9344
9675
  functors[9]({
9345
9676
  imports(entries) {
@@ -9358,6 +9689,7 @@ assign(globalThis, {
9358
9689
  mandatoryTransforms: cells[9].mandatoryTransforms.set,
9359
9690
  applyTransforms: cells[9].applyTransforms.set,
9360
9691
  },
9692
+ importMeta: {},
9361
9693
  });
9362
9694
  functors[10]({
9363
9695
  imports(entries) {
@@ -9374,6 +9706,7 @@ assign(globalThis, {
9374
9706
  onceVar: {
9375
9707
  makeSafeEvaluator: cells[10].makeSafeEvaluator.set,
9376
9708
  },
9709
+ importMeta: {},
9377
9710
  });
9378
9711
  functors[11]({
9379
9712
  imports(entries) {
@@ -9388,6 +9721,7 @@ assign(globalThis, {
9388
9721
  provideCompartmentEvaluator: cells[11].provideCompartmentEvaluator.set,
9389
9722
  compartmentEvaluate: cells[11].compartmentEvaluate.set,
9390
9723
  },
9724
+ importMeta: {},
9391
9725
  });
9392
9726
  functors[12]({
9393
9727
  imports(entries) {
@@ -9398,6 +9732,7 @@ assign(globalThis, {
9398
9732
  onceVar: {
9399
9733
  makeEvalFunction: cells[12].makeEvalFunction.set,
9400
9734
  },
9735
+ importMeta: {},
9401
9736
  });
9402
9737
  functors[13]({
9403
9738
  imports(entries) {
@@ -9410,6 +9745,7 @@ assign(globalThis, {
9410
9745
  onceVar: {
9411
9746
  makeFunctionConstructor: cells[13].makeFunctionConstructor.set,
9412
9747
  },
9748
+ importMeta: {},
9413
9749
  });
9414
9750
  functors[14]({
9415
9751
  imports(entries) {
@@ -9428,6 +9764,7 @@ assign(globalThis, {
9428
9764
  isAccessorPermit: cells[14].isAccessorPermit.set,
9429
9765
  whitelist: cells[14].whitelist.set,
9430
9766
  },
9767
+ importMeta: {},
9431
9768
  });
9432
9769
  functors[15]({
9433
9770
  imports(entries) {
@@ -9444,6 +9781,7 @@ assign(globalThis, {
9444
9781
  setGlobalObjectMutableProperties: cells[15].setGlobalObjectMutableProperties.set,
9445
9782
  setGlobalObjectEvaluators: cells[15].setGlobalObjectEvaluators.set,
9446
9783
  },
9784
+ importMeta: {},
9447
9785
  });
9448
9786
  functors[16]({
9449
9787
  imports(entries) {
@@ -9457,6 +9795,7 @@ assign(globalThis, {
9457
9795
  makeAlias: cells[16].makeAlias.set,
9458
9796
  load: cells[16].load.set,
9459
9797
  },
9798
+ importMeta: {},
9460
9799
  });
9461
9800
  functors[17]({
9462
9801
  imports(entries) {
@@ -9471,6 +9810,7 @@ assign(globalThis, {
9471
9810
  deferExports: cells[17].deferExports.set,
9472
9811
  getDeferredExports: cells[17].getDeferredExports.set,
9473
9812
  },
9813
+ importMeta: {},
9474
9814
  });
9475
9815
  functors[18]({
9476
9816
  imports(entries) {
@@ -9486,6 +9826,7 @@ assign(globalThis, {
9486
9826
  makeThirdPartyModuleInstance: cells[18].makeThirdPartyModuleInstance.set,
9487
9827
  makeModuleInstance: cells[18].makeModuleInstance.set,
9488
9828
  },
9829
+ importMeta: {},
9489
9830
  });
9490
9831
  functors[19]({
9491
9832
  imports(entries) {
@@ -9500,6 +9841,7 @@ assign(globalThis, {
9500
9841
  link: cells[19].link.set,
9501
9842
  instantiate: cells[19].instantiate.set,
9502
9843
  },
9844
+ importMeta: {},
9503
9845
  });
9504
9846
  functors[20]({
9505
9847
  imports(entries) {
@@ -9522,6 +9864,7 @@ assign(globalThis, {
9522
9864
  CompartmentPrototype: cells[20].CompartmentPrototype.set,
9523
9865
  makeCompartmentConstructor: cells[20].makeCompartmentConstructor.set,
9524
9866
  },
9867
+ importMeta: {},
9525
9868
  });
9526
9869
  functors[21]({
9527
9870
  imports(entries) {
@@ -9535,6 +9878,7 @@ assign(globalThis, {
9535
9878
  makeIntrinsicsCollector: cells[21].makeIntrinsicsCollector.set,
9536
9879
  getGlobalIntrinsics: cells[21].getGlobalIntrinsics.set,
9537
9880
  },
9881
+ importMeta: {},
9538
9882
  });
9539
9883
  functors[22]({
9540
9884
  imports(entries) {
@@ -9547,6 +9891,7 @@ assign(globalThis, {
9547
9891
  moderateEnablements: cells[22].moderateEnablements.set,
9548
9892
  severeEnablements: cells[22].severeEnablements.set,
9549
9893
  },
9894
+ importMeta: {},
9550
9895
  });
9551
9896
  functors[23]({
9552
9897
  imports(entries) {
@@ -9559,6 +9904,7 @@ assign(globalThis, {
9559
9904
  onceVar: {
9560
9905
  default: cells[23].default.set,
9561
9906
  },
9907
+ importMeta: {},
9562
9908
  });
9563
9909
  functors[24]({
9564
9910
  imports(entries) {
@@ -9571,6 +9917,7 @@ assign(globalThis, {
9571
9917
  onceVar: {
9572
9918
  makeEnvironmentCaptor: cells[24].makeEnvironmentCaptor.set,
9573
9919
  },
9920
+ importMeta: {},
9574
9921
  });
9575
9922
  functors[25]({
9576
9923
  imports(entries) {
@@ -9586,85 +9933,92 @@ assign(globalThis, {
9586
9933
  makeCausalConsole: cells[25].makeCausalConsole.set,
9587
9934
  filterConsole: cells[25].filterConsole.set,
9588
9935
  consoleWhitelist: cells[25].consoleWhitelist.set,
9589
- BASE_CONSOLE_LEVEL: cells[25].BASE_CONSOLE_LEVEL.set,
9590
9936
  },
9937
+ importMeta: {},
9591
9938
  });
9592
9939
  functors[26]({
9593
9940
  imports(entries) {
9594
9941
  const map = new Map(entries);
9595
9942
  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
9943
  },
9601
9944
  liveVar: {
9602
9945
  },
9603
9946
  onceVar: {
9604
- tameConsole: cells[26].tameConsole.set,
9947
+ makeRejectionHandlers: cells[26].makeRejectionHandlers.set,
9605
9948
  },
9949
+ importMeta: {},
9606
9950
  });
9607
9951
  functors[27]({
9608
9952
  imports(entries) {
9609
9953
  const map = new Map(entries);
9610
9954
  observeImports(map, "../commons.js", 0);
9955
+ observeImports(map, "./assert.js", 4);
9956
+ observeImports(map, "./console.js", 25);
9957
+ observeImports(map, "./internal-types.js", 1);
9958
+ observeImports(map, "./types.js", 3);
9959
+ observeImports(map, "./unhandled-rejection.js", 26);
9611
9960
  },
9612
9961
  liveVar: {
9613
9962
  },
9614
9963
  onceVar: {
9615
- filterFileName: cells[27].filterFileName.set,
9616
- shortenCallSiteString: cells[27].shortenCallSiteString.set,
9617
- tameV8ErrorConstructor: cells[27].tameV8ErrorConstructor.set,
9964
+ tameConsole: cells[27].tameConsole.set,
9618
9965
  },
9966
+ importMeta: {},
9619
9967
  });
9620
9968
  functors[28]({
9621
9969
  imports(entries) {
9622
9970
  const map = new Map(entries);
9623
9971
  observeImports(map, "../commons.js", 0);
9624
- observeImports(map, "../whitelist.js", 14);
9625
- observeImports(map, "./tame-v8-error-constructor.js", 27);
9626
9972
  },
9627
9973
  liveVar: {
9628
9974
  },
9629
9975
  onceVar: {
9630
- default: cells[28].default.set,
9976
+ filterFileName: cells[28].filterFileName.set,
9977
+ shortenCallSiteString: cells[28].shortenCallSiteString.set,
9978
+ tameV8ErrorConstructor: cells[28].tameV8ErrorConstructor.set,
9631
9979
  },
9980
+ importMeta: {},
9632
9981
  });
9633
9982
  functors[29]({
9634
9983
  imports(entries) {
9635
9984
  const map = new Map(entries);
9636
- observeImports(map, "./commons.js", 0);
9637
- observeImports(map, "./compartment-shim.js", 20);
9985
+ observeImports(map, "../commons.js", 0);
9986
+ observeImports(map, "../whitelist.js", 14);
9987
+ observeImports(map, "./tame-v8-error-constructor.js", 28);
9638
9988
  },
9639
9989
  liveVar: {
9640
9990
  },
9641
9991
  onceVar: {
9642
- getAnonymousIntrinsics: cells[29].getAnonymousIntrinsics.set,
9992
+ default: cells[29].default.set,
9643
9993
  },
9994
+ importMeta: {},
9644
9995
  });
9645
9996
  functors[30]({
9646
9997
  imports(entries) {
9647
9998
  const map = new Map(entries);
9648
9999
  observeImports(map, "./commons.js", 0);
9649
- observeImports(map, "./error/assert.js", 4);
10000
+ observeImports(map, "./compartment-shim.js", 20);
9650
10001
  },
9651
10002
  liveVar: {
9652
10003
  },
9653
10004
  onceVar: {
9654
- isTypedArray: cells[30].isTypedArray.set,
9655
- makeHardener: cells[30].makeHardener.set,
10005
+ getAnonymousIntrinsics: cells[30].getAnonymousIntrinsics.set,
9656
10006
  },
10007
+ importMeta: {},
9657
10008
  });
9658
10009
  functors[31]({
9659
10010
  imports(entries) {
9660
10011
  const map = new Map(entries);
9661
10012
  observeImports(map, "./commons.js", 0);
10013
+ observeImports(map, "./error/assert.js", 4);
9662
10014
  },
9663
10015
  liveVar: {
9664
10016
  },
9665
10017
  onceVar: {
9666
- default: cells[31].default.set,
10018
+ isTypedArray: cells[31].isTypedArray.set,
10019
+ makeHardener: cells[31].makeHardener.set,
9667
10020
  },
10021
+ importMeta: {},
9668
10022
  });
9669
10023
  functors[32]({
9670
10024
  imports(entries) {
@@ -9674,8 +10028,9 @@ assign(globalThis, {
9674
10028
  liveVar: {
9675
10029
  },
9676
10030
  onceVar: {
9677
- tameDomains: cells[32].tameDomains.set,
10031
+ default: cells[32].default.set,
9678
10032
  },
10033
+ importMeta: {},
9679
10034
  });
9680
10035
  functors[33]({
9681
10036
  imports(entries) {
@@ -9685,8 +10040,9 @@ assign(globalThis, {
9685
10040
  liveVar: {
9686
10041
  },
9687
10042
  onceVar: {
9688
- default: cells[33].default.set,
10043
+ tameDomains: cells[33].tameDomains.set,
9689
10044
  },
10045
+ importMeta: {},
9690
10046
  });
9691
10047
  functors[34]({
9692
10048
  imports(entries) {
@@ -9696,31 +10052,34 @@ assign(globalThis, {
9696
10052
  liveVar: {
9697
10053
  },
9698
10054
  onceVar: {
9699
- tameFunctionToString: cells[34].tameFunctionToString.set,
10055
+ default: cells[34].default.set,
9700
10056
  },
10057
+ importMeta: {},
9701
10058
  });
9702
10059
  functors[35]({
9703
10060
  imports(entries) {
9704
10061
  const map = new Map(entries);
9705
10062
  observeImports(map, "./commons.js", 0);
9706
- observeImports(map, "./error/assert.js", 4);
9707
10063
  },
9708
10064
  liveVar: {
9709
10065
  },
9710
10066
  onceVar: {
9711
- default: cells[35].default.set,
10067
+ tameFunctionToString: cells[35].tameFunctionToString.set,
9712
10068
  },
10069
+ importMeta: {},
9713
10070
  });
9714
10071
  functors[36]({
9715
10072
  imports(entries) {
9716
10073
  const map = new Map(entries);
9717
10074
  observeImports(map, "./commons.js", 0);
10075
+ observeImports(map, "./error/assert.js", 4);
9718
10076
  },
9719
10077
  liveVar: {
9720
10078
  },
9721
10079
  onceVar: {
9722
10080
  default: cells[36].default.set,
9723
10081
  },
10082
+ importMeta: {},
9724
10083
  });
9725
10084
  functors[37]({
9726
10085
  imports(entries) {
@@ -9732,20 +10091,34 @@ assign(globalThis, {
9732
10091
  onceVar: {
9733
10092
  default: cells[37].default.set,
9734
10093
  },
10094
+ importMeta: {},
9735
10095
  });
9736
10096
  functors[38]({
9737
10097
  imports(entries) {
9738
10098
  const map = new Map(entries);
9739
10099
  observeImports(map, "./commons.js", 0);
9740
- observeImports(map, "./whitelist.js", 14);
9741
10100
  },
9742
10101
  liveVar: {
9743
10102
  },
9744
10103
  onceVar: {
9745
10104
  default: cells[38].default.set,
9746
10105
  },
10106
+ importMeta: {},
9747
10107
  });
9748
10108
  functors[39]({
10109
+ imports(entries) {
10110
+ const map = new Map(entries);
10111
+ observeImports(map, "./commons.js", 0);
10112
+ observeImports(map, "./whitelist.js", 14);
10113
+ },
10114
+ liveVar: {
10115
+ },
10116
+ onceVar: {
10117
+ default: cells[39].default.set,
10118
+ },
10119
+ importMeta: {},
10120
+ });
10121
+ functors[40]({
9749
10122
  imports(entries) {
9750
10123
  const map = new Map(entries);
9751
10124
  observeImports(map, "./commons.js", 0);
@@ -9754,43 +10127,45 @@ assign(globalThis, {
9754
10127
  observeImports(map, "./environment-options.js", 24);
9755
10128
  observeImports(map, "./error/assert.js", 4);
9756
10129
  observeImports(map, "./error/stringify-utils.js", 2);
9757
- observeImports(map, "./error/tame-console.js", 26);
9758
- observeImports(map, "./error/tame-error-constructor.js", 28);
9759
- observeImports(map, "./get-anonymous-intrinsics.js", 29);
10130
+ observeImports(map, "./error/tame-console.js", 27);
10131
+ observeImports(map, "./error/tame-error-constructor.js", 29);
10132
+ observeImports(map, "./get-anonymous-intrinsics.js", 30);
9760
10133
  observeImports(map, "./global-object.js", 15);
9761
10134
  observeImports(map, "./intrinsics.js", 21);
9762
- observeImports(map, "./make-hardener.js", 30);
10135
+ observeImports(map, "./make-hardener.js", 31);
9763
10136
  observeImports(map, "./make-safe-evaluator.js", 10);
9764
- observeImports(map, "./tame-date-constructor.js", 31);
9765
- observeImports(map, "./tame-domains.js", 32);
9766
- observeImports(map, "./tame-function-constructors.js", 33);
9767
- observeImports(map, "./tame-function-tostring.js", 34);
9768
- observeImports(map, "./tame-locale-methods.js", 35);
9769
- observeImports(map, "./tame-math-object.js", 36);
9770
- observeImports(map, "./tame-regexp-constructor.js", 37);
9771
- observeImports(map, "./whitelist-intrinsics.js", 38);
10137
+ observeImports(map, "./tame-date-constructor.js", 32);
10138
+ observeImports(map, "./tame-domains.js", 33);
10139
+ observeImports(map, "./tame-function-constructors.js", 34);
10140
+ observeImports(map, "./tame-function-tostring.js", 35);
10141
+ observeImports(map, "./tame-locale-methods.js", 36);
10142
+ observeImports(map, "./tame-math-object.js", 37);
10143
+ observeImports(map, "./tame-regexp-constructor.js", 38);
10144
+ observeImports(map, "./whitelist-intrinsics.js", 39);
9772
10145
  observeImports(map, "./whitelist.js", 14);
9773
10146
  },
9774
10147
  liveVar: {
9775
10148
  },
9776
10149
  onceVar: {
9777
- repairIntrinsics: cells[39].repairIntrinsics.set,
9778
- lockdown: cells[39].lockdown.set,
10150
+ repairIntrinsics: cells[40].repairIntrinsics.set,
10151
+ lockdown: cells[40].lockdown.set,
9779
10152
  },
10153
+ importMeta: {},
9780
10154
  });
9781
- functors[40]({
10155
+ functors[41]({
9782
10156
  imports(entries) {
9783
10157
  const map = new Map(entries);
9784
10158
  observeImports(map, "./src/commons.js", 0);
9785
10159
  observeImports(map, "./src/compartment-shim.js", 20);
9786
10160
  observeImports(map, "./src/error/assert.js", 4);
9787
10161
  observeImports(map, "./src/intrinsics.js", 21);
9788
- observeImports(map, "./src/lockdown-shim.js", 39);
9789
- observeImports(map, "./src/tame-function-tostring.js", 34);
10162
+ observeImports(map, "./src/lockdown-shim.js", 40);
10163
+ observeImports(map, "./src/tame-function-tostring.js", 35);
9790
10164
  },
9791
10165
  liveVar: {
9792
10166
  },
9793
10167
  onceVar: {
9794
10168
  },
10169
+ importMeta: {},
9795
10170
  });
9796
10171
  })();