ses 0.18.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lockdown.cjs +185 -125
- package/dist/lockdown.mjs +185 -125
- package/dist/lockdown.umd.js +185 -125
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +185 -125
- package/dist/ses.mjs +185 -125
- package/dist/ses.umd.js +185 -125
- package/dist/ses.umd.min.js +1 -1
- package/package.json +11 -6
- package/src/enablements.js +1 -1
- package/src/error/console.js +4 -0
- package/src/error/internal-types.js +2 -2
- package/src/error/tame-console.js +38 -4
- package/src/error/types.js +4 -4
- package/src/global-object.js +8 -6
- package/src/lockdown.js +23 -6
- package/src/permits.js +2 -0
- package/types.d.ts +4 -1
package/dist/ses.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
// ses@1.0.0
|
|
1
2
|
'use strict';
|
|
2
3
|
(() => {
|
|
3
4
|
const functors = [
|
|
4
5
|
// === functors[0] ===
|
|
5
|
-
(
|
|
6
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { $h_imports([]); /* global globalThis */
|
|
6
7
|
/* eslint-disable no-restricted-globals */
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -294,10 +295,10 @@ const noEvalEvaluate= ()=> {
|
|
|
294
295
|
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_EVAL.md
|
|
295
296
|
throw TypeError('Cannot eval with evalTaming set to "noEval" (SES_NO_EVAL)');
|
|
296
297
|
};$h_once.noEvalEvaluate(noEvalEvaluate);
|
|
297
|
-
})
|
|
298
|
+
})()
|
|
298
299
|
,
|
|
299
300
|
// === functors[1] ===
|
|
300
|
-
(
|
|
301
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let TypeError;$h_imports([["./commons.js", [["TypeError", [$h_a => (TypeError = $h_a)]]]]]);
|
|
301
302
|
|
|
302
303
|
/** getThis returns globalThis in sloppy mode or undefined in strict mode. */
|
|
303
304
|
function getThis() {
|
|
@@ -308,10 +309,10 @@ if( getThis()) {
|
|
|
308
309
|
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_SLOPPY.md
|
|
309
310
|
throw TypeError( `SES failed to initialize, sloppy mode (SES_NO_SLOPPY)`);
|
|
310
311
|
}
|
|
311
|
-
})
|
|
312
|
+
})()
|
|
312
313
|
,
|
|
313
314
|
// === functors[2] ===
|
|
314
|
-
(
|
|
315
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { $h_imports([]); // @ts-check
|
|
315
316
|
|
|
316
317
|
// `@endo/env-options` needs to be imported quite early, and so should
|
|
317
318
|
// avoid importing from ses or anything that depends on ses.
|
|
@@ -404,14 +405,14 @@ const makeEnvironmentCaptor= (aGlobal)=>{
|
|
|
404
405
|
return freeze({ getEnvironmentOption, getCapturedEnvironmentOptionNames});
|
|
405
406
|
};$h_once.makeEnvironmentCaptor(makeEnvironmentCaptor);
|
|
406
407
|
freeze(makeEnvironmentCaptor);
|
|
407
|
-
})
|
|
408
|
+
})()
|
|
408
409
|
,
|
|
409
410
|
// === functors[3] ===
|
|
410
|
-
(
|
|
411
|
-
})
|
|
411
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { $h_imports([["./src/env-options.js", []]]);
|
|
412
|
+
})()
|
|
412
413
|
,
|
|
413
414
|
// === functors[4] ===
|
|
414
|
-
(
|
|
415
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let Set,String,isArray,arrayJoin,arraySlice,arraySort,arrayMap,keys,fromEntries,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h_imports([["../commons.js", [["Set", [$h_a => (Set = $h_a)]],["String", [$h_a => (String = $h_a)]],["isArray", [$h_a => (isArray = $h_a)]],["arrayJoin", [$h_a => (arrayJoin = $h_a)]],["arraySlice", [$h_a => (arraySlice = $h_a)]],["arraySort", [$h_a => (arraySort = $h_a)]],["arrayMap", [$h_a => (arrayMap = $h_a)]],["keys", [$h_a => (keys = $h_a)]],["fromEntries", [$h_a => (fromEntries = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["is", [$h_a => (is = $h_a)]],["isError", [$h_a => (isError = $h_a)]],["setAdd", [$h_a => (setAdd = $h_a)]],["setHas", [$h_a => (setHas = $h_a)]],["stringIncludes", [$h_a => (stringIncludes = $h_a)]],["stringStartsWith", [$h_a => (stringStartsWith = $h_a)]],["stringifyJson", [$h_a => (stringifyJson = $h_a)]],["toStringTagSymbol", [$h_a => (toStringTagSymbol = $h_a)]]]]]);
|
|
415
416
|
|
|
416
417
|
|
|
417
418
|
|
|
@@ -603,16 +604,16 @@ const bestEffortStringify= (payload, spaces= undefined)=> {
|
|
|
603
604
|
}
|
|
604
605
|
};$h_once.bestEffortStringify(bestEffortStringify);
|
|
605
606
|
freeze(bestEffortStringify);
|
|
606
|
-
})
|
|
607
|
+
})()
|
|
607
608
|
,
|
|
608
609
|
// === functors[5] ===
|
|
609
|
-
(
|
|
610
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { $h_imports([]); // @ts-check
|
|
610
611
|
|
|
611
612
|
/**
|
|
612
613
|
* @callback BaseAssert
|
|
613
614
|
* The `assert` function itself.
|
|
614
615
|
*
|
|
615
|
-
* @param {
|
|
616
|
+
* @param {any} flag The truthy/falsy value
|
|
616
617
|
* @param {Details=} optDetails The details to throw
|
|
617
618
|
* @param {ErrorConstructor=} ErrorConstructor An optional alternate error
|
|
618
619
|
* constructor to use.
|
|
@@ -659,8 +660,8 @@ freeze(bestEffortStringify);
|
|
|
659
660
|
* The `assert.equal` method
|
|
660
661
|
*
|
|
661
662
|
* Assert that two values must be `Object.is`.
|
|
662
|
-
* @param {
|
|
663
|
-
* @param {
|
|
663
|
+
* @param {any} actual The value we received
|
|
664
|
+
* @param {any} expected What we wanted
|
|
664
665
|
* @param {Details=} optDetails The details to throw
|
|
665
666
|
* @param {ErrorConstructor=} ErrorConstructor An optional alternate error
|
|
666
667
|
* constructor to use.
|
|
@@ -809,7 +810,7 @@ freeze(bestEffortStringify);
|
|
|
809
810
|
* ```
|
|
810
811
|
*
|
|
811
812
|
* @callback AssertQuote
|
|
812
|
-
* @param {
|
|
813
|
+
* @param {any} payload What to declassify
|
|
813
814
|
* @param {(string|number)=} spaces
|
|
814
815
|
* @returns {StringablePayload} The declassified payload
|
|
815
816
|
*/
|
|
@@ -1011,10 +1012,10 @@ freeze(bestEffortStringify);
|
|
|
1011
1012
|
* @param {string=} topic
|
|
1012
1013
|
* @returns {VirtualConsole}
|
|
1013
1014
|
*/
|
|
1014
|
-
})
|
|
1015
|
+
})()
|
|
1015
1016
|
,
|
|
1016
1017
|
// === functors[6] ===
|
|
1017
|
-
(
|
|
1018
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { $h_imports([]); // @ts-check
|
|
1018
1019
|
|
|
1019
1020
|
/**
|
|
1020
1021
|
* @typedef {readonly any[]} LogArgs
|
|
@@ -1099,14 +1100,14 @@ freeze(bestEffortStringify);
|
|
|
1099
1100
|
* calls methods of the `loggedErrorHandler` to customize how it handles logged
|
|
1100
1101
|
* errors.
|
|
1101
1102
|
*
|
|
1102
|
-
* @param {VirtualConsole} baseConsole
|
|
1103
|
+
* @param {VirtualConsole | undefined} baseConsole
|
|
1103
1104
|
* @param {LoggedErrorHandler} loggedErrorHandler
|
|
1104
|
-
* @returns {VirtualConsole}
|
|
1105
|
+
* @returns {VirtualConsole | undefined}
|
|
1105
1106
|
*/
|
|
1106
|
-
})
|
|
1107
|
+
})()
|
|
1107
1108
|
,
|
|
1108
1109
|
// === functors[7] ===
|
|
1109
|
-
(
|
|
1110
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { $h_imports([["./internal-types.js", []]]);
|
|
1110
1111
|
|
|
1111
1112
|
|
|
1112
1113
|
|
|
@@ -1383,10 +1384,10 @@ const makeNoteLogArgsArrayKit= (
|
|
|
1383
1384
|
|
|
1384
1385
|
};$h_once.makeNoteLogArgsArrayKit(makeNoteLogArgsArrayKit);
|
|
1385
1386
|
freeze(makeNoteLogArgsArrayKit);
|
|
1386
|
-
})
|
|
1387
|
+
})()
|
|
1387
1388
|
,
|
|
1388
1389
|
// === functors[8] ===
|
|
1389
|
-
(
|
|
1390
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,globalThis,is,isError,regexpTest,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,an,bestEffortStringify,makeNoteLogArgsArrayKit;$h_imports([["../commons.js", [["RangeError", [$h_a => (RangeError = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["WeakMap", [$h_a => (WeakMap = $h_a)]],["arrayJoin", [$h_a => (arrayJoin = $h_a)]],["arrayMap", [$h_a => (arrayMap = $h_a)]],["arrayPop", [$h_a => (arrayPop = $h_a)]],["arrayPush", [$h_a => (arrayPush = $h_a)]],["assign", [$h_a => (assign = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["globalThis", [$h_a => (globalThis = $h_a)]],["is", [$h_a => (is = $h_a)]],["isError", [$h_a => (isError = $h_a)]],["regexpTest", [$h_a => (regexpTest = $h_a)]],["stringIndexOf", [$h_a => (stringIndexOf = $h_a)]],["stringReplace", [$h_a => (stringReplace = $h_a)]],["stringSlice", [$h_a => (stringSlice = $h_a)]],["stringStartsWith", [$h_a => (stringStartsWith = $h_a)]],["weakmapDelete", [$h_a => (weakmapDelete = $h_a)]],["weakmapGet", [$h_a => (weakmapGet = $h_a)]],["weakmapHas", [$h_a => (weakmapHas = $h_a)]],["weakmapSet", [$h_a => (weakmapSet = $h_a)]]]],["./stringify-utils.js", [["an", [$h_a => (an = $h_a)]],["bestEffortStringify", [$h_a => (bestEffortStringify = $h_a)]]]],["./types.js", []],["./internal-types.js", []],["./note-log-args.js", [["makeNoteLogArgsArrayKit", [$h_a => (makeNoteLogArgsArrayKit = $h_a)]]]]]);
|
|
1390
1391
|
|
|
1391
1392
|
|
|
1392
1393
|
|
|
@@ -1855,10 +1856,10 @@ freeze(makeAssert);
|
|
|
1855
1856
|
|
|
1856
1857
|
/** @type {Assert} */
|
|
1857
1858
|
const assert= makeAssert();$h_once.assert(assert);
|
|
1858
|
-
})
|
|
1859
|
+
})()
|
|
1859
1860
|
,
|
|
1860
1861
|
// === functors[9] ===
|
|
1861
|
-
(
|
|
1862
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let Set,String,TypeError,WeakMap,WeakSet,globalThis,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)]],["globalThis", [$h_a => (globalThis = $h_a)]],["apply", [$h_a => (apply = $h_a)]],["arrayForEach", [$h_a => (arrayForEach = $h_a)]],["defineProperty", [$h_a => (defineProperty = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["getOwnPropertyDescriptor", [$h_a => (getOwnPropertyDescriptor = $h_a)]],["getOwnPropertyDescriptors", [$h_a => (getOwnPropertyDescriptors = $h_a)]],["getPrototypeOf", [$h_a => (getPrototypeOf = $h_a)]],["isInteger", [$h_a => (isInteger = $h_a)]],["isObject", [$h_a => (isObject = $h_a)]],["objectHasOwnProperty", [$h_a => (objectHasOwnProperty = $h_a)]],["ownKeys", [$h_a => (ownKeys = $h_a)]],["preventExtensions", [$h_a => (preventExtensions = $h_a)]],["setAdd", [$h_a => (setAdd = $h_a)]],["setForEach", [$h_a => (setForEach = $h_a)]],["setHas", [$h_a => (setHas = $h_a)]],["toStringTagSymbol", [$h_a => (toStringTagSymbol = $h_a)]],["typedArrayPrototype", [$h_a => (typedArrayPrototype = $h_a)]],["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)]]]]]);
|
|
1862
1863
|
|
|
1863
1864
|
|
|
1864
1865
|
|
|
@@ -2105,10 +2106,10 @@ const makeHardener= ()=> {
|
|
|
2105
2106
|
|
|
2106
2107
|
return harden;
|
|
2107
2108
|
};$h_once.makeHardener(makeHardener);
|
|
2108
|
-
})
|
|
2109
|
+
})()
|
|
2109
2110
|
,
|
|
2110
2111
|
// === functors[10] ===
|
|
2111
|
-
(
|
|
2112
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { $h_imports([]); /* eslint-disable no-restricted-globals */
|
|
2112
2113
|
/**
|
|
2113
2114
|
* @file Exports {@code whitelist}, a recursively defined
|
|
2114
2115
|
* JSON record enumerating all intrinsics and their properties
|
|
@@ -3524,6 +3525,8 @@ const permitted= {
|
|
|
3524
3525
|
race: fn,
|
|
3525
3526
|
reject: fn,
|
|
3526
3527
|
resolve: fn,
|
|
3528
|
+
// https://github.com/tc39/proposal-promise-with-resolvers
|
|
3529
|
+
withResolvers: fn,
|
|
3527
3530
|
'@@species': getter},
|
|
3528
3531
|
|
|
3529
3532
|
|
|
@@ -3622,10 +3625,10 @@ const permitted= {
|
|
|
3622
3625
|
harden: { ...fn, isFake: 'boolean'},
|
|
3623
3626
|
|
|
3624
3627
|
'%InitialGetStackString%': fn};$h_once.permitted(permitted);
|
|
3625
|
-
})
|
|
3628
|
+
})()
|
|
3626
3629
|
,
|
|
3627
3630
|
// === functors[11] ===
|
|
3628
|
-
(
|
|
3631
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let TypeError,WeakSet,arrayFilter,create,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,permitted;$h_imports([["./commons.js", [["TypeError", [$h_a => (TypeError = $h_a)]],["WeakSet", [$h_a => (WeakSet = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $h_a)]],["create", [$h_a => (create = $h_a)]],["defineProperty", [$h_a => (defineProperty = $h_a)]],["entries", [$h_a => (entries = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["getOwnPropertyDescriptor", [$h_a => (getOwnPropertyDescriptor = $h_a)]],["getOwnPropertyDescriptors", [$h_a => (getOwnPropertyDescriptors = $h_a)]],["globalThis", [$h_a => (globalThis = $h_a)]],["is", [$h_a => (is = $h_a)]],["isObject", [$h_a => (isObject = $h_a)]],["objectHasOwnProperty", [$h_a => (objectHasOwnProperty = $h_a)]],["values", [$h_a => (values = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]],["./permits.js", [["constantProperties", [$h_a => (constantProperties = $h_a)]],["sharedGlobalPropertyNames", [$h_a => (sharedGlobalPropertyNames = $h_a)]],["universalPropertyNames", [$h_a => (universalPropertyNames = $h_a)]],["permitted", [$h_a => (permitted = $h_a)]]]]]);
|
|
3629
3632
|
|
|
3630
3633
|
|
|
3631
3634
|
|
|
@@ -3799,10 +3802,10 @@ const getGlobalIntrinsics= (globalObject)=>{
|
|
|
3799
3802
|
|
|
3800
3803
|
return finalIntrinsics();
|
|
3801
3804
|
};$h_once.getGlobalIntrinsics(getGlobalIntrinsics);
|
|
3802
|
-
})
|
|
3805
|
+
})()
|
|
3803
3806
|
,
|
|
3804
3807
|
// === functors[12] ===
|
|
3805
|
-
(
|
|
3808
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let permitted,FunctionInstance,isAccessorPermit,Map,String,Symbol,TypeError,arrayFilter,arrayIncludes,arrayMap,entries,getOwnPropertyDescriptor,getPrototypeOf,isObject,mapGet,objectHasOwnProperty,ownKeys,symbolKeyFor;$h_imports([["./permits.js", [["permitted", [$h_a => (permitted = $h_a)]],["FunctionInstance", [$h_a => (FunctionInstance = $h_a)]],["isAccessorPermit", [$h_a => (isAccessorPermit = $h_a)]]]],["./commons.js", [["Map", [$h_a => (Map = $h_a)]],["String", [$h_a => (String = $h_a)]],["Symbol", [$h_a => (Symbol = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $h_a)]],["arrayIncludes", [$h_a => (arrayIncludes = $h_a)]],["arrayMap", [$h_a => (arrayMap = $h_a)]],["entries", [$h_a => (entries = $h_a)]],["getOwnPropertyDescriptor", [$h_a => (getOwnPropertyDescriptor = $h_a)]],["getPrototypeOf", [$h_a => (getPrototypeOf = $h_a)]],["isObject", [$h_a => (isObject = $h_a)]],["mapGet", [$h_a => (mapGet = $h_a)]],["objectHasOwnProperty", [$h_a => (objectHasOwnProperty = $h_a)]],["ownKeys", [$h_a => (ownKeys = $h_a)]],["symbolKeyFor", [$h_a => (symbolKeyFor = $h_a)]]]]]);
|
|
3806
3809
|
|
|
3807
3810
|
|
|
3808
3811
|
|
|
@@ -4118,10 +4121,10 @@ function whitelistIntrinsics(
|
|
|
4118
4121
|
// removed from the global object by the whitelisting operation.
|
|
4119
4122
|
visitProperties('intrinsics', intrinsics, permitted);
|
|
4120
4123
|
}$h_once.default( whitelistIntrinsics);
|
|
4121
|
-
})
|
|
4124
|
+
})()
|
|
4122
4125
|
,
|
|
4123
4126
|
// === functors[13] ===
|
|
4124
|
-
(
|
|
4127
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf,freeze;$h_imports([["./commons.js", [["FERAL_FUNCTION", [$h_a => (FERAL_FUNCTION = $h_a)]],["SyntaxError", [$h_a => (SyntaxError = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["defineProperties", [$h_a => (defineProperties = $h_a)]],["getPrototypeOf", [$h_a => (getPrototypeOf = $h_a)]],["setPrototypeOf", [$h_a => (setPrototypeOf = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]]]]]);
|
|
4125
4128
|
|
|
4126
4129
|
|
|
4127
4130
|
|
|
@@ -4257,10 +4260,10 @@ function tameFunctionConstructors() {
|
|
|
4257
4260
|
|
|
4258
4261
|
return newIntrinsics;
|
|
4259
4262
|
}$h_once.default( tameFunctionConstructors);
|
|
4260
|
-
})
|
|
4263
|
+
})()
|
|
4261
4264
|
,
|
|
4262
4265
|
// === functors[14] ===
|
|
4263
|
-
(
|
|
4266
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
4264
4267
|
|
|
4265
4268
|
|
|
4266
4269
|
|
|
@@ -4390,10 +4393,10 @@ function tameDateConstructor(dateTaming= 'safe') {
|
|
|
4390
4393
|
'%SharedDate%': SharedDate};
|
|
4391
4394
|
|
|
4392
4395
|
}$h_once.default( tameDateConstructor);
|
|
4393
|
-
})
|
|
4396
|
+
})()
|
|
4394
4397
|
,
|
|
4395
4398
|
// === functors[15] ===
|
|
4396
|
-
(
|
|
4399
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
4397
4400
|
|
|
4398
4401
|
|
|
4399
4402
|
|
|
@@ -4437,10 +4440,10 @@ function tameMathObject(mathTaming= 'safe') {
|
|
|
4437
4440
|
'%SharedMath%': sharedMath};
|
|
4438
4441
|
|
|
4439
4442
|
}$h_once.default( tameMathObject);
|
|
4440
|
-
})
|
|
4443
|
+
})()
|
|
4441
4444
|
,
|
|
4442
4445
|
// === functors[16] ===
|
|
4443
|
-
(
|
|
4446
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
4444
4447
|
|
|
4445
4448
|
|
|
4446
4449
|
|
|
@@ -4501,10 +4504,10 @@ function tameRegExpConstructor(regExpTaming= 'safe') {
|
|
|
4501
4504
|
'%SharedRegExp%': SharedRegExp};
|
|
4502
4505
|
|
|
4503
4506
|
}$h_once.default( tameRegExpConstructor);
|
|
4504
|
-
})
|
|
4507
|
+
})()
|
|
4505
4508
|
,
|
|
4506
4509
|
// === functors[17] ===
|
|
4507
|
-
(
|
|
4510
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { $h_imports([]); /**
|
|
4508
4511
|
* @file Exports {@code enablements}, a recursively defined
|
|
4509
4512
|
* JSON record defining the optimum set of intrinsics properties
|
|
4510
4513
|
* that need to be "repaired" before hardening is applied on
|
|
@@ -4699,7 +4702,7 @@ const severeEnablements= {
|
|
|
4699
4702
|
* With the `'*'` setting here, all the properties inherited from
|
|
4700
4703
|
* `Object.prototype` are accessors, creating an unusable display as seen
|
|
4701
4704
|
* at As explained at
|
|
4702
|
-
* https://github.com/endojs/endo/blob/master/packages/ses/lockdown
|
|
4705
|
+
* https://github.com/endojs/endo/blob/master/packages/ses/docs/lockdown.md#overridetaming-options
|
|
4703
4706
|
* Open the triangles at the bottom of that section.
|
|
4704
4707
|
*/
|
|
4705
4708
|
'%ObjectPrototype%': '*',
|
|
@@ -4724,10 +4727,10 @@ const severeEnablements= {
|
|
|
4724
4727
|
* is accepted.
|
|
4725
4728
|
*/
|
|
4726
4729
|
'%SetPrototype%': '*'};$h_once.severeEnablements(severeEnablements);
|
|
4727
|
-
})
|
|
4730
|
+
})()
|
|
4728
4731
|
,
|
|
4729
4732
|
// === functors[18] ===
|
|
4730
|
-
(
|
|
4733
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
4731
4734
|
|
|
4732
4735
|
|
|
4733
4736
|
|
|
@@ -4931,10 +4934,10 @@ function enablePropertyOverrides(
|
|
|
4931
4934
|
// Do the repair.
|
|
4932
4935
|
enableProperties('root', intrinsics, plan);
|
|
4933
4936
|
}$h_once.default( enablePropertyOverrides);
|
|
4934
|
-
})
|
|
4937
|
+
})()
|
|
4935
4938
|
,
|
|
4936
4939
|
// === functors[19] ===
|
|
4937
|
-
(
|
|
4940
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
4938
4941
|
|
|
4939
4942
|
|
|
4940
4943
|
|
|
@@ -5015,10 +5018,10 @@ function tameLocaleMethods(intrinsics, localeTaming= 'safe') {
|
|
|
5015
5018
|
value: numberToString});
|
|
5016
5019
|
|
|
5017
5020
|
}$h_once.default( tameLocaleMethods);
|
|
5018
|
-
})
|
|
5021
|
+
})()
|
|
5019
5022
|
,
|
|
5020
5023
|
// === functors[20] ===
|
|
5021
|
-
(
|
|
5024
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { $h_imports([]); /**
|
|
5022
5025
|
* makeEvalFunction()
|
|
5023
5026
|
* A safe version of the native eval function which relies on
|
|
5024
5027
|
* the safety of safeEvaluate for confinement.
|
|
@@ -5045,10 +5048,10 @@ const makeEvalFunction= (safeEvaluate)=>{
|
|
|
5045
5048
|
|
|
5046
5049
|
return newEval;
|
|
5047
5050
|
};$h_once.makeEvalFunction(makeEvalFunction);
|
|
5048
|
-
})
|
|
5051
|
+
})()
|
|
5049
5052
|
,
|
|
5050
5053
|
// === functors[21] ===
|
|
5051
|
-
(
|
|
5054
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
5052
5055
|
|
|
5053
5056
|
|
|
5054
5057
|
|
|
@@ -5126,10 +5129,10 @@ const makeFunctionConstructor= (safeEvaluate)=>{
|
|
|
5126
5129
|
|
|
5127
5130
|
return newFunction;
|
|
5128
5131
|
};$h_once.makeFunctionConstructor(makeFunctionConstructor);
|
|
5129
|
-
})
|
|
5132
|
+
})()
|
|
5130
5133
|
,
|
|
5131
5134
|
// === functors[22] ===
|
|
5132
|
-
(
|
|
5135
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let TypeError,assign,create,defineProperty,entries,freeze,objectHasOwnProperty,unscopablesSymbol,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h_imports([["./commons.js", [["TypeError", [$h_a => (TypeError = $h_a)]],["assign", [$h_a => (assign = $h_a)]],["create", [$h_a => (create = $h_a)]],["defineProperty", [$h_a => (defineProperty = $h_a)]],["entries", [$h_a => (entries = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["objectHasOwnProperty", [$h_a => (objectHasOwnProperty = $h_a)]],["unscopablesSymbol", [$h_a => (unscopablesSymbol = $h_a)]]]],["./make-eval-function.js", [["makeEvalFunction", [$h_a => (makeEvalFunction = $h_a)]]]],["./make-function-constructor.js", [["makeFunctionConstructor", [$h_a => (makeFunctionConstructor = $h_a)]]]],["./permits.js", [["constantProperties", [$h_a => (constantProperties = $h_a)]],["universalPropertyNames", [$h_a => (universalPropertyNames = $h_a)]]]]]);
|
|
5133
5136
|
|
|
5134
5137
|
|
|
5135
5138
|
|
|
@@ -5241,10 +5244,12 @@ const setGlobalObjectMutableProperties= (
|
|
|
5241
5244
|
globalThis: globalObject};
|
|
5242
5245
|
|
|
5243
5246
|
|
|
5244
|
-
perCompartmentGlobals.Compartment=
|
|
5245
|
-
makeCompartmentConstructor
|
|
5246
|
-
|
|
5247
|
-
|
|
5247
|
+
perCompartmentGlobals.Compartment= freeze(
|
|
5248
|
+
makeCompartmentConstructor(
|
|
5249
|
+
makeCompartmentConstructor,
|
|
5250
|
+
intrinsics,
|
|
5251
|
+
markVirtualizedNativeFunction));
|
|
5252
|
+
|
|
5248
5253
|
|
|
5249
5254
|
|
|
5250
5255
|
// TODO These should still be tamed according to the whitelist before
|
|
@@ -5276,7 +5281,7 @@ const setGlobalObjectEvaluators= (
|
|
|
5276
5281
|
markVirtualizedNativeFunction)=>
|
|
5277
5282
|
{
|
|
5278
5283
|
{
|
|
5279
|
-
const f= makeEvalFunction(evaluator);
|
|
5284
|
+
const f= freeze(makeEvalFunction(evaluator));
|
|
5280
5285
|
markVirtualizedNativeFunction(f);
|
|
5281
5286
|
defineProperty(globalObject, 'eval', {
|
|
5282
5287
|
value: f,
|
|
@@ -5286,7 +5291,7 @@ const setGlobalObjectEvaluators= (
|
|
|
5286
5291
|
|
|
5287
5292
|
}
|
|
5288
5293
|
{
|
|
5289
|
-
const f= makeFunctionConstructor(evaluator);
|
|
5294
|
+
const f= freeze(makeFunctionConstructor(evaluator));
|
|
5290
5295
|
markVirtualizedNativeFunction(f);
|
|
5291
5296
|
defineProperty(globalObject, 'Function', {
|
|
5292
5297
|
value: f,
|
|
@@ -5296,10 +5301,10 @@ const setGlobalObjectEvaluators= (
|
|
|
5296
5301
|
|
|
5297
5302
|
}
|
|
5298
5303
|
};$h_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
|
|
5299
|
-
})
|
|
5304
|
+
})()
|
|
5300
5305
|
,
|
|
5301
5306
|
// === functors[23] ===
|
|
5302
|
-
(
|
|
5307
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let Proxy,String,TypeError,ReferenceError,create,freeze,getOwnPropertyDescriptors,globalThis,immutableObject,assert;$h_imports([["./commons.js", [["Proxy", [$h_a => (Proxy = $h_a)]],["String", [$h_a => (String = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["ReferenceError", [$h_a => (ReferenceError = $h_a)]],["create", [$h_a => (create = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["getOwnPropertyDescriptors", [$h_a => (getOwnPropertyDescriptors = $h_a)]],["globalThis", [$h_a => (globalThis = $h_a)]],["immutableObject", [$h_a => (immutableObject = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
5303
5308
|
|
|
5304
5309
|
|
|
5305
5310
|
|
|
@@ -5391,10 +5396,10 @@ const strictScopeTerminatorHandler= freeze(
|
|
|
5391
5396
|
const strictScopeTerminator= new Proxy(
|
|
5392
5397
|
immutableObject,
|
|
5393
5398
|
strictScopeTerminatorHandler);$h_once.strictScopeTerminator(strictScopeTerminator);
|
|
5394
|
-
})
|
|
5399
|
+
})()
|
|
5395
5400
|
,
|
|
5396
5401
|
// === functors[24] ===
|
|
5397
|
-
(
|
|
5402
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let Proxy,create,freeze,getOwnPropertyDescriptors,immutableObject,reflectSet,strictScopeTerminatorHandler,alwaysThrowHandler;$h_imports([["./commons.js", [["Proxy", [$h_a => (Proxy = $h_a)]],["create", [$h_a => (create = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["getOwnPropertyDescriptors", [$h_a => (getOwnPropertyDescriptors = $h_a)]],["immutableObject", [$h_a => (immutableObject = $h_a)]],["reflectSet", [$h_a => (reflectSet = $h_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminatorHandler", [$h_a => (strictScopeTerminatorHandler = $h_a)]],["alwaysThrowHandler", [$h_a => (alwaysThrowHandler = $h_a)]]]]]);
|
|
5398
5403
|
|
|
5399
5404
|
|
|
5400
5405
|
|
|
@@ -5448,10 +5453,10 @@ const createSloppyGlobalsScopeTerminator= (globalObject)=>{
|
|
|
5448
5453
|
return sloppyGlobalsScopeTerminator;
|
|
5449
5454
|
};$h_once.createSloppyGlobalsScopeTerminator(createSloppyGlobalsScopeTerminator);
|
|
5450
5455
|
freeze(createSloppyGlobalsScopeTerminator);
|
|
5451
|
-
})
|
|
5456
|
+
})()
|
|
5452
5457
|
,
|
|
5453
5458
|
// === functors[25] ===
|
|
5454
|
-
(
|
|
5459
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let FERAL_EVAL,create,defineProperties,freeze,assert;$h_imports([["./commons.js", [["FERAL_EVAL", [$h_a => (FERAL_EVAL = $h_a)]],["create", [$h_a => (create = $h_a)]],["defineProperties", [$h_a => (defineProperties = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
5455
5460
|
|
|
5456
5461
|
|
|
5457
5462
|
|
|
@@ -5540,10 +5545,10 @@ const makeEvalScopeKit= ()=> {
|
|
|
5540
5545
|
|
|
5541
5546
|
return evalScopeKit;
|
|
5542
5547
|
};$h_once.makeEvalScopeKit(makeEvalScopeKit);
|
|
5543
|
-
})
|
|
5548
|
+
})()
|
|
5544
5549
|
,
|
|
5545
5550
|
// === functors[26] ===
|
|
5546
|
-
(
|
|
5551
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
5547
5552
|
|
|
5548
5553
|
// Captures a key and value of the form #key=value or @key=value
|
|
5549
5554
|
const sourceMetaEntryRegExp=
|
|
@@ -5593,10 +5598,10 @@ const getSourceURL= (src)=>{
|
|
|
5593
5598
|
|
|
5594
5599
|
return sourceURL;
|
|
5595
5600
|
};$h_once.getSourceURL(getSourceURL);
|
|
5596
|
-
})
|
|
5601
|
+
})()
|
|
5597
5602
|
,
|
|
5598
5603
|
// === functors[27] ===
|
|
5599
|
-
(
|
|
5604
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,freeze,getSourceURL;$h_imports([["./commons.js", [["FERAL_REG_EXP", [$h_a => (FERAL_REG_EXP = $h_a)]],["SyntaxError", [$h_a => (SyntaxError = $h_a)]],["stringReplace", [$h_a => (stringReplace = $h_a)]],["stringSearch", [$h_a => (stringSearch = $h_a)]],["stringSlice", [$h_a => (stringSlice = $h_a)]],["stringSplit", [$h_a => (stringSplit = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]]]],["./get-source-url.js", [["getSourceURL", [$h_a => (getSourceURL = $h_a)]]]]]);
|
|
5600
5605
|
|
|
5601
5606
|
|
|
5602
5607
|
|
|
@@ -5861,10 +5866,10 @@ $h_once.applyTransforms(applyTransforms);const transforms=freeze({
|
|
|
5861
5866
|
rejectSomeDirectEvalExpressions: freeze(rejectSomeDirectEvalExpressions),
|
|
5862
5867
|
mandatoryTransforms: freeze(mandatoryTransforms),
|
|
5863
5868
|
applyTransforms: freeze(applyTransforms)});$h_once.transforms(transforms);
|
|
5864
|
-
})
|
|
5869
|
+
})()
|
|
5865
5870
|
,
|
|
5866
5871
|
// === functors[28] ===
|
|
5867
|
-
(
|
|
5872
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
5868
5873
|
|
|
5869
5874
|
|
|
5870
5875
|
|
|
@@ -6044,10 +6049,10 @@ const getScopeConstants= (globalObject, moduleLexicals= {})=> {
|
|
|
6044
6049
|
moduleLexicalConstants};
|
|
6045
6050
|
|
|
6046
6051
|
};$h_once.getScopeConstants(getScopeConstants);
|
|
6047
|
-
})
|
|
6052
|
+
})()
|
|
6048
6053
|
,
|
|
6049
6054
|
// === functors[29] ===
|
|
6050
|
-
(
|
|
6055
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let FERAL_FUNCTION,arrayJoin,apply,getScopeConstants;$h_imports([["./commons.js", [["FERAL_FUNCTION", [$h_a => (FERAL_FUNCTION = $h_a)]],["arrayJoin", [$h_a => (arrayJoin = $h_a)]],["apply", [$h_a => (apply = $h_a)]]]],["./scope-constants.js", [["getScopeConstants", [$h_a => (getScopeConstants = $h_a)]]]]]);
|
|
6051
6056
|
|
|
6052
6057
|
|
|
6053
6058
|
|
|
@@ -6157,10 +6162,10 @@ const makeEvaluate= (context)=>{
|
|
|
6157
6162
|
|
|
6158
6163
|
return apply(evaluateFactory, context, []);
|
|
6159
6164
|
};$h_once.makeEvaluate(makeEvaluate);
|
|
6160
|
-
})
|
|
6165
|
+
})()
|
|
6161
6166
|
,
|
|
6162
6167
|
// === functors[30] ===
|
|
6163
|
-
(
|
|
6168
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let apply,freeze,strictScopeTerminator,createSloppyGlobalsScopeTerminator,makeEvalScopeKit,applyTransforms,mandatoryTransforms,makeEvaluate,assert;$h_imports([["./commons.js", [["apply", [$h_a => (apply = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminator", [$h_a => (strictScopeTerminator = $h_a)]]]],["./sloppy-globals-scope-terminator.js", [["createSloppyGlobalsScopeTerminator", [$h_a => (createSloppyGlobalsScopeTerminator = $h_a)]]]],["./eval-scope.js", [["makeEvalScopeKit", [$h_a => (makeEvalScopeKit = $h_a)]]]],["./transforms.js", [["applyTransforms", [$h_a => (applyTransforms = $h_a)]],["mandatoryTransforms", [$h_a => (mandatoryTransforms = $h_a)]]]],["./make-evaluate.js", [["makeEvaluate", [$h_a => (makeEvaluate = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
6164
6169
|
|
|
6165
6170
|
|
|
6166
6171
|
|
|
@@ -6270,10 +6275,10 @@ const makeSafeEvaluator= ({
|
|
|
6270
6275
|
|
|
6271
6276
|
return { safeEvaluate};
|
|
6272
6277
|
};$h_once.makeSafeEvaluator(makeSafeEvaluator);
|
|
6273
|
-
})
|
|
6278
|
+
})()
|
|
6274
6279
|
,
|
|
6275
6280
|
// === functors[31] ===
|
|
6276
|
-
(
|
|
6281
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
6277
6282
|
|
|
6278
6283
|
|
|
6279
6284
|
|
|
@@ -6323,10 +6328,10 @@ const tameFunctionToString= ()=> {
|
|
|
6323
6328
|
}
|
|
6324
6329
|
return markVirtualizedNativeFunction;
|
|
6325
6330
|
};$h_once.tameFunctionToString(tameFunctionToString);
|
|
6326
|
-
})
|
|
6331
|
+
})()
|
|
6327
6332
|
,
|
|
6328
6333
|
// === functors[32] ===
|
|
6329
|
-
(
|
|
6334
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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);
|
|
6330
6335
|
|
|
6331
6336
|
|
|
6332
6337
|
|
|
@@ -6373,10 +6378,10 @@ function tameDomains(domainTaming= 'safe') {
|
|
|
6373
6378
|
|
|
6374
6379
|
}
|
|
6375
6380
|
}
|
|
6376
|
-
})
|
|
6381
|
+
})()
|
|
6377
6382
|
,
|
|
6378
6383
|
// === functors[33] ===
|
|
6379
|
-
(
|
|
6384
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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", []]]);
|
|
6380
6385
|
|
|
6381
6386
|
|
|
6382
6387
|
|
|
@@ -6552,6 +6557,10 @@ freeze(ErrorInfo);
|
|
|
6552
6557
|
|
|
6553
6558
|
/** @type {MakeCausalConsole} */
|
|
6554
6559
|
const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
6560
|
+
if( !baseConsole) {
|
|
6561
|
+
return undefined;
|
|
6562
|
+
}
|
|
6563
|
+
|
|
6555
6564
|
const { getStackString, tagError, takeMessageLogArgs, takeNoteLogArgsArray}=
|
|
6556
6565
|
loggedErrorHandler;
|
|
6557
6566
|
|
|
@@ -6755,10 +6764,10 @@ const filterConsole= (baseConsole, filter, _topic= undefined)=> {
|
|
|
6755
6764
|
return (/** @type {VirtualConsole} */ freeze(filteringConsole));
|
|
6756
6765
|
};$h_once.filterConsole(filterConsole);
|
|
6757
6766
|
freeze(filterConsole);
|
|
6758
|
-
})
|
|
6767
|
+
})()
|
|
6759
6768
|
,
|
|
6760
6769
|
// === functors[34] ===
|
|
6761
|
-
(
|
|
6770
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
6762
6771
|
|
|
6763
6772
|
|
|
6764
6773
|
|
|
@@ -6880,10 +6889,15 @@ const makeRejectionHandlers= (reportReason)=>{
|
|
|
6880
6889
|
processTerminationHandler};
|
|
6881
6890
|
|
|
6882
6891
|
};$h_once.makeRejectionHandlers(makeRejectionHandlers);
|
|
6883
|
-
})
|
|
6892
|
+
})()
|
|
6884
6893
|
,
|
|
6885
6894
|
// === functors[35] ===
|
|
6886
|
-
(
|
|
6895
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let TypeError,apply,defineProperty,freeze,globalThis,defaultHandler,makeCausalConsole,makeRejectionHandlers;$h_imports([["../commons.js", [["TypeError", [$h_a => (TypeError = $h_a)]],["apply", [$h_a => (apply = $h_a)]],["defineProperty", [$h_a => (defineProperty = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["globalThis", [$h_a => (globalThis = $h_a)]]]],["./assert.js", [["loggedErrorHandler", [$h_a => (defaultHandler = $h_a)]]]],["./console.js", [["makeCausalConsole", [$h_a => (makeCausalConsole = $h_a)]]]],["./unhandled-rejection.js", [["makeRejectionHandlers", [$h_a => (makeRejectionHandlers = $h_a)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
6896
|
+
|
|
6897
|
+
|
|
6898
|
+
|
|
6899
|
+
|
|
6900
|
+
|
|
6887
6901
|
|
|
6888
6902
|
|
|
6889
6903
|
|
|
@@ -6892,8 +6906,36 @@ const makeRejectionHandlers= (reportReason)=>{
|
|
|
6892
6906
|
|
|
6893
6907
|
|
|
6894
6908
|
|
|
6909
|
+
|
|
6910
|
+
const wrapLogger= (logger, thisArg)=>
|
|
6911
|
+
freeze((...args)=> apply(logger, thisArg, args));
|
|
6912
|
+
|
|
6895
6913
|
// eslint-disable-next-line no-restricted-globals
|
|
6896
|
-
const originalConsole=
|
|
6914
|
+
const originalConsole= /** @type {VirtualConsole} */
|
|
6915
|
+
// eslint-disable-next-line no-nested-ternary
|
|
6916
|
+
typeof console!== 'undefined'?
|
|
6917
|
+
console:
|
|
6918
|
+
typeof print=== 'function'?
|
|
6919
|
+
// Make a good-enough console for eshost (including only functions that
|
|
6920
|
+
// log at a specific level with no special argument interpretation).
|
|
6921
|
+
// https://console.spec.whatwg.org/#logging
|
|
6922
|
+
((p)=>freeze({ debug: p, log: p, info: p, warn: p, error: p}))(
|
|
6923
|
+
// eslint-disable-next-line no-undef
|
|
6924
|
+
wrapLogger(print)):
|
|
6925
|
+
|
|
6926
|
+
undefined;
|
|
6927
|
+
|
|
6928
|
+
|
|
6929
|
+
// Upgrade a log-only console (as in `eshost -h SpiderMonkey`).
|
|
6930
|
+
if( originalConsole&& originalConsole.log) {
|
|
6931
|
+
for( const methodName of ['warn', 'error']) {
|
|
6932
|
+
if( !originalConsole[methodName]) {
|
|
6933
|
+
defineProperty(originalConsole, methodName, {
|
|
6934
|
+
value: wrapLogger(originalConsole.log, originalConsole)});
|
|
6935
|
+
|
|
6936
|
+
}
|
|
6937
|
+
}
|
|
6938
|
+
}
|
|
6897
6939
|
|
|
6898
6940
|
/**
|
|
6899
6941
|
* Wrap console unless suppressed.
|
|
@@ -6925,11 +6967,12 @@ const tameConsole= (
|
|
|
6925
6967
|
getStackString: optGetStackString};
|
|
6926
6968
|
|
|
6927
6969
|
}
|
|
6928
|
-
const ourConsole=
|
|
6970
|
+
const ourConsole= /** @type {VirtualConsole} */
|
|
6929
6971
|
consoleTaming=== 'unsafe'?
|
|
6930
6972
|
originalConsole:
|
|
6931
6973
|
makeCausalConsole(originalConsole, loggedErrorHandler);
|
|
6932
6974
|
|
|
6975
|
+
|
|
6933
6976
|
// Attach platform-specific error traps such that any error that gets thrown
|
|
6934
6977
|
// at top-of-turn (the bottom of stack) will get logged by our causal
|
|
6935
6978
|
// console, revealing the diagnostic information associated with the error,
|
|
@@ -7023,10 +7066,10 @@ const tameConsole= (
|
|
|
7023
7066
|
|
|
7024
7067
|
return { console: ourConsole};
|
|
7025
7068
|
};$h_once.tameConsole(tameConsole);
|
|
7026
|
-
})
|
|
7069
|
+
})()
|
|
7027
7070
|
,
|
|
7028
7071
|
// === functors[36] ===
|
|
7029
|
-
(
|
|
7072
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
7030
7073
|
|
|
7031
7074
|
|
|
7032
7075
|
|
|
@@ -7363,10 +7406,10 @@ const tameV8ErrorConstructor= (
|
|
|
7363
7406
|
|
|
7364
7407
|
return tamedMethods.getStackString;
|
|
7365
7408
|
};$h_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
|
|
7366
|
-
})
|
|
7409
|
+
})()
|
|
7367
7410
|
,
|
|
7368
7411
|
// === functors[37] ===
|
|
7369
|
-
(
|
|
7412
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let FERAL_ERROR,TypeError,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,defineProperty,NativeErrors,tameV8ErrorConstructor;$h_imports([["../commons.js", [["FERAL_ERROR", [$h_a => (FERAL_ERROR = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["apply", [$h_a => (apply = $h_a)]],["construct", [$h_a => (construct = $h_a)]],["defineProperties", [$h_a => (defineProperties = $h_a)]],["setPrototypeOf", [$h_a => (setPrototypeOf = $h_a)]],["getOwnPropertyDescriptor", [$h_a => (getOwnPropertyDescriptor = $h_a)]],["defineProperty", [$h_a => (defineProperty = $h_a)]]]],["../permits.js", [["NativeErrors", [$h_a => (NativeErrors = $h_a)]]]],["./tame-v8-error-constructor.js", [["tameV8ErrorConstructor", [$h_a => (tameV8ErrorConstructor = $h_a)]]]]]);
|
|
7370
7413
|
|
|
7371
7414
|
|
|
7372
7415
|
|
|
@@ -7617,10 +7660,10 @@ function tameErrorConstructor(
|
|
|
7617
7660
|
'%SharedError%': SharedError};
|
|
7618
7661
|
|
|
7619
7662
|
}$h_once.default( tameErrorConstructor);
|
|
7620
|
-
})
|
|
7663
|
+
})()
|
|
7621
7664
|
,
|
|
7622
7665
|
// === functors[38] ===
|
|
7623
|
-
(
|
|
7666
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
7624
7667
|
|
|
7625
7668
|
|
|
7626
7669
|
|
|
@@ -7981,10 +8024,10 @@ const load= async(
|
|
|
7981
8024
|
|
|
7982
8025
|
}
|
|
7983
8026
|
};$h_once.load(load);
|
|
7984
|
-
})
|
|
8027
|
+
})()
|
|
7985
8028
|
,
|
|
7986
8029
|
// === functors[39] ===
|
|
7987
|
-
(
|
|
8030
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
7988
8031
|
|
|
7989
8032
|
|
|
7990
8033
|
|
|
@@ -8156,10 +8199,10 @@ $h_once.deferExports(deferExports);const getDeferredExports=(
|
|
|
8156
8199
|
}
|
|
8157
8200
|
return mapGet(deferredExports, specifier);
|
|
8158
8201
|
};$h_once.getDeferredExports(getDeferredExports);
|
|
8159
|
-
})
|
|
8202
|
+
})()
|
|
8160
8203
|
,
|
|
8161
8204
|
// === functors[40] ===
|
|
8162
|
-
(
|
|
8205
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let TypeError,arrayPush,create,getOwnPropertyDescriptors,evadeHtmlCommentTest,evadeImportExpressionTest,rejectSomeDirectEvalExpressions,makeSafeEvaluator;$h_imports([["./commons.js", [["TypeError", [$h_a => (TypeError = $h_a)]],["arrayPush", [$h_a => (arrayPush = $h_a)]],["create", [$h_a => (create = $h_a)]],["getOwnPropertyDescriptors", [$h_a => (getOwnPropertyDescriptors = $h_a)]]]],["./transforms.js", [["evadeHtmlCommentTest", [$h_a => (evadeHtmlCommentTest = $h_a)]],["evadeImportExpressionTest", [$h_a => (evadeImportExpressionTest = $h_a)]],["rejectSomeDirectEvalExpressions", [$h_a => (rejectSomeDirectEvalExpressions = $h_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h_a => (makeSafeEvaluator = $h_a)]]]]]);
|
|
8163
8206
|
|
|
8164
8207
|
|
|
8165
8208
|
|
|
@@ -8252,10 +8295,10 @@ const compartmentEvaluate= (compartmentFields, source, options)=> {
|
|
|
8252
8295
|
localTransforms});
|
|
8253
8296
|
|
|
8254
8297
|
};$h_once.compartmentEvaluate(compartmentEvaluate);
|
|
8255
|
-
})
|
|
8298
|
+
})()
|
|
8256
8299
|
,
|
|
8257
8300
|
// === functors[41] ===
|
|
8258
|
-
(
|
|
8301
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
8259
8302
|
|
|
8260
8303
|
|
|
8261
8304
|
|
|
@@ -8743,10 +8786,10 @@ $h_once.makeThirdPartyModuleInstance(makeThirdPartyModuleInstance);const make
|
|
|
8743
8786
|
execute});
|
|
8744
8787
|
|
|
8745
8788
|
};$h_once.makeModuleInstance(makeModuleInstance);
|
|
8746
|
-
})
|
|
8789
|
+
})()
|
|
8747
8790
|
,
|
|
8748
8791
|
// === functors[42] ===
|
|
8749
|
-
(
|
|
8792
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 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)]]]]]);
|
|
8750
8793
|
|
|
8751
8794
|
|
|
8752
8795
|
|
|
@@ -8923,10 +8966,10 @@ const instantiate= (
|
|
|
8923
8966
|
|
|
8924
8967
|
return moduleInstance;
|
|
8925
8968
|
};$h_once.instantiate(instantiate);
|
|
8926
|
-
})
|
|
8969
|
+
})()
|
|
8927
8970
|
,
|
|
8928
8971
|
// === functors[43] ===
|
|
8929
|
-
(
|
|
8972
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let Map,ReferenceError,TypeError,WeakMap,assign,defineProperties,entries,promiseThen,weakmapGet,weakmapSet,setGlobalObjectSymbolUnscopables,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,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)]],["assign", [$h_a => (assign = $h_a)]],["defineProperties", [$h_a => (defineProperties = $h_a)]],["entries", [$h_a => (entries = $h_a)]],["promiseThen", [$h_a => (promiseThen = $h_a)]],["weakmapGet", [$h_a => (weakmapGet = $h_a)]],["weakmapSet", [$h_a => (weakmapSet = $h_a)]]]],["./global-object.js", [["setGlobalObjectSymbolUnscopables", [$h_a => (setGlobalObjectSymbolUnscopables = $h_a)]],["setGlobalObjectConstantProperties", [$h_a => (setGlobalObjectConstantProperties = $h_a)]],["setGlobalObjectMutableProperties", [$h_a => (setGlobalObjectMutableProperties = $h_a)]],["setGlobalObjectEvaluators", [$h_a => (setGlobalObjectEvaluators = $h_a)]]]],["./permits.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)]]]]]);
|
|
8930
8973
|
|
|
8931
8974
|
|
|
8932
8975
|
|
|
@@ -9218,10 +9261,10 @@ const makeCompartmentConstructor= (
|
|
|
9218
9261
|
|
|
9219
9262
|
return Compartment;
|
|
9220
9263
|
};$h_once.makeCompartmentConstructor(makeCompartmentConstructor);
|
|
9221
|
-
})
|
|
9264
|
+
})()
|
|
9222
9265
|
,
|
|
9223
9266
|
// === functors[44] ===
|
|
9224
|
-
(
|
|
9267
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,InertCompartment;$h_imports([["./commons.js", [["FERAL_FUNCTION", [$h_a => (FERAL_FUNCTION = $h_a)]],["Float32Array", [$h_a => (Float32Array = $h_a)]],["Map", [$h_a => (Map = $h_a)]],["Set", [$h_a => (Set = $h_a)]],["String", [$h_a => (String = $h_a)]],["getOwnPropertyDescriptor", [$h_a => (getOwnPropertyDescriptor = $h_a)]],["getPrototypeOf", [$h_a => (getPrototypeOf = $h_a)]],["iterateArray", [$h_a => (iterateArray = $h_a)]],["iterateMap", [$h_a => (iterateMap = $h_a)]],["iterateSet", [$h_a => (iterateSet = $h_a)]],["iterateString", [$h_a => (iterateString = $h_a)]],["matchAllRegExp", [$h_a => (matchAllRegExp = $h_a)]],["matchAllSymbol", [$h_a => (matchAllSymbol = $h_a)]],["regexpPrototype", [$h_a => (regexpPrototype = $h_a)]],["globalThis", [$h_a => (globalThis = $h_a)]]]],["./compartment.js", [["InertCompartment", [$h_a => (InertCompartment = $h_a)]]]]]);
|
|
9225
9268
|
|
|
9226
9269
|
|
|
9227
9270
|
|
|
@@ -9382,10 +9425,10 @@ const getAnonymousIntrinsics= ()=> {
|
|
|
9382
9425
|
|
|
9383
9426
|
return intrinsics;
|
|
9384
9427
|
};$h_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
|
|
9385
|
-
})
|
|
9428
|
+
})()
|
|
9386
9429
|
,
|
|
9387
9430
|
// === functors[45] ===
|
|
9388
|
-
(
|
|
9431
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let TypeError,freeze;$h_imports([["./commons.js", [["TypeError", [$h_a => (TypeError = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]]]]]);
|
|
9389
9432
|
|
|
9390
9433
|
|
|
9391
9434
|
const tameHarden= (safeHarden, hardenTaming)=> {
|
|
@@ -9414,10 +9457,10 @@ const tameHarden= (safeHarden, hardenTaming)=> {
|
|
|
9414
9457
|
return freeze(fakeHarden);
|
|
9415
9458
|
};$h_once.tameHarden(tameHarden);
|
|
9416
9459
|
freeze(tameHarden);
|
|
9417
|
-
})
|
|
9460
|
+
})()
|
|
9418
9461
|
,
|
|
9419
9462
|
// === functors[46] ===
|
|
9420
|
-
(
|
|
9463
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let Symbol,entries,fromEntries,getOwnPropertyDescriptors,defineProperties,arrayMap;$h_imports([["./commons.js", [["Symbol", [$h_a => (Symbol = $h_a)]],["entries", [$h_a => (entries = $h_a)]],["fromEntries", [$h_a => (fromEntries = $h_a)]],["getOwnPropertyDescriptors", [$h_a => (getOwnPropertyDescriptors = $h_a)]],["defineProperties", [$h_a => (defineProperties = $h_a)]],["arrayMap", [$h_a => (arrayMap = $h_a)]]]]]);
|
|
9421
9464
|
|
|
9422
9465
|
|
|
9423
9466
|
|
|
@@ -9482,10 +9525,11 @@ const tameSymbolConstructor= ()=> {
|
|
|
9482
9525
|
|
|
9483
9526
|
return { '%SharedSymbol%': SharedSymbol};
|
|
9484
9527
|
};$h_once.tameSymbolConstructor(tameSymbolConstructor);
|
|
9485
|
-
})
|
|
9528
|
+
})()
|
|
9486
9529
|
,
|
|
9487
9530
|
// === functors[47] ===
|
|
9488
|
-
(
|
|
9531
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let makeEnvironmentCaptor,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,getOwnPropertyNames,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor;$h_imports([["@endo/env-options", [["makeEnvironmentCaptor", [$h_a => (makeEnvironmentCaptor = $h_a)]]]],["./commons.js", [["FERAL_FUNCTION", [$h_a => (FERAL_FUNCTION = $h_a)]],["FERAL_EVAL", [$h_a => (FERAL_EVAL = $h_a)]],["TypeError", [$h_a => (TypeError = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $h_a)]],["globalThis", [$h_a => (globalThis = $h_a)]],["is", [$h_a => (is = $h_a)]],["ownKeys", [$h_a => (ownKeys = $h_a)]],["stringSplit", [$h_a => (stringSplit = $h_a)]],["noEvalEvaluate", [$h_a => (noEvalEvaluate = $h_a)]],["getOwnPropertyNames", [$h_a => (getOwnPropertyNames = $h_a)]]]],["./make-hardener.js", [["makeHardener", [$h_a => (makeHardener = $h_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h_a => (makeIntrinsicsCollector = $h_a)]]]],["./permits-intrinsics.js", [["default", [$h_a => (whitelistIntrinsics = $h_a)]]]],["./tame-function-constructors.js", [["default", [$h_a => (tameFunctionConstructors = $h_a)]]]],["./tame-date-constructor.js", [["default", [$h_a => (tameDateConstructor = $h_a)]]]],["./tame-math-object.js", [["default", [$h_a => (tameMathObject = $h_a)]]]],["./tame-regexp-constructor.js", [["default", [$h_a => (tameRegExpConstructor = $h_a)]]]],["./enable-property-overrides.js", [["default", [$h_a => (enablePropertyOverrides = $h_a)]]]],["./tame-locale-methods.js", [["default", [$h_a => (tameLocaleMethods = $h_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h_a => (setGlobalObjectConstantProperties = $h_a)]],["setGlobalObjectMutableProperties", [$h_a => (setGlobalObjectMutableProperties = $h_a)]],["setGlobalObjectEvaluators", [$h_a => (setGlobalObjectEvaluators = $h_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h_a => (makeSafeEvaluator = $h_a)]]]],["./permits.js", [["initialGlobalPropertyNames", [$h_a => (initialGlobalPropertyNames = $h_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h_a => (tameFunctionToString = $h_a)]]]],["./tame-domains.js", [["tameDomains", [$h_a => (tameDomains = $h_a)]]]],["./error/tame-console.js", [["tameConsole", [$h_a => (tameConsole = $h_a)]]]],["./error/tame-error-constructor.js", [["default", [$h_a => (tameErrorConstructor = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]],["makeAssert", [$h_a => (makeAssert = $h_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h_a => (getAnonymousIntrinsics = $h_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h_a => (makeCompartmentConstructor = $h_a)]]]],["./tame-harden.js", [["tameHarden", [$h_a => (tameHarden = $h_a)]]]],["./tame-symbol-constructor.js", [["tameSymbolConstructor", [$h_a => (tameSymbolConstructor = $h_a)]]]]]);
|
|
9532
|
+
|
|
9489
9533
|
|
|
9490
9534
|
|
|
9491
9535
|
|
|
@@ -9638,21 +9682,25 @@ const repairIntrinsics= (options= {})=> {
|
|
|
9638
9682
|
// such as those from the infrastructure. However, the bug you're trying to
|
|
9639
9683
|
// track down might be in the infrastrure, in which case the `'verbose'` setting
|
|
9640
9684
|
// is useful. See
|
|
9641
|
-
// [`stackFiltering` options](https://github.com/Agoric/SES-shim/blob/master/packages/ses/lockdown
|
|
9685
|
+
// [`stackFiltering` options](https://github.com/Agoric/SES-shim/blob/master/packages/ses/docs/lockdown.md#stackfiltering-options)
|
|
9642
9686
|
// for an explanation.
|
|
9643
9687
|
|
|
9644
9688
|
const { getEnvironmentOption: getenv}= makeEnvironmentCaptor(globalThis);
|
|
9645
9689
|
|
|
9646
9690
|
const {
|
|
9647
9691
|
errorTaming= getenv('LOCKDOWN_ERROR_TAMING', 'safe'),
|
|
9648
|
-
errorTrapping=
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9692
|
+
errorTrapping= /** @type {"platform" | "none" | "report" | "abort" | "exit" | undefined} */
|
|
9693
|
+
getenv('LOCKDOWN_ERROR_TRAPPING', 'platform'),
|
|
9694
|
+
|
|
9695
|
+
unhandledRejectionTrapping= /** @type {"none" | "report" | undefined} */
|
|
9696
|
+
getenv('LOCKDOWN_UNHANDLED_REJECTION_TRAPPING', 'report'),
|
|
9652
9697
|
|
|
9653
9698
|
regExpTaming= getenv('LOCKDOWN_REGEXP_TAMING', 'safe'),
|
|
9654
9699
|
localeTaming= getenv('LOCKDOWN_LOCALE_TAMING', 'safe'),
|
|
9655
|
-
|
|
9700
|
+
|
|
9701
|
+
consoleTaming= /** @type {'unsafe' | 'safe' | undefined} */
|
|
9702
|
+
getenv('LOCKDOWN_CONSOLE_TAMING', 'safe'),
|
|
9703
|
+
|
|
9656
9704
|
overrideTaming= getenv('LOCKDOWN_OVERRIDE_TAMING', 'moderate'),
|
|
9657
9705
|
stackFiltering= getenv('LOCKDOWN_STACK_FILTERING', 'concise'),
|
|
9658
9706
|
domainTaming= getenv('LOCKDOWN_DOMAIN_TAMING', 'safe'),
|
|
@@ -9872,15 +9920,27 @@ const repairIntrinsics= (options= {})=> {
|
|
|
9872
9920
|
// must be the operation that modifies the intrinsics.
|
|
9873
9921
|
tamedHarden(intrinsics);
|
|
9874
9922
|
|
|
9923
|
+
// Harden evaluators
|
|
9924
|
+
tamedHarden(globalThis.Function);
|
|
9925
|
+
tamedHarden(globalThis.eval);
|
|
9926
|
+
// @ts-ignore Compartment does exist on globalThis
|
|
9927
|
+
tamedHarden(globalThis.Compartment);
|
|
9928
|
+
|
|
9929
|
+
// Harden Symbol and properties for initialGlobalPropertyNames in the host realm
|
|
9930
|
+
tamedHarden(globalThis.Symbol);
|
|
9931
|
+
for( const prop of getOwnPropertyNames(initialGlobalPropertyNames)) {
|
|
9932
|
+
tamedHarden(globalThis[prop]);
|
|
9933
|
+
}
|
|
9934
|
+
|
|
9875
9935
|
return tamedHarden;
|
|
9876
9936
|
};
|
|
9877
9937
|
|
|
9878
9938
|
return hardenIntrinsics;
|
|
9879
9939
|
};$h_once.repairIntrinsics(repairIntrinsics);
|
|
9880
|
-
})
|
|
9940
|
+
})()
|
|
9881
9941
|
,
|
|
9882
9942
|
// === functors[48] ===
|
|
9883
|
-
(
|
|
9943
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let globalThis,repairIntrinsics;$h_imports([["./assert-sloppy-mode.js", []],["./commons.js", [["globalThis", [$h_a => (globalThis = $h_a)]]]],["./lockdown.js", [["repairIntrinsics", [$h_a => (repairIntrinsics = $h_a)]]]]]);
|
|
9884
9944
|
|
|
9885
9945
|
|
|
9886
9946
|
|
|
@@ -9915,10 +9975,10 @@ globalThis.repairIntrinsics= (options)=>{
|
|
|
9915
9975
|
globalThis.harden= hardenIntrinsics();
|
|
9916
9976
|
};
|
|
9917
9977
|
};
|
|
9918
|
-
})
|
|
9978
|
+
})()
|
|
9919
9979
|
,
|
|
9920
9980
|
// === functors[49] ===
|
|
9921
|
-
(
|
|
9981
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let globalThis,makeCompartmentConstructor,tameFunctionToString,getGlobalIntrinsics;$h_imports([["./commons.js", [["globalThis", [$h_a => (globalThis = $h_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h_a => (makeCompartmentConstructor = $h_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h_a => (tameFunctionToString = $h_a)]]]],["./intrinsics.js", [["getGlobalIntrinsics", [$h_a => (getGlobalIntrinsics = $h_a)]]]]]);
|
|
9922
9982
|
|
|
9923
9983
|
|
|
9924
9984
|
|
|
@@ -9932,18 +9992,18 @@ globalThis.Compartment= makeCompartmentConstructor(
|
|
|
9932
9992
|
makeCompartmentConstructor,
|
|
9933
9993
|
getGlobalIntrinsics(globalThis),
|
|
9934
9994
|
markVirtualizedNativeFunction);
|
|
9935
|
-
})
|
|
9995
|
+
})()
|
|
9936
9996
|
,
|
|
9937
9997
|
// === functors[50] ===
|
|
9938
|
-
(
|
|
9998
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { let globalThis,assert;$h_imports([["./commons.js", [["globalThis", [$h_a => (globalThis = $h_a)]]]],["./error/assert.js", [["assert", [$h_a => (assert = $h_a)]]]]]);
|
|
9939
9999
|
|
|
9940
10000
|
|
|
9941
10001
|
globalThis.assert= assert;
|
|
9942
|
-
})
|
|
10002
|
+
})()
|
|
9943
10003
|
,
|
|
9944
10004
|
// === functors[51] ===
|
|
9945
|
-
(
|
|
9946
|
-
})
|
|
10005
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { $h_imports([["./src/lockdown-shim.js", []],["./src/compartment-shim.js", []],["./src/assert-shim.js", []]]);
|
|
10006
|
+
})()
|
|
9947
10007
|
,
|
|
9948
10008
|
]; // functors end
|
|
9949
10009
|
|