ses 1.9.1 → 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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // ses@1.9.1
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
  },
@@ -720,16 +727,7 @@ function observeImports(map, importName, importIndex) {
720
727
  liveVar: {
721
728
  },
722
729
  onceVar: {
723
- NativeErrors: cells[11].NativeErrors.set,
724
- constantProperties: cells[11].constantProperties.set,
725
- universalPropertyNames: cells[11].universalPropertyNames.set,
726
- initialGlobalPropertyNames: cells[11].initialGlobalPropertyNames.set,
727
- sharedGlobalPropertyNames: cells[11].sharedGlobalPropertyNames.set,
728
- uniqueGlobalPropertyNames: cells[11].uniqueGlobalPropertyNames.set,
729
- FunctionInstance: cells[11].FunctionInstance.set,
730
- AsyncFunctionInstance: cells[11].AsyncFunctionInstance.set,
731
- isAccessorPermit: cells[11].isAccessorPermit.set,
732
- permitted: cells[11].permitted.set,
730
+ cauterizeProperty: cells[11].cauterizeProperty.set,
733
731
  },
734
732
  importMeta: {},
735
733
  });
@@ -737,33 +735,44 @@ function observeImports(map, importName, importIndex) {
737
735
  imports(entries) {
738
736
  const map = new Map(entries);
739
737
  observeImports(map, "./commons.js", 0);
740
- observeImports(map, "./permits.js", 11);
741
738
  },
742
739
  liveVar: {
743
740
  },
744
741
  onceVar: {
745
- makeIntrinsicsCollector: cells[12].makeIntrinsicsCollector.set,
746
- 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,
747
752
  },
748
753
  importMeta: {},
749
754
  });
750
755
  functors[13]({
751
756
  imports(entries) {
752
757
  const map = new Map(entries);
753
- observeImports(map, "./permits.js", 11);
758
+ observeImports(map, "./cauterize-property.js", 11);
754
759
  observeImports(map, "./commons.js", 0);
760
+ observeImports(map, "./permits.js", 12);
755
761
  },
756
762
  liveVar: {
757
763
  },
758
764
  onceVar: {
759
- default: cells[13].default.set,
765
+ makeIntrinsicsCollector: cells[13].makeIntrinsicsCollector.set,
766
+ getGlobalIntrinsics: cells[13].getGlobalIntrinsics.set,
760
767
  },
761
768
  importMeta: {},
762
769
  });
763
770
  functors[14]({
764
771
  imports(entries) {
765
772
  const map = new Map(entries);
773
+ observeImports(map, "./permits.js", 12);
766
774
  observeImports(map, "./commons.js", 0);
775
+ observeImports(map, "./cauterize-property.js", 11);
767
776
  },
768
777
  liveVar: {
769
778
  },
@@ -816,9 +825,7 @@ function observeImports(map, importName, importIndex) {
816
825
  liveVar: {
817
826
  },
818
827
  onceVar: {
819
- minEnablements: cells[18].minEnablements.set,
820
- moderateEnablements: cells[18].moderateEnablements.set,
821
- severeEnablements: cells[18].severeEnablements.set,
828
+ default: cells[18].default.set,
822
829
  },
823
830
  importMeta: {},
824
831
  });
@@ -826,12 +833,13 @@ function observeImports(map, importName, importIndex) {
826
833
  imports(entries) {
827
834
  const map = new Map(entries);
828
835
  observeImports(map, "./commons.js", 0);
829
- observeImports(map, "./enablements.js", 18);
830
836
  },
831
837
  liveVar: {
832
838
  },
833
839
  onceVar: {
834
- default: cells[19].default.set,
840
+ minEnablements: cells[19].minEnablements.set,
841
+ moderateEnablements: cells[19].moderateEnablements.set,
842
+ severeEnablements: cells[19].severeEnablements.set,
835
843
  },
836
844
  importMeta: {},
837
845
  });
@@ -839,7 +847,7 @@ function observeImports(map, importName, importIndex) {
839
847
  imports(entries) {
840
848
  const map = new Map(entries);
841
849
  observeImports(map, "./commons.js", 0);
842
- observeImports(map, "./error/assert.js", 9);
850
+ observeImports(map, "./enablements.js", 19);
843
851
  },
844
852
  liveVar: {
845
853
  },
@@ -851,24 +859,24 @@ function observeImports(map, importName, importIndex) {
851
859
  functors[21]({
852
860
  imports(entries) {
853
861
  const map = new Map(entries);
862
+ observeImports(map, "./commons.js", 0);
863
+ observeImports(map, "./error/assert.js", 9);
854
864
  },
855
865
  liveVar: {
856
866
  },
857
867
  onceVar: {
858
- makeEvalFunction: cells[21].makeEvalFunction.set,
868
+ default: cells[21].default.set,
859
869
  },
860
870
  importMeta: {},
861
871
  });
862
872
  functors[22]({
863
873
  imports(entries) {
864
874
  const map = new Map(entries);
865
- observeImports(map, "./commons.js", 0);
866
- observeImports(map, "./error/assert.js", 9);
867
875
  },
868
876
  liveVar: {
869
877
  },
870
878
  onceVar: {
871
- makeFunctionConstructor: cells[22].makeFunctionConstructor.set,
879
+ makeEvalFunction: cells[22].makeEvalFunction.set,
872
880
  },
873
881
  importMeta: {},
874
882
  });
@@ -876,17 +884,12 @@ function observeImports(map, importName, importIndex) {
876
884
  imports(entries) {
877
885
  const map = new Map(entries);
878
886
  observeImports(map, "./commons.js", 0);
879
- observeImports(map, "./make-eval-function.js", 21);
880
- observeImports(map, "./make-function-constructor.js", 22);
881
- observeImports(map, "./permits.js", 11);
887
+ observeImports(map, "./error/assert.js", 9);
882
888
  },
883
889
  liveVar: {
884
890
  },
885
891
  onceVar: {
886
- setGlobalObjectSymbolUnscopables: cells[23].setGlobalObjectSymbolUnscopables.set,
887
- setGlobalObjectConstantProperties: cells[23].setGlobalObjectConstantProperties.set,
888
- setGlobalObjectMutableProperties: cells[23].setGlobalObjectMutableProperties.set,
889
- setGlobalObjectEvaluators: cells[23].setGlobalObjectEvaluators.set,
892
+ makeFunctionConstructor: cells[23].makeFunctionConstructor.set,
890
893
  },
891
894
  importMeta: {},
892
895
  });
@@ -894,14 +897,17 @@ function observeImports(map, importName, importIndex) {
894
897
  imports(entries) {
895
898
  const map = new Map(entries);
896
899
  observeImports(map, "./commons.js", 0);
897
- 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);
898
903
  },
899
904
  liveVar: {
900
905
  },
901
906
  onceVar: {
902
- alwaysThrowHandler: cells[24].alwaysThrowHandler.set,
903
- strictScopeTerminatorHandler: cells[24].strictScopeTerminatorHandler.set,
904
- 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,
905
911
  },
906
912
  importMeta: {},
907
913
  });
@@ -909,12 +915,14 @@ function observeImports(map, importName, importIndex) {
909
915
  imports(entries) {
910
916
  const map = new Map(entries);
911
917
  observeImports(map, "./commons.js", 0);
912
- observeImports(map, "./strict-scope-terminator.js", 24);
918
+ observeImports(map, "./error/assert.js", 9);
913
919
  },
914
920
  liveVar: {
915
921
  },
916
922
  onceVar: {
917
- createSloppyGlobalsScopeTerminator: cells[25].createSloppyGlobalsScopeTerminator.set,
923
+ alwaysThrowHandler: cells[25].alwaysThrowHandler.set,
924
+ strictScopeTerminatorHandler: cells[25].strictScopeTerminatorHandler.set,
925
+ strictScopeTerminator: cells[25].strictScopeTerminator.set,
918
926
  },
919
927
  importMeta: {},
920
928
  });
@@ -922,12 +930,12 @@ function observeImports(map, importName, importIndex) {
922
930
  imports(entries) {
923
931
  const map = new Map(entries);
924
932
  observeImports(map, "./commons.js", 0);
925
- observeImports(map, "./error/assert.js", 9);
933
+ observeImports(map, "./strict-scope-terminator.js", 25);
926
934
  },
927
935
  liveVar: {
928
936
  },
929
937
  onceVar: {
930
- makeEvalScopeKit: cells[26].makeEvalScopeKit.set,
938
+ createSloppyGlobalsScopeTerminator: cells[26].createSloppyGlobalsScopeTerminator.set,
931
939
  },
932
940
  importMeta: {},
933
941
  });
@@ -935,11 +943,12 @@ function observeImports(map, importName, importIndex) {
935
943
  imports(entries) {
936
944
  const map = new Map(entries);
937
945
  observeImports(map, "./commons.js", 0);
946
+ observeImports(map, "./error/assert.js", 9);
938
947
  },
939
948
  liveVar: {
940
949
  },
941
950
  onceVar: {
942
- getSourceURL: cells[27].getSourceURL.set,
951
+ makeEvalScopeKit: cells[27].makeEvalScopeKit.set,
943
952
  },
944
953
  importMeta: {},
945
954
  });
@@ -947,19 +956,11 @@ function observeImports(map, importName, importIndex) {
947
956
  imports(entries) {
948
957
  const map = new Map(entries);
949
958
  observeImports(map, "./commons.js", 0);
950
- observeImports(map, "./get-source-url.js", 27);
951
959
  },
952
960
  liveVar: {
953
961
  },
954
962
  onceVar: {
955
- rejectHtmlComments: cells[28].rejectHtmlComments.set,
956
- evadeHtmlCommentTest: cells[28].evadeHtmlCommentTest.set,
957
- rejectImportExpressions: cells[28].rejectImportExpressions.set,
958
- evadeImportExpressionTest: cells[28].evadeImportExpressionTest.set,
959
- rejectSomeDirectEvalExpressions: cells[28].rejectSomeDirectEvalExpressions.set,
960
- mandatoryTransforms: cells[28].mandatoryTransforms.set,
961
- applyTransforms: cells[28].applyTransforms.set,
962
- transforms: cells[28].transforms.set,
963
+ getSourceURL: cells[28].getSourceURL.set,
963
964
  },
964
965
  importMeta: {},
965
966
  });
@@ -967,12 +968,19 @@ function observeImports(map, importName, importIndex) {
967
968
  imports(entries) {
968
969
  const map = new Map(entries);
969
970
  observeImports(map, "./commons.js", 0);
971
+ observeImports(map, "./get-source-url.js", 28);
970
972
  },
971
973
  liveVar: {
972
974
  },
973
975
  onceVar: {
974
- isValidIdentifierName: cells[29].isValidIdentifierName.set,
975
- 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,
976
984
  },
977
985
  importMeta: {},
978
986
  });
@@ -980,12 +988,12 @@ function observeImports(map, importName, importIndex) {
980
988
  imports(entries) {
981
989
  const map = new Map(entries);
982
990
  observeImports(map, "./commons.js", 0);
983
- observeImports(map, "./scope-constants.js", 29);
984
991
  },
985
992
  liveVar: {
986
993
  },
987
994
  onceVar: {
988
- makeEvaluate: cells[30].makeEvaluate.set,
995
+ isValidIdentifierName: cells[30].isValidIdentifierName.set,
996
+ getScopeConstants: cells[30].getScopeConstants.set,
989
997
  },
990
998
  importMeta: {},
991
999
  });
@@ -993,17 +1001,12 @@ function observeImports(map, importName, importIndex) {
993
1001
  imports(entries) {
994
1002
  const map = new Map(entries);
995
1003
  observeImports(map, "./commons.js", 0);
996
- observeImports(map, "./strict-scope-terminator.js", 24);
997
- observeImports(map, "./sloppy-globals-scope-terminator.js", 25);
998
- observeImports(map, "./eval-scope.js", 26);
999
- observeImports(map, "./transforms.js", 28);
1000
- observeImports(map, "./make-evaluate.js", 30);
1001
- observeImports(map, "./error/assert.js", 9);
1004
+ observeImports(map, "./scope-constants.js", 30);
1002
1005
  },
1003
1006
  liveVar: {
1004
1007
  },
1005
1008
  onceVar: {
1006
- makeSafeEvaluator: cells[31].makeSafeEvaluator.set,
1009
+ makeEvaluate: cells[31].makeEvaluate.set,
1007
1010
  },
1008
1011
  importMeta: {},
1009
1012
  });
@@ -1011,11 +1014,17 @@ function observeImports(map, importName, importIndex) {
1011
1014
  imports(entries) {
1012
1015
  const map = new Map(entries);
1013
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);
1014
1023
  },
1015
1024
  liveVar: {
1016
1025
  },
1017
1026
  onceVar: {
1018
- tameFunctionToString: cells[32].tameFunctionToString.set,
1027
+ makeSafeEvaluator: cells[32].makeSafeEvaluator.set,
1019
1028
  },
1020
1029
  importMeta: {},
1021
1030
  });
@@ -1027,7 +1036,7 @@ function observeImports(map, importName, importIndex) {
1027
1036
  liveVar: {
1028
1037
  },
1029
1038
  onceVar: {
1030
- tameDomains: cells[33].tameDomains.set,
1039
+ tameFunctionToString: cells[33].tameFunctionToString.set,
1031
1040
  },
1032
1041
  importMeta: {},
1033
1042
  });
@@ -1039,25 +1048,19 @@ function observeImports(map, importName, importIndex) {
1039
1048
  liveVar: {
1040
1049
  },
1041
1050
  onceVar: {
1042
- tameModuleSource: cells[34].tameModuleSource.set,
1051
+ tameDomains: cells[34].tameDomains.set,
1043
1052
  },
1044
1053
  importMeta: {},
1045
1054
  });
1046
1055
  functors[35]({
1047
1056
  imports(entries) {
1048
1057
  const map = new Map(entries);
1049
- observeImports(map, "../commons.js", 0);
1058
+ observeImports(map, "./commons.js", 0);
1050
1059
  },
1051
1060
  liveVar: {
1052
1061
  },
1053
1062
  onceVar: {
1054
- consoleLevelMethods: cells[35].consoleLevelMethods.set,
1055
- consoleOtherMethods: cells[35].consoleOtherMethods.set,
1056
- makeLoggingConsoleKit: cells[35].makeLoggingConsoleKit.set,
1057
- pumpLogToConsole: cells[35].pumpLogToConsole.set,
1058
- makeCausalConsole: cells[35].makeCausalConsole.set,
1059
- defineCausalConsoleFromLogger: cells[35].defineCausalConsoleFromLogger.set,
1060
- filterConsole: cells[35].filterConsole.set,
1063
+ tameModuleSource: cells[35].tameModuleSource.set,
1061
1064
  },
1062
1065
  importMeta: {},
1063
1066
  });
@@ -1069,7 +1072,13 @@ function observeImports(map, importName, importIndex) {
1069
1072
  liveVar: {
1070
1073
  },
1071
1074
  onceVar: {
1072
- 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,
1073
1082
  },
1074
1083
  importMeta: {},
1075
1084
  });
@@ -1077,14 +1086,11 @@ function observeImports(map, importName, importIndex) {
1077
1086
  imports(entries) {
1078
1087
  const map = new Map(entries);
1079
1088
  observeImports(map, "../commons.js", 0);
1080
- observeImports(map, "./assert.js", 9);
1081
- observeImports(map, "./console.js", 35);
1082
- observeImports(map, "./unhandled-rejection.js", 36);
1083
1089
  },
1084
1090
  liveVar: {
1085
1091
  },
1086
1092
  onceVar: {
1087
- tameConsole: cells[37].tameConsole.set,
1093
+ makeRejectionHandlers: cells[37].makeRejectionHandlers.set,
1088
1094
  },
1089
1095
  importMeta: {},
1090
1096
  });
@@ -1092,13 +1098,14 @@ function observeImports(map, importName, importIndex) {
1092
1098
  imports(entries) {
1093
1099
  const map = new Map(entries);
1094
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);
1095
1104
  },
1096
1105
  liveVar: {
1097
1106
  },
1098
1107
  onceVar: {
1099
- filterFileName: cells[38].filterFileName.set,
1100
- shortenCallSiteString: cells[38].shortenCallSiteString.set,
1101
- tameV8ErrorConstructor: cells[38].tameV8ErrorConstructor.set,
1108
+ tameConsole: cells[38].tameConsole.set,
1102
1109
  },
1103
1110
  importMeta: {},
1104
1111
  });
@@ -1106,75 +1113,73 @@ function observeImports(map, importName, importIndex) {
1106
1113
  imports(entries) {
1107
1114
  const map = new Map(entries);
1108
1115
  observeImports(map, "../commons.js", 0);
1109
- observeImports(map, "../permits.js", 11);
1110
- observeImports(map, "./tame-v8-error-constructor.js", 38);
1111
1116
  },
1112
1117
  liveVar: {
1113
1118
  },
1114
1119
  onceVar: {
1115
- default: cells[39].default.set,
1120
+ filterFileName: cells[39].filterFileName.set,
1121
+ shortenCallSiteString: cells[39].shortenCallSiteString.set,
1122
+ tameV8ErrorConstructor: cells[39].tameV8ErrorConstructor.set,
1116
1123
  },
1117
1124
  importMeta: {},
1118
1125
  });
1119
1126
  functors[40]({
1120
1127
  imports(entries) {
1121
1128
  const map = new Map(entries);
1122
- observeImports(map, "@endo/env-options", 3);
1123
- observeImports(map, "./commons.js", 0);
1124
- 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);
1125
1132
  },
1126
1133
  liveVar: {
1127
1134
  },
1128
1135
  onceVar: {
1129
- makeAlias: cells[40].makeAlias.set,
1130
- load: cells[40].load.set,
1131
- loadNow: cells[40].loadNow.set,
1136
+ default: cells[40].default.set,
1132
1137
  },
1133
1138
  importMeta: {},
1134
1139
  });
1135
1140
  functors[41]({
1136
1141
  imports(entries) {
1137
1142
  const map = new Map(entries);
1138
- observeImports(map, "./module-load.js", 40);
1143
+ observeImports(map, "@endo/env-options", 3);
1139
1144
  observeImports(map, "./commons.js", 0);
1140
1145
  observeImports(map, "./error/assert.js", 9);
1141
1146
  },
1142
1147
  liveVar: {
1143
1148
  },
1144
1149
  onceVar: {
1145
- deferExports: cells[41].deferExports.set,
1146
- getDeferredExports: cells[41].getDeferredExports.set,
1150
+ makeAlias: cells[41].makeAlias.set,
1151
+ load: cells[41].load.set,
1152
+ loadNow: cells[41].loadNow.set,
1147
1153
  },
1148
1154
  importMeta: {},
1149
1155
  });
1150
1156
  functors[42]({
1151
1157
  imports(entries) {
1152
1158
  const map = new Map(entries);
1159
+ observeImports(map, "./module-load.js", 41);
1153
1160
  observeImports(map, "./commons.js", 0);
1154
- observeImports(map, "./transforms.js", 28);
1155
- observeImports(map, "./make-safe-evaluator.js", 31);
1161
+ observeImports(map, "./error/assert.js", 9);
1156
1162
  },
1157
1163
  liveVar: {
1158
1164
  },
1159
1165
  onceVar: {
1160
- provideCompartmentEvaluator: cells[42].provideCompartmentEvaluator.set,
1161
- compartmentEvaluate: cells[42].compartmentEvaluate.set,
1166
+ deferExports: cells[42].deferExports.set,
1167
+ getDeferredExports: cells[42].getDeferredExports.set,
1162
1168
  },
1163
1169
  importMeta: {},
1164
1170
  });
1165
1171
  functors[43]({
1166
1172
  imports(entries) {
1167
1173
  const map = new Map(entries);
1168
- observeImports(map, "./error/assert.js", 9);
1169
- observeImports(map, "./module-proxy.js", 41);
1170
1174
  observeImports(map, "./commons.js", 0);
1171
- observeImports(map, "./compartment-evaluate.js", 42);
1175
+ observeImports(map, "./transforms.js", 29);
1176
+ observeImports(map, "./make-safe-evaluator.js", 32);
1172
1177
  },
1173
1178
  liveVar: {
1174
1179
  },
1175
1180
  onceVar: {
1176
- makeVirtualModuleInstance: cells[43].makeVirtualModuleInstance.set,
1177
- makeModuleInstance: cells[43].makeModuleInstance.set,
1181
+ provideCompartmentEvaluator: cells[43].provideCompartmentEvaluator.set,
1182
+ compartmentEvaluate: cells[43].compartmentEvaluate.set,
1178
1183
  },
1179
1184
  importMeta: {},
1180
1185
  });
@@ -1182,36 +1187,30 @@ function observeImports(map, importName, importIndex) {
1182
1187
  imports(entries) {
1183
1188
  const map = new Map(entries);
1184
1189
  observeImports(map, "./error/assert.js", 9);
1185
- observeImports(map, "./module-instance.js", 43);
1190
+ observeImports(map, "./module-proxy.js", 42);
1186
1191
  observeImports(map, "./commons.js", 0);
1192
+ observeImports(map, "./compartment-evaluate.js", 43);
1187
1193
  },
1188
1194
  liveVar: {
1189
1195
  },
1190
1196
  onceVar: {
1191
- link: cells[44].link.set,
1192
- instantiate: cells[44].instantiate.set,
1197
+ makeVirtualModuleInstance: cells[44].makeVirtualModuleInstance.set,
1198
+ makeModuleInstance: cells[44].makeModuleInstance.set,
1193
1199
  },
1194
1200
  importMeta: {},
1195
1201
  });
1196
1202
  functors[45]({
1197
1203
  imports(entries) {
1198
1204
  const map = new Map(entries);
1199
- observeImports(map, "./commons.js", 0);
1200
- observeImports(map, "./global-object.js", 23);
1201
1205
  observeImports(map, "./error/assert.js", 9);
1202
- observeImports(map, "./permits.js", 11);
1203
- observeImports(map, "./module-load.js", 40);
1204
- observeImports(map, "./module-link.js", 44);
1205
- observeImports(map, "./module-proxy.js", 41);
1206
- observeImports(map, "./compartment-evaluate.js", 42);
1207
- observeImports(map, "./make-safe-evaluator.js", 31);
1206
+ observeImports(map, "./module-instance.js", 44);
1207
+ observeImports(map, "./commons.js", 0);
1208
1208
  },
1209
1209
  liveVar: {
1210
1210
  },
1211
1211
  onceVar: {
1212
- InertCompartment: cells[45].InertCompartment.set,
1213
- CompartmentPrototype: cells[45].CompartmentPrototype.set,
1214
- makeCompartmentConstructor: cells[45].makeCompartmentConstructor.set,
1212
+ link: cells[45].link.set,
1213
+ instantiate: cells[45].instantiate.set,
1215
1214
  },
1216
1215
  importMeta: {},
1217
1216
  });
@@ -1219,12 +1218,21 @@ function observeImports(map, importName, importIndex) {
1219
1218
  imports(entries) {
1220
1219
  const map = new Map(entries);
1221
1220
  observeImports(map, "./commons.js", 0);
1222
- 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);
1223
1229
  },
1224
1230
  liveVar: {
1225
1231
  },
1226
1232
  onceVar: {
1227
- getAnonymousIntrinsics: cells[46].getAnonymousIntrinsics.set,
1233
+ InertCompartment: cells[46].InertCompartment.set,
1234
+ CompartmentPrototype: cells[46].CompartmentPrototype.set,
1235
+ makeCompartmentConstructor: cells[46].makeCompartmentConstructor.set,
1228
1236
  },
1229
1237
  importMeta: {},
1230
1238
  });
@@ -1232,11 +1240,12 @@ function observeImports(map, importName, importIndex) {
1232
1240
  imports(entries) {
1233
1241
  const map = new Map(entries);
1234
1242
  observeImports(map, "./commons.js", 0);
1243
+ observeImports(map, "./compartment.js", 46);
1235
1244
  },
1236
1245
  liveVar: {
1237
1246
  },
1238
1247
  onceVar: {
1239
- tameHarden: cells[47].tameHarden.set,
1248
+ getAnonymousIntrinsics: cells[47].getAnonymousIntrinsics.set,
1240
1249
  },
1241
1250
  importMeta: {},
1242
1251
  });
@@ -1248,7 +1257,7 @@ function observeImports(map, importName, importIndex) {
1248
1257
  liveVar: {
1249
1258
  },
1250
1259
  onceVar: {
1251
- tameSymbolConstructor: cells[48].tameSymbolConstructor.set,
1260
+ tameHarden: cells[48].tameHarden.set,
1252
1261
  },
1253
1262
  importMeta: {},
1254
1263
  });
@@ -1260,8 +1269,7 @@ function observeImports(map, importName, importIndex) {
1260
1269
  liveVar: {
1261
1270
  },
1262
1271
  onceVar: {
1263
- tameFauxDataProperty: cells[49].tameFauxDataProperty.set,
1264
- tameFauxDataProperties: cells[49].tameFauxDataProperties.set,
1272
+ tameSymbolConstructor: cells[49].tameSymbolConstructor.set,
1265
1273
  },
1266
1274
  importMeta: {},
1267
1275
  });
@@ -1273,7 +1281,8 @@ function observeImports(map, importName, importIndex) {
1273
1281
  liveVar: {
1274
1282
  },
1275
1283
  onceVar: {
1276
- tameRegeneratorRuntime: cells[50].tameRegeneratorRuntime.set,
1284
+ tameFauxDataProperty: cells[50].tameFauxDataProperty.set,
1285
+ tameFauxDataProperties: cells[50].tameFauxDataProperties.set,
1277
1286
  },
1278
1287
  importMeta: {},
1279
1288
  });
@@ -1285,54 +1294,81 @@ function observeImports(map, importName, importIndex) {
1285
1294
  liveVar: {
1286
1295
  },
1287
1296
  onceVar: {
1288
- shimArrayBufferTransfer: cells[51].shimArrayBufferTransfer.set,
1297
+ tameRegeneratorRuntime: cells[51].tameRegeneratorRuntime.set,
1289
1298
  },
1290
1299
  importMeta: {},
1291
1300
  });
1292
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]({
1293
1328
  imports(entries) {
1294
1329
  const map = new Map(entries);
1295
1330
  observeImports(map, "@endo/env-options", 3);
1296
1331
  observeImports(map, "./commons.js", 0);
1297
1332
  observeImports(map, "./make-hardener.js", 10);
1298
- observeImports(map, "./intrinsics.js", 12);
1299
- observeImports(map, "./permits-intrinsics.js", 13);
1300
- observeImports(map, "./tame-function-constructors.js", 14);
1301
- observeImports(map, "./tame-date-constructor.js", 15);
1302
- observeImports(map, "./tame-math-object.js", 16);
1303
- observeImports(map, "./tame-regexp-constructor.js", 17);
1304
- observeImports(map, "./enable-property-overrides.js", 19);
1305
- observeImports(map, "./tame-locale-methods.js", 20);
1306
- observeImports(map, "./global-object.js", 23);
1307
- observeImports(map, "./make-safe-evaluator.js", 31);
1308
- observeImports(map, "./permits.js", 11);
1309
- observeImports(map, "./tame-function-tostring.js", 32);
1310
- observeImports(map, "./tame-domains.js", 33);
1311
- observeImports(map, "./tame-module-source.js", 34);
1312
- observeImports(map, "./error/tame-console.js", 37);
1313
- 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);
1314
1349
  observeImports(map, "./error/assert.js", 9);
1315
- observeImports(map, "./get-anonymous-intrinsics.js", 46);
1316
- observeImports(map, "./compartment.js", 45);
1317
- observeImports(map, "./tame-harden.js", 47);
1318
- observeImports(map, "./tame-symbol-constructor.js", 48);
1319
- observeImports(map, "./tame-faux-data-properties.js", 49);
1320
- observeImports(map, "./tame-regenerator-runtime.js", 50);
1321
- 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);
1322
1358
  },
1323
1359
  liveVar: {
1324
1360
  },
1325
1361
  onceVar: {
1326
- repairIntrinsics: cells[52].repairIntrinsics.set,
1362
+ repairIntrinsics: cells[54].repairIntrinsics.set,
1327
1363
  },
1328
1364
  importMeta: {},
1329
1365
  });
1330
- functors[53]({
1366
+ functors[55]({
1331
1367
  imports(entries) {
1332
1368
  const map = new Map(entries);
1333
1369
  observeImports(map, "./assert-sloppy-mode.js", 1);
1334
1370
  observeImports(map, "./commons.js", 0);
1335
- observeImports(map, "./lockdown.js", 52);
1371
+ observeImports(map, "./lockdown.js", 54);
1336
1372
  },
1337
1373
  liveVar: {
1338
1374
  },
@@ -1340,13 +1376,14 @@ function observeImports(map, importName, importIndex) {
1340
1376
  },
1341
1377
  importMeta: {},
1342
1378
  });
1343
- functors[54]({
1379
+ functors[56]({
1344
1380
  imports(entries) {
1345
1381
  const map = new Map(entries);
1346
1382
  observeImports(map, "./commons.js", 0);
1347
- observeImports(map, "./compartment.js", 45);
1348
- observeImports(map, "./tame-function-tostring.js", 32);
1349
- 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);
1350
1387
  },
1351
1388
  liveVar: {
1352
1389
  },
@@ -1354,7 +1391,7 @@ function observeImports(map, importName, importIndex) {
1354
1391
  },
1355
1392
  importMeta: {},
1356
1393
  });
1357
- functors[55]({
1394
+ functors[57]({
1358
1395
  imports(entries) {
1359
1396
  const map = new Map(entries);
1360
1397
  observeImports(map, "./commons.js", 0);
@@ -1366,11 +1403,11 @@ function observeImports(map, importName, importIndex) {
1366
1403
  },
1367
1404
  importMeta: {},
1368
1405
  });
1369
- functors[56]({
1406
+ functors[58]({
1370
1407
  imports(entries) {
1371
1408
  const map = new Map(entries);
1372
1409
  observeImports(map, "./commons.js", 0);
1373
- observeImports(map, "./error/console.js", 35);
1410
+ observeImports(map, "./error/console.js", 36);
1374
1411
  observeImports(map, "./error/assert.js", 9);
1375
1412
  },
1376
1413
  liveVar: {
@@ -1379,13 +1416,13 @@ function observeImports(map, importName, importIndex) {
1379
1416
  },
1380
1417
  importMeta: {},
1381
1418
  });
1382
- functors[57]({
1419
+ functors[59]({
1383
1420
  imports(entries) {
1384
1421
  const map = new Map(entries);
1385
- observeImports(map, "./src/lockdown-shim.js", 53);
1386
- observeImports(map, "./src/compartment-shim.js", 54);
1387
- observeImports(map, "./src/assert-shim.js", 55);
1388
- 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);
1389
1426
  },
1390
1427
  liveVar: {
1391
1428
  },
@@ -2260,7 +2297,7 @@ freeze(bestEffortStringify);
2260
2297
  /**
2261
2298
  * @callback MakeLoggingConsoleKit
2262
2299
  *
2263
- * A logging console just accumulates the contents of all whitelisted calls,
2300
+ * A logging console just accumulates the contents of all permitted calls,
2264
2301
  * making them available to callers of `takeLog()`. Calling `takeLog()`
2265
2302
  * consumes these, so later calls to `takeLog()` will only provide a log of
2266
2303
  * calls that have happened since then.
@@ -3456,6 +3493,78 @@ const makeHardener= ()=> {
3456
3493
  })()
3457
3494
  ,
3458
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] ===
3459
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)]]]]]);
3460
3569
 
3461
3570
 
@@ -3464,7 +3573,7 @@ const makeHardener= ()=> {
3464
3573
  /** @import {GenericErrorConstructor} from '../types.js' */
3465
3574
 
3466
3575
  /**
3467
- * @file Exports {@code whitelist}, a recursively defined
3576
+ * @module Exports {@code permits}, a recursively defined
3468
3577
  * JSON record enumerating all intrinsics and their properties
3469
3578
  * according to ECMA specs.
3470
3579
  *
@@ -3490,7 +3599,7 @@ const constantProperties= {
3490
3599
  * universalPropertyNames
3491
3600
  * Properties of all global objects.
3492
3601
  * Must be powerless.
3493
- * Maps from property name to the intrinsic name in the whitelist.
3602
+ * Maps from property name to the intrinsic name in the permits.
3494
3603
  */$h͏_once.constantProperties(constantProperties);
3495
3604
  const universalPropertyNames= {
3496
3605
  // *** Function Properties of the Global Object
@@ -3573,7 +3682,7 @@ const universalPropertyNames= {
3573
3682
  * Those found only on the initial global, i.e., the global of the
3574
3683
  * start compartment, as well as any compartments created before lockdown.
3575
3684
  * These may provide much of the power provided by the original.
3576
- * Maps from property name to the intrinsic name in the whitelist.
3685
+ * Maps from property name to the intrinsic name in the permits.
3577
3686
  */$h͏_once.universalPropertyNames(universalPropertyNames);
3578
3687
  const initialGlobalPropertyNames= {
3579
3688
  // *** Constructor Properties of the Global Object
@@ -3583,7 +3692,7 @@ const initialGlobalPropertyNames= {
3583
3692
  RegExp: '%InitialRegExp%',
3584
3693
 
3585
3694
  // Omit `Symbol`, because we want the original to appear on the
3586
- // start compartment without passing through the whitelist mechanism, since
3695
+ // start compartment without passing through the permits mechanism, since
3587
3696
  // we want to preserve all its properties, even if we never heard of them.
3588
3697
  // Symbol: '%InitialSymbol%',
3589
3698
 
@@ -3607,7 +3716,7 @@ const initialGlobalPropertyNames= {
3607
3716
  * sharedGlobalPropertyNames
3608
3717
  * Those found only on the globals of new compartments created after lockdown,
3609
3718
  * which must therefore be powerless.
3610
- * Maps from property name to the intrinsic name in the whitelist.
3719
+ * Maps from property name to the intrinsic name in the permits.
3611
3720
  */$h͏_once.initialGlobalPropertyNames(initialGlobalPropertyNames);
3612
3721
  const sharedGlobalPropertyNames= {
3613
3722
  // *** Constructor Properties of the Global Object
@@ -3626,7 +3735,7 @@ const sharedGlobalPropertyNames= {
3626
3735
  * uniqueGlobalPropertyNames
3627
3736
  * Those made separately for each global, including the initial global
3628
3737
  * of the start compartment.
3629
- * Maps from property name to the intrinsic name in the whitelist
3738
+ * Maps from property name to the intrinsic name in the permits
3630
3739
  * (which is currently always the same).
3631
3740
  */$h͏_once.sharedGlobalPropertyNames(sharedGlobalPropertyNames);
3632
3741
  const uniqueGlobalPropertyNames= {
@@ -3686,18 +3795,18 @@ if( typeof AggregateError!== 'undefined') {
3686
3795
  * blacklisted and simply removed. Properties not mentioned
3687
3796
  * are also considered blacklisted and are removed.
3688
3797
  * <li>A string value equal to a primitive ("number", "string", etc),
3689
- * in which case the property is whitelisted if its value property
3798
+ * in which case the property is permitted if its value property
3690
3799
  * is typeof the given type. For example, {@code "Infinity"} leads to
3691
3800
  * "number" and property values that fail {@code typeof "number"}.
3692
3801
  * are removed.
3693
3802
  * <li>A string value equal to an intinsic name ("ObjectPrototype",
3694
- * "Array", etc), in which case the property whitelisted if its
3803
+ * "Array", etc), in which case the property permitted if its
3695
3804
  * value property is equal to the value of the corresponfing
3696
3805
  * intrinsics. For example, {@code Map.prototype} leads to
3697
3806
  * "MapPrototype" and the property is removed if its value is
3698
3807
  * not equal to %MapPrototype%
3699
3808
  * <li>Another record, in which case this property is simply
3700
- * whitelisted and that next record represents the disposition of
3809
+ * permitted and that next record represents the disposition of
3701
3810
  * the object which is its value. For example, {@code "Object"}
3702
3811
  * leads to another record explaining what properties {@code
3703
3812
  * "Object"} may have and how each such property should be treated.
@@ -4954,7 +5063,7 @@ const permitted= {
4954
5063
  //
4955
5064
  // We will likely change this to add a property to Promise called
4956
5065
  // Promise.delegate and put static methods on it, which will necessitate
4957
- // another whitelist change to update to the current proposed standard.
5066
+ // another permits change to update to the current proposed standard.
4958
5067
  HandledPromise: {
4959
5068
  '[[Proto]]': 'Promise',
4960
5069
  applyFunction: fn,
@@ -5006,7 +5115,9 @@ const permitted= {
5006
5115
  resolve: fn,
5007
5116
  // https://github.com/tc39/proposal-promise-with-resolvers
5008
5117
  withResolvers: fn,
5009
- '@@species': getter},
5118
+ '@@species': getter,
5119
+ // https://github.com/tc39/proposal-promise-try
5120
+ try: fn},
5010
5121
 
5011
5122
 
5012
5123
  '%PromisePrototype%': {
@@ -5105,8 +5216,8 @@ const permitted= {
5105
5216
  '%InitialGetStackString%': fn};$h͏_once.permitted(permitted);
5106
5217
  })()
5107
5218
  ,
5108
- // === functors[12] ===
5109
- ({ 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)]]]]]);
5110
5221
 
5111
5222
 
5112
5223
 
@@ -5130,13 +5241,18 @@ const permitted= {
5130
5241
 
5131
5242
 
5132
5243
 
5244
+
5245
+
5246
+ /**
5247
+ * @import {Reporter} from './reporting-types.js'
5248
+ */
5133
5249
 
5134
5250
  const isFunction= (obj)=>typeof obj=== 'function';
5135
5251
 
5136
5252
  // Like defineProperty, but throws if it would modify an existing property.
5137
5253
  // We use this to ensure that two conflicting attempts to define the same
5138
5254
  // property throws, causing SES initialization to fail. Otherwise, a
5139
- // conflict between, for example, two of SES's internal whitelists might
5255
+ // conflict between, for example, two of SES's internal permits might
5140
5256
  // get masked as one overwrites the other. Accordingly, the thrown error
5141
5257
  // complains of a "Conflicting definition".
5142
5258
  function initProperty(obj, name, desc) {
@@ -5179,7 +5295,10 @@ function sampleGlobals(globalObject, newPropertyNames) {
5179
5295
  return newIntrinsics;
5180
5296
  }
5181
5297
 
5182
- const makeIntrinsicsCollector= ()=> {
5298
+ /**
5299
+ * @param {Reporter} reporter
5300
+ */
5301
+ const makeIntrinsicsCollector= (reporter)=>{
5183
5302
  /** @type {Record<any, any>} */
5184
5303
  const intrinsics= create(null);
5185
5304
  let pseudoNatives;
@@ -5190,7 +5309,7 @@ const makeIntrinsicsCollector= ()=> {
5190
5309
  freeze(addIntrinsics);
5191
5310
 
5192
5311
  // For each intrinsic, if it has a `.prototype` property, use the
5193
- // 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
5194
5313
  // to the intrinsics.
5195
5314
  const completePrototypes= ()=> {
5196
5315
  for( const [name, intrinsic]of entries(intrinsics)) {
@@ -5204,17 +5323,25 @@ const makeIntrinsicsCollector= ()=> {
5204
5323
  }
5205
5324
  const permit= permitted[name];
5206
5325
  if( typeof permit!== 'object') {
5207
- throw TypeError( `Expected permit object at whitelist.${name}`);
5326
+ throw TypeError( `Expected permit object at permits.${name}`);
5208
5327
  }
5209
5328
  const namePrototype= permit.prototype;
5210
5329
  if( !namePrototype) {
5211
- 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;
5212
5339
  }
5213
5340
  if(
5214
5341
  typeof namePrototype!== 'string'||
5215
5342
  !objectHasOwnProperty(permitted, namePrototype))
5216
5343
  {
5217
- throw TypeError( `Unrecognized ${name}.prototype whitelist entry`);
5344
+ throw TypeError( `Unrecognized ${name}.prototype permits entry`);
5218
5345
  }
5219
5346
  const intrinsicPrototype= intrinsic.prototype;
5220
5347
  if( objectHasOwnProperty(intrinsics, namePrototype)) {
@@ -5263,7 +5390,7 @@ const makeIntrinsicsCollector= ()=> {
5263
5390
  /**
5264
5391
  * getGlobalIntrinsics()
5265
5392
  * Doesn't tame, delete, or modify anything. Samples globalObject to create an
5266
- * intrinsics record containing only the whitelisted global variables, listed
5393
+ * intrinsics record containing only the permitted global variables, listed
5267
5394
  * by the intrinsic names appropriate for new globals, i.e., the globals of
5268
5395
  * newly constructed compartments.
5269
5396
  *
@@ -5272,9 +5399,11 @@ const makeIntrinsicsCollector= ()=> {
5272
5399
  * *original* unsafe (feral, untamed) bindings of these global variables.
5273
5400
  *
5274
5401
  * @param {object} globalObject
5402
+ * @param {Reporter} reporter
5275
5403
  */$h͏_once.makeIntrinsicsCollector(makeIntrinsicsCollector);
5276
- const getGlobalIntrinsics= (globalObject)=>{
5277
- const { addIntrinsics, finalIntrinsics}= makeIntrinsicsCollector();
5404
+ const getGlobalIntrinsics= (globalObject, reporter)=> {
5405
+ // TODO pass a proper reporter to `makeIntrinsicsCollector`
5406
+ const { addIntrinsics, finalIntrinsics}= makeIntrinsicsCollector(reporter);
5278
5407
 
5279
5408
  addIntrinsics(sampleGlobals(globalObject, sharedGlobalPropertyNames));
5280
5409
 
@@ -5282,8 +5411,9 @@ const getGlobalIntrinsics= (globalObject)=>{
5282
5411
  };$h͏_once.getGlobalIntrinsics(getGlobalIntrinsics);
5283
5412
  })()
5284
5413
  ,
5285
- // === functors[13] ===
5286
- ({ 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
+
5287
5417
 
5288
5418
 
5289
5419
 
@@ -5348,28 +5478,22 @@ const getGlobalIntrinsics= (globalObject)=>{
5348
5478
 
5349
5479
 
5350
5480
  /**
5351
- * whitelistIntrinsics()
5481
+ * @import {Reporter} from './reporting-types.js'
5482
+ */
5483
+
5484
+ /**
5352
5485
  * Removes all non-allowed properties found by recursively and
5353
5486
  * reflectively walking own property chains.
5354
5487
  *
5355
5488
  * @param {object} intrinsics
5356
- * @param {(object) => void} markVirtualizedNativeFunction
5489
+ * @param {(virtualizedNativeFunction: object) => void} markVirtualizedNativeFunction
5490
+ * @param {Reporter} reporter
5357
5491
  */
5358
- function whitelistIntrinsics(
5492
+ function removeUnpermittedIntrinsics(
5359
5493
  intrinsics,
5360
- markVirtualizedNativeFunction)
5494
+ markVirtualizedNativeFunction,
5495
+ reporter)
5361
5496
  {
5362
- let groupStarted= false;
5363
- const inConsoleGroup= (level, ...args)=> {
5364
- if( !groupStarted) {
5365
- // eslint-disable-next-line @endo/no-polymorphic-call
5366
- console.groupCollapsed('Removing unpermitted intrinsics');
5367
- groupStarted= true;
5368
- }
5369
- // eslint-disable-next-line @endo/no-polymorphic-call
5370
- return console[level](...args);
5371
- };
5372
-
5373
5497
  // These primitives are allowed for permits.
5374
5498
  const primitives= ['undefined', 'boolean', 'number', 'string', 'symbol'];
5375
5499
 
@@ -5433,7 +5557,7 @@ function whitelistIntrinsics(
5433
5557
 
5434
5558
  // Assert: protoName, if provided, is a string.
5435
5559
  if( protoName!== undefined&& typeof protoName!== 'string') {
5436
- throw TypeError( `Malformed whitelist permit ${path}.__proto__`);
5560
+ throw TypeError( `Malformed permit ${path}.__proto__`);
5437
5561
  }
5438
5562
 
5439
5563
  // If permit not specified, default to Object.prototype.
@@ -5449,7 +5573,7 @@ function whitelistIntrinsics(
5449
5573
 
5450
5574
  /*
5451
5575
  * isAllowedPropertyValue()
5452
- * Whitelist a single property value against a permit.
5576
+ * enforce permit for a single property value.
5453
5577
  */
5454
5578
  function isAllowedPropertyValue(path, value, prop, permit) {
5455
5579
  if( typeof permit=== 'object') {
@@ -5477,7 +5601,7 @@ function whitelistIntrinsics(
5477
5601
 
5478
5602
  if( objectHasOwnProperty(intrinsics, permit)) {
5479
5603
  if( value!== intrinsics[permit]) {
5480
- throw TypeError( `Does not match whitelist ${path}`);
5604
+ throw TypeError( `Does not match permit for ${path}`);
5481
5605
  }
5482
5606
  return true;
5483
5607
  }
@@ -5570,56 +5694,18 @@ function whitelistIntrinsics(
5570
5694
  const subPermit= getSubPermit(obj, permit, propString);
5571
5695
 
5572
5696
  if( !subPermit|| !isAllowedProperty(subPath, obj, prop, subPermit)) {
5573
- // Either the object lacks a permit or the object doesn't match the
5574
- // permit.
5575
- // If the permit is specifically false, not merely undefined,
5576
- // this is a property we expect to see because we know it exists in
5577
- // some environments and we have expressly decided to exclude it.
5578
- // Any other disallowed property is one we have not audited and we log
5579
- // that we are removing it so we know to look into it, as happens when
5580
- // the language evolves new features to existing intrinsics.
5581
- if( subPermit!== false) {
5582
- inConsoleGroup('warn', `Removing ${subPath}`);
5583
- }
5584
- try {
5585
- delete obj[prop];
5586
- }catch( err) {
5587
- if( prop in obj) {
5588
- if( typeof obj=== 'function'&& prop=== 'prototype') {
5589
- obj.prototype= undefined;
5590
- if( obj.prototype=== undefined) {
5591
- inConsoleGroup(
5592
- 'warn',
5593
- `Tolerating undeletable ${subPath} === undefined`);
5594
-
5595
- // eslint-disable-next-line no-continue
5596
- continue;
5597
- }
5598
- }
5599
- inConsoleGroup('error', `failed to delete ${subPath}`,err);
5600
- }else {
5601
- inConsoleGroup('error', `deleting ${subPath} threw`,err);
5602
- }
5603
- throw err;
5604
- }
5697
+ cauterizeProperty(obj, prop, subPermit=== false, subPath, reporter);
5605
5698
  }
5606
5699
  }
5607
5700
  }
5608
5701
 
5609
- try {
5610
- // Start path with 'intrinsics' to clarify that properties are not
5611
- // removed from the global object by the whitelisting operation.
5612
- visitProperties('intrinsics', intrinsics, permitted);
5613
- }finally {
5614
- if( groupStarted) {
5615
- // eslint-disable-next-line @endo/no-polymorphic-call
5616
- console.groupEnd();
5617
- }
5618
- }
5619
- }$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);
5620
5706
  })()
5621
5707
  ,
5622
- // === functors[14] ===
5708
+ // === functors[15] ===
5623
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)]]]]]);
5624
5710
 
5625
5711
 
@@ -5758,7 +5844,7 @@ function tameFunctionConstructors() {
5758
5844
  }$h͏_once.default( tameFunctionConstructors);
5759
5845
  })()
5760
5846
  ,
5761
- // === functors[15] ===
5847
+ // === functors[16] ===
5762
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)]]]]]);
5763
5849
 
5764
5850
 
@@ -5891,7 +5977,7 @@ function tameDateConstructor(dateTaming= 'safe') {
5891
5977
  }$h͏_once.default( tameDateConstructor);
5892
5978
  })()
5893
5979
  ,
5894
- // === functors[16] ===
5980
+ // === functors[17] ===
5895
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)]]]]]);
5896
5982
 
5897
5983
 
@@ -5938,7 +6024,7 @@ function tameMathObject(mathTaming= 'safe') {
5938
6024
  }$h͏_once.default( tameMathObject);
5939
6025
  })()
5940
6026
  ,
5941
- // === functors[17] ===
6027
+ // === functors[18] ===
5942
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)]]]]]);
5943
6029
 
5944
6030
 
@@ -6009,11 +6095,11 @@ function tameRegExpConstructor(regExpTaming= 'safe') {
6009
6095
  }$h͏_once.default( tameRegExpConstructor);
6010
6096
  })()
6011
6097
  ,
6012
- // === functors[18] ===
6098
+ // === functors[19] ===
6013
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)]]]]]);
6014
6100
 
6015
6101
  /**
6016
- * @file Exports {@code enablements}, a recursively defined
6102
+ * @module Exports {@code enablements}, a recursively defined
6017
6103
  * JSON record defining the optimum set of intrinsics properties
6018
6104
  * that need to be "repaired" before hardening is applied on
6019
6105
  * enviromments subject to the override mistake.
@@ -6253,7 +6339,7 @@ const severeEnablements= {
6253
6339
  '%SetPrototype%': '*'};$h͏_once.severeEnablements(severeEnablements);
6254
6340
  })()
6255
6341
  ,
6256
- // === functors[19] ===
6342
+ // === functors[20] ===
6257
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)]]]]]);
6258
6344
 
6259
6345
 
@@ -6278,9 +6364,11 @@ const severeEnablements= {
6278
6364
 
6279
6365
 
6280
6366
 
6367
+
6368
+ /** @import {Reporter} from './reporting-types.js' */
6281
6369
 
6282
6370
  /**
6283
- * For a special set of properties defined in the `enablement` whitelist,
6371
+ * For a special set of properties defined in the `enablement` list,
6284
6372
  * `enablePropertyOverrides` ensures that the effect of freezing does not
6285
6373
  * suppress the ability to override these properties on derived objects by
6286
6374
  * simple assignment.
@@ -6331,11 +6419,13 @@ const severeEnablements= {
6331
6419
  *
6332
6420
  * @param {Record<string, any>} intrinsics
6333
6421
  * @param {'min' | 'moderate' | 'severe'} overrideTaming
6422
+ * @param {Reporter} reporter
6334
6423
  * @param {Iterable<string | symbol>} [overrideDebug]
6335
6424
  */
6336
6425
  function enablePropertyOverrides(
6337
6426
  intrinsics,
6338
6427
  overrideTaming,
6428
+ { warn},
6339
6429
  overrideDebug= [])
6340
6430
  {
6341
6431
  const debugProperties= new Set(overrideDebug);
@@ -6365,8 +6455,7 @@ function enablePropertyOverrides(
6365
6455
  this[prop]= newValue;
6366
6456
  }else {
6367
6457
  if( isDebug) {
6368
- // eslint-disable-next-line @endo/no-polymorphic-call
6369
- console.error(TypeError( `Override property ${prop}`));
6458
+ warn(TypeError( `Override property ${prop}`));
6370
6459
  }
6371
6460
  defineProperty(this, prop, {
6372
6461
  value: newValue,
@@ -6464,7 +6553,7 @@ function enablePropertyOverrides(
6464
6553
  }$h͏_once.default( enablePropertyOverrides);
6465
6554
  })()
6466
6555
  ,
6467
- // === functors[20] ===
6556
+ // === functors[21] ===
6468
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)]]]]]);
6469
6558
 
6470
6559
 
@@ -6548,7 +6637,7 @@ function tameLocaleMethods(intrinsics, localeTaming= 'safe') {
6548
6637
  }$h͏_once.default( tameLocaleMethods);
6549
6638
  })()
6550
6639
  ,
6551
- // === functors[21] ===
6640
+ // === functors[22] ===
6552
6641
  ({ imports: $h͏_imports, liveVar: $h͏_live, onceVar: $h͏_once, importMeta: $h͏____meta, }) => (function () { 'use strict'; $h͏_imports([]); /**
6553
6642
  * makeEvalFunction()
6554
6643
  * A safe version of the native eval function which relies on
@@ -6578,7 +6667,7 @@ const makeEvalFunction= (safeEvaluate)=>{
6578
6667
  };$h͏_once.makeEvalFunction(makeEvalFunction);
6579
6668
  })()
6580
6669
  ,
6581
- // === functors[22] ===
6670
+ // === functors[23] ===
6582
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)]]]]]);
6583
6672
 
6584
6673
 
@@ -6659,7 +6748,7 @@ const makeFunctionConstructor= (safeEvaluate)=>{
6659
6748
  };$h͏_once.makeFunctionConstructor(makeFunctionConstructor);
6660
6749
  })()
6661
6750
  ,
6662
- // === functors[23] ===
6751
+ // === functors[24] ===
6663
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)]]]]]);
6664
6753
 
6665
6754
 
@@ -6783,7 +6872,7 @@ const setGlobalObjectMutableProperties= (
6783
6872
 
6784
6873
 
6785
6874
 
6786
- // TODO These should still be tamed according to the whitelist before
6875
+ // TODO These should still be tamed according to the permits before
6787
6876
  // being made available.
6788
6877
  for( const [name, value]of entries(perCompartmentGlobals)) {
6789
6878
  defineProperty(globalObject, name, {
@@ -6834,7 +6923,7 @@ const setGlobalObjectEvaluators= (
6834
6923
  };$h͏_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
6835
6924
  })()
6836
6925
  ,
6837
- // === functors[24] ===
6926
+ // === functors[25] ===
6838
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)]]]]]);
6839
6928
 
6840
6929
 
@@ -6929,7 +7018,7 @@ const strictScopeTerminator= new Proxy(
6929
7018
  strictScopeTerminatorHandler);$h͏_once.strictScopeTerminator(strictScopeTerminator);
6930
7019
  })()
6931
7020
  ,
6932
- // === functors[25] ===
7021
+ // === functors[26] ===
6933
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)]]]]]);
6934
7023
 
6935
7024
 
@@ -6986,7 +7075,7 @@ const createSloppyGlobalsScopeTerminator= (globalObject)=>{
6986
7075
  freeze(createSloppyGlobalsScopeTerminator);
6987
7076
  })()
6988
7077
  ,
6989
- // === functors[26] ===
7078
+ // === functors[27] ===
6990
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)]]]]]);
6991
7080
 
6992
7081
 
@@ -7078,7 +7167,7 @@ const makeEvalScopeKit= ()=> {
7078
7167
  };$h͏_once.makeEvalScopeKit(makeEvalScopeKit);
7079
7168
  })()
7080
7169
  ,
7081
- // === functors[27] ===
7170
+ // === functors[28] ===
7082
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)]]]]]);
7083
7172
 
7084
7173
  // Captures a key and value of the form #key=value or @key=value
@@ -7131,7 +7220,7 @@ const getSourceURL= (src)=>{
7131
7220
  };$h͏_once.getSourceURL(getSourceURL);
7132
7221
  })()
7133
7222
  ,
7134
- // === functors[28] ===
7223
+ // === functors[29] ===
7135
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)]]]]]);
7136
7225
 
7137
7226
 
@@ -7399,7 +7488,7 @@ $h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
7399
7488
  applyTransforms: freeze(applyTransforms)});$h͏_once.transforms(transforms);
7400
7489
  })()
7401
7490
  ,
7402
- // === functors[29] ===
7491
+ // === functors[30] ===
7403
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)]]]]]);
7404
7493
 
7405
7494
 
@@ -7582,7 +7671,7 @@ const getScopeConstants= (globalObject, moduleLexicals= {})=> {
7582
7671
  };$h͏_once.getScopeConstants(getScopeConstants);
7583
7672
  })()
7584
7673
  ,
7585
- // === functors[30] ===
7674
+ // === functors[31] ===
7586
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)]]]]]);
7587
7676
 
7588
7677
 
@@ -7695,7 +7784,7 @@ const makeEvaluate= (context)=>{
7695
7784
  };$h͏_once.makeEvaluate(makeEvaluate);
7696
7785
  })()
7697
7786
  ,
7698
- // === functors[31] ===
7787
+ // === functors[32] ===
7699
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)]]]]]);
7700
7789
 
7701
7790
 
@@ -7808,7 +7897,7 @@ const makeSafeEvaluator= ({
7808
7897
  };$h͏_once.makeSafeEvaluator(makeSafeEvaluator);
7809
7898
  })()
7810
7899
  ,
7811
- // === functors[32] ===
7900
+ // === functors[33] ===
7812
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)]]]]]);
7813
7902
 
7814
7903
 
@@ -7861,7 +7950,7 @@ const tameFunctionToString= ()=> {
7861
7950
  };$h͏_once.tameFunctionToString(tameFunctionToString);
7862
7951
  })()
7863
7952
  ,
7864
- // === functors[33] ===
7953
+ // === functors[34] ===
7865
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);
7866
7955
 
7867
7956
 
@@ -7909,7 +7998,7 @@ function tameDomains(domainTaming= 'safe') {
7909
7998
  }
7910
7999
  })()
7911
8000
  ,
7912
- // === functors[34] ===
8001
+ // === functors[35] ===
7913
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)]]]]]);
7914
8003
 
7915
8004
 
@@ -7963,7 +8052,7 @@ const tameModuleSource= ()=> {
7963
8052
  };$h͏_once.tameModuleSource(tameModuleSource);
7964
8053
  })()
7965
8054
  ,
7966
- // === functors[35] ===
8055
+ // === functors[36] ===
7967
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)]]]]]);
7968
8057
 
7969
8058
 
@@ -7997,7 +8086,7 @@ const tameModuleSource= ()=> {
7997
8086
  // For our internal debugging purposes, uncomment
7998
8087
  // const internalDebugConsole = console;
7999
8088
 
8000
- // The whitelists of console methods, from:
8089
+ // The permitted console methods, from:
8001
8090
  // Whatwg "living standard" https://console.spec.whatwg.org/
8002
8091
  // Node https://nodejs.org/dist/latest-v14.x/docs/api/console.html
8003
8092
  // MDN https://developer.mozilla.org/en-US/docs/Web/API/Console_API
@@ -8076,7 +8165,7 @@ const consoleOtherMethods= freeze([
8076
8165
  ]);
8077
8166
 
8078
8167
  /** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */$h͏_once.consoleOtherMethods(consoleOtherMethods);
8079
- const consoleWhitelist= freeze([
8168
+ const consoleMethodPermits= freeze([
8080
8169
  ...consoleLevelMethods,
8081
8170
  ...consoleOtherMethods]);
8082
8171
 
@@ -8084,8 +8173,8 @@ const consoleWhitelist= freeze([
8084
8173
  /**
8085
8174
  * consoleOmittedProperties is currently unused. I record and maintain it here
8086
8175
  * with the intention that it be treated like the `false` entries in the main
8087
- * SES whitelist: that seeing these on the original console is expected, but
8088
- * 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
8089
8178
  * provide a diagnostic.
8090
8179
  *
8091
8180
  * const consoleOmittedProperties = freeze([
@@ -8124,7 +8213,7 @@ const makeLoggingConsoleKit= (
8124
8213
  let logArray= [];
8125
8214
 
8126
8215
  const loggingConsole= fromEntries(
8127
- arrayMap(consoleWhitelist, ([name, _])=> {
8216
+ arrayMap(consoleMethodPermits, ([name, _])=> {
8128
8217
  // Use an arrow function so that it doesn't come with its own name in
8129
8218
  // its printed form. Instead, we're hoping that tooling uses only
8130
8219
  // the `.name` property set below.
@@ -8474,11 +8563,11 @@ freeze(defineCausalConsoleFromLogger);
8474
8563
  /** @type {FilterConsole} */
8475
8564
  const filterConsole= (baseConsole, filter, _topic= undefined)=> {
8476
8565
  // TODO do something with optional topic string
8477
- const whitelist= arrayFilter(
8478
- consoleWhitelist,
8566
+ const methodPermits= arrayFilter(
8567
+ consoleMethodPermits,
8479
8568
  ([name, _])=> name in baseConsole);
8480
8569
 
8481
- const methods= arrayMap(whitelist, ([name, severity])=> {
8570
+ const methods= arrayMap(methodPermits, ([name, severity])=> {
8482
8571
  /**
8483
8572
  * @param {...any} args
8484
8573
  */
@@ -8498,7 +8587,7 @@ const filterConsole= (baseConsole, filter, _topic= undefined)=> {
8498
8587
  freeze(filterConsole);
8499
8588
  })()
8500
8589
  ,
8501
- // === functors[36] ===
8590
+ // === functors[37] ===
8502
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)]]]]]);
8503
8592
 
8504
8593
 
@@ -8623,7 +8712,7 @@ const makeRejectionHandlers= (reportReason)=>{
8623
8712
  };$h͏_once.makeRejectionHandlers(makeRejectionHandlers);
8624
8713
  })()
8625
8714
  ,
8626
- // === functors[37] ===
8715
+ // === functors[38] ===
8627
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)]]]]]);
8628
8717
 
8629
8718
 
@@ -8827,7 +8916,7 @@ const tameConsole= (
8827
8916
  };$h͏_once.tameConsole(tameConsole);
8828
8917
  })()
8829
8918
  ,
8830
- // === functors[38] ===
8919
+ // === functors[39] ===
8831
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)]]]]]);
8832
8921
 
8833
8922
 
@@ -8849,8 +8938,8 @@ const tameConsole= (
8849
8938
 
8850
8939
 
8851
8940
 
8852
- // Whitelist names from https://v8.dev/docs/stack-trace-api
8853
- // 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
8854
8943
  // callSiteToFrame to shim the error stack proposal.
8855
8944
  const safeV8CallSiteMethodNames= [
8856
8945
  // suppress 'getThis' definitely
@@ -8875,7 +8964,7 @@ const safeV8CallSiteMethodNames= [
8875
8964
  'getPosition',
8876
8965
  'getScriptNameOrSourceURL',
8877
8966
 
8878
- 'toString' // TODO replace to use only whitelisted info
8967
+ 'toString' // TODO replace to use only permitted info
8879
8968
  ];
8880
8969
 
8881
8970
  // TODO this is a ridiculously expensive way to attenuate callsites.
@@ -9173,7 +9262,7 @@ const tameV8ErrorConstructor= (
9173
9262
  };$h͏_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
9174
9263
  })()
9175
9264
  ,
9176
- // === functors[39] ===
9265
+ // === functors[40] ===
9177
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)]]]]]);
9178
9267
 
9179
9268
 
@@ -9471,8 +9560,10 @@ function tameErrorConstructor(
9471
9560
  }$h͏_once.default( tameErrorConstructor);
9472
9561
  })()
9473
9562
  ,
9474
- // === functors[40] ===
9475
- ({ 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
+
9476
9567
 
9477
9568
 
9478
9569
 
@@ -9559,14 +9650,23 @@ const loadModuleSource= (
9559
9650
  moduleLoads,
9560
9651
  importMeta)=>
9561
9652
  {
9562
- const { resolveHook}= weakmapGet(compartmentPrivateFields, compartment);
9653
+ const { resolveHook, name: compartmentName}= weakmapGet(
9654
+ compartmentPrivateFields,
9655
+ compartment);
9563
9656
 
9564
- // resolve all imports relative to this referrer module.
9565
- const resolvedImports= resolveAll(
9566
- moduleSource.imports,
9567
- resolveHook,
9568
- moduleSpecifier);
9569
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);
9570
9670
  const moduleRecord= freeze({
9571
9671
  compartment,
9572
9672
  moduleSource,
@@ -10124,7 +10224,7 @@ const loadNow= (
10124
10224
  };$h͏_once.loadNow(loadNow);
10125
10225
  })()
10126
10226
  ,
10127
- // === functors[41] ===
10227
+ // === functors[42] ===
10128
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)]]]]]);
10129
10229
 
10130
10230
 
@@ -10327,7 +10427,7 @@ const getDeferredExports= (
10327
10427
  };$h͏_once.getDeferredExports(getDeferredExports);
10328
10428
  })()
10329
10429
  ,
10330
- // === functors[42] ===
10430
+ // === functors[43] ===
10331
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)]]]]]);
10332
10432
 
10333
10433
 
@@ -10423,7 +10523,7 @@ const compartmentEvaluate= (compartmentFields, source, options)=> {
10423
10523
  };$h͏_once.compartmentEvaluate(compartmentEvaluate);
10424
10524
  })()
10425
10525
  ,
10426
- // === functors[43] ===
10526
+ // === functors[44] ===
10427
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)]]]]]);
10428
10528
 
10429
10529
 
@@ -10910,7 +11010,7 @@ $h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleI
10910
11010
  };$h͏_once.makeModuleInstance(makeModuleInstance);
10911
11011
  })()
10912
11012
  ,
10913
- // === functors[44] ===
11013
+ // === functors[45] ===
10914
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)]]]]]);
10915
11015
 
10916
11016
 
@@ -10989,27 +11089,27 @@ function mayBeVirtualModuleSource(moduleSource) {
10989
11089
  function validateVirtualModuleSource(moduleSource, moduleSpecifier) {
10990
11090
  const { exports}= moduleSource;
10991
11091
  isArray(exports)||
10992
- 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(
10993
11093
  exports)
10994
11094
  }, for module ${q(moduleSpecifier)}`;
10995
11095
  }
10996
11096
 
10997
11097
  function validateModuleSource(moduleSource, moduleSpecifier) {
10998
11098
  isObject(moduleSource)||
10999
- Fail `Module sources must be of type object, got ${q(
11099
+ Fail `Invalid module source: must be of type object, got ${q(
11000
11100
  moduleSource)
11001
11101
  }, for module ${q(moduleSpecifier)}`;
11002
11102
  const { imports, exports, reexports= []}= moduleSource;
11003
11103
  isArray(imports)||
11004
- 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(
11005
11105
  imports)
11006
11106
  }, for module ${q(moduleSpecifier)}`;
11007
11107
  isArray(exports)||
11008
- 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(
11009
11109
  exports)
11010
11110
  }, for module ${q(moduleSpecifier)}`;
11011
11111
  isArray(reexports)||
11012
- 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(
11013
11113
  reexports)
11014
11114
  }, for module ${q(moduleSpecifier)}`;
11015
11115
  }
@@ -11051,9 +11151,7 @@ const instantiate= (
11051
11151
  resolvedImports);
11052
11152
 
11053
11153
  }else {
11054
- throw TypeError(
11055
- `importHook must provide a module source, got ${q(moduleSource)}`);
11056
-
11154
+ throw TypeError( `Invalid module source, got ${q(moduleSource)}`);
11057
11155
  }
11058
11156
 
11059
11157
  // Memoize.
@@ -11074,7 +11172,7 @@ const instantiate= (
11074
11172
  };$h͏_once.instantiate(instantiate);
11075
11173
  })()
11076
11174
  ,
11077
- // === functors[45] ===
11175
+ // === functors[46] ===
11078
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)]]]]]);
11079
11177
 
11080
11178
 
@@ -11400,7 +11498,7 @@ const makeCompartmentConstructor= (
11400
11498
  };$h͏_once.makeCompartmentConstructor(makeCompartmentConstructor);
11401
11499
  })()
11402
11500
  ,
11403
- // === functors[46] ===
11501
+ // === functors[47] ===
11404
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)]]]]]);
11405
11503
 
11406
11504
 
@@ -11568,7 +11666,7 @@ const getAnonymousIntrinsics= ()=> {
11568
11666
  };$h͏_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
11569
11667
  })()
11570
11668
  ,
11571
- // === functors[47] ===
11669
+ // === functors[48] ===
11572
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)]]]]]);
11573
11671
 
11574
11672
 
@@ -11604,7 +11702,7 @@ const tameHarden= (safeHarden, hardenTaming)=> {
11604
11702
  freeze(tameHarden);
11605
11703
  })()
11606
11704
  ,
11607
- // === functors[48] ===
11705
+ // === functors[49] ===
11608
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)]]]]]);
11609
11707
 
11610
11708
 
@@ -11623,8 +11721,8 @@ freeze(tameHarden);
11623
11721
  * `Symbol` constructor on constructed compartments.
11624
11722
  *
11625
11723
  * Starting these properties as configurable assumes two succeeding phases of
11626
- * processing: A whitelisting phase, that
11627
- * 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
11628
11726
  * configurable) and a global hardening step that freezes all primordials,
11629
11727
  * returning these properties to their expected non-configurable status.
11630
11728
  *
@@ -11671,7 +11769,7 @@ const tameSymbolConstructor= ()=> {
11671
11769
  };$h͏_once.tameSymbolConstructor(tameSymbolConstructor);
11672
11770
  })()
11673
11771
  ,
11674
- // === functors[49] ===
11772
+ // === functors[50] ===
11675
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)]]]]]);
11676
11774
 
11677
11775
 
@@ -11884,7 +11982,7 @@ const tameFauxDataProperties= (intrinsics)=>{
11884
11982
  };$h͏_once.tameFauxDataProperties(tameFauxDataProperties);
11885
11983
  })()
11886
11984
  ,
11887
- // === functors[50] ===
11985
+ // === functors[51] ===
11888
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)]]]]]);
11889
11987
 
11890
11988
 
@@ -11916,7 +12014,7 @@ const tameRegeneratorRuntime= ()=> {
11916
12014
  };$h͏_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
11917
12015
  })()
11918
12016
  ,
11919
- // === functors[51] ===
12017
+ // === functors[52] ===
11920
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)]]]]]);
11921
12019
 
11922
12020
 
@@ -12005,8 +12103,118 @@ const shimArrayBufferTransfer= ()=> {
12005
12103
  };$h͏_once.shimArrayBufferTransfer(shimArrayBufferTransfer);
12006
12104
  })()
12007
12105
  ,
12008
- // === functors[52] ===
12009
- ({ 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
+
12010
12218
 
12011
12219
 
12012
12220
 
@@ -12170,19 +12378,24 @@ const repairIntrinsics= (options= {})=> {
12170
12378
 
12171
12379
  const {
12172
12380
  errorTaming= getenv('LOCKDOWN_ERROR_TAMING', 'safe'),
12173
- errorTrapping= /** @type {"platform" | "none" | "report" | "abort" | "exit" | undefined} */
12381
+ errorTrapping= /** @type {"platform" | "none" | "report" | "abort" | "exit"} */
12174
12382
  getenv('LOCKDOWN_ERROR_TRAPPING', 'platform'),
12175
12383
 
12176
- unhandledRejectionTrapping= /** @type {"none" | "report" | undefined} */
12384
+ reporting= /** @type {"platform" | "console" | "none"} */
12385
+ getenv('LOCKDOWN_REPORTING', 'platform'),
12386
+
12387
+ unhandledRejectionTrapping= /** @type {"none" | "report"} */
12177
12388
  getenv('LOCKDOWN_UNHANDLED_REJECTION_TRAPPING', 'report'),
12178
12389
 
12179
12390
  regExpTaming= getenv('LOCKDOWN_REGEXP_TAMING', 'safe'),
12180
12391
  localeTaming= getenv('LOCKDOWN_LOCALE_TAMING', 'safe'),
12181
12392
 
12182
- consoleTaming= /** @type {'unsafe' | 'safe' | undefined} */
12393
+ consoleTaming= /** @type {'unsafe' | 'safe'} */
12183
12394
  getenv('LOCKDOWN_CONSOLE_TAMING', 'safe'),
12184
12395
 
12185
- overrideTaming= getenv('LOCKDOWN_OVERRIDE_TAMING', 'moderate'),
12396
+ overrideTaming= /** @type {'moderate' | 'min' | 'severe'} */
12397
+ getenv('LOCKDOWN_OVERRIDE_TAMING', 'moderate'),
12398
+
12186
12399
  stackFiltering= getenv('LOCKDOWN_STACK_FILTERING', 'concise'),
12187
12400
  domainTaming= getenv('LOCKDOWN_DOMAIN_TAMING', 'safe'),
12188
12401
  evalTaming= getenv('LOCKDOWN_EVAL_TAMING', 'safeEval'),
@@ -12216,6 +12429,8 @@ const repairIntrinsics= (options= {})=> {
12216
12429
  extraOptionsNames.length=== 0||
12217
12430
  Fail `lockdown(): non supported option ${q(extraOptionsNames)}`;
12218
12431
 
12432
+ const reporter= chooseReporter(reporting);
12433
+
12219
12434
  priorRepairIntrinsics=== undefined||
12220
12435
  // eslint-disable-next-line @endo/no-polymorphic-call
12221
12436
  assert.fail(
@@ -12281,7 +12496,7 @@ const repairIntrinsics= (options= {})=> {
12281
12496
  const markVirtualizedNativeFunction= tameFunctionToString();
12282
12497
 
12283
12498
  const { addIntrinsics, completePrototypes, finalIntrinsics}=
12284
- makeIntrinsicsCollector();
12499
+ makeIntrinsicsCollector(reporter);
12285
12500
 
12286
12501
  // @ts-expect-error __hardenTaming__ could be any string
12287
12502
  const tamedHarden= tameHarden(safeHarden, __hardenTaming__);
@@ -12365,13 +12580,22 @@ const repairIntrinsics= (options= {})=> {
12365
12580
  tameFauxDataProperties(intrinsics);
12366
12581
 
12367
12582
  /**
12368
- * 2. WHITELIST to standardize the environment.
12583
+ * 2. Enforce PERMITS on shared intrinsics
12369
12584
  */
12370
12585
 
12371
12586
  // Remove non-standard properties.
12372
- // All remaining function encountered during whitelisting are
12587
+ // All remaining functions encountered during whitelisting are
12373
12588
  // branded as honorary native functions.
12374
- whitelistIntrinsics(intrinsics, markVirtualizedNativeFunction);
12589
+ reportInGroup(
12590
+ 'SES Removing unpermitted intrinsics',
12591
+ reporter,
12592
+ (groupReporter)=>
12593
+ removeUnpermittedIntrinsics(
12594
+ intrinsics,
12595
+ markVirtualizedNativeFunction,
12596
+ groupReporter));
12597
+
12598
+
12375
12599
 
12376
12600
  // Initialize the powerful initial global, i.e., the global of the
12377
12601
  // start compartment, from the intrinsics.
@@ -12433,7 +12657,14 @@ const repairIntrinsics= (options= {})=> {
12433
12657
  // therefore before vetted shims rather than afterwards. It is not
12434
12658
  // clear yet which is better.
12435
12659
  // @ts-ignore enablePropertyOverrides does its own input validation
12436
- enablePropertyOverrides(intrinsics, overrideTaming, overrideDebug);
12660
+ reportInGroup('SES Enabling property overrides', reporter, (groupReporter)=>
12661
+ enablePropertyOverrides(
12662
+ intrinsics,
12663
+ overrideTaming,
12664
+ groupReporter,
12665
+ overrideDebug));
12666
+
12667
+
12437
12668
  if( legacyRegeneratorRuntimeTaming=== 'unsafe-ignore') {
12438
12669
  tameRegeneratorRuntime();
12439
12670
  }
@@ -12469,7 +12700,7 @@ const repairIntrinsics= (options= {})=> {
12469
12700
  };$h͏_once.repairIntrinsics(repairIntrinsics);
12470
12701
  })()
12471
12702
  ,
12472
- // === functors[53] ===
12703
+ // === functors[55] ===
12473
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)]]]]]);
12474
12705
 
12475
12706
 
@@ -12509,29 +12740,35 @@ globalThis.repairIntrinsics= (options)=>{
12509
12740
  };
12510
12741
  })()
12511
12742
  ,
12512
- // === functors[54] ===
12513
- ({ 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)]]]]]);
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)]]]]]);
12745
+
12514
12746
 
12515
12747
 
12516
12748
 
12517
12749
 
12518
12750
  const markVirtualizedNativeFunction= tameFunctionToString();
12519
12751
 
12752
+ const muteReporter= chooseReporter('none');
12753
+
12520
12754
  // @ts-ignore Compartment is definitely on globalThis.
12521
12755
  globalThis.Compartment= makeCompartmentConstructor(
12522
12756
  makeCompartmentConstructor,
12523
- 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),
12524
12761
  markVirtualizedNativeFunction);
12525
12762
  })()
12526
12763
  ,
12527
- // === functors[55] ===
12764
+ // === functors[57] ===
12528
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)]]]]]);
12529
12766
 
12530
12767
 
12531
12768
  globalThis.assert= assert;
12532
12769
  })()
12533
12770
  ,
12534
- // === functors[56] ===
12771
+ // === functors[58] ===
12535
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)]]]]]);
12536
12773
 
12537
12774
 
@@ -12584,7 +12821,7 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA]=
12584
12821
  makeCausalConsoleFromLoggerForSesAva;
12585
12822
  })()
12586
12823
  ,
12587
- // === functors[57] ===
12824
+ // === functors[59] ===
12588
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", []]]);
12589
12826
  })()
12590
12827
  ,