ses 1.9.0 → 1.10.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/ses.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- // ses@1.9.0
1
+ // ses@1.10.0
2
2
  'use strict';
3
3
  (functors => {
4
4
 
@@ -213,6 +213,9 @@
213
213
  isTypedArray: cell("isTypedArray"),
214
214
  makeHardener: cell("makeHardener"),
215
215
  },
216
+ {
217
+ cauterizeProperty: cell("cauterizeProperty"),
218
+ },
216
219
  {
217
220
  NativeErrors: cell("NativeErrors"),
218
221
  constantProperties: cell("constantProperties"),
@@ -378,6 +381,10 @@
378
381
  {
379
382
  shimArrayBufferTransfer: cell("shimArrayBufferTransfer"),
380
383
  },
384
+ {
385
+ chooseReporter: cell("chooseReporter"),
386
+ reportInGroup: cell("reportInGroup"),
387
+ },
381
388
  {
382
389
  repairIntrinsics: cell("repairIntrinsics"),
383
390
  },
@@ -664,7 +671,6 @@ function observeImports(map, importName, importIndex) {
664
671
  imports(entries) {
665
672
  const map = new Map(entries);
666
673
  observeImports(map, "../make-lru-cachemap.js", 7);
667
- observeImports(map, "./internal-types.js", 6);
668
674
  },
669
675
  liveVar: {
670
676
  },
@@ -721,16 +727,7 @@ function observeImports(map, importName, importIndex) {
721
727
  liveVar: {
722
728
  },
723
729
  onceVar: {
724
- NativeErrors: cells[11].NativeErrors.set,
725
- constantProperties: cells[11].constantProperties.set,
726
- universalPropertyNames: cells[11].universalPropertyNames.set,
727
- initialGlobalPropertyNames: cells[11].initialGlobalPropertyNames.set,
728
- sharedGlobalPropertyNames: cells[11].sharedGlobalPropertyNames.set,
729
- uniqueGlobalPropertyNames: cells[11].uniqueGlobalPropertyNames.set,
730
- FunctionInstance: cells[11].FunctionInstance.set,
731
- AsyncFunctionInstance: cells[11].AsyncFunctionInstance.set,
732
- isAccessorPermit: cells[11].isAccessorPermit.set,
733
- permitted: cells[11].permitted.set,
730
+ cauterizeProperty: cells[11].cauterizeProperty.set,
734
731
  },
735
732
  importMeta: {},
736
733
  });
@@ -738,33 +735,44 @@ function observeImports(map, importName, importIndex) {
738
735
  imports(entries) {
739
736
  const map = new Map(entries);
740
737
  observeImports(map, "./commons.js", 0);
741
- observeImports(map, "./permits.js", 11);
742
738
  },
743
739
  liveVar: {
744
740
  },
745
741
  onceVar: {
746
- makeIntrinsicsCollector: cells[12].makeIntrinsicsCollector.set,
747
- getGlobalIntrinsics: cells[12].getGlobalIntrinsics.set,
742
+ NativeErrors: cells[12].NativeErrors.set,
743
+ constantProperties: cells[12].constantProperties.set,
744
+ universalPropertyNames: cells[12].universalPropertyNames.set,
745
+ initialGlobalPropertyNames: cells[12].initialGlobalPropertyNames.set,
746
+ sharedGlobalPropertyNames: cells[12].sharedGlobalPropertyNames.set,
747
+ uniqueGlobalPropertyNames: cells[12].uniqueGlobalPropertyNames.set,
748
+ FunctionInstance: cells[12].FunctionInstance.set,
749
+ AsyncFunctionInstance: cells[12].AsyncFunctionInstance.set,
750
+ isAccessorPermit: cells[12].isAccessorPermit.set,
751
+ permitted: cells[12].permitted.set,
748
752
  },
749
753
  importMeta: {},
750
754
  });
751
755
  functors[13]({
752
756
  imports(entries) {
753
757
  const map = new Map(entries);
754
- observeImports(map, "./permits.js", 11);
758
+ observeImports(map, "./cauterize-property.js", 11);
755
759
  observeImports(map, "./commons.js", 0);
760
+ observeImports(map, "./permits.js", 12);
756
761
  },
757
762
  liveVar: {
758
763
  },
759
764
  onceVar: {
760
- default: cells[13].default.set,
765
+ makeIntrinsicsCollector: cells[13].makeIntrinsicsCollector.set,
766
+ getGlobalIntrinsics: cells[13].getGlobalIntrinsics.set,
761
767
  },
762
768
  importMeta: {},
763
769
  });
764
770
  functors[14]({
765
771
  imports(entries) {
766
772
  const map = new Map(entries);
773
+ observeImports(map, "./permits.js", 12);
767
774
  observeImports(map, "./commons.js", 0);
775
+ observeImports(map, "./cauterize-property.js", 11);
768
776
  },
769
777
  liveVar: {
770
778
  },
@@ -817,9 +825,7 @@ function observeImports(map, importName, importIndex) {
817
825
  liveVar: {
818
826
  },
819
827
  onceVar: {
820
- minEnablements: cells[18].minEnablements.set,
821
- moderateEnablements: cells[18].moderateEnablements.set,
822
- severeEnablements: cells[18].severeEnablements.set,
828
+ default: cells[18].default.set,
823
829
  },
824
830
  importMeta: {},
825
831
  });
@@ -827,12 +833,13 @@ function observeImports(map, importName, importIndex) {
827
833
  imports(entries) {
828
834
  const map = new Map(entries);
829
835
  observeImports(map, "./commons.js", 0);
830
- observeImports(map, "./enablements.js", 18);
831
836
  },
832
837
  liveVar: {
833
838
  },
834
839
  onceVar: {
835
- default: cells[19].default.set,
840
+ minEnablements: cells[19].minEnablements.set,
841
+ moderateEnablements: cells[19].moderateEnablements.set,
842
+ severeEnablements: cells[19].severeEnablements.set,
836
843
  },
837
844
  importMeta: {},
838
845
  });
@@ -840,7 +847,7 @@ function observeImports(map, importName, importIndex) {
840
847
  imports(entries) {
841
848
  const map = new Map(entries);
842
849
  observeImports(map, "./commons.js", 0);
843
- observeImports(map, "./error/assert.js", 9);
850
+ observeImports(map, "./enablements.js", 19);
844
851
  },
845
852
  liveVar: {
846
853
  },
@@ -852,24 +859,24 @@ function observeImports(map, importName, importIndex) {
852
859
  functors[21]({
853
860
  imports(entries) {
854
861
  const map = new Map(entries);
862
+ observeImports(map, "./commons.js", 0);
863
+ observeImports(map, "./error/assert.js", 9);
855
864
  },
856
865
  liveVar: {
857
866
  },
858
867
  onceVar: {
859
- makeEvalFunction: cells[21].makeEvalFunction.set,
868
+ default: cells[21].default.set,
860
869
  },
861
870
  importMeta: {},
862
871
  });
863
872
  functors[22]({
864
873
  imports(entries) {
865
874
  const map = new Map(entries);
866
- observeImports(map, "./commons.js", 0);
867
- observeImports(map, "./error/assert.js", 9);
868
875
  },
869
876
  liveVar: {
870
877
  },
871
878
  onceVar: {
872
- makeFunctionConstructor: cells[22].makeFunctionConstructor.set,
879
+ makeEvalFunction: cells[22].makeEvalFunction.set,
873
880
  },
874
881
  importMeta: {},
875
882
  });
@@ -877,17 +884,12 @@ function observeImports(map, importName, importIndex) {
877
884
  imports(entries) {
878
885
  const map = new Map(entries);
879
886
  observeImports(map, "./commons.js", 0);
880
- observeImports(map, "./make-eval-function.js", 21);
881
- observeImports(map, "./make-function-constructor.js", 22);
882
- observeImports(map, "./permits.js", 11);
887
+ observeImports(map, "./error/assert.js", 9);
883
888
  },
884
889
  liveVar: {
885
890
  },
886
891
  onceVar: {
887
- setGlobalObjectSymbolUnscopables: cells[23].setGlobalObjectSymbolUnscopables.set,
888
- setGlobalObjectConstantProperties: cells[23].setGlobalObjectConstantProperties.set,
889
- setGlobalObjectMutableProperties: cells[23].setGlobalObjectMutableProperties.set,
890
- setGlobalObjectEvaluators: cells[23].setGlobalObjectEvaluators.set,
892
+ makeFunctionConstructor: cells[23].makeFunctionConstructor.set,
891
893
  },
892
894
  importMeta: {},
893
895
  });
@@ -895,14 +897,17 @@ function observeImports(map, importName, importIndex) {
895
897
  imports(entries) {
896
898
  const map = new Map(entries);
897
899
  observeImports(map, "./commons.js", 0);
898
- observeImports(map, "./error/assert.js", 9);
900
+ observeImports(map, "./make-eval-function.js", 22);
901
+ observeImports(map, "./make-function-constructor.js", 23);
902
+ observeImports(map, "./permits.js", 12);
899
903
  },
900
904
  liveVar: {
901
905
  },
902
906
  onceVar: {
903
- alwaysThrowHandler: cells[24].alwaysThrowHandler.set,
904
- strictScopeTerminatorHandler: cells[24].strictScopeTerminatorHandler.set,
905
- strictScopeTerminator: cells[24].strictScopeTerminator.set,
907
+ setGlobalObjectSymbolUnscopables: cells[24].setGlobalObjectSymbolUnscopables.set,
908
+ setGlobalObjectConstantProperties: cells[24].setGlobalObjectConstantProperties.set,
909
+ setGlobalObjectMutableProperties: cells[24].setGlobalObjectMutableProperties.set,
910
+ setGlobalObjectEvaluators: cells[24].setGlobalObjectEvaluators.set,
906
911
  },
907
912
  importMeta: {},
908
913
  });
@@ -910,12 +915,14 @@ function observeImports(map, importName, importIndex) {
910
915
  imports(entries) {
911
916
  const map = new Map(entries);
912
917
  observeImports(map, "./commons.js", 0);
913
- observeImports(map, "./strict-scope-terminator.js", 24);
918
+ observeImports(map, "./error/assert.js", 9);
914
919
  },
915
920
  liveVar: {
916
921
  },
917
922
  onceVar: {
918
- createSloppyGlobalsScopeTerminator: cells[25].createSloppyGlobalsScopeTerminator.set,
923
+ alwaysThrowHandler: cells[25].alwaysThrowHandler.set,
924
+ strictScopeTerminatorHandler: cells[25].strictScopeTerminatorHandler.set,
925
+ strictScopeTerminator: cells[25].strictScopeTerminator.set,
919
926
  },
920
927
  importMeta: {},
921
928
  });
@@ -923,12 +930,12 @@ function observeImports(map, importName, importIndex) {
923
930
  imports(entries) {
924
931
  const map = new Map(entries);
925
932
  observeImports(map, "./commons.js", 0);
926
- observeImports(map, "./error/assert.js", 9);
933
+ observeImports(map, "./strict-scope-terminator.js", 25);
927
934
  },
928
935
  liveVar: {
929
936
  },
930
937
  onceVar: {
931
- makeEvalScopeKit: cells[26].makeEvalScopeKit.set,
938
+ createSloppyGlobalsScopeTerminator: cells[26].createSloppyGlobalsScopeTerminator.set,
932
939
  },
933
940
  importMeta: {},
934
941
  });
@@ -936,11 +943,12 @@ function observeImports(map, importName, importIndex) {
936
943
  imports(entries) {
937
944
  const map = new Map(entries);
938
945
  observeImports(map, "./commons.js", 0);
946
+ observeImports(map, "./error/assert.js", 9);
939
947
  },
940
948
  liveVar: {
941
949
  },
942
950
  onceVar: {
943
- getSourceURL: cells[27].getSourceURL.set,
951
+ makeEvalScopeKit: cells[27].makeEvalScopeKit.set,
944
952
  },
945
953
  importMeta: {},
946
954
  });
@@ -948,19 +956,11 @@ function observeImports(map, importName, importIndex) {
948
956
  imports(entries) {
949
957
  const map = new Map(entries);
950
958
  observeImports(map, "./commons.js", 0);
951
- observeImports(map, "./get-source-url.js", 27);
952
959
  },
953
960
  liveVar: {
954
961
  },
955
962
  onceVar: {
956
- rejectHtmlComments: cells[28].rejectHtmlComments.set,
957
- evadeHtmlCommentTest: cells[28].evadeHtmlCommentTest.set,
958
- rejectImportExpressions: cells[28].rejectImportExpressions.set,
959
- evadeImportExpressionTest: cells[28].evadeImportExpressionTest.set,
960
- rejectSomeDirectEvalExpressions: cells[28].rejectSomeDirectEvalExpressions.set,
961
- mandatoryTransforms: cells[28].mandatoryTransforms.set,
962
- applyTransforms: cells[28].applyTransforms.set,
963
- transforms: cells[28].transforms.set,
963
+ getSourceURL: cells[28].getSourceURL.set,
964
964
  },
965
965
  importMeta: {},
966
966
  });
@@ -968,12 +968,19 @@ function observeImports(map, importName, importIndex) {
968
968
  imports(entries) {
969
969
  const map = new Map(entries);
970
970
  observeImports(map, "./commons.js", 0);
971
+ observeImports(map, "./get-source-url.js", 28);
971
972
  },
972
973
  liveVar: {
973
974
  },
974
975
  onceVar: {
975
- isValidIdentifierName: cells[29].isValidIdentifierName.set,
976
- getScopeConstants: cells[29].getScopeConstants.set,
976
+ rejectHtmlComments: cells[29].rejectHtmlComments.set,
977
+ evadeHtmlCommentTest: cells[29].evadeHtmlCommentTest.set,
978
+ rejectImportExpressions: cells[29].rejectImportExpressions.set,
979
+ evadeImportExpressionTest: cells[29].evadeImportExpressionTest.set,
980
+ rejectSomeDirectEvalExpressions: cells[29].rejectSomeDirectEvalExpressions.set,
981
+ mandatoryTransforms: cells[29].mandatoryTransforms.set,
982
+ applyTransforms: cells[29].applyTransforms.set,
983
+ transforms: cells[29].transforms.set,
977
984
  },
978
985
  importMeta: {},
979
986
  });
@@ -981,12 +988,12 @@ function observeImports(map, importName, importIndex) {
981
988
  imports(entries) {
982
989
  const map = new Map(entries);
983
990
  observeImports(map, "./commons.js", 0);
984
- observeImports(map, "./scope-constants.js", 29);
985
991
  },
986
992
  liveVar: {
987
993
  },
988
994
  onceVar: {
989
- makeEvaluate: cells[30].makeEvaluate.set,
995
+ isValidIdentifierName: cells[30].isValidIdentifierName.set,
996
+ getScopeConstants: cells[30].getScopeConstants.set,
990
997
  },
991
998
  importMeta: {},
992
999
  });
@@ -994,17 +1001,12 @@ function observeImports(map, importName, importIndex) {
994
1001
  imports(entries) {
995
1002
  const map = new Map(entries);
996
1003
  observeImports(map, "./commons.js", 0);
997
- observeImports(map, "./strict-scope-terminator.js", 24);
998
- observeImports(map, "./sloppy-globals-scope-terminator.js", 25);
999
- observeImports(map, "./eval-scope.js", 26);
1000
- observeImports(map, "./transforms.js", 28);
1001
- observeImports(map, "./make-evaluate.js", 30);
1002
- observeImports(map, "./error/assert.js", 9);
1004
+ observeImports(map, "./scope-constants.js", 30);
1003
1005
  },
1004
1006
  liveVar: {
1005
1007
  },
1006
1008
  onceVar: {
1007
- makeSafeEvaluator: cells[31].makeSafeEvaluator.set,
1009
+ makeEvaluate: cells[31].makeEvaluate.set,
1008
1010
  },
1009
1011
  importMeta: {},
1010
1012
  });
@@ -1012,11 +1014,17 @@ function observeImports(map, importName, importIndex) {
1012
1014
  imports(entries) {
1013
1015
  const map = new Map(entries);
1014
1016
  observeImports(map, "./commons.js", 0);
1017
+ observeImports(map, "./strict-scope-terminator.js", 25);
1018
+ observeImports(map, "./sloppy-globals-scope-terminator.js", 26);
1019
+ observeImports(map, "./eval-scope.js", 27);
1020
+ observeImports(map, "./transforms.js", 29);
1021
+ observeImports(map, "./make-evaluate.js", 31);
1022
+ observeImports(map, "./error/assert.js", 9);
1015
1023
  },
1016
1024
  liveVar: {
1017
1025
  },
1018
1026
  onceVar: {
1019
- tameFunctionToString: cells[32].tameFunctionToString.set,
1027
+ makeSafeEvaluator: cells[32].makeSafeEvaluator.set,
1020
1028
  },
1021
1029
  importMeta: {},
1022
1030
  });
@@ -1028,7 +1036,7 @@ function observeImports(map, importName, importIndex) {
1028
1036
  liveVar: {
1029
1037
  },
1030
1038
  onceVar: {
1031
- tameDomains: cells[33].tameDomains.set,
1039
+ tameFunctionToString: cells[33].tameFunctionToString.set,
1032
1040
  },
1033
1041
  importMeta: {},
1034
1042
  });
@@ -1040,27 +1048,19 @@ function observeImports(map, importName, importIndex) {
1040
1048
  liveVar: {
1041
1049
  },
1042
1050
  onceVar: {
1043
- tameModuleSource: cells[34].tameModuleSource.set,
1051
+ tameDomains: cells[34].tameDomains.set,
1044
1052
  },
1045
1053
  importMeta: {},
1046
1054
  });
1047
1055
  functors[35]({
1048
1056
  imports(entries) {
1049
1057
  const map = new Map(entries);
1050
- observeImports(map, "../commons.js", 0);
1051
- observeImports(map, "./types.js", 5);
1052
- observeImports(map, "./internal-types.js", 6);
1058
+ observeImports(map, "./commons.js", 0);
1053
1059
  },
1054
1060
  liveVar: {
1055
1061
  },
1056
1062
  onceVar: {
1057
- consoleLevelMethods: cells[35].consoleLevelMethods.set,
1058
- consoleOtherMethods: cells[35].consoleOtherMethods.set,
1059
- makeLoggingConsoleKit: cells[35].makeLoggingConsoleKit.set,
1060
- pumpLogToConsole: cells[35].pumpLogToConsole.set,
1061
- makeCausalConsole: cells[35].makeCausalConsole.set,
1062
- defineCausalConsoleFromLogger: cells[35].defineCausalConsoleFromLogger.set,
1063
- filterConsole: cells[35].filterConsole.set,
1063
+ tameModuleSource: cells[35].tameModuleSource.set,
1064
1064
  },
1065
1065
  importMeta: {},
1066
1066
  });
@@ -1072,7 +1072,13 @@ function observeImports(map, importName, importIndex) {
1072
1072
  liveVar: {
1073
1073
  },
1074
1074
  onceVar: {
1075
- makeRejectionHandlers: cells[36].makeRejectionHandlers.set,
1075
+ consoleLevelMethods: cells[36].consoleLevelMethods.set,
1076
+ consoleOtherMethods: cells[36].consoleOtherMethods.set,
1077
+ makeLoggingConsoleKit: cells[36].makeLoggingConsoleKit.set,
1078
+ pumpLogToConsole: cells[36].pumpLogToConsole.set,
1079
+ makeCausalConsole: cells[36].makeCausalConsole.set,
1080
+ defineCausalConsoleFromLogger: cells[36].defineCausalConsoleFromLogger.set,
1081
+ filterConsole: cells[36].filterConsole.set,
1076
1082
  },
1077
1083
  importMeta: {},
1078
1084
  });
@@ -1080,16 +1086,11 @@ function observeImports(map, importName, importIndex) {
1080
1086
  imports(entries) {
1081
1087
  const map = new Map(entries);
1082
1088
  observeImports(map, "../commons.js", 0);
1083
- observeImports(map, "./assert.js", 9);
1084
- observeImports(map, "./console.js", 35);
1085
- observeImports(map, "./unhandled-rejection.js", 36);
1086
- observeImports(map, "./types.js", 5);
1087
- observeImports(map, "./internal-types.js", 6);
1088
1089
  },
1089
1090
  liveVar: {
1090
1091
  },
1091
1092
  onceVar: {
1092
- tameConsole: cells[37].tameConsole.set,
1093
+ makeRejectionHandlers: cells[37].makeRejectionHandlers.set,
1093
1094
  },
1094
1095
  importMeta: {},
1095
1096
  });
@@ -1097,13 +1098,14 @@ function observeImports(map, importName, importIndex) {
1097
1098
  imports(entries) {
1098
1099
  const map = new Map(entries);
1099
1100
  observeImports(map, "../commons.js", 0);
1101
+ observeImports(map, "./assert.js", 9);
1102
+ observeImports(map, "./console.js", 36);
1103
+ observeImports(map, "./unhandled-rejection.js", 37);
1100
1104
  },
1101
1105
  liveVar: {
1102
1106
  },
1103
1107
  onceVar: {
1104
- filterFileName: cells[38].filterFileName.set,
1105
- shortenCallSiteString: cells[38].shortenCallSiteString.set,
1106
- tameV8ErrorConstructor: cells[38].tameV8ErrorConstructor.set,
1108
+ tameConsole: cells[38].tameConsole.set,
1107
1109
  },
1108
1110
  importMeta: {},
1109
1111
  });
@@ -1111,75 +1113,73 @@ function observeImports(map, importName, importIndex) {
1111
1113
  imports(entries) {
1112
1114
  const map = new Map(entries);
1113
1115
  observeImports(map, "../commons.js", 0);
1114
- observeImports(map, "../permits.js", 11);
1115
- observeImports(map, "./tame-v8-error-constructor.js", 38);
1116
1116
  },
1117
1117
  liveVar: {
1118
1118
  },
1119
1119
  onceVar: {
1120
- default: cells[39].default.set,
1120
+ filterFileName: cells[39].filterFileName.set,
1121
+ shortenCallSiteString: cells[39].shortenCallSiteString.set,
1122
+ tameV8ErrorConstructor: cells[39].tameV8ErrorConstructor.set,
1121
1123
  },
1122
1124
  importMeta: {},
1123
1125
  });
1124
1126
  functors[40]({
1125
1127
  imports(entries) {
1126
1128
  const map = new Map(entries);
1127
- observeImports(map, "@endo/env-options", 3);
1128
- observeImports(map, "./commons.js", 0);
1129
- observeImports(map, "./error/assert.js", 9);
1129
+ observeImports(map, "../commons.js", 0);
1130
+ observeImports(map, "../permits.js", 12);
1131
+ observeImports(map, "./tame-v8-error-constructor.js", 39);
1130
1132
  },
1131
1133
  liveVar: {
1132
1134
  },
1133
1135
  onceVar: {
1134
- makeAlias: cells[40].makeAlias.set,
1135
- load: cells[40].load.set,
1136
- loadNow: cells[40].loadNow.set,
1136
+ default: cells[40].default.set,
1137
1137
  },
1138
1138
  importMeta: {},
1139
1139
  });
1140
1140
  functors[41]({
1141
1141
  imports(entries) {
1142
1142
  const map = new Map(entries);
1143
- observeImports(map, "./module-load.js", 40);
1143
+ observeImports(map, "@endo/env-options", 3);
1144
1144
  observeImports(map, "./commons.js", 0);
1145
1145
  observeImports(map, "./error/assert.js", 9);
1146
1146
  },
1147
1147
  liveVar: {
1148
1148
  },
1149
1149
  onceVar: {
1150
- deferExports: cells[41].deferExports.set,
1151
- getDeferredExports: cells[41].getDeferredExports.set,
1150
+ makeAlias: cells[41].makeAlias.set,
1151
+ load: cells[41].load.set,
1152
+ loadNow: cells[41].loadNow.set,
1152
1153
  },
1153
1154
  importMeta: {},
1154
1155
  });
1155
1156
  functors[42]({
1156
1157
  imports(entries) {
1157
1158
  const map = new Map(entries);
1159
+ observeImports(map, "./module-load.js", 41);
1158
1160
  observeImports(map, "./commons.js", 0);
1159
- observeImports(map, "./transforms.js", 28);
1160
- observeImports(map, "./make-safe-evaluator.js", 31);
1161
+ observeImports(map, "./error/assert.js", 9);
1161
1162
  },
1162
1163
  liveVar: {
1163
1164
  },
1164
1165
  onceVar: {
1165
- provideCompartmentEvaluator: cells[42].provideCompartmentEvaluator.set,
1166
- compartmentEvaluate: cells[42].compartmentEvaluate.set,
1166
+ deferExports: cells[42].deferExports.set,
1167
+ getDeferredExports: cells[42].getDeferredExports.set,
1167
1168
  },
1168
1169
  importMeta: {},
1169
1170
  });
1170
1171
  functors[43]({
1171
1172
  imports(entries) {
1172
1173
  const map = new Map(entries);
1173
- observeImports(map, "./error/assert.js", 9);
1174
- observeImports(map, "./module-proxy.js", 41);
1175
1174
  observeImports(map, "./commons.js", 0);
1176
- observeImports(map, "./compartment-evaluate.js", 42);
1175
+ observeImports(map, "./transforms.js", 29);
1176
+ observeImports(map, "./make-safe-evaluator.js", 32);
1177
1177
  },
1178
1178
  liveVar: {
1179
1179
  },
1180
1180
  onceVar: {
1181
- makeVirtualModuleInstance: cells[43].makeVirtualModuleInstance.set,
1182
- makeModuleInstance: cells[43].makeModuleInstance.set,
1181
+ provideCompartmentEvaluator: cells[43].provideCompartmentEvaluator.set,
1182
+ compartmentEvaluate: cells[43].compartmentEvaluate.set,
1183
1183
  },
1184
1184
  importMeta: {},
1185
1185
  });
@@ -1187,36 +1187,30 @@ function observeImports(map, importName, importIndex) {
1187
1187
  imports(entries) {
1188
1188
  const map = new Map(entries);
1189
1189
  observeImports(map, "./error/assert.js", 9);
1190
- observeImports(map, "./module-instance.js", 43);
1190
+ observeImports(map, "./module-proxy.js", 42);
1191
1191
  observeImports(map, "./commons.js", 0);
1192
+ observeImports(map, "./compartment-evaluate.js", 43);
1192
1193
  },
1193
1194
  liveVar: {
1194
1195
  },
1195
1196
  onceVar: {
1196
- link: cells[44].link.set,
1197
- instantiate: cells[44].instantiate.set,
1197
+ makeVirtualModuleInstance: cells[44].makeVirtualModuleInstance.set,
1198
+ makeModuleInstance: cells[44].makeModuleInstance.set,
1198
1199
  },
1199
1200
  importMeta: {},
1200
1201
  });
1201
1202
  functors[45]({
1202
1203
  imports(entries) {
1203
1204
  const map = new Map(entries);
1204
- observeImports(map, "./commons.js", 0);
1205
- observeImports(map, "./global-object.js", 23);
1206
1205
  observeImports(map, "./error/assert.js", 9);
1207
- observeImports(map, "./permits.js", 11);
1208
- observeImports(map, "./module-load.js", 40);
1209
- observeImports(map, "./module-link.js", 44);
1210
- observeImports(map, "./module-proxy.js", 41);
1211
- observeImports(map, "./compartment-evaluate.js", 42);
1212
- observeImports(map, "./make-safe-evaluator.js", 31);
1206
+ observeImports(map, "./module-instance.js", 44);
1207
+ observeImports(map, "./commons.js", 0);
1213
1208
  },
1214
1209
  liveVar: {
1215
1210
  },
1216
1211
  onceVar: {
1217
- InertCompartment: cells[45].InertCompartment.set,
1218
- CompartmentPrototype: cells[45].CompartmentPrototype.set,
1219
- makeCompartmentConstructor: cells[45].makeCompartmentConstructor.set,
1212
+ link: cells[45].link.set,
1213
+ instantiate: cells[45].instantiate.set,
1220
1214
  },
1221
1215
  importMeta: {},
1222
1216
  });
@@ -1224,12 +1218,21 @@ function observeImports(map, importName, importIndex) {
1224
1218
  imports(entries) {
1225
1219
  const map = new Map(entries);
1226
1220
  observeImports(map, "./commons.js", 0);
1227
- observeImports(map, "./compartment.js", 45);
1221
+ observeImports(map, "./global-object.js", 24);
1222
+ observeImports(map, "./error/assert.js", 9);
1223
+ observeImports(map, "./permits.js", 12);
1224
+ observeImports(map, "./module-load.js", 41);
1225
+ observeImports(map, "./module-link.js", 45);
1226
+ observeImports(map, "./module-proxy.js", 42);
1227
+ observeImports(map, "./compartment-evaluate.js", 43);
1228
+ observeImports(map, "./make-safe-evaluator.js", 32);
1228
1229
  },
1229
1230
  liveVar: {
1230
1231
  },
1231
1232
  onceVar: {
1232
- getAnonymousIntrinsics: cells[46].getAnonymousIntrinsics.set,
1233
+ InertCompartment: cells[46].InertCompartment.set,
1234
+ CompartmentPrototype: cells[46].CompartmentPrototype.set,
1235
+ makeCompartmentConstructor: cells[46].makeCompartmentConstructor.set,
1233
1236
  },
1234
1237
  importMeta: {},
1235
1238
  });
@@ -1237,11 +1240,12 @@ function observeImports(map, importName, importIndex) {
1237
1240
  imports(entries) {
1238
1241
  const map = new Map(entries);
1239
1242
  observeImports(map, "./commons.js", 0);
1243
+ observeImports(map, "./compartment.js", 46);
1240
1244
  },
1241
1245
  liveVar: {
1242
1246
  },
1243
1247
  onceVar: {
1244
- tameHarden: cells[47].tameHarden.set,
1248
+ getAnonymousIntrinsics: cells[47].getAnonymousIntrinsics.set,
1245
1249
  },
1246
1250
  importMeta: {},
1247
1251
  });
@@ -1253,7 +1257,7 @@ function observeImports(map, importName, importIndex) {
1253
1257
  liveVar: {
1254
1258
  },
1255
1259
  onceVar: {
1256
- tameSymbolConstructor: cells[48].tameSymbolConstructor.set,
1260
+ tameHarden: cells[48].tameHarden.set,
1257
1261
  },
1258
1262
  importMeta: {},
1259
1263
  });
@@ -1265,8 +1269,7 @@ function observeImports(map, importName, importIndex) {
1265
1269
  liveVar: {
1266
1270
  },
1267
1271
  onceVar: {
1268
- tameFauxDataProperty: cells[49].tameFauxDataProperty.set,
1269
- tameFauxDataProperties: cells[49].tameFauxDataProperties.set,
1272
+ tameSymbolConstructor: cells[49].tameSymbolConstructor.set,
1270
1273
  },
1271
1274
  importMeta: {},
1272
1275
  });
@@ -1278,7 +1281,8 @@ function observeImports(map, importName, importIndex) {
1278
1281
  liveVar: {
1279
1282
  },
1280
1283
  onceVar: {
1281
- tameRegeneratorRuntime: cells[50].tameRegeneratorRuntime.set,
1284
+ tameFauxDataProperty: cells[50].tameFauxDataProperty.set,
1285
+ tameFauxDataProperties: cells[50].tameFauxDataProperties.set,
1282
1286
  },
1283
1287
  importMeta: {},
1284
1288
  });
@@ -1290,54 +1294,81 @@ function observeImports(map, importName, importIndex) {
1290
1294
  liveVar: {
1291
1295
  },
1292
1296
  onceVar: {
1293
- shimArrayBufferTransfer: cells[51].shimArrayBufferTransfer.set,
1297
+ tameRegeneratorRuntime: cells[51].tameRegeneratorRuntime.set,
1294
1298
  },
1295
1299
  importMeta: {},
1296
1300
  });
1297
1301
  functors[52]({
1302
+ imports(entries) {
1303
+ const map = new Map(entries);
1304
+ observeImports(map, "./commons.js", 0);
1305
+ },
1306
+ liveVar: {
1307
+ },
1308
+ onceVar: {
1309
+ shimArrayBufferTransfer: cells[52].shimArrayBufferTransfer.set,
1310
+ },
1311
+ importMeta: {},
1312
+ });
1313
+ functors[53]({
1314
+ imports(entries) {
1315
+ const map = new Map(entries);
1316
+ observeImports(map, "./commons.js", 0);
1317
+ observeImports(map, "./error/assert.js", 9);
1318
+ },
1319
+ liveVar: {
1320
+ },
1321
+ onceVar: {
1322
+ chooseReporter: cells[53].chooseReporter.set,
1323
+ reportInGroup: cells[53].reportInGroup.set,
1324
+ },
1325
+ importMeta: {},
1326
+ });
1327
+ functors[54]({
1298
1328
  imports(entries) {
1299
1329
  const map = new Map(entries);
1300
1330
  observeImports(map, "@endo/env-options", 3);
1301
1331
  observeImports(map, "./commons.js", 0);
1302
1332
  observeImports(map, "./make-hardener.js", 10);
1303
- observeImports(map, "./intrinsics.js", 12);
1304
- observeImports(map, "./permits-intrinsics.js", 13);
1305
- observeImports(map, "./tame-function-constructors.js", 14);
1306
- observeImports(map, "./tame-date-constructor.js", 15);
1307
- observeImports(map, "./tame-math-object.js", 16);
1308
- observeImports(map, "./tame-regexp-constructor.js", 17);
1309
- observeImports(map, "./enable-property-overrides.js", 19);
1310
- observeImports(map, "./tame-locale-methods.js", 20);
1311
- observeImports(map, "./global-object.js", 23);
1312
- observeImports(map, "./make-safe-evaluator.js", 31);
1313
- observeImports(map, "./permits.js", 11);
1314
- observeImports(map, "./tame-function-tostring.js", 32);
1315
- observeImports(map, "./tame-domains.js", 33);
1316
- observeImports(map, "./tame-module-source.js", 34);
1317
- observeImports(map, "./error/tame-console.js", 37);
1318
- observeImports(map, "./error/tame-error-constructor.js", 39);
1333
+ observeImports(map, "./intrinsics.js", 13);
1334
+ observeImports(map, "./permits-intrinsics.js", 14);
1335
+ observeImports(map, "./tame-function-constructors.js", 15);
1336
+ observeImports(map, "./tame-date-constructor.js", 16);
1337
+ observeImports(map, "./tame-math-object.js", 17);
1338
+ observeImports(map, "./tame-regexp-constructor.js", 18);
1339
+ observeImports(map, "./enable-property-overrides.js", 20);
1340
+ observeImports(map, "./tame-locale-methods.js", 21);
1341
+ observeImports(map, "./global-object.js", 24);
1342
+ observeImports(map, "./make-safe-evaluator.js", 32);
1343
+ observeImports(map, "./permits.js", 12);
1344
+ observeImports(map, "./tame-function-tostring.js", 33);
1345
+ observeImports(map, "./tame-domains.js", 34);
1346
+ observeImports(map, "./tame-module-source.js", 35);
1347
+ observeImports(map, "./error/tame-console.js", 38);
1348
+ observeImports(map, "./error/tame-error-constructor.js", 40);
1319
1349
  observeImports(map, "./error/assert.js", 9);
1320
- observeImports(map, "./get-anonymous-intrinsics.js", 46);
1321
- observeImports(map, "./compartment.js", 45);
1322
- observeImports(map, "./tame-harden.js", 47);
1323
- observeImports(map, "./tame-symbol-constructor.js", 48);
1324
- observeImports(map, "./tame-faux-data-properties.js", 49);
1325
- observeImports(map, "./tame-regenerator-runtime.js", 50);
1326
- observeImports(map, "./shim-arraybuffer-transfer.js", 51);
1350
+ observeImports(map, "./get-anonymous-intrinsics.js", 47);
1351
+ observeImports(map, "./compartment.js", 46);
1352
+ observeImports(map, "./tame-harden.js", 48);
1353
+ observeImports(map, "./tame-symbol-constructor.js", 49);
1354
+ observeImports(map, "./tame-faux-data-properties.js", 50);
1355
+ observeImports(map, "./tame-regenerator-runtime.js", 51);
1356
+ observeImports(map, "./shim-arraybuffer-transfer.js", 52);
1357
+ observeImports(map, "./reporting.js", 53);
1327
1358
  },
1328
1359
  liveVar: {
1329
1360
  },
1330
1361
  onceVar: {
1331
- repairIntrinsics: cells[52].repairIntrinsics.set,
1362
+ repairIntrinsics: cells[54].repairIntrinsics.set,
1332
1363
  },
1333
1364
  importMeta: {},
1334
1365
  });
1335
- functors[53]({
1366
+ functors[55]({
1336
1367
  imports(entries) {
1337
1368
  const map = new Map(entries);
1338
1369
  observeImports(map, "./assert-sloppy-mode.js", 1);
1339
1370
  observeImports(map, "./commons.js", 0);
1340
- observeImports(map, "./lockdown.js", 52);
1371
+ observeImports(map, "./lockdown.js", 54);
1341
1372
  },
1342
1373
  liveVar: {
1343
1374
  },
@@ -1345,13 +1376,14 @@ function observeImports(map, importName, importIndex) {
1345
1376
  },
1346
1377
  importMeta: {},
1347
1378
  });
1348
- functors[54]({
1379
+ functors[56]({
1349
1380
  imports(entries) {
1350
1381
  const map = new Map(entries);
1351
1382
  observeImports(map, "./commons.js", 0);
1352
- observeImports(map, "./compartment.js", 45);
1353
- observeImports(map, "./tame-function-tostring.js", 32);
1354
- observeImports(map, "./intrinsics.js", 12);
1383
+ observeImports(map, "./compartment.js", 46);
1384
+ observeImports(map, "./tame-function-tostring.js", 33);
1385
+ observeImports(map, "./intrinsics.js", 13);
1386
+ observeImports(map, "./reporting.js", 53);
1355
1387
  },
1356
1388
  liveVar: {
1357
1389
  },
@@ -1359,7 +1391,7 @@ function observeImports(map, importName, importIndex) {
1359
1391
  },
1360
1392
  importMeta: {},
1361
1393
  });
1362
- functors[55]({
1394
+ functors[57]({
1363
1395
  imports(entries) {
1364
1396
  const map = new Map(entries);
1365
1397
  observeImports(map, "./commons.js", 0);
@@ -1371,11 +1403,11 @@ function observeImports(map, importName, importIndex) {
1371
1403
  },
1372
1404
  importMeta: {},
1373
1405
  });
1374
- functors[56]({
1406
+ functors[58]({
1375
1407
  imports(entries) {
1376
1408
  const map = new Map(entries);
1377
1409
  observeImports(map, "./commons.js", 0);
1378
- observeImports(map, "./error/console.js", 35);
1410
+ observeImports(map, "./error/console.js", 36);
1379
1411
  observeImports(map, "./error/assert.js", 9);
1380
1412
  },
1381
1413
  liveVar: {
@@ -1384,13 +1416,13 @@ function observeImports(map, importName, importIndex) {
1384
1416
  },
1385
1417
  importMeta: {},
1386
1418
  });
1387
- functors[57]({
1419
+ functors[59]({
1388
1420
  imports(entries) {
1389
1421
  const map = new Map(entries);
1390
- observeImports(map, "./src/lockdown-shim.js", 53);
1391
- observeImports(map, "./src/compartment-shim.js", 54);
1392
- observeImports(map, "./src/assert-shim.js", 55);
1393
- observeImports(map, "./src/console-shim.js", 56);
1422
+ observeImports(map, "./src/lockdown-shim.js", 55);
1423
+ observeImports(map, "./src/compartment-shim.js", 56);
1424
+ observeImports(map, "./src/assert-shim.js", 57);
1425
+ observeImports(map, "./src/console-shim.js", 58);
1394
1426
  },
1395
1427
  liveVar: {
1396
1428
  },
@@ -2203,6 +2235,10 @@ freeze(bestEffortStringify);
2203
2235
  // === functors[6] ===
2204
2236
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); // @ts-check
2205
2237
 
2238
+ /**
2239
+ * @import {VirtualConsole} from './types.js'
2240
+ */
2241
+
2206
2242
  /**
2207
2243
  * @typedef {readonly any[]} LogArgs
2208
2244
  *
@@ -2261,7 +2297,7 @@ freeze(bestEffortStringify);
2261
2297
  /**
2262
2298
  * @callback MakeLoggingConsoleKit
2263
2299
  *
2264
- * A logging console just accumulates the contents of all whitelisted calls,
2300
+ * A logging console just accumulates the contents of all permitted calls,
2265
2301
  * making them available to callers of `takeLog()`. Calling `takeLog()`
2266
2302
  * consumes these, so later calls to `takeLog()` will only provide a log of
2267
2303
  * calls that have happened since then.
@@ -2522,12 +2558,15 @@ freeze(makeLRUCacheMap);
2522
2558
  })()
2523
2559
  ,
2524
2560
  // === functors[8] ===
2525
- ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let makeLRUCacheMap;$h͏_imports([["../make-lru-cachemap.js", [["makeLRUCacheMap", [$h͏_a => (makeLRUCacheMap = $h͏_a)]]]],["./internal-types.js", []]]);
2561
+ ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let makeLRUCacheMap;$h͏_imports([["../make-lru-cachemap.js", [["makeLRUCacheMap", [$h͏_a => (makeLRUCacheMap = $h͏_a)]]]]]);
2526
2562
 
2527
2563
 
2528
2564
 
2529
2565
 
2530
2566
 
2567
+ /**
2568
+ * @import {LogArgs} from './internal-types.js';
2569
+ */
2531
2570
 
2532
2571
  const { freeze}= Object;
2533
2572
  const { isSafeInteger}= Number;
@@ -2648,6 +2687,7 @@ freeze(makeNoteLogArgsArrayKit);
2648
2687
 
2649
2688
  /**
2650
2689
  * @import {BaseAssert, Assert, AssertionFunctions, AssertionUtilities, StringablePayload, DetailsToken, MakeAssert} from '../../types.js'
2690
+ * @import {LogArgs, NoteCallback, LoggedErrorHandler} from "./internal-types.js";
2651
2691
  */
2652
2692
 
2653
2693
  // For our internal debugging purposes, uncomment
@@ -3453,6 +3493,78 @@ const makeHardener= ()=> {
3453
3493
  })()
3454
3494
  ,
3455
3495
  // === functors[11] ===
3496
+ ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let objectHasOwnProperty;$h͏_imports([["./commons.js", [["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]]]]]);
3497
+
3498
+ /**
3499
+ * @import {Reporter} from './reporting-types.js'
3500
+ */
3501
+
3502
+ /**
3503
+ * Delete `obj[prop]` or at least make it harmless.
3504
+ *
3505
+ * If the property was not expected, then emit a reporter-dependent warning
3506
+ * to bring attention to this case, so someone can determine what to do with it.
3507
+ *
3508
+ * If the property to be deleted is a function's `.prototype` property, this
3509
+ * will normally be because the function was supposed to be a
3510
+ * - builtin method or non-constructor function
3511
+ * - arrow function
3512
+ * - concise method
3513
+ *
3514
+ * all of whom are not supposed to have a `.prototype` property. Nevertheless,
3515
+ * on some platforms (like older versions of Hermes), or as a result of
3516
+ * some shim-based mods to the primordials (like core-js?), some of these
3517
+ * functions may accidentally be more like `function` functions with
3518
+ * an undeletable `.prototype` property. In these cases, if we can
3519
+ * set the value of that bogus `.prototype` property to `undefined`,
3520
+ * we do so, issuing a warning, rather than failing to initialize ses.
3521
+ *
3522
+ * @param {object} obj
3523
+ * @param {PropertyKey} prop
3524
+ * @param {boolean} known If deletion is expected, don't warn
3525
+ * @param {string} subPath Used for warning messages
3526
+ * @param {Reporter} reporter Where to issue warning or error.
3527
+ * @returns {void}
3528
+ */
3529
+ const cauterizeProperty= (
3530
+ obj,
3531
+ prop,
3532
+ known,
3533
+ subPath,
3534
+ { warn, error})=>
3535
+ {
3536
+ // Either the object lacks a permit or the object doesn't match the
3537
+ // permit.
3538
+ // If the permit is specifically false, not merely undefined,
3539
+ // this is a property we expect to see because we know it exists in
3540
+ // some environments and we have expressly decided to exclude it.
3541
+ // Any other disallowed property is one we have not audited and we log
3542
+ // that we are removing it so we know to look into it, as happens when
3543
+ // the language evolves new features to existing intrinsics.
3544
+ if( !known) {
3545
+ warn( `Removing ${subPath}`);
3546
+ }
3547
+ try {
3548
+ delete obj[prop];
3549
+ }catch( err) {
3550
+ if( objectHasOwnProperty(obj, prop)) {
3551
+ if( typeof obj=== 'function'&& prop=== 'prototype') {
3552
+ obj.prototype= undefined;
3553
+ if( obj.prototype=== undefined) {
3554
+ warn( `Tolerating undeletable ${subPath} === undefined`);
3555
+ return;
3556
+ }
3557
+ }
3558
+ error( `failed to delete ${subPath}`,err);
3559
+ }else {
3560
+ error( `deleting ${subPath} threw`,err);
3561
+ }
3562
+ throw err;
3563
+ }
3564
+ };$h͏_once.cauterizeProperty(cauterizeProperty);
3565
+ })()
3566
+ ,
3567
+ // === functors[12] ===
3456
3568
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let arrayPush;$h͏_imports([["./commons.js", [["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]]]]]);
3457
3569
 
3458
3570
 
@@ -3461,7 +3573,7 @@ const makeHardener= ()=> {
3461
3573
  /** @import {GenericErrorConstructor} from '../types.js' */
3462
3574
 
3463
3575
  /**
3464
- * @file Exports {@code whitelist}, a recursively defined
3576
+ * @module Exports {@code permits}, a recursively defined
3465
3577
  * JSON record enumerating all intrinsics and their properties
3466
3578
  * according to ECMA specs.
3467
3579
  *
@@ -3487,7 +3599,7 @@ const constantProperties= {
3487
3599
  * universalPropertyNames
3488
3600
  * Properties of all global objects.
3489
3601
  * Must be powerless.
3490
- * Maps from property name to the intrinsic name in the whitelist.
3602
+ * Maps from property name to the intrinsic name in the permits.
3491
3603
  */$h͏_once.constantProperties(constantProperties);
3492
3604
  const universalPropertyNames= {
3493
3605
  // *** Function Properties of the Global Object
@@ -3570,7 +3682,7 @@ const universalPropertyNames= {
3570
3682
  * Those found only on the initial global, i.e., the global of the
3571
3683
  * start compartment, as well as any compartments created before lockdown.
3572
3684
  * These may provide much of the power provided by the original.
3573
- * Maps from property name to the intrinsic name in the whitelist.
3685
+ * Maps from property name to the intrinsic name in the permits.
3574
3686
  */$h͏_once.universalPropertyNames(universalPropertyNames);
3575
3687
  const initialGlobalPropertyNames= {
3576
3688
  // *** Constructor Properties of the Global Object
@@ -3580,7 +3692,7 @@ const initialGlobalPropertyNames= {
3580
3692
  RegExp: '%InitialRegExp%',
3581
3693
 
3582
3694
  // Omit `Symbol`, because we want the original to appear on the
3583
- // start compartment without passing through the whitelist mechanism, since
3695
+ // start compartment without passing through the permits mechanism, since
3584
3696
  // we want to preserve all its properties, even if we never heard of them.
3585
3697
  // Symbol: '%InitialSymbol%',
3586
3698
 
@@ -3604,7 +3716,7 @@ const initialGlobalPropertyNames= {
3604
3716
  * sharedGlobalPropertyNames
3605
3717
  * Those found only on the globals of new compartments created after lockdown,
3606
3718
  * which must therefore be powerless.
3607
- * Maps from property name to the intrinsic name in the whitelist.
3719
+ * Maps from property name to the intrinsic name in the permits.
3608
3720
  */$h͏_once.initialGlobalPropertyNames(initialGlobalPropertyNames);
3609
3721
  const sharedGlobalPropertyNames= {
3610
3722
  // *** Constructor Properties of the Global Object
@@ -3623,7 +3735,7 @@ const sharedGlobalPropertyNames= {
3623
3735
  * uniqueGlobalPropertyNames
3624
3736
  * Those made separately for each global, including the initial global
3625
3737
  * of the start compartment.
3626
- * Maps from property name to the intrinsic name in the whitelist
3738
+ * Maps from property name to the intrinsic name in the permits
3627
3739
  * (which is currently always the same).
3628
3740
  */$h͏_once.sharedGlobalPropertyNames(sharedGlobalPropertyNames);
3629
3741
  const uniqueGlobalPropertyNames= {
@@ -3683,18 +3795,18 @@ if( typeof AggregateError!== 'undefined') {
3683
3795
  * blacklisted and simply removed. Properties not mentioned
3684
3796
  * are also considered blacklisted and are removed.
3685
3797
  * <li>A string value equal to a primitive ("number", "string", etc),
3686
- * in which case the property is whitelisted if its value property
3798
+ * in which case the property is permitted if its value property
3687
3799
  * is typeof the given type. For example, {@code "Infinity"} leads to
3688
3800
  * "number" and property values that fail {@code typeof "number"}.
3689
3801
  * are removed.
3690
3802
  * <li>A string value equal to an intinsic name ("ObjectPrototype",
3691
- * "Array", etc), in which case the property whitelisted if its
3803
+ * "Array", etc), in which case the property permitted if its
3692
3804
  * value property is equal to the value of the corresponfing
3693
3805
  * intrinsics. For example, {@code Map.prototype} leads to
3694
3806
  * "MapPrototype" and the property is removed if its value is
3695
3807
  * not equal to %MapPrototype%
3696
3808
  * <li>Another record, in which case this property is simply
3697
- * whitelisted and that next record represents the disposition of
3809
+ * permitted and that next record represents the disposition of
3698
3810
  * the object which is its value. For example, {@code "Object"}
3699
3811
  * leads to another record explaining what properties {@code
3700
3812
  * "Object"} may have and how each such property should be treated.
@@ -4951,7 +5063,7 @@ const permitted= {
4951
5063
  //
4952
5064
  // We will likely change this to add a property to Promise called
4953
5065
  // Promise.delegate and put static methods on it, which will necessitate
4954
- // another whitelist change to update to the current proposed standard.
5066
+ // another permits change to update to the current proposed standard.
4955
5067
  HandledPromise: {
4956
5068
  '[[Proto]]': 'Promise',
4957
5069
  applyFunction: fn,
@@ -5003,7 +5115,9 @@ const permitted= {
5003
5115
  resolve: fn,
5004
5116
  // https://github.com/tc39/proposal-promise-with-resolvers
5005
5117
  withResolvers: fn,
5006
- '@@species': getter},
5118
+ '@@species': getter,
5119
+ // https://github.com/tc39/proposal-promise-try
5120
+ try: fn},
5007
5121
 
5008
5122
 
5009
5123
  '%PromisePrototype%': {
@@ -5102,8 +5216,8 @@ const permitted= {
5102
5216
  '%InitialGetStackString%': fn};$h͏_once.permitted(permitted);
5103
5217
  })()
5104
5218
  ,
5105
- // === functors[12] ===
5106
- ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,WeakSet,arrayFilter,create,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,permitted;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["values", [$h͏_a => (values = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]]]],["./permits.js", [["constantProperties", [$h͏_a => (constantProperties = $h͏_a)]],["sharedGlobalPropertyNames", [$h͏_a => (sharedGlobalPropertyNames = $h͏_a)]],["universalPropertyNames", [$h͏_a => (universalPropertyNames = $h͏_a)]],["permitted", [$h͏_a => (permitted = $h͏_a)]]]]]);
5219
+ // === functors[13] ===
5220
+ ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let cauterizeProperty,TypeError,WeakSet,arrayFilter,create,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,permitted;$h͏_imports([["./cauterize-property.js", [["cauterizeProperty", [$h͏_a => (cauterizeProperty = $h͏_a)]]]],["./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)]]]]]);
5107
5221
 
5108
5222
 
5109
5223
 
@@ -5127,13 +5241,18 @@ const permitted= {
5127
5241
 
5128
5242
 
5129
5243
 
5244
+
5245
+
5246
+ /**
5247
+ * @import {Reporter} from './reporting-types.js'
5248
+ */
5130
5249
 
5131
5250
  const isFunction= (obj)=>typeof obj=== 'function';
5132
5251
 
5133
5252
  // Like defineProperty, but throws if it would modify an existing property.
5134
5253
  // We use this to ensure that two conflicting attempts to define the same
5135
5254
  // property throws, causing SES initialization to fail. Otherwise, a
5136
- // conflict between, for example, two of SES's internal whitelists might
5255
+ // conflict between, for example, two of SES's internal permits might
5137
5256
  // get masked as one overwrites the other. Accordingly, the thrown error
5138
5257
  // complains of a "Conflicting definition".
5139
5258
  function initProperty(obj, name, desc) {
@@ -5176,7 +5295,10 @@ function sampleGlobals(globalObject, newPropertyNames) {
5176
5295
  return newIntrinsics;
5177
5296
  }
5178
5297
 
5179
- const makeIntrinsicsCollector= ()=> {
5298
+ /**
5299
+ * @param {Reporter} reporter
5300
+ */
5301
+ const makeIntrinsicsCollector= (reporter)=>{
5180
5302
  /** @type {Record<any, any>} */
5181
5303
  const intrinsics= create(null);
5182
5304
  let pseudoNatives;
@@ -5187,7 +5309,7 @@ const makeIntrinsicsCollector= ()=> {
5187
5309
  freeze(addIntrinsics);
5188
5310
 
5189
5311
  // For each intrinsic, if it has a `.prototype` property, use the
5190
- // whitelist to find out the intrinsic name for that prototype and add it
5312
+ // permits to find out the intrinsic name for that prototype and add it
5191
5313
  // to the intrinsics.
5192
5314
  const completePrototypes= ()=> {
5193
5315
  for( const [name, intrinsic]of entries(intrinsics)) {
@@ -5201,17 +5323,25 @@ const makeIntrinsicsCollector= ()=> {
5201
5323
  }
5202
5324
  const permit= permitted[name];
5203
5325
  if( typeof permit!== 'object') {
5204
- throw TypeError( `Expected permit object at whitelist.${name}`);
5326
+ throw TypeError( `Expected permit object at permits.${name}`);
5205
5327
  }
5206
5328
  const namePrototype= permit.prototype;
5207
5329
  if( !namePrototype) {
5208
- throw TypeError( `${name}.prototype property not whitelisted`);
5330
+ cauterizeProperty(
5331
+ intrinsic,
5332
+ 'prototype',
5333
+ false,
5334
+ `${name}.prototype`,
5335
+ reporter);
5336
+
5337
+ // eslint-disable-next-line no-continue
5338
+ continue;
5209
5339
  }
5210
5340
  if(
5211
5341
  typeof namePrototype!== 'string'||
5212
5342
  !objectHasOwnProperty(permitted, namePrototype))
5213
5343
  {
5214
- throw TypeError( `Unrecognized ${name}.prototype whitelist entry`);
5344
+ throw TypeError( `Unrecognized ${name}.prototype permits entry`);
5215
5345
  }
5216
5346
  const intrinsicPrototype= intrinsic.prototype;
5217
5347
  if( objectHasOwnProperty(intrinsics, namePrototype)) {
@@ -5260,7 +5390,7 @@ const makeIntrinsicsCollector= ()=> {
5260
5390
  /**
5261
5391
  * getGlobalIntrinsics()
5262
5392
  * Doesn't tame, delete, or modify anything. Samples globalObject to create an
5263
- * intrinsics record containing only the whitelisted global variables, listed
5393
+ * intrinsics record containing only the permitted global variables, listed
5264
5394
  * by the intrinsic names appropriate for new globals, i.e., the globals of
5265
5395
  * newly constructed compartments.
5266
5396
  *
@@ -5269,9 +5399,11 @@ const makeIntrinsicsCollector= ()=> {
5269
5399
  * *original* unsafe (feral, untamed) bindings of these global variables.
5270
5400
  *
5271
5401
  * @param {object} globalObject
5402
+ * @param {Reporter} reporter
5272
5403
  */$h͏_once.makeIntrinsicsCollector(makeIntrinsicsCollector);
5273
- const getGlobalIntrinsics= (globalObject)=>{
5274
- const { addIntrinsics, finalIntrinsics}= makeIntrinsicsCollector();
5404
+ const getGlobalIntrinsics= (globalObject, reporter)=> {
5405
+ // TODO pass a proper reporter to `makeIntrinsicsCollector`
5406
+ const { addIntrinsics, finalIntrinsics}= makeIntrinsicsCollector(reporter);
5275
5407
 
5276
5408
  addIntrinsics(sampleGlobals(globalObject, sharedGlobalPropertyNames));
5277
5409
 
@@ -5279,8 +5411,9 @@ const getGlobalIntrinsics= (globalObject)=>{
5279
5411
  };$h͏_once.getGlobalIntrinsics(getGlobalIntrinsics);
5280
5412
  })()
5281
5413
  ,
5282
- // === functors[13] ===
5283
- ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let permitted,FunctionInstance,isAccessorPermit,Map,String,Symbol,TypeError,arrayFilter,arrayIncludes,arrayMap,entries,getOwnPropertyDescriptor,getPrototypeOf,isObject,mapGet,objectHasOwnProperty,ownKeys,symbolKeyFor;$h͏_imports([["./permits.js", [["permitted", [$h͏_a => (permitted = $h͏_a)]],["FunctionInstance", [$h͏_a => (FunctionInstance = $h͏_a)]],["isAccessorPermit", [$h͏_a => (isAccessorPermit = $h͏_a)]]]],["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["Symbol", [$h͏_a => (Symbol = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes", [$h͏_a => (arrayIncludes = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["symbolKeyFor", [$h͏_a => (symbolKeyFor = $h͏_a)]]]]]);
5414
+ // === functors[14] ===
5415
+ ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let permitted,FunctionInstance,isAccessorPermit,Map,String,Symbol,TypeError,arrayFilter,arrayIncludes,arrayMap,entries,getOwnPropertyDescriptor,getPrototypeOf,isObject,mapGet,objectHasOwnProperty,ownKeys,symbolKeyFor,cauterizeProperty;$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)]]]],["./cauterize-property.js", [["cauterizeProperty", [$h͏_a => (cauterizeProperty = $h͏_a)]]]]]);
5416
+
5284
5417
 
5285
5418
 
5286
5419
 
@@ -5345,28 +5478,22 @@ const getGlobalIntrinsics= (globalObject)=>{
5345
5478
 
5346
5479
 
5347
5480
  /**
5348
- * whitelistIntrinsics()
5481
+ * @import {Reporter} from './reporting-types.js'
5482
+ */
5483
+
5484
+ /**
5349
5485
  * Removes all non-allowed properties found by recursively and
5350
5486
  * reflectively walking own property chains.
5351
5487
  *
5352
5488
  * @param {object} intrinsics
5353
- * @param {(object) => void} markVirtualizedNativeFunction
5489
+ * @param {(virtualizedNativeFunction: object) => void} markVirtualizedNativeFunction
5490
+ * @param {Reporter} reporter
5354
5491
  */
5355
- function whitelistIntrinsics(
5492
+ function removeUnpermittedIntrinsics(
5356
5493
  intrinsics,
5357
- markVirtualizedNativeFunction)
5494
+ markVirtualizedNativeFunction,
5495
+ reporter)
5358
5496
  {
5359
- let groupStarted= false;
5360
- const inConsoleGroup= (level, ...args)=> {
5361
- if( !groupStarted) {
5362
- // eslint-disable-next-line @endo/no-polymorphic-call
5363
- console.groupCollapsed('Removing unpermitted intrinsics');
5364
- groupStarted= true;
5365
- }
5366
- // eslint-disable-next-line @endo/no-polymorphic-call
5367
- return console[level](...args);
5368
- };
5369
-
5370
5497
  // These primitives are allowed for permits.
5371
5498
  const primitives= ['undefined', 'boolean', 'number', 'string', 'symbol'];
5372
5499
 
@@ -5430,7 +5557,7 @@ function whitelistIntrinsics(
5430
5557
 
5431
5558
  // Assert: protoName, if provided, is a string.
5432
5559
  if( protoName!== undefined&& typeof protoName!== 'string') {
5433
- throw TypeError( `Malformed whitelist permit ${path}.__proto__`);
5560
+ throw TypeError( `Malformed permit ${path}.__proto__`);
5434
5561
  }
5435
5562
 
5436
5563
  // If permit not specified, default to Object.prototype.
@@ -5446,7 +5573,7 @@ function whitelistIntrinsics(
5446
5573
 
5447
5574
  /*
5448
5575
  * isAllowedPropertyValue()
5449
- * Whitelist a single property value against a permit.
5576
+ * enforce permit for a single property value.
5450
5577
  */
5451
5578
  function isAllowedPropertyValue(path, value, prop, permit) {
5452
5579
  if( typeof permit=== 'object') {
@@ -5474,7 +5601,7 @@ function whitelistIntrinsics(
5474
5601
 
5475
5602
  if( objectHasOwnProperty(intrinsics, permit)) {
5476
5603
  if( value!== intrinsics[permit]) {
5477
- throw TypeError( `Does not match whitelist ${path}`);
5604
+ throw TypeError( `Does not match permit for ${path}`);
5478
5605
  }
5479
5606
  return true;
5480
5607
  }
@@ -5567,56 +5694,18 @@ function whitelistIntrinsics(
5567
5694
  const subPermit= getSubPermit(obj, permit, propString);
5568
5695
 
5569
5696
  if( !subPermit|| !isAllowedProperty(subPath, obj, prop, subPermit)) {
5570
- // Either the object lacks a permit or the object doesn't match the
5571
- // permit.
5572
- // If the permit is specifically false, not merely undefined,
5573
- // this is a property we expect to see because we know it exists in
5574
- // some environments and we have expressly decided to exclude it.
5575
- // Any other disallowed property is one we have not audited and we log
5576
- // that we are removing it so we know to look into it, as happens when
5577
- // the language evolves new features to existing intrinsics.
5578
- if( subPermit!== false) {
5579
- inConsoleGroup('warn', `Removing ${subPath}`);
5580
- }
5581
- try {
5582
- delete obj[prop];
5583
- }catch( err) {
5584
- if( prop in obj) {
5585
- if( typeof obj=== 'function'&& prop=== 'prototype') {
5586
- obj.prototype= undefined;
5587
- if( obj.prototype=== undefined) {
5588
- inConsoleGroup(
5589
- 'warn',
5590
- `Tolerating undeletable ${subPath} === undefined`);
5591
-
5592
- // eslint-disable-next-line no-continue
5593
- continue;
5594
- }
5595
- }
5596
- inConsoleGroup('error', `failed to delete ${subPath}`,err);
5597
- }else {
5598
- inConsoleGroup('error', `deleting ${subPath} threw`,err);
5599
- }
5600
- throw err;
5601
- }
5697
+ cauterizeProperty(obj, prop, subPermit=== false, subPath, reporter);
5602
5698
  }
5603
5699
  }
5604
5700
  }
5605
5701
 
5606
- try {
5607
- // Start path with 'intrinsics' to clarify that properties are not
5608
- // removed from the global object by the whitelisting operation.
5609
- visitProperties('intrinsics', intrinsics, permitted);
5610
- }finally {
5611
- if( groupStarted) {
5612
- // eslint-disable-next-line @endo/no-polymorphic-call
5613
- console.groupEnd();
5614
- }
5615
- }
5616
- }$h͏_once.default( whitelistIntrinsics);
5702
+ // Start path with 'intrinsics' to clarify that properties are not
5703
+ // removed from the global object by the permitting operation.
5704
+ visitProperties('intrinsics', intrinsics, permitted);
5705
+ }$h͏_once.default( removeUnpermittedIntrinsics);
5617
5706
  })()
5618
5707
  ,
5619
- // === functors[14] ===
5708
+ // === functors[15] ===
5620
5709
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf,freeze;$h͏_imports([["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["SyntaxError", [$h͏_a => (SyntaxError = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["setPrototypeOf", [$h͏_a => (setPrototypeOf = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]]]);
5621
5710
 
5622
5711
 
@@ -5755,7 +5844,7 @@ function tameFunctionConstructors() {
5755
5844
  }$h͏_once.default( tameFunctionConstructors);
5756
5845
  })()
5757
5846
  ,
5758
- // === functors[15] ===
5847
+ // === functors[16] ===
5759
5848
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Date,TypeError,apply,construct,defineProperties;$h͏_imports([["./commons.js", [["Date", [$h͏_a => (Date = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["construct", [$h͏_a => (construct = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]]]]]);
5760
5849
 
5761
5850
 
@@ -5888,7 +5977,7 @@ function tameDateConstructor(dateTaming= 'safe') {
5888
5977
  }$h͏_once.default( tameDateConstructor);
5889
5978
  })()
5890
5979
  ,
5891
- // === functors[16] ===
5980
+ // === functors[17] ===
5892
5981
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Math,TypeError,create,getOwnPropertyDescriptors,objectPrototype;$h͏_imports([["./commons.js", [["Math", [$h͏_a => (Math = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["objectPrototype", [$h͏_a => (objectPrototype = $h͏_a)]]]]]);
5893
5982
 
5894
5983
 
@@ -5935,7 +6024,7 @@ function tameMathObject(mathTaming= 'safe') {
5935
6024
  }$h͏_once.default( tameMathObject);
5936
6025
  })()
5937
6026
  ,
5938
- // === functors[17] ===
6027
+ // === functors[18] ===
5939
6028
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_REG_EXP,TypeError,construct,defineProperties,getOwnPropertyDescriptor,speciesSymbol;$h͏_imports([["./commons.js", [["FERAL_REG_EXP", [$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["construct", [$h͏_a => (construct = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["speciesSymbol", [$h͏_a => (speciesSymbol = $h͏_a)]]]]]);
5940
6029
 
5941
6030
 
@@ -6006,11 +6095,11 @@ function tameRegExpConstructor(regExpTaming= 'safe') {
6006
6095
  }$h͏_once.default( tameRegExpConstructor);
6007
6096
  })()
6008
6097
  ,
6009
- // === functors[18] ===
6098
+ // === functors[19] ===
6010
6099
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let toStringTagSymbol,iteratorSymbol;$h͏_imports([["./commons.js", [["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]],["iteratorSymbol", [$h͏_a => (iteratorSymbol = $h͏_a)]]]]]);
6011
6100
 
6012
6101
  /**
6013
- * @file Exports {@code enablements}, a recursively defined
6102
+ * @module Exports {@code enablements}, a recursively defined
6014
6103
  * JSON record defining the optimum set of intrinsics properties
6015
6104
  * that need to be "repaired" before hardening is applied on
6016
6105
  * enviromments subject to the override mistake.
@@ -6250,7 +6339,7 @@ const severeEnablements= {
6250
6339
  '%SetPrototype%': '*'};$h͏_once.severeEnablements(severeEnablements);
6251
6340
  })()
6252
6341
  ,
6253
- // === functors[19] ===
6342
+ // === functors[20] ===
6254
6343
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,isObject,objectHasOwnProperty,ownKeys,setHas,minEnablements,moderateEnablements,severeEnablements;$h͏_imports([["./commons.js", [["Set", [$h͏_a => (Set = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayForEach", [$h͏_a => (arrayForEach = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["setHas", [$h͏_a => (setHas = $h͏_a)]]]],["./enablements.js", [["minEnablements", [$h͏_a => (minEnablements = $h͏_a)]],["moderateEnablements", [$h͏_a => (moderateEnablements = $h͏_a)]],["severeEnablements", [$h͏_a => (severeEnablements = $h͏_a)]]]]]);
6255
6344
 
6256
6345
 
@@ -6275,9 +6364,11 @@ const severeEnablements= {
6275
6364
 
6276
6365
 
6277
6366
 
6367
+
6368
+ /** @import {Reporter} from './reporting-types.js' */
6278
6369
 
6279
6370
  /**
6280
- * For a special set of properties defined in the `enablement` whitelist,
6371
+ * For a special set of properties defined in the `enablement` list,
6281
6372
  * `enablePropertyOverrides` ensures that the effect of freezing does not
6282
6373
  * suppress the ability to override these properties on derived objects by
6283
6374
  * simple assignment.
@@ -6328,11 +6419,13 @@ const severeEnablements= {
6328
6419
  *
6329
6420
  * @param {Record<string, any>} intrinsics
6330
6421
  * @param {'min' | 'moderate' | 'severe'} overrideTaming
6422
+ * @param {Reporter} reporter
6331
6423
  * @param {Iterable<string | symbol>} [overrideDebug]
6332
6424
  */
6333
6425
  function enablePropertyOverrides(
6334
6426
  intrinsics,
6335
6427
  overrideTaming,
6428
+ { warn},
6336
6429
  overrideDebug= [])
6337
6430
  {
6338
6431
  const debugProperties= new Set(overrideDebug);
@@ -6362,8 +6455,7 @@ function enablePropertyOverrides(
6362
6455
  this[prop]= newValue;
6363
6456
  }else {
6364
6457
  if( isDebug) {
6365
- // eslint-disable-next-line @endo/no-polymorphic-call
6366
- console.error(TypeError( `Override property ${prop}`));
6458
+ warn(TypeError( `Override property ${prop}`));
6367
6459
  }
6368
6460
  defineProperty(this, prop, {
6369
6461
  value: newValue,
@@ -6461,7 +6553,7 @@ function enablePropertyOverrides(
6461
6553
  }$h͏_once.default( enablePropertyOverrides);
6462
6554
  })()
6463
6555
  ,
6464
- // === functors[20] ===
6556
+ // === functors[21] ===
6465
6557
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Number,String,TypeError,defineProperty,getOwnPropertyNames,isObject,regexpExec,assert;$h͏_imports([["./commons.js", [["Number", [$h͏_a => (Number = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["regexpExec", [$h͏_a => (regexpExec = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
6466
6558
 
6467
6559
 
@@ -6545,7 +6637,7 @@ function tameLocaleMethods(intrinsics, localeTaming= 'safe') {
6545
6637
  }$h͏_once.default( tameLocaleMethods);
6546
6638
  })()
6547
6639
  ,
6548
- // === functors[21] ===
6640
+ // === functors[22] ===
6549
6641
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /**
6550
6642
  * makeEvalFunction()
6551
6643
  * A safe version of the native eval function which relies on
@@ -6575,7 +6667,7 @@ const makeEvalFunction= (safeEvaluate)=>{
6575
6667
  };$h͏_once.makeEvalFunction(makeEvalFunction);
6576
6668
  })()
6577
6669
  ,
6578
- // === functors[22] ===
6670
+ // === functors[23] ===
6579
6671
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_FUNCTION,arrayJoin,arrayPop,defineProperties,getPrototypeOf,assert;$h͏_imports([["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayPop", [$h͏_a => (arrayPop = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
6580
6672
 
6581
6673
 
@@ -6656,7 +6748,7 @@ const makeFunctionConstructor= (safeEvaluate)=>{
6656
6748
  };$h͏_once.makeFunctionConstructor(makeFunctionConstructor);
6657
6749
  })()
6658
6750
  ,
6659
- // === functors[23] ===
6751
+ // === functors[24] ===
6660
6752
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,assign,create,defineProperty,entries,freeze,objectHasOwnProperty,unscopablesSymbol,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["assign", [$h͏_a => (assign = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["unscopablesSymbol", [$h͏_a => (unscopablesSymbol = $h͏_a)]]]],["./make-eval-function.js", [["makeEvalFunction", [$h͏_a => (makeEvalFunction = $h͏_a)]]]],["./make-function-constructor.js", [["makeFunctionConstructor", [$h͏_a => (makeFunctionConstructor = $h͏_a)]]]],["./permits.js", [["constantProperties", [$h͏_a => (constantProperties = $h͏_a)]],["universalPropertyNames", [$h͏_a => (universalPropertyNames = $h͏_a)]]]]]);
6661
6753
 
6662
6754
 
@@ -6780,7 +6872,7 @@ const setGlobalObjectMutableProperties= (
6780
6872
 
6781
6873
 
6782
6874
 
6783
- // TODO These should still be tamed according to the whitelist before
6875
+ // TODO These should still be tamed according to the permits before
6784
6876
  // being made available.
6785
6877
  for( const [name, value]of entries(perCompartmentGlobals)) {
6786
6878
  defineProperty(globalObject, name, {
@@ -6831,7 +6923,7 @@ const setGlobalObjectEvaluators= (
6831
6923
  };$h͏_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
6832
6924
  })()
6833
6925
  ,
6834
- // === functors[24] ===
6926
+ // === functors[25] ===
6835
6927
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Proxy,String,TypeError,ReferenceError,create,freeze,getOwnPropertyDescriptors,globalThis,immutableObject,assert;$h͏_imports([["./commons.js", [["Proxy", [$h͏_a => (Proxy = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["ReferenceError", [$h͏_a => (ReferenceError = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["immutableObject", [$h͏_a => (immutableObject = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
6836
6928
 
6837
6929
 
@@ -6926,7 +7018,7 @@ const strictScopeTerminator= new Proxy(
6926
7018
  strictScopeTerminatorHandler);$h͏_once.strictScopeTerminator(strictScopeTerminator);
6927
7019
  })()
6928
7020
  ,
6929
- // === functors[25] ===
7021
+ // === functors[26] ===
6930
7022
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Proxy,create,freeze,getOwnPropertyDescriptors,immutableObject,reflectSet,strictScopeTerminatorHandler,alwaysThrowHandler;$h͏_imports([["./commons.js", [["Proxy", [$h͏_a => (Proxy = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["immutableObject", [$h͏_a => (immutableObject = $h͏_a)]],["reflectSet", [$h͏_a => (reflectSet = $h͏_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminatorHandler", [$h͏_a => (strictScopeTerminatorHandler = $h͏_a)]],["alwaysThrowHandler", [$h͏_a => (alwaysThrowHandler = $h͏_a)]]]]]);
6931
7023
 
6932
7024
 
@@ -6983,7 +7075,7 @@ const createSloppyGlobalsScopeTerminator= (globalObject)=>{
6983
7075
  freeze(createSloppyGlobalsScopeTerminator);
6984
7076
  })()
6985
7077
  ,
6986
- // === functors[26] ===
7078
+ // === functors[27] ===
6987
7079
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_EVAL,create,defineProperties,freeze,assert;$h͏_imports([["./commons.js", [["FERAL_EVAL", [$h͏_a => (FERAL_EVAL = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
6988
7080
 
6989
7081
 
@@ -7075,7 +7167,7 @@ const makeEvalScopeKit= ()=> {
7075
7167
  };$h͏_once.makeEvalScopeKit(makeEvalScopeKit);
7076
7168
  })()
7077
7169
  ,
7078
- // === functors[27] ===
7170
+ // === functors[28] ===
7079
7171
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_REG_EXP,regexpExec,stringSlice;$h͏_imports([["./commons.js", [["FERAL_REG_EXP", [$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["regexpExec", [$h͏_a => (regexpExec = $h͏_a)]],["stringSlice", [$h͏_a => (stringSlice = $h͏_a)]]]]]);
7080
7172
 
7081
7173
  // Captures a key and value of the form #key=value or @key=value
@@ -7128,7 +7220,7 @@ const getSourceURL= (src)=>{
7128
7220
  };$h͏_once.getSourceURL(getSourceURL);
7129
7221
  })()
7130
7222
  ,
7131
- // === functors[28] ===
7223
+ // === functors[29] ===
7132
7224
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,freeze,getSourceURL;$h͏_imports([["./commons.js", [["FERAL_REG_EXP", [$h͏_a => (FERAL_REG_EXP = $h͏_a)]],["SyntaxError", [$h͏_a => (SyntaxError = $h͏_a)]],["stringReplace", [$h͏_a => (stringReplace = $h͏_a)]],["stringSearch", [$h͏_a => (stringSearch = $h͏_a)]],["stringSlice", [$h͏_a => (stringSlice = $h͏_a)]],["stringSplit", [$h͏_a => (stringSplit = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]],["./get-source-url.js", [["getSourceURL", [$h͏_a => (getSourceURL = $h͏_a)]]]]]);
7133
7225
 
7134
7226
 
@@ -7396,7 +7488,7 @@ $h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
7396
7488
  applyTransforms: freeze(applyTransforms)});$h͏_once.transforms(transforms);
7397
7489
  })()
7398
7490
  ,
7399
- // === functors[29] ===
7491
+ // === functors[30] ===
7400
7492
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let arrayFilter,arrayIncludes,getOwnPropertyDescriptor,getOwnPropertyNames,objectHasOwnProperty,regexpTest;$h͏_imports([["./commons.js", [["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayIncludes", [$h͏_a => (arrayIncludes = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]],["regexpTest", [$h͏_a => (regexpTest = $h͏_a)]]]]]);
7401
7493
 
7402
7494
 
@@ -7579,7 +7671,7 @@ const getScopeConstants= (globalObject, moduleLexicals= {})=> {
7579
7671
  };$h͏_once.getScopeConstants(getScopeConstants);
7580
7672
  })()
7581
7673
  ,
7582
- // === functors[30] ===
7674
+ // === functors[31] ===
7583
7675
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_FUNCTION,arrayJoin,apply,getScopeConstants;$h͏_imports([["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]]]],["./scope-constants.js", [["getScopeConstants", [$h͏_a => (getScopeConstants = $h͏_a)]]]]]);
7584
7676
 
7585
7677
 
@@ -7692,7 +7784,7 @@ const makeEvaluate= (context)=>{
7692
7784
  };$h͏_once.makeEvaluate(makeEvaluate);
7693
7785
  })()
7694
7786
  ,
7695
- // === functors[31] ===
7787
+ // === functors[32] ===
7696
7788
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let apply,freeze,strictScopeTerminator,createSloppyGlobalsScopeTerminator,makeEvalScopeKit,applyTransforms,mandatoryTransforms,makeEvaluate,assert;$h͏_imports([["./commons.js", [["apply", [$h͏_a => (apply = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminator", [$h͏_a => (strictScopeTerminator = $h͏_a)]]]],["./sloppy-globals-scope-terminator.js", [["createSloppyGlobalsScopeTerminator", [$h͏_a => (createSloppyGlobalsScopeTerminator = $h͏_a)]]]],["./eval-scope.js", [["makeEvalScopeKit", [$h͏_a => (makeEvalScopeKit = $h͏_a)]]]],["./transforms.js", [["applyTransforms", [$h͏_a => (applyTransforms = $h͏_a)]],["mandatoryTransforms", [$h͏_a => (mandatoryTransforms = $h͏_a)]]]],["./make-evaluate.js", [["makeEvaluate", [$h͏_a => (makeEvaluate = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
7697
7789
 
7698
7790
 
@@ -7805,7 +7897,7 @@ const makeSafeEvaluator= ({
7805
7897
  };$h͏_once.makeSafeEvaluator(makeSafeEvaluator);
7806
7898
  })()
7807
7899
  ,
7808
- // === functors[32] ===
7900
+ // === functors[33] ===
7809
7901
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let WeakSet,defineProperty,freeze,functionPrototype,functionToString,stringEndsWith,weaksetAdd,weaksetHas;$h͏_imports([["./commons.js", [["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["functionPrototype", [$h͏_a => (functionPrototype = $h͏_a)]],["functionToString", [$h͏_a => (functionToString = $h͏_a)]],["stringEndsWith", [$h͏_a => (stringEndsWith = $h͏_a)]],["weaksetAdd", [$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]]]]]);
7810
7902
 
7811
7903
 
@@ -7858,7 +7950,7 @@ const tameFunctionToString= ()=> {
7858
7950
  };$h͏_once.tameFunctionToString(tameFunctionToString);
7859
7951
  })()
7860
7952
  ,
7861
- // === functors[33] ===
7953
+ // === functors[34] ===
7862
7954
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,globalThis,getOwnPropertyDescriptor,defineProperty;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]]]]]);Object.defineProperty(tameDomains, 'name', {value: "tameDomains"});$h͏_once.tameDomains(tameDomains);
7863
7955
 
7864
7956
 
@@ -7906,7 +7998,7 @@ function tameDomains(domainTaming= 'safe') {
7906
7998
  }
7907
7999
  })()
7908
8000
  ,
7909
- // === functors[34] ===
8001
+ // === functors[35] ===
7910
8002
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let functionPrototype,getPrototypeOf,globalThis,objectPrototype,setPrototypeOf;$h͏_imports([["./commons.js", [["functionPrototype", [$h͏_a => (functionPrototype = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["objectPrototype", [$h͏_a => (objectPrototype = $h͏_a)]],["setPrototypeOf", [$h͏_a => (setPrototypeOf = $h͏_a)]]]]]);
7911
8003
 
7912
8004
 
@@ -7960,9 +8052,8 @@ const tameModuleSource= ()=> {
7960
8052
  };$h͏_once.tameModuleSource(tameModuleSource);
7961
8053
  })()
7962
8054
  ,
7963
- // === functors[35] ===
7964
- ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let WeakSet,arrayFilter,arrayFlatMap,arrayMap,arrayPop,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,stringIncludes,stringSplit,weaksetAdd,weaksetHas;$h͏_imports([["../commons.js", [["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayFlatMap", [$h͏_a => (arrayFlatMap = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arrayPop", [$h͏_a => (arrayPop = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["fromEntries", [$h͏_a => (fromEntries = $h͏_a)]],["isError", [$h͏_a => (isError = $h͏_a)]],["stringEndsWith", [$h͏_a => (stringEndsWith = $h͏_a)]],["stringIncludes", [$h͏_a => (stringIncludes = $h͏_a)]],["stringSplit", [$h͏_a => (stringSplit = $h͏_a)]],["weaksetAdd", [$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]]]],["./types.js", []],["./internal-types.js", []]]);
7965
-
8055
+ // === functors[36] ===
8056
+ ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let WeakSet,arrayFilter,arrayFlatMap,arrayMap,arrayPop,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,stringIncludes,stringSplit,weaksetAdd,weaksetHas;$h͏_imports([["../commons.js", [["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayFlatMap", [$h͏_a => (arrayFlatMap = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arrayPop", [$h͏_a => (arrayPop = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["fromEntries", [$h͏_a => (fromEntries = $h͏_a)]],["isError", [$h͏_a => (isError = $h͏_a)]],["stringEndsWith", [$h͏_a => (stringEndsWith = $h͏_a)]],["stringIncludes", [$h͏_a => (stringIncludes = $h͏_a)]],["stringSplit", [$h͏_a => (stringSplit = $h͏_a)]],["weaksetAdd", [$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]]]]]);
7966
8057
 
7967
8058
 
7968
8059
 
@@ -7987,11 +8078,15 @@ const tameModuleSource= ()=> {
7987
8078
 
7988
8079
 
7989
8080
 
8081
+ /**
8082
+ * @import {FilterConsole, LogSeverity, VirtualConsole} from './types.js'
8083
+ * @import {ErrorInfo, ErrorInfoKind, LogRecord, NoteCallback, LoggedErrorHandler, MakeCausalConsole, MakeLoggingConsoleKit} from "./internal-types.js";
8084
+ */
7990
8085
 
7991
8086
  // For our internal debugging purposes, uncomment
7992
8087
  // const internalDebugConsole = console;
7993
8088
 
7994
- // The whitelists of console methods, from:
8089
+ // The permitted console methods, from:
7995
8090
  // Whatwg "living standard" https://console.spec.whatwg.org/
7996
8091
  // Node https://nodejs.org/dist/latest-v14.x/docs/api/console.html
7997
8092
  // MDN https://developer.mozilla.org/en-US/docs/Web/API/Console_API
@@ -8070,7 +8165,7 @@ const consoleOtherMethods= freeze([
8070
8165
  ]);
8071
8166
 
8072
8167
  /** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */$h͏_once.consoleOtherMethods(consoleOtherMethods);
8073
- const consoleWhitelist= freeze([
8168
+ const consoleMethodPermits= freeze([
8074
8169
  ...consoleLevelMethods,
8075
8170
  ...consoleOtherMethods]);
8076
8171
 
@@ -8078,8 +8173,8 @@ const consoleWhitelist= freeze([
8078
8173
  /**
8079
8174
  * consoleOmittedProperties is currently unused. I record and maintain it here
8080
8175
  * with the intention that it be treated like the `false` entries in the main
8081
- * SES whitelist: that seeing these on the original console is expected, but
8082
- * seeing anything else that's outside the whitelist is surprising and should
8176
+ * SES permits: that seeing these on the original console is expected, but
8177
+ * seeing anything else that's outside the permits is surprising and should
8083
8178
  * provide a diagnostic.
8084
8179
  *
8085
8180
  * const consoleOmittedProperties = freeze([
@@ -8118,7 +8213,7 @@ const makeLoggingConsoleKit= (
8118
8213
  let logArray= [];
8119
8214
 
8120
8215
  const loggingConsole= fromEntries(
8121
- arrayMap(consoleWhitelist, ([name, _])=> {
8216
+ arrayMap(consoleMethodPermits, ([name, _])=> {
8122
8217
  // Use an arrow function so that it doesn't come with its own name in
8123
8218
  // its printed form. Instead, we're hoping that tooling uses only
8124
8219
  // the `.name` property set below.
@@ -8468,11 +8563,11 @@ freeze(defineCausalConsoleFromLogger);
8468
8563
  /** @type {FilterConsole} */
8469
8564
  const filterConsole= (baseConsole, filter, _topic= undefined)=> {
8470
8565
  // TODO do something with optional topic string
8471
- const whitelist= arrayFilter(
8472
- consoleWhitelist,
8566
+ const methodPermits= arrayFilter(
8567
+ consoleMethodPermits,
8473
8568
  ([name, _])=> name in baseConsole);
8474
8569
 
8475
- const methods= arrayMap(whitelist, ([name, severity])=> {
8570
+ const methods= arrayMap(methodPermits, ([name, severity])=> {
8476
8571
  /**
8477
8572
  * @param {...any} args
8478
8573
  */
@@ -8492,7 +8587,7 @@ const filterConsole= (baseConsole, filter, _topic= undefined)=> {
8492
8587
  freeze(filterConsole);
8493
8588
  })()
8494
8589
  ,
8495
- // === functors[36] ===
8590
+ // === functors[37] ===
8496
8591
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FinalizationRegistry,Map,mapGet,mapDelete,WeakMap,mapSet,finalizationRegistryRegister,weakmapSet,weakmapGet,mapEntries,mapHas;$h͏_imports([["../commons.js", [["FinalizationRegistry", [$h͏_a => (FinalizationRegistry = $h͏_a)]],["Map", [$h͏_a => (Map = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["mapDelete", [$h͏_a => (mapDelete = $h͏_a)]],["WeakMap", [$h͏_a => (WeakMap = $h͏_a)]],["mapSet", [$h͏_a => (mapSet = $h͏_a)]],["finalizationRegistryRegister", [$h͏_a => (finalizationRegistryRegister = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["mapEntries", [$h͏_a => (mapEntries = $h͏_a)]],["mapHas", [$h͏_a => (mapHas = $h͏_a)]]]]]);
8497
8592
 
8498
8593
 
@@ -8617,9 +8712,8 @@ const makeRejectionHandlers= (reportReason)=>{
8617
8712
  };$h͏_once.makeRejectionHandlers(makeRejectionHandlers);
8618
8713
  })()
8619
8714
  ,
8620
- // === functors[37] ===
8621
- ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,apply,defineProperty,freeze,globalThis,defaultHandler,makeCausalConsole,makeRejectionHandlers;$h͏_imports([["../commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./assert.js", [["loggedErrorHandler", [$h͏_a => (defaultHandler = $h͏_a)]]]],["./console.js", [["makeCausalConsole", [$h͏_a => (makeCausalConsole = $h͏_a)]]]],["./unhandled-rejection.js", [["makeRejectionHandlers", [$h͏_a => (makeRejectionHandlers = $h͏_a)]]]],["./types.js", []],["./internal-types.js", []]]);
8622
-
8715
+ // === functors[38] ===
8716
+ ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,apply,defineProperty,freeze,globalThis,defaultHandler,makeCausalConsole,makeRejectionHandlers;$h͏_imports([["../commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./assert.js", [["loggedErrorHandler", [$h͏_a => (defaultHandler = $h͏_a)]]]],["./console.js", [["makeCausalConsole", [$h͏_a => (makeCausalConsole = $h͏_a)]]]],["./unhandled-rejection.js", [["makeRejectionHandlers", [$h͏_a => (makeRejectionHandlers = $h͏_a)]]]]]);
8623
8717
 
8624
8718
 
8625
8719
 
@@ -8633,6 +8727,10 @@ const makeRejectionHandlers= (reportReason)=>{
8633
8727
 
8634
8728
 
8635
8729
 
8730
+ /**
8731
+ * @import {VirtualConsole} from './types.js'
8732
+ * @import {GetStackString} from './internal-types.js';
8733
+ */
8636
8734
 
8637
8735
  const failFast= (message)=>{
8638
8736
  throw TypeError(message);
@@ -8818,7 +8916,7 @@ const tameConsole= (
8818
8916
  };$h͏_once.tameConsole(tameConsole);
8819
8917
  })()
8820
8918
  ,
8821
- // === functors[38] ===
8919
+ // === functors[39] ===
8822
8920
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,regexpTest,weakmapGet,weakmapSet,weaksetAdd,weaksetHas,TypeError;$h͏_imports([["../commons.js", [["WeakMap", [$h͏_a => (WeakMap = $h͏_a)]],["WeakSet", [$h͏_a => (WeakSet = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arraySlice", [$h͏_a => (arraySlice = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["fromEntries", [$h͏_a => (fromEntries = $h͏_a)]],["reflectSet", [$h͏_a => (reflectSet = $h͏_a)]],["regexpExec", [$h͏_a => (regexpExec = $h͏_a)]],["regexpTest", [$h͏_a => (regexpTest = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]],["weaksetAdd", [$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas", [$h͏_a => (weaksetHas = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]]]]]);
8823
8921
 
8824
8922
 
@@ -8840,8 +8938,8 @@ const tameConsole= (
8840
8938
 
8841
8939
 
8842
8940
 
8843
- // Whitelist names from https://v8.dev/docs/stack-trace-api
8844
- // Whitelisting only the names used by error-stack-shim/src/v8StackFrames
8941
+ // Permit names from https://v8.dev/docs/stack-trace-api
8942
+ // Permiting only the names used by error-stack-shim/src/v8StackFrames
8845
8943
  // callSiteToFrame to shim the error stack proposal.
8846
8944
  const safeV8CallSiteMethodNames= [
8847
8945
  // suppress 'getThis' definitely
@@ -8866,7 +8964,7 @@ const safeV8CallSiteMethodNames= [
8866
8964
  'getPosition',
8867
8965
  'getScriptNameOrSourceURL',
8868
8966
 
8869
- 'toString' // TODO replace to use only whitelisted info
8967
+ 'toString' // TODO replace to use only permitted info
8870
8968
  ];
8871
8969
 
8872
8970
  // TODO this is a ridiculously expensive way to attenuate callsites.
@@ -9164,7 +9262,7 @@ const tameV8ErrorConstructor= (
9164
9262
  };$h͏_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
9165
9263
  })()
9166
9264
  ,
9167
- // === functors[39] ===
9265
+ // === functors[40] ===
9168
9266
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_ERROR,TypeError,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,defineProperty,getOwnPropertyDescriptors,NativeErrors,tameV8ErrorConstructor;$h͏_imports([["../commons.js", [["FERAL_ERROR", [$h͏_a => (FERAL_ERROR = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["construct", [$h͏_a => (construct = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["setPrototypeOf", [$h͏_a => (setPrototypeOf = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]]]],["../permits.js", [["NativeErrors", [$h͏_a => (NativeErrors = $h͏_a)]]]],["./tame-v8-error-constructor.js", [["tameV8ErrorConstructor", [$h͏_a => (tameV8ErrorConstructor = $h͏_a)]]]]]);
9169
9267
 
9170
9268
 
@@ -9462,8 +9560,10 @@ function tameErrorConstructor(
9462
9560
  }$h͏_once.default( tameErrorConstructor);
9463
9561
  })()
9464
9562
  ,
9465
- // === functors[40] ===
9466
- ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let getenv,Map,Set,TypeError,arrayJoin,arrayMap,arrayPush,create,freeze,generatorNext,generatorThrow,getOwnPropertyNames,isObject,mapGet,mapHas,mapSet,promiseThen,setAdd,values,weakmapGet,weakmapHas,makeError,annotateError,q,b,X;$h͏_imports([["@endo/env-options", [["getEnvironmentOption", [$h͏_a => (getenv = $h͏_a)]]]],["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["Set", [$h͏_a => (Set = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["generatorNext", [$h͏_a => (generatorNext = $h͏_a)]],["generatorThrow", [$h͏_a => (generatorThrow = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["mapHas", [$h͏_a => (mapHas = $h͏_a)]],["mapSet", [$h͏_a => (mapSet = $h͏_a)]],["promiseThen", [$h͏_a => (promiseThen = $h͏_a)]],["setAdd", [$h͏_a => (setAdd = $h͏_a)]],["values", [$h͏_a => (values = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas", [$h͏_a => (weakmapHas = $h͏_a)]]]],["./error/assert.js", [["makeError", [$h͏_a => (makeError = $h͏_a)]],["annotateError", [$h͏_a => (annotateError = $h͏_a)]],["q", [$h͏_a => (q = $h͏_a)]],["b", [$h͏_a => (b = $h͏_a)]],["X", [$h͏_a => (X = $h͏_a)]]]]]);
9563
+ // === functors[41] ===
9564
+ ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let getenv,Map,Set,TypeError,arrayJoin,arrayMap,arrayPush,arraySome,create,freeze,generatorNext,generatorThrow,getOwnPropertyNames,isArray,isObject,mapGet,mapHas,mapSet,promiseThen,setAdd,values,weakmapGet,weakmapHas,makeError,annotateError,q,b,X;$h͏_imports([["@endo/env-options", [["getEnvironmentOption", [$h͏_a => (getenv = $h͏_a)]]]],["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["Set", [$h͏_a => (Set = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayJoin", [$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["arraySome", [$h͏_a => (arraySome = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["generatorNext", [$h͏_a => (generatorNext = $h͏_a)]],["generatorThrow", [$h͏_a => (generatorThrow = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["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)]],["promiseThen", [$h͏_a => (promiseThen = $h͏_a)]],["setAdd", [$h͏_a => (setAdd = $h͏_a)]],["values", [$h͏_a => (values = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas", [$h͏_a => (weakmapHas = $h͏_a)]]]],["./error/assert.js", [["makeError", [$h͏_a => (makeError = $h͏_a)]],["annotateError", [$h͏_a => (annotateError = $h͏_a)]],["q", [$h͏_a => (q = $h͏_a)]],["b", [$h͏_a => (b = $h͏_a)]],["X", [$h͏_a => (X = $h͏_a)]]]]]);
9565
+
9566
+
9467
9567
 
9468
9568
 
9469
9569
 
@@ -9550,14 +9650,23 @@ const loadModuleSource= (
9550
9650
  moduleLoads,
9551
9651
  importMeta)=>
9552
9652
  {
9553
- const { resolveHook}= weakmapGet(compartmentPrivateFields, compartment);
9653
+ const { resolveHook, name: compartmentName}= weakmapGet(
9654
+ compartmentPrivateFields,
9655
+ compartment);
9554
9656
 
9555
- // resolve all imports relative to this referrer module.
9556
- const resolvedImports= resolveAll(
9557
- moduleSource.imports,
9558
- resolveHook,
9559
- moduleSpecifier);
9560
9657
 
9658
+ const { imports}= moduleSource;
9659
+ if(
9660
+ !isArray(imports)||
9661
+ arraySome(imports, (specifier)=>typeof specifier!== 'string'))
9662
+ {
9663
+ throw makeError(
9664
+ X `Invalid module source: 'imports' must be an array of strings, got ${imports} for module ${q(moduleSpecifier)} of compartment ${q(compartmentName)}`);
9665
+
9666
+ }
9667
+
9668
+ // resolve all imports relative to this referrer module.
9669
+ const resolvedImports= resolveAll(imports, resolveHook, moduleSpecifier);
9561
9670
  const moduleRecord= freeze({
9562
9671
  compartment,
9563
9672
  moduleSource,
@@ -10115,7 +10224,7 @@ const loadNow= (
10115
10224
  };$h͏_once.loadNow(loadNow);
10116
10225
  })()
10117
10226
  ,
10118
- // === functors[41] ===
10227
+ // === functors[42] ===
10119
10228
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let makeAlias,Proxy,TypeError,create,freeze,mapGet,mapHas,mapSet,ownKeys,reflectGet,reflectGetOwnPropertyDescriptor,reflectHas,reflectIsExtensible,reflectPreventExtensions,toStringTagSymbol,weakmapSet,assert;$h͏_imports([["./module-load.js", [["makeAlias", [$h͏_a => (makeAlias = $h͏_a)]]]],["./commons.js", [["Proxy", [$h͏_a => (Proxy = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["mapHas", [$h͏_a => (mapHas = $h͏_a)]],["mapSet", [$h͏_a => (mapSet = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["reflectGet", [$h͏_a => (reflectGet = $h͏_a)]],["reflectGetOwnPropertyDescriptor", [$h͏_a => (reflectGetOwnPropertyDescriptor = $h͏_a)]],["reflectHas", [$h͏_a => (reflectHas = $h͏_a)]],["reflectIsExtensible", [$h͏_a => (reflectIsExtensible = $h͏_a)]],["reflectPreventExtensions", [$h͏_a => (reflectPreventExtensions = $h͏_a)]],["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
10120
10229
 
10121
10230
 
@@ -10318,7 +10427,7 @@ const getDeferredExports= (
10318
10427
  };$h͏_once.getDeferredExports(getDeferredExports);
10319
10428
  })()
10320
10429
  ,
10321
- // === functors[42] ===
10430
+ // === functors[43] ===
10322
10431
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,arrayPush,create,getOwnPropertyDescriptors,evadeHtmlCommentTest,evadeImportExpressionTest,rejectSomeDirectEvalExpressions,makeSafeEvaluator;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]]]],["./transforms.js", [["evadeHtmlCommentTest", [$h͏_a => (evadeHtmlCommentTest = $h͏_a)]],["evadeImportExpressionTest", [$h͏_a => (evadeImportExpressionTest = $h͏_a)]],["rejectSomeDirectEvalExpressions", [$h͏_a => (rejectSomeDirectEvalExpressions = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h͏_a => (makeSafeEvaluator = $h͏_a)]]]]]);
10323
10432
 
10324
10433
 
@@ -10414,7 +10523,7 @@ const compartmentEvaluate= (compartmentFields, source, options)=> {
10414
10523
  };$h͏_once.compartmentEvaluate(compartmentEvaluate);
10415
10524
  })()
10416
10525
  ,
10417
- // === functors[43] ===
10526
+ // === functors[44] ===
10418
10527
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let assert,getDeferredExports,ReferenceError,SyntaxError,TypeError,arrayForEach,arrayIncludes,arrayPush,arraySome,arraySort,create,defineProperty,entries,freeze,isArray,keys,mapGet,weakmapGet,reflectHas,assign,compartmentEvaluate;$h͏_imports([["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]],["./module-proxy.js", [["getDeferredExports", [$h͏_a => (getDeferredExports = $h͏_a)]]]],["./commons.js", [["ReferenceError", [$h͏_a => (ReferenceError = $h͏_a)]],["SyntaxError", [$h͏_a => (SyntaxError = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayForEach", [$h͏_a => (arrayForEach = $h͏_a)]],["arrayIncludes", [$h͏_a => (arrayIncludes = $h͏_a)]],["arrayPush", [$h͏_a => (arrayPush = $h͏_a)]],["arraySome", [$h͏_a => (arraySome = $h͏_a)]],["arraySort", [$h͏_a => (arraySort = $h͏_a)]],["create", [$h͏_a => (create = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]],["isArray", [$h͏_a => (isArray = $h͏_a)]],["keys", [$h͏_a => (keys = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["reflectHas", [$h͏_a => (reflectHas = $h͏_a)]],["assign", [$h͏_a => (assign = $h͏_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate", [$h͏_a => (compartmentEvaluate = $h͏_a)]]]]]);
10419
10528
 
10420
10529
 
@@ -10901,7 +11010,7 @@ $h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleI
10901
11010
  };$h͏_once.makeModuleInstance(makeModuleInstance);
10902
11011
  })()
10903
11012
  ,
10904
- // === functors[44] ===
11013
+ // === functors[45] ===
10905
11014
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let assert,makeModuleInstance,makeVirtualModuleInstance,Map,ReferenceError,TypeError,entries,isArray,isObject,mapGet,mapHas,mapSet,weakmapGet;$h͏_imports([["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]],["./module-instance.js", [["makeModuleInstance", [$h͏_a => (makeModuleInstance = $h͏_a)]],["makeVirtualModuleInstance", [$h͏_a => (makeVirtualModuleInstance = $h͏_a)]]]],["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["ReferenceError", [$h͏_a => (ReferenceError = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["isArray", [$h͏_a => (isArray = $h͏_a)]],["isObject", [$h͏_a => (isObject = $h͏_a)]],["mapGet", [$h͏_a => (mapGet = $h͏_a)]],["mapHas", [$h͏_a => (mapHas = $h͏_a)]],["mapSet", [$h͏_a => (mapSet = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]]]]]);
10906
11015
 
10907
11016
 
@@ -10980,27 +11089,27 @@ function mayBeVirtualModuleSource(moduleSource) {
10980
11089
  function validateVirtualModuleSource(moduleSource, moduleSpecifier) {
10981
11090
  const { exports}= moduleSource;
10982
11091
  isArray(exports)||
10983
- Fail `Property 'exports' of a third-party module source must be an array, got ${q(
11092
+ Fail `Invalid module source: 'exports' of a virtual module source must be an array, got ${q(
10984
11093
  exports)
10985
11094
  }, for module ${q(moduleSpecifier)}`;
10986
11095
  }
10987
11096
 
10988
11097
  function validateModuleSource(moduleSource, moduleSpecifier) {
10989
11098
  isObject(moduleSource)||
10990
- Fail `Module sources must be of type object, got ${q(
11099
+ Fail `Invalid module source: must be of type object, got ${q(
10991
11100
  moduleSource)
10992
11101
  }, for module ${q(moduleSpecifier)}`;
10993
11102
  const { imports, exports, reexports= []}= moduleSource;
10994
11103
  isArray(imports)||
10995
- Fail `Property 'imports' of a module source must be an array, got ${q(
11104
+ Fail `Invalid module source: 'imports' must be an array, got ${q(
10996
11105
  imports)
10997
11106
  }, for module ${q(moduleSpecifier)}`;
10998
11107
  isArray(exports)||
10999
- Fail `Property 'exports' of a precompiled module source must be an array, got ${q(
11108
+ Fail `Invalid module source: 'exports' must be an array, got ${q(
11000
11109
  exports)
11001
11110
  }, for module ${q(moduleSpecifier)}`;
11002
11111
  isArray(reexports)||
11003
- Fail `Property 'reexports' of a precompiled module source must be an array if present, got ${q(
11112
+ Fail `Invalid module source: 'reexports' must be an array if present, got ${q(
11004
11113
  reexports)
11005
11114
  }, for module ${q(moduleSpecifier)}`;
11006
11115
  }
@@ -11042,9 +11151,7 @@ const instantiate= (
11042
11151
  resolvedImports);
11043
11152
 
11044
11153
  }else {
11045
- throw TypeError(
11046
- `importHook must provide a module source, got ${q(moduleSource)}`);
11047
-
11154
+ throw TypeError( `Invalid module source, got ${q(moduleSource)}`);
11048
11155
  }
11049
11156
 
11050
11157
  // Memoize.
@@ -11065,7 +11172,7 @@ const instantiate= (
11065
11172
  };$h͏_once.instantiate(instantiate);
11066
11173
  })()
11067
11174
  ,
11068
- // === functors[45] ===
11175
+ // === functors[46] ===
11069
11176
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Map,TypeError,WeakMap,assign,defineProperties,promiseThen,toStringTagSymbol,weakmapGet,weakmapSet,setGlobalObjectSymbolUnscopables,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,assert,assertEqual,sharedGlobalPropertyNames,load,loadNow,link,getDeferredExports,compartmentEvaluate,makeSafeEvaluator;$h͏_imports([["./commons.js", [["Map", [$h͏_a => (Map = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["WeakMap", [$h͏_a => (WeakMap = $h͏_a)]],["assign", [$h͏_a => (assign = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["promiseThen", [$h͏_a => (promiseThen = $h͏_a)]],["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]],["weakmapGet", [$h͏_a => (weakmapGet = $h͏_a)]],["weakmapSet", [$h͏_a => (weakmapSet = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectSymbolUnscopables", [$h͏_a => (setGlobalObjectSymbolUnscopables = $h͏_a)]],["setGlobalObjectConstantProperties", [$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties", [$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators", [$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]],["assertEqual", [$h͏_a => (assertEqual = $h͏_a)]]]],["./permits.js", [["sharedGlobalPropertyNames", [$h͏_a => (sharedGlobalPropertyNames = $h͏_a)]]]],["./module-load.js", [["load", [$h͏_a => (load = $h͏_a)]],["loadNow", [$h͏_a => (loadNow = $h͏_a)]]]],["./module-link.js", [["link", [$h͏_a => (link = $h͏_a)]]]],["./module-proxy.js", [["getDeferredExports", [$h͏_a => (getDeferredExports = $h͏_a)]]]],["./compartment-evaluate.js", [["compartmentEvaluate", [$h͏_a => (compartmentEvaluate = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h͏_a => (makeSafeEvaluator = $h͏_a)]]]]]);
11070
11177
 
11071
11178
 
@@ -11391,7 +11498,7 @@ const makeCompartmentConstructor= (
11391
11498
  };$h͏_once.makeCompartmentConstructor(makeCompartmentConstructor);
11392
11499
  })()
11393
11500
  ,
11394
- // === functors[46] ===
11501
+ // === functors[47] ===
11395
11502
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,InertCompartment;$h͏_imports([["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["Float32Array", [$h͏_a => (Float32Array = $h͏_a)]],["Map", [$h͏_a => (Map = $h͏_a)]],["Set", [$h͏_a => (Set = $h͏_a)]],["String", [$h͏_a => (String = $h͏_a)]],["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]],["iterateArray", [$h͏_a => (iterateArray = $h͏_a)]],["iterateMap", [$h͏_a => (iterateMap = $h͏_a)]],["iterateSet", [$h͏_a => (iterateSet = $h͏_a)]],["iterateString", [$h͏_a => (iterateString = $h͏_a)]],["matchAllRegExp", [$h͏_a => (matchAllRegExp = $h͏_a)]],["matchAllSymbol", [$h͏_a => (matchAllSymbol = $h͏_a)]],["regexpPrototype", [$h͏_a => (regexpPrototype = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./compartment.js", [["InertCompartment", [$h͏_a => (InertCompartment = $h͏_a)]]]]]);
11396
11503
 
11397
11504
 
@@ -11559,7 +11666,7 @@ const getAnonymousIntrinsics= ()=> {
11559
11666
  };$h͏_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
11560
11667
  })()
11561
11668
  ,
11562
- // === functors[47] ===
11669
+ // === functors[48] ===
11563
11670
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,freeze;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["freeze", [$h͏_a => (freeze = $h͏_a)]]]]]);
11564
11671
 
11565
11672
 
@@ -11595,7 +11702,7 @@ const tameHarden= (safeHarden, hardenTaming)=> {
11595
11702
  freeze(tameHarden);
11596
11703
  })()
11597
11704
  ,
11598
- // === functors[48] ===
11705
+ // === functors[49] ===
11599
11706
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let Symbol,entries,fromEntries,getOwnPropertyDescriptors,defineProperties,arrayMap,functionBind;$h͏_imports([["./commons.js", [["Symbol", [$h͏_a => (Symbol = $h͏_a)]],["entries", [$h͏_a => (entries = $h͏_a)]],["fromEntries", [$h͏_a => (fromEntries = $h͏_a)]],["getOwnPropertyDescriptors", [$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["defineProperties", [$h͏_a => (defineProperties = $h͏_a)]],["arrayMap", [$h͏_a => (arrayMap = $h͏_a)]],["functionBind", [$h͏_a => (functionBind = $h͏_a)]]]]]);
11600
11707
 
11601
11708
 
@@ -11614,8 +11721,8 @@ freeze(tameHarden);
11614
11721
  * `Symbol` constructor on constructed compartments.
11615
11722
  *
11616
11723
  * Starting these properties as configurable assumes two succeeding phases of
11617
- * processing: A whitelisting phase, that
11618
- * removes all properties not on the whitelist (which requires them to be
11724
+ * processing: A permit enforcement phase, that
11725
+ * removes all properties not on the permits (which requires them to be
11619
11726
  * configurable) and a global hardening step that freezes all primordials,
11620
11727
  * returning these properties to their expected non-configurable status.
11621
11728
  *
@@ -11662,7 +11769,7 @@ const tameSymbolConstructor= ()=> {
11662
11769
  };$h͏_once.tameSymbolConstructor(tameSymbolConstructor);
11663
11770
  })()
11664
11771
  ,
11665
- // === functors[49] ===
11772
+ // === functors[50] ===
11666
11773
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let getOwnPropertyDescriptor,apply,defineProperty,toStringTagSymbol;$h͏_imports([["./commons.js", [["getOwnPropertyDescriptor", [$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["apply", [$h͏_a => (apply = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["toStringTagSymbol", [$h͏_a => (toStringTagSymbol = $h͏_a)]]]]]);
11667
11774
 
11668
11775
 
@@ -11875,7 +11982,7 @@ const tameFauxDataProperties= (intrinsics)=>{
11875
11982
  };$h͏_once.tameFauxDataProperties(tameFauxDataProperties);
11876
11983
  })()
11877
11984
  ,
11878
- // === functors[50] ===
11985
+ // === functors[51] ===
11879
11986
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let defineProperty,iteratorPrototype,iteratorSymbol,objectHasOwnProperty;$h͏_imports([["./commons.js", [["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]],["iteratorPrototype", [$h͏_a => (iteratorPrototype = $h͏_a)]],["iteratorSymbol", [$h͏_a => (iteratorSymbol = $h͏_a)]],["objectHasOwnProperty", [$h͏_a => (objectHasOwnProperty = $h͏_a)]]]]]);
11880
11987
 
11881
11988
 
@@ -11907,7 +12014,7 @@ const tameRegeneratorRuntime= ()=> {
11907
12014
  };$h͏_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
11908
12015
  })()
11909
12016
  ,
11910
- // === functors[51] ===
12017
+ // === functors[52] ===
11911
12018
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let ArrayBuffer,arrayBufferPrototype,arrayBufferSlice,arrayBufferGetByteLength,Uint8Array,typedArraySet,globalThis,TypeError,defineProperty;$h͏_imports([["./commons.js", [["ArrayBuffer", [$h͏_a => (ArrayBuffer = $h͏_a)]],["arrayBufferPrototype", [$h͏_a => (arrayBufferPrototype = $h͏_a)]],["arrayBufferSlice", [$h͏_a => (arrayBufferSlice = $h͏_a)]],["arrayBufferGetByteLength", [$h͏_a => (arrayBufferGetByteLength = $h͏_a)]],["Uint8Array", [$h͏_a => (Uint8Array = $h͏_a)]],["typedArraySet", [$h͏_a => (typedArraySet = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["defineProperty", [$h͏_a => (defineProperty = $h͏_a)]]]]]);
11912
12019
 
11913
12020
 
@@ -11996,8 +12103,118 @@ const shimArrayBufferTransfer= ()=> {
11996
12103
  };$h͏_once.shimArrayBufferTransfer(shimArrayBufferTransfer);
11997
12104
  })()
11998
12105
  ,
11999
- // === functors[52] ===
12000
- ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let getenv,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameModuleSource,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor,tameFauxDataProperties,tameRegeneratorRuntime,shimArrayBufferTransfer;$h͏_imports([["@endo/env-options", [["getEnvironmentOption", [$h͏_a => (getenv = $h͏_a)]]]],["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["FERAL_EVAL", [$h͏_a => (FERAL_EVAL = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["stringSplit", [$h͏_a => (stringSplit = $h͏_a)]],["noEvalEvaluate", [$h͏_a => (noEvalEvaluate = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./make-hardener.js", [["makeHardener", [$h͏_a => (makeHardener = $h͏_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h͏_a => (makeIntrinsicsCollector = $h͏_a)]]]],["./permits-intrinsics.js", [["default", [$h͏_a => (whitelistIntrinsics = $h͏_a)]]]],["./tame-function-constructors.js", [["default", [$h͏_a => (tameFunctionConstructors = $h͏_a)]]]],["./tame-date-constructor.js", [["default", [$h͏_a => (tameDateConstructor = $h͏_a)]]]],["./tame-math-object.js", [["default", [$h͏_a => (tameMathObject = $h͏_a)]]]],["./tame-regexp-constructor.js", [["default", [$h͏_a => (tameRegExpConstructor = $h͏_a)]]]],["./enable-property-overrides.js", [["default", [$h͏_a => (enablePropertyOverrides = $h͏_a)]]]],["./tame-locale-methods.js", [["default", [$h͏_a => (tameLocaleMethods = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties", [$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators", [$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h͏_a => (makeSafeEvaluator = $h͏_a)]]]],["./permits.js", [["initialGlobalPropertyNames", [$h͏_a => (initialGlobalPropertyNames = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./tame-domains.js", [["tameDomains", [$h͏_a => (tameDomains = $h͏_a)]]]],["./tame-module-source.js", [["tameModuleSource", [$h͏_a => (tameModuleSource = $h͏_a)]]]],["./error/tame-console.js", [["tameConsole", [$h͏_a => (tameConsole = $h͏_a)]]]],["./error/tame-error-constructor.js", [["default", [$h͏_a => (tameErrorConstructor = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]],["makeAssert", [$h͏_a => (makeAssert = $h͏_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h͏_a => (getAnonymousIntrinsics = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-harden.js", [["tameHarden", [$h͏_a => (tameHarden = $h͏_a)]]]],["./tame-symbol-constructor.js", [["tameSymbolConstructor", [$h͏_a => (tameSymbolConstructor = $h͏_a)]]]],["./tame-faux-data-properties.js", [["tameFauxDataProperties", [$h͏_a => (tameFauxDataProperties = $h͏_a)]]]],["./tame-regenerator-runtime.js", [["tameRegeneratorRuntime", [$h͏_a => (tameRegeneratorRuntime = $h͏_a)]]]],["./shim-arraybuffer-transfer.js", [["shimArrayBufferTransfer", [$h͏_a => (shimArrayBufferTransfer = $h͏_a)]]]]]);
12106
+ // === functors[53] ===
12107
+ ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let TypeError,functionBind,globalThis,assert;$h͏_imports([["./commons.js", [["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["functionBind", [$h͏_a => (functionBind = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
12108
+
12109
+
12110
+ /**
12111
+ * @import {Reporter, GroupReporter} from './reporting-types.js'
12112
+ */
12113
+
12114
+ /**
12115
+ * Creates a suitable reporter for internal errors and warnings out of the
12116
+ * Node.js console.error to ensure all messages to go stderr, including the
12117
+ * group label.
12118
+ * Accounts for the extra space introduced by console.error as a delimiter
12119
+ * between the indent and subsequent arguments.
12120
+ *
12121
+ * @param {(...message: Array<any>) => void} print
12122
+ */
12123
+ const makeReportPrinter= (print)=>{
12124
+ let indent= false;
12125
+ /** @param {Array<any>} args */
12126
+ const printIndent= (...args)=> {
12127
+ if( indent) {
12128
+ print(' ', ...args);
12129
+ }else {
12130
+ print(...args);
12131
+ }
12132
+ };
12133
+ return (/** @type {GroupReporter} */ {
12134
+ warn(...args) {
12135
+ printIndent(...args);
12136
+ },
12137
+ error(...args) {
12138
+ printIndent(...args);
12139
+ },
12140
+ groupCollapsed(...args) {
12141
+ assert(!indent);
12142
+ print(...args);
12143
+ indent= true;
12144
+ },
12145
+ groupEnd() {
12146
+ indent= false;
12147
+ }});
12148
+
12149
+ };
12150
+
12151
+ const mute= ()=> { };
12152
+
12153
+ /**
12154
+ * @param {"platform" | "console" | "none"} reporting
12155
+ */
12156
+ const chooseReporter= (reporting)=>{
12157
+ if( reporting=== 'none') {
12158
+ return makeReportPrinter(mute);
12159
+ }
12160
+ if( reporting!== 'platform'&& reporting!== 'console') {
12161
+ throw new TypeError( `Invalid lockdown reporting option: ${reporting}`);
12162
+ }
12163
+ if(
12164
+ reporting=== 'console'||
12165
+ globalThis.window=== globalThis||
12166
+ globalThis.importScripts!== undefined)
12167
+ {
12168
+ return console;
12169
+ }
12170
+ if( globalThis.console!== undefined) {
12171
+ // On Node.js, we send all feedback to stderr, regardless of purported level.
12172
+ const console= globalThis.console;
12173
+ const error= functionBind(console.error, console);
12174
+ return makeReportPrinter(error);
12175
+ }
12176
+ if( globalThis.print!== undefined) {
12177
+ return makeReportPrinter(globalThis.print);
12178
+ }
12179
+ return makeReportPrinter(mute);
12180
+ };
12181
+
12182
+ /**
12183
+ * @param {string} groupLabel
12184
+ * @param {GroupReporter} console
12185
+ * @param {(internalConsole: Reporter) => void} callback
12186
+ */$h͏_once.chooseReporter(chooseReporter);
12187
+ const reportInGroup= (groupLabel, console, callback)=> {
12188
+ const { warn, error, groupCollapsed, groupEnd}= console;
12189
+ let groupStarted= false;
12190
+ try {
12191
+ return callback({
12192
+ warn(...args) {
12193
+ if( !groupStarted) {
12194
+ groupCollapsed(groupLabel);
12195
+ groupStarted= true;
12196
+ }
12197
+ warn(...args);
12198
+ },
12199
+ error(...args) {
12200
+ if( !groupStarted) {
12201
+ groupCollapsed(groupLabel);
12202
+ groupStarted= true;
12203
+ }
12204
+ error(...args);
12205
+ }});
12206
+
12207
+ }finally {
12208
+ if( groupStarted) {
12209
+ groupEnd();
12210
+ }
12211
+ }
12212
+ };$h͏_once.reportInGroup(reportInGroup);
12213
+ })()
12214
+ ,
12215
+ // === functors[54] ===
12216
+ ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let getenv,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,removeUnpermittedIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameModuleSource,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor,tameFauxDataProperties,tameRegeneratorRuntime,shimArrayBufferTransfer,reportInGroup,chooseReporter;$h͏_imports([["@endo/env-options", [["getEnvironmentOption", [$h͏_a => (getenv = $h͏_a)]]]],["./commons.js", [["FERAL_FUNCTION", [$h͏_a => (FERAL_FUNCTION = $h͏_a)]],["FERAL_EVAL", [$h͏_a => (FERAL_EVAL = $h͏_a)]],["TypeError", [$h͏_a => (TypeError = $h͏_a)]],["arrayFilter", [$h͏_a => (arrayFilter = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]],["is", [$h͏_a => (is = $h͏_a)]],["ownKeys", [$h͏_a => (ownKeys = $h͏_a)]],["stringSplit", [$h͏_a => (stringSplit = $h͏_a)]],["noEvalEvaluate", [$h͏_a => (noEvalEvaluate = $h͏_a)]],["getOwnPropertyNames", [$h͏_a => (getOwnPropertyNames = $h͏_a)]],["getPrototypeOf", [$h͏_a => (getPrototypeOf = $h͏_a)]]]],["./make-hardener.js", [["makeHardener", [$h͏_a => (makeHardener = $h͏_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h͏_a => (makeIntrinsicsCollector = $h͏_a)]]]],["./permits-intrinsics.js", [["default", [$h͏_a => (removeUnpermittedIntrinsics = $h͏_a)]]]],["./tame-function-constructors.js", [["default", [$h͏_a => (tameFunctionConstructors = $h͏_a)]]]],["./tame-date-constructor.js", [["default", [$h͏_a => (tameDateConstructor = $h͏_a)]]]],["./tame-math-object.js", [["default", [$h͏_a => (tameMathObject = $h͏_a)]]]],["./tame-regexp-constructor.js", [["default", [$h͏_a => (tameRegExpConstructor = $h͏_a)]]]],["./enable-property-overrides.js", [["default", [$h͏_a => (enablePropertyOverrides = $h͏_a)]]]],["./tame-locale-methods.js", [["default", [$h͏_a => (tameLocaleMethods = $h͏_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h͏_a => (setGlobalObjectConstantProperties = $h͏_a)]],["setGlobalObjectMutableProperties", [$h͏_a => (setGlobalObjectMutableProperties = $h͏_a)]],["setGlobalObjectEvaluators", [$h͏_a => (setGlobalObjectEvaluators = $h͏_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h͏_a => (makeSafeEvaluator = $h͏_a)]]]],["./permits.js", [["initialGlobalPropertyNames", [$h͏_a => (initialGlobalPropertyNames = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./tame-domains.js", [["tameDomains", [$h͏_a => (tameDomains = $h͏_a)]]]],["./tame-module-source.js", [["tameModuleSource", [$h͏_a => (tameModuleSource = $h͏_a)]]]],["./error/tame-console.js", [["tameConsole", [$h͏_a => (tameConsole = $h͏_a)]]]],["./error/tame-error-constructor.js", [["default", [$h͏_a => (tameErrorConstructor = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]],["makeAssert", [$h͏_a => (makeAssert = $h͏_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h͏_a => (getAnonymousIntrinsics = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-harden.js", [["tameHarden", [$h͏_a => (tameHarden = $h͏_a)]]]],["./tame-symbol-constructor.js", [["tameSymbolConstructor", [$h͏_a => (tameSymbolConstructor = $h͏_a)]]]],["./tame-faux-data-properties.js", [["tameFauxDataProperties", [$h͏_a => (tameFauxDataProperties = $h͏_a)]]]],["./tame-regenerator-runtime.js", [["tameRegeneratorRuntime", [$h͏_a => (tameRegeneratorRuntime = $h͏_a)]]]],["./shim-arraybuffer-transfer.js", [["shimArrayBufferTransfer", [$h͏_a => (shimArrayBufferTransfer = $h͏_a)]]]],["./reporting.js", [["reportInGroup", [$h͏_a => (reportInGroup = $h͏_a)]],["chooseReporter", [$h͏_a => (chooseReporter = $h͏_a)]]]]]);
12217
+
12001
12218
 
12002
12219
 
12003
12220
 
@@ -12161,19 +12378,24 @@ const repairIntrinsics= (options= {})=> {
12161
12378
 
12162
12379
  const {
12163
12380
  errorTaming= getenv('LOCKDOWN_ERROR_TAMING', 'safe'),
12164
- errorTrapping= /** @type {"platform" | "none" | "report" | "abort" | "exit" | undefined} */
12381
+ errorTrapping= /** @type {"platform" | "none" | "report" | "abort" | "exit"} */
12165
12382
  getenv('LOCKDOWN_ERROR_TRAPPING', 'platform'),
12166
12383
 
12167
- unhandledRejectionTrapping= /** @type {"none" | "report" | undefined} */
12384
+ reporting= /** @type {"platform" | "console" | "none"} */
12385
+ getenv('LOCKDOWN_REPORTING', 'platform'),
12386
+
12387
+ unhandledRejectionTrapping= /** @type {"none" | "report"} */
12168
12388
  getenv('LOCKDOWN_UNHANDLED_REJECTION_TRAPPING', 'report'),
12169
12389
 
12170
12390
  regExpTaming= getenv('LOCKDOWN_REGEXP_TAMING', 'safe'),
12171
12391
  localeTaming= getenv('LOCKDOWN_LOCALE_TAMING', 'safe'),
12172
12392
 
12173
- consoleTaming= /** @type {'unsafe' | 'safe' | undefined} */
12393
+ consoleTaming= /** @type {'unsafe' | 'safe'} */
12174
12394
  getenv('LOCKDOWN_CONSOLE_TAMING', 'safe'),
12175
12395
 
12176
- overrideTaming= getenv('LOCKDOWN_OVERRIDE_TAMING', 'moderate'),
12396
+ overrideTaming= /** @type {'moderate' | 'min' | 'severe'} */
12397
+ getenv('LOCKDOWN_OVERRIDE_TAMING', 'moderate'),
12398
+
12177
12399
  stackFiltering= getenv('LOCKDOWN_STACK_FILTERING', 'concise'),
12178
12400
  domainTaming= getenv('LOCKDOWN_DOMAIN_TAMING', 'safe'),
12179
12401
  evalTaming= getenv('LOCKDOWN_EVAL_TAMING', 'safeEval'),
@@ -12207,6 +12429,8 @@ const repairIntrinsics= (options= {})=> {
12207
12429
  extraOptionsNames.length=== 0||
12208
12430
  Fail `lockdown(): non supported option ${q(extraOptionsNames)}`;
12209
12431
 
12432
+ const reporter= chooseReporter(reporting);
12433
+
12210
12434
  priorRepairIntrinsics=== undefined||
12211
12435
  // eslint-disable-next-line @endo/no-polymorphic-call
12212
12436
  assert.fail(
@@ -12272,7 +12496,7 @@ const repairIntrinsics= (options= {})=> {
12272
12496
  const markVirtualizedNativeFunction= tameFunctionToString();
12273
12497
 
12274
12498
  const { addIntrinsics, completePrototypes, finalIntrinsics}=
12275
- makeIntrinsicsCollector();
12499
+ makeIntrinsicsCollector(reporter);
12276
12500
 
12277
12501
  // @ts-expect-error __hardenTaming__ could be any string
12278
12502
  const tamedHarden= tameHarden(safeHarden, __hardenTaming__);
@@ -12356,13 +12580,22 @@ const repairIntrinsics= (options= {})=> {
12356
12580
  tameFauxDataProperties(intrinsics);
12357
12581
 
12358
12582
  /**
12359
- * 2. WHITELIST to standardize the environment.
12583
+ * 2. Enforce PERMITS on shared intrinsics
12360
12584
  */
12361
12585
 
12362
12586
  // Remove non-standard properties.
12363
- // All remaining function encountered during whitelisting are
12587
+ // All remaining functions encountered during whitelisting are
12364
12588
  // branded as honorary native functions.
12365
- whitelistIntrinsics(intrinsics, markVirtualizedNativeFunction);
12589
+ reportInGroup(
12590
+ 'SES Removing unpermitted intrinsics',
12591
+ reporter,
12592
+ (groupReporter)=>
12593
+ removeUnpermittedIntrinsics(
12594
+ intrinsics,
12595
+ markVirtualizedNativeFunction,
12596
+ groupReporter));
12597
+
12598
+
12366
12599
 
12367
12600
  // Initialize the powerful initial global, i.e., the global of the
12368
12601
  // start compartment, from the intrinsics.
@@ -12424,7 +12657,14 @@ const repairIntrinsics= (options= {})=> {
12424
12657
  // therefore before vetted shims rather than afterwards. It is not
12425
12658
  // clear yet which is better.
12426
12659
  // @ts-ignore enablePropertyOverrides does its own input validation
12427
- enablePropertyOverrides(intrinsics, overrideTaming, overrideDebug);
12660
+ reportInGroup('SES Enabling property overrides', reporter, (groupReporter)=>
12661
+ enablePropertyOverrides(
12662
+ intrinsics,
12663
+ overrideTaming,
12664
+ groupReporter,
12665
+ overrideDebug));
12666
+
12667
+
12428
12668
  if( legacyRegeneratorRuntimeTaming=== 'unsafe-ignore') {
12429
12669
  tameRegeneratorRuntime();
12430
12670
  }
@@ -12460,7 +12700,7 @@ const repairIntrinsics= (options= {})=> {
12460
12700
  };$h͏_once.repairIntrinsics(repairIntrinsics);
12461
12701
  })()
12462
12702
  ,
12463
- // === functors[53] ===
12703
+ // === functors[55] ===
12464
12704
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let globalThis,repairIntrinsics;$h͏_imports([["./assert-sloppy-mode.js", []],["./commons.js", [["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./lockdown.js", [["repairIntrinsics", [$h͏_a => (repairIntrinsics = $h͏_a)]]]]]);
12465
12705
 
12466
12706
 
@@ -12500,9 +12740,8 @@ globalThis.repairIntrinsics= (options)=>{
12500
12740
  };
12501
12741
  })()
12502
12742
  ,
12503
- // === functors[54] ===
12504
- ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let globalThis,makeCompartmentConstructor,tameFunctionToString,getGlobalIntrinsics;$h͏_imports([["./commons.js", [["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h͏_a => (makeCompartmentConstructor = $h͏_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h͏_a => (tameFunctionToString = $h͏_a)]]]],["./intrinsics.js", [["getGlobalIntrinsics", [$h͏_a => (getGlobalIntrinsics = $h͏_a)]]]]]);
12505
-
12743
+ // === functors[56] ===
12744
+ ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let globalThis,makeCompartmentConstructor,tameFunctionToString,getGlobalIntrinsics,chooseReporter;$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)]]]],["./reporting.js", [["chooseReporter", [$h͏_a => (chooseReporter = $h͏_a)]]]]]);
12506
12745
 
12507
12746
 
12508
12747
 
@@ -12510,21 +12749,26 @@ globalThis.repairIntrinsics= (options)=>{
12510
12749
 
12511
12750
  const markVirtualizedNativeFunction= tameFunctionToString();
12512
12751
 
12752
+ const muteReporter= chooseReporter('none');
12753
+
12513
12754
  // @ts-ignore Compartment is definitely on globalThis.
12514
12755
  globalThis.Compartment= makeCompartmentConstructor(
12515
12756
  makeCompartmentConstructor,
12516
- getGlobalIntrinsics(globalThis),
12757
+ // Any reporting that would need to be done should have already been done
12758
+ // during `lockdown()`.
12759
+ // See https://github.com/endojs/endo/pull/2624#discussion_r1840979770
12760
+ getGlobalIntrinsics(globalThis, muteReporter),
12517
12761
  markVirtualizedNativeFunction);
12518
12762
  })()
12519
12763
  ,
12520
- // === functors[55] ===
12764
+ // === functors[57] ===
12521
12765
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let globalThis,assert;$h͏_imports([["./commons.js", [["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["assert", [$h͏_a => (assert = $h͏_a)]]]]]);
12522
12766
 
12523
12767
 
12524
12768
  globalThis.assert= assert;
12525
12769
  })()
12526
12770
  ,
12527
- // === functors[56] ===
12771
+ // === functors[58] ===
12528
12772
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; let symbolFor,globalThis,defineCausalConsoleFromLogger,loggedErrorHandler;$h͏_imports([["./commons.js", [["symbolFor", [$h͏_a => (symbolFor = $h͏_a)]],["globalThis", [$h͏_a => (globalThis = $h͏_a)]]]],["./error/console.js", [["defineCausalConsoleFromLogger", [$h͏_a => (defineCausalConsoleFromLogger = $h͏_a)]]]],["./error/assert.js", [["loggedErrorHandler", [$h͏_a => (loggedErrorHandler = $h͏_a)]]]]]);
12529
12773
 
12530
12774
 
@@ -12577,7 +12821,7 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA]=
12577
12821
  makeCausalConsoleFromLoggerForSesAva;
12578
12822
  })()
12579
12823
  ,
12580
- // === functors[57] ===
12824
+ // === functors[59] ===
12581
12825
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([["./src/lockdown-shim.js", []],["./src/compartment-shim.js", []],["./src/assert-shim.js", []],["./src/console-shim.js", []]]);
12582
12826
  })()
12583
12827
  ,