ses 1.12.0 → 1.13.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/LICENSE +1 -1
- package/SECURITY.md +2 -2
- package/dist/lockdown.cjs +854 -406
- package/dist/lockdown.mjs +854 -406
- package/dist/lockdown.umd.js +854 -406
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses-hermes.cjs +742 -406
- package/dist/ses.cjs +854 -406
- package/dist/ses.mjs +854 -406
- package/dist/ses.umd.js +854 -406
- package/dist/ses.umd.min.js +1 -1
- package/dist/types.d.cts +14 -5
- package/package.json +11 -10
- package/src/commons.js +3 -1
- package/src/compartment.js +3 -1
- package/src/enablements.js +3 -1
- package/src/error/tame-console.js +0 -4
- package/src/error/tame-error-constructor.js +0 -11
- package/src/error/tame-v8-error-constructor.js +58 -15
- package/src/get-anonymous-intrinsics.js +11 -0
- package/src/lockdown.js +99 -56
- package/src/make-eval-function.js +5 -4
- package/src/make-function-constructor.js +5 -4
- package/src/module-load.js +47 -24
- package/src/permits.js +30 -1
- package/src/reporting.js +1 -4
- package/src/shim-arraybuffer-transfer.js +0 -1
- package/src/tame-domains.js +0 -4
- package/src/tame-harden.js +1 -5
- package/src/tame-locale-methods.js +0 -3
- package/src/tame-regexp-constructor.js +0 -3
- package/types.d.ts +14 -5
package/dist/ses-hermes.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ses@1.
|
|
1
|
+
// ses@1.13.0
|
|
2
2
|
(functors => options => {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -206,6 +206,12 @@
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
},
|
|
209
|
+
{
|
|
210
|
+
isBufferImmutable: cell("isBufferImmutable"),
|
|
211
|
+
sliceBufferToImmutable: cell("sliceBufferToImmutable"),
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
},
|
|
209
215
|
{
|
|
210
216
|
an: cell("an"),
|
|
211
217
|
bestEffortStringify: cell("bestEffortStringify"),
|
|
@@ -651,20 +657,19 @@ function observeImports(map, importName, importIndex) {
|
|
|
651
657
|
functors[4]({
|
|
652
658
|
imports(entries) {
|
|
653
659
|
const map = new Map(entries);
|
|
654
|
-
observeImports(map, "../commons.js", 0);
|
|
655
660
|
},
|
|
656
661
|
liveVar: {
|
|
657
662
|
},
|
|
658
663
|
onceVar: {
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
enJoin: cells[4].enJoin.set,
|
|
664
|
+
isBufferImmutable: cells[4].isBufferImmutable.set,
|
|
665
|
+
sliceBufferToImmutable: cells[4].sliceBufferToImmutable.set,
|
|
662
666
|
},
|
|
663
667
|
importMeta: {},
|
|
664
668
|
});
|
|
665
669
|
functors[5]({
|
|
666
670
|
imports(entries) {
|
|
667
671
|
const map = new Map(entries);
|
|
672
|
+
observeImports(map, "./src/limited-pony-for-hermes.js", 4);
|
|
668
673
|
},
|
|
669
674
|
liveVar: {
|
|
670
675
|
},
|
|
@@ -675,10 +680,14 @@ function observeImports(map, importName, importIndex) {
|
|
|
675
680
|
functors[6]({
|
|
676
681
|
imports(entries) {
|
|
677
682
|
const map = new Map(entries);
|
|
683
|
+
observeImports(map, "../commons.js", 0);
|
|
678
684
|
},
|
|
679
685
|
liveVar: {
|
|
680
686
|
},
|
|
681
687
|
onceVar: {
|
|
688
|
+
an: cells[6].an.set,
|
|
689
|
+
bestEffortStringify: cells[6].bestEffortStringify.set,
|
|
690
|
+
enJoin: cells[6].enJoin.set,
|
|
682
691
|
},
|
|
683
692
|
importMeta: {},
|
|
684
693
|
});
|
|
@@ -689,71 +698,65 @@ function observeImports(map, importName, importIndex) {
|
|
|
689
698
|
liveVar: {
|
|
690
699
|
},
|
|
691
700
|
onceVar: {
|
|
692
|
-
makeLRUCacheMap: cells[7].makeLRUCacheMap.set,
|
|
693
701
|
},
|
|
694
702
|
importMeta: {},
|
|
695
703
|
});
|
|
696
704
|
functors[8]({
|
|
697
705
|
imports(entries) {
|
|
698
706
|
const map = new Map(entries);
|
|
699
|
-
observeImports(map, "../make-lru-cachemap.js", 7);
|
|
700
707
|
},
|
|
701
708
|
liveVar: {
|
|
702
709
|
},
|
|
703
710
|
onceVar: {
|
|
704
|
-
makeNoteLogArgsArrayKit: cells[8].makeNoteLogArgsArrayKit.set,
|
|
705
711
|
},
|
|
706
712
|
importMeta: {},
|
|
707
713
|
});
|
|
708
714
|
functors[9]({
|
|
709
715
|
imports(entries) {
|
|
710
716
|
const map = new Map(entries);
|
|
711
|
-
observeImports(map, "../commons.js", 0);
|
|
712
|
-
observeImports(map, "./stringify-utils.js", 4);
|
|
713
|
-
observeImports(map, "./types.js", 5);
|
|
714
|
-
observeImports(map, "./internal-types.js", 6);
|
|
715
|
-
observeImports(map, "./note-log-args.js", 8);
|
|
716
717
|
},
|
|
717
718
|
liveVar: {
|
|
718
719
|
},
|
|
719
720
|
onceVar: {
|
|
720
|
-
|
|
721
|
-
bare: cells[9].b.set,
|
|
722
|
-
redactedDetails: cells[9].X.set,
|
|
723
|
-
unredactedDetails: cells[9].unredactedDetails.set,
|
|
724
|
-
makeError: cells[9].makeError.set,
|
|
725
|
-
note: cells[9].annotateError.set,
|
|
726
|
-
loggedErrorHandler: cells[9].loggedErrorHandler.set,
|
|
727
|
-
makeAssert: cells[9].makeAssert.set,
|
|
728
|
-
assert: cells[9].assert.set,
|
|
729
|
-
assertEqual: cells[9].assertEqual.set,
|
|
730
|
-
sanitizeError: cells[9].sanitizeError.set,
|
|
721
|
+
makeLRUCacheMap: cells[9].makeLRUCacheMap.set,
|
|
731
722
|
},
|
|
732
723
|
importMeta: {},
|
|
733
724
|
});
|
|
734
725
|
functors[10]({
|
|
735
726
|
imports(entries) {
|
|
736
727
|
const map = new Map(entries);
|
|
737
|
-
observeImports(map, "
|
|
738
|
-
observeImports(map, "./error/assert.js", 9);
|
|
728
|
+
observeImports(map, "../make-lru-cachemap.js", 9);
|
|
739
729
|
},
|
|
740
730
|
liveVar: {
|
|
741
731
|
},
|
|
742
732
|
onceVar: {
|
|
743
|
-
|
|
744
|
-
makeHardener: cells[10].makeHardener.set,
|
|
733
|
+
makeNoteLogArgsArrayKit: cells[10].makeNoteLogArgsArrayKit.set,
|
|
745
734
|
},
|
|
746
735
|
importMeta: {},
|
|
747
736
|
});
|
|
748
737
|
functors[11]({
|
|
749
738
|
imports(entries) {
|
|
750
739
|
const map = new Map(entries);
|
|
751
|
-
observeImports(map, "
|
|
740
|
+
observeImports(map, "../commons.js", 0);
|
|
741
|
+
observeImports(map, "./stringify-utils.js", 6);
|
|
742
|
+
observeImports(map, "./types.js", 7);
|
|
743
|
+
observeImports(map, "./internal-types.js", 8);
|
|
744
|
+
observeImports(map, "./note-log-args.js", 10);
|
|
752
745
|
},
|
|
753
746
|
liveVar: {
|
|
754
747
|
},
|
|
755
748
|
onceVar: {
|
|
756
|
-
|
|
749
|
+
quote: cells[11].q.set,
|
|
750
|
+
bare: cells[11].b.set,
|
|
751
|
+
redactedDetails: cells[11].X.set,
|
|
752
|
+
unredactedDetails: cells[11].unredactedDetails.set,
|
|
753
|
+
makeError: cells[11].makeError.set,
|
|
754
|
+
note: cells[11].annotateError.set,
|
|
755
|
+
loggedErrorHandler: cells[11].loggedErrorHandler.set,
|
|
756
|
+
makeAssert: cells[11].makeAssert.set,
|
|
757
|
+
assert: cells[11].assert.set,
|
|
758
|
+
assertEqual: cells[11].assertEqual.set,
|
|
759
|
+
sanitizeError: cells[11].sanitizeError.set,
|
|
757
760
|
},
|
|
758
761
|
importMeta: {},
|
|
759
762
|
});
|
|
@@ -761,68 +764,70 @@ function observeImports(map, importName, importIndex) {
|
|
|
761
764
|
imports(entries) {
|
|
762
765
|
const map = new Map(entries);
|
|
763
766
|
observeImports(map, "./commons.js", 0);
|
|
767
|
+
observeImports(map, "./error/assert.js", 11);
|
|
764
768
|
},
|
|
765
769
|
liveVar: {
|
|
766
770
|
},
|
|
767
771
|
onceVar: {
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
universalPropertyNames: cells[12].universalPropertyNames.set,
|
|
771
|
-
initialGlobalPropertyNames: cells[12].initialGlobalPropertyNames.set,
|
|
772
|
-
sharedGlobalPropertyNames: cells[12].sharedGlobalPropertyNames.set,
|
|
773
|
-
uniqueGlobalPropertyNames: cells[12].uniqueGlobalPropertyNames.set,
|
|
774
|
-
FunctionInstance: cells[12].FunctionInstance.set,
|
|
775
|
-
AsyncFunctionInstance: cells[12].AsyncFunctionInstance.set,
|
|
776
|
-
isAccessorPermit: cells[12].isAccessorPermit.set,
|
|
777
|
-
permitted: cells[12].permitted.set,
|
|
772
|
+
isTypedArray: cells[12].isTypedArray.set,
|
|
773
|
+
makeHardener: cells[12].makeHardener.set,
|
|
778
774
|
},
|
|
779
775
|
importMeta: {},
|
|
780
776
|
});
|
|
781
777
|
functors[13]({
|
|
782
778
|
imports(entries) {
|
|
783
779
|
const map = new Map(entries);
|
|
784
|
-
observeImports(map, "./cauterize-property.js", 11);
|
|
785
780
|
observeImports(map, "./commons.js", 0);
|
|
786
|
-
observeImports(map, "./permits.js", 12);
|
|
787
781
|
},
|
|
788
782
|
liveVar: {
|
|
789
783
|
},
|
|
790
784
|
onceVar: {
|
|
791
|
-
|
|
792
|
-
getGlobalIntrinsics: cells[13].getGlobalIntrinsics.set,
|
|
785
|
+
cauterizeProperty: cells[13].cauterizeProperty.set,
|
|
793
786
|
},
|
|
794
787
|
importMeta: {},
|
|
795
788
|
});
|
|
796
789
|
functors[14]({
|
|
797
790
|
imports(entries) {
|
|
798
791
|
const map = new Map(entries);
|
|
799
|
-
observeImports(map, "./permits.js", 12);
|
|
800
792
|
observeImports(map, "./commons.js", 0);
|
|
801
|
-
observeImports(map, "./cauterize-property.js", 11);
|
|
802
793
|
},
|
|
803
794
|
liveVar: {
|
|
804
795
|
},
|
|
805
796
|
onceVar: {
|
|
806
|
-
|
|
797
|
+
NativeErrors: cells[14].NativeErrors.set,
|
|
798
|
+
constantProperties: cells[14].constantProperties.set,
|
|
799
|
+
universalPropertyNames: cells[14].universalPropertyNames.set,
|
|
800
|
+
initialGlobalPropertyNames: cells[14].initialGlobalPropertyNames.set,
|
|
801
|
+
sharedGlobalPropertyNames: cells[14].sharedGlobalPropertyNames.set,
|
|
802
|
+
uniqueGlobalPropertyNames: cells[14].uniqueGlobalPropertyNames.set,
|
|
803
|
+
FunctionInstance: cells[14].FunctionInstance.set,
|
|
804
|
+
AsyncFunctionInstance: cells[14].AsyncFunctionInstance.set,
|
|
805
|
+
isAccessorPermit: cells[14].isAccessorPermit.set,
|
|
806
|
+
permitted: cells[14].permitted.set,
|
|
807
807
|
},
|
|
808
808
|
importMeta: {},
|
|
809
809
|
});
|
|
810
810
|
functors[15]({
|
|
811
811
|
imports(entries) {
|
|
812
812
|
const map = new Map(entries);
|
|
813
|
+
observeImports(map, "./cauterize-property.js", 13);
|
|
813
814
|
observeImports(map, "./commons.js", 0);
|
|
815
|
+
observeImports(map, "./permits.js", 14);
|
|
814
816
|
},
|
|
815
817
|
liveVar: {
|
|
816
818
|
},
|
|
817
819
|
onceVar: {
|
|
818
|
-
|
|
820
|
+
makeIntrinsicsCollector: cells[15].makeIntrinsicsCollector.set,
|
|
821
|
+
getGlobalIntrinsics: cells[15].getGlobalIntrinsics.set,
|
|
819
822
|
},
|
|
820
823
|
importMeta: {},
|
|
821
824
|
});
|
|
822
825
|
functors[16]({
|
|
823
826
|
imports(entries) {
|
|
824
827
|
const map = new Map(entries);
|
|
828
|
+
observeImports(map, "./permits.js", 14);
|
|
825
829
|
observeImports(map, "./commons.js", 0);
|
|
830
|
+
observeImports(map, "./cauterize-property.js", 13);
|
|
826
831
|
},
|
|
827
832
|
liveVar: {
|
|
828
833
|
},
|
|
@@ -863,9 +868,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
863
868
|
liveVar: {
|
|
864
869
|
},
|
|
865
870
|
onceVar: {
|
|
866
|
-
|
|
867
|
-
moderateEnablements: cells[19].moderateEnablements.set,
|
|
868
|
-
severeEnablements: cells[19].severeEnablements.set,
|
|
871
|
+
default: cells[19].default.set,
|
|
869
872
|
},
|
|
870
873
|
importMeta: {},
|
|
871
874
|
});
|
|
@@ -873,7 +876,6 @@ function observeImports(map, importName, importIndex) {
|
|
|
873
876
|
imports(entries) {
|
|
874
877
|
const map = new Map(entries);
|
|
875
878
|
observeImports(map, "./commons.js", 0);
|
|
876
|
-
observeImports(map, "./enablements.js", 19);
|
|
877
879
|
},
|
|
878
880
|
liveVar: {
|
|
879
881
|
},
|
|
@@ -886,23 +888,26 @@ function observeImports(map, importName, importIndex) {
|
|
|
886
888
|
imports(entries) {
|
|
887
889
|
const map = new Map(entries);
|
|
888
890
|
observeImports(map, "./commons.js", 0);
|
|
889
|
-
observeImports(map, "./error/assert.js", 9);
|
|
890
891
|
},
|
|
891
892
|
liveVar: {
|
|
892
893
|
},
|
|
893
894
|
onceVar: {
|
|
894
|
-
|
|
895
|
+
minEnablements: cells[21].minEnablements.set,
|
|
896
|
+
moderateEnablements: cells[21].moderateEnablements.set,
|
|
897
|
+
severeEnablements: cells[21].severeEnablements.set,
|
|
895
898
|
},
|
|
896
899
|
importMeta: {},
|
|
897
900
|
});
|
|
898
901
|
functors[22]({
|
|
899
902
|
imports(entries) {
|
|
900
903
|
const map = new Map(entries);
|
|
904
|
+
observeImports(map, "./commons.js", 0);
|
|
905
|
+
observeImports(map, "./enablements.js", 21);
|
|
901
906
|
},
|
|
902
907
|
liveVar: {
|
|
903
908
|
},
|
|
904
909
|
onceVar: {
|
|
905
|
-
|
|
910
|
+
default: cells[22].default.set,
|
|
906
911
|
},
|
|
907
912
|
importMeta: {},
|
|
908
913
|
});
|
|
@@ -910,30 +915,23 @@ function observeImports(map, importName, importIndex) {
|
|
|
910
915
|
imports(entries) {
|
|
911
916
|
const map = new Map(entries);
|
|
912
917
|
observeImports(map, "./commons.js", 0);
|
|
913
|
-
observeImports(map, "./error/assert.js",
|
|
918
|
+
observeImports(map, "./error/assert.js", 11);
|
|
914
919
|
},
|
|
915
920
|
liveVar: {
|
|
916
921
|
},
|
|
917
922
|
onceVar: {
|
|
918
|
-
|
|
923
|
+
default: cells[23].default.set,
|
|
919
924
|
},
|
|
920
925
|
importMeta: {},
|
|
921
926
|
});
|
|
922
927
|
functors[24]({
|
|
923
928
|
imports(entries) {
|
|
924
929
|
const map = new Map(entries);
|
|
925
|
-
observeImports(map, "./commons.js", 0);
|
|
926
|
-
observeImports(map, "./make-eval-function.js", 22);
|
|
927
|
-
observeImports(map, "./make-function-constructor.js", 23);
|
|
928
|
-
observeImports(map, "./permits.js", 12);
|
|
929
930
|
},
|
|
930
931
|
liveVar: {
|
|
931
932
|
},
|
|
932
933
|
onceVar: {
|
|
933
|
-
|
|
934
|
-
setGlobalObjectConstantProperties: cells[24].setGlobalObjectConstantProperties.set,
|
|
935
|
-
setGlobalObjectMutableProperties: cells[24].setGlobalObjectMutableProperties.set,
|
|
936
|
-
setGlobalObjectEvaluators: cells[24].setGlobalObjectEvaluators.set,
|
|
934
|
+
makeEvalFunction: cells[24].makeEvalFunction.set,
|
|
937
935
|
},
|
|
938
936
|
importMeta: {},
|
|
939
937
|
});
|
|
@@ -941,14 +939,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
941
939
|
imports(entries) {
|
|
942
940
|
const map = new Map(entries);
|
|
943
941
|
observeImports(map, "./commons.js", 0);
|
|
944
|
-
observeImports(map, "./error/assert.js",
|
|
942
|
+
observeImports(map, "./error/assert.js", 11);
|
|
945
943
|
},
|
|
946
944
|
liveVar: {
|
|
947
945
|
},
|
|
948
946
|
onceVar: {
|
|
949
|
-
|
|
950
|
-
strictScopeTerminatorHandler: cells[25].strictScopeTerminatorHandler.set,
|
|
951
|
-
strictScopeTerminator: cells[25].strictScopeTerminator.set,
|
|
947
|
+
makeFunctionConstructor: cells[25].makeFunctionConstructor.set,
|
|
952
948
|
},
|
|
953
949
|
importMeta: {},
|
|
954
950
|
});
|
|
@@ -956,12 +952,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
956
952
|
imports(entries) {
|
|
957
953
|
const map = new Map(entries);
|
|
958
954
|
observeImports(map, "./commons.js", 0);
|
|
959
|
-
observeImports(map, "./
|
|
955
|
+
observeImports(map, "./make-eval-function.js", 24);
|
|
956
|
+
observeImports(map, "./make-function-constructor.js", 25);
|
|
957
|
+
observeImports(map, "./permits.js", 14);
|
|
960
958
|
},
|
|
961
959
|
liveVar: {
|
|
962
960
|
},
|
|
963
961
|
onceVar: {
|
|
964
|
-
|
|
962
|
+
setGlobalObjectSymbolUnscopables: cells[26].setGlobalObjectSymbolUnscopables.set,
|
|
963
|
+
setGlobalObjectConstantProperties: cells[26].setGlobalObjectConstantProperties.set,
|
|
964
|
+
setGlobalObjectMutableProperties: cells[26].setGlobalObjectMutableProperties.set,
|
|
965
|
+
setGlobalObjectEvaluators: cells[26].setGlobalObjectEvaluators.set,
|
|
965
966
|
},
|
|
966
967
|
importMeta: {},
|
|
967
968
|
});
|
|
@@ -969,12 +970,14 @@ function observeImports(map, importName, importIndex) {
|
|
|
969
970
|
imports(entries) {
|
|
970
971
|
const map = new Map(entries);
|
|
971
972
|
observeImports(map, "./commons.js", 0);
|
|
972
|
-
observeImports(map, "./error/assert.js",
|
|
973
|
+
observeImports(map, "./error/assert.js", 11);
|
|
973
974
|
},
|
|
974
975
|
liveVar: {
|
|
975
976
|
},
|
|
976
977
|
onceVar: {
|
|
977
|
-
|
|
978
|
+
alwaysThrowHandler: cells[27].alwaysThrowHandler.set,
|
|
979
|
+
strictScopeTerminatorHandler: cells[27].strictScopeTerminatorHandler.set,
|
|
980
|
+
strictScopeTerminator: cells[27].strictScopeTerminator.set,
|
|
978
981
|
},
|
|
979
982
|
importMeta: {},
|
|
980
983
|
});
|
|
@@ -982,11 +985,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
982
985
|
imports(entries) {
|
|
983
986
|
const map = new Map(entries);
|
|
984
987
|
observeImports(map, "./commons.js", 0);
|
|
988
|
+
observeImports(map, "./strict-scope-terminator.js", 27);
|
|
985
989
|
},
|
|
986
990
|
liveVar: {
|
|
987
991
|
},
|
|
988
992
|
onceVar: {
|
|
989
|
-
|
|
993
|
+
createSloppyGlobalsScopeTerminator: cells[28].createSloppyGlobalsScopeTerminator.set,
|
|
990
994
|
},
|
|
991
995
|
importMeta: {},
|
|
992
996
|
});
|
|
@@ -994,19 +998,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
994
998
|
imports(entries) {
|
|
995
999
|
const map = new Map(entries);
|
|
996
1000
|
observeImports(map, "./commons.js", 0);
|
|
997
|
-
observeImports(map, "./
|
|
1001
|
+
observeImports(map, "./error/assert.js", 11);
|
|
998
1002
|
},
|
|
999
1003
|
liveVar: {
|
|
1000
1004
|
},
|
|
1001
1005
|
onceVar: {
|
|
1002
|
-
|
|
1003
|
-
evadeHtmlCommentTest: cells[29].evadeHtmlCommentTest.set,
|
|
1004
|
-
rejectImportExpressions: cells[29].rejectImportExpressions.set,
|
|
1005
|
-
evadeImportExpressionTest: cells[29].evadeImportExpressionTest.set,
|
|
1006
|
-
rejectSomeDirectEvalExpressions: cells[29].rejectSomeDirectEvalExpressions.set,
|
|
1007
|
-
mandatoryTransforms: cells[29].mandatoryTransforms.set,
|
|
1008
|
-
applyTransforms: cells[29].applyTransforms.set,
|
|
1009
|
-
transforms: cells[29].transforms.set,
|
|
1006
|
+
makeEvalScopeKit: cells[29].makeEvalScopeKit.set,
|
|
1010
1007
|
},
|
|
1011
1008
|
importMeta: {},
|
|
1012
1009
|
});
|
|
@@ -1018,8 +1015,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1018
1015
|
liveVar: {
|
|
1019
1016
|
},
|
|
1020
1017
|
onceVar: {
|
|
1021
|
-
|
|
1022
|
-
getScopeConstants: cells[30].getScopeConstants.set,
|
|
1018
|
+
getSourceURL: cells[30].getSourceURL.set,
|
|
1023
1019
|
},
|
|
1024
1020
|
importMeta: {},
|
|
1025
1021
|
});
|
|
@@ -1027,12 +1023,19 @@ function observeImports(map, importName, importIndex) {
|
|
|
1027
1023
|
imports(entries) {
|
|
1028
1024
|
const map = new Map(entries);
|
|
1029
1025
|
observeImports(map, "./commons.js", 0);
|
|
1030
|
-
observeImports(map, "./
|
|
1026
|
+
observeImports(map, "./get-source-url.js", 30);
|
|
1031
1027
|
},
|
|
1032
1028
|
liveVar: {
|
|
1033
1029
|
},
|
|
1034
1030
|
onceVar: {
|
|
1035
|
-
|
|
1031
|
+
rejectHtmlComments: cells[31].rejectHtmlComments.set,
|
|
1032
|
+
evadeHtmlCommentTest: cells[31].evadeHtmlCommentTest.set,
|
|
1033
|
+
rejectImportExpressions: cells[31].rejectImportExpressions.set,
|
|
1034
|
+
evadeImportExpressionTest: cells[31].evadeImportExpressionTest.set,
|
|
1035
|
+
rejectSomeDirectEvalExpressions: cells[31].rejectSomeDirectEvalExpressions.set,
|
|
1036
|
+
mandatoryTransforms: cells[31].mandatoryTransforms.set,
|
|
1037
|
+
applyTransforms: cells[31].applyTransforms.set,
|
|
1038
|
+
transforms: cells[31].transforms.set,
|
|
1036
1039
|
},
|
|
1037
1040
|
importMeta: {},
|
|
1038
1041
|
});
|
|
@@ -1040,17 +1043,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1040
1043
|
imports(entries) {
|
|
1041
1044
|
const map = new Map(entries);
|
|
1042
1045
|
observeImports(map, "./commons.js", 0);
|
|
1043
|
-
observeImports(map, "./strict-scope-terminator.js", 25);
|
|
1044
|
-
observeImports(map, "./sloppy-globals-scope-terminator.js", 26);
|
|
1045
|
-
observeImports(map, "./eval-scope.js", 27);
|
|
1046
|
-
observeImports(map, "./transforms.js", 29);
|
|
1047
|
-
observeImports(map, "./make-evaluate.js", 31);
|
|
1048
|
-
observeImports(map, "./error/assert.js", 9);
|
|
1049
1046
|
},
|
|
1050
1047
|
liveVar: {
|
|
1051
1048
|
},
|
|
1052
1049
|
onceVar: {
|
|
1053
|
-
|
|
1050
|
+
isValidIdentifierName: cells[32].isValidIdentifierName.set,
|
|
1051
|
+
getScopeConstants: cells[32].getScopeConstants.set,
|
|
1054
1052
|
},
|
|
1055
1053
|
importMeta: {},
|
|
1056
1054
|
});
|
|
@@ -1058,11 +1056,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1058
1056
|
imports(entries) {
|
|
1059
1057
|
const map = new Map(entries);
|
|
1060
1058
|
observeImports(map, "./commons.js", 0);
|
|
1059
|
+
observeImports(map, "./scope-constants.js", 32);
|
|
1061
1060
|
},
|
|
1062
1061
|
liveVar: {
|
|
1063
1062
|
},
|
|
1064
1063
|
onceVar: {
|
|
1065
|
-
|
|
1064
|
+
makeEvaluate: cells[33].makeEvaluate.set,
|
|
1066
1065
|
},
|
|
1067
1066
|
importMeta: {},
|
|
1068
1067
|
});
|
|
@@ -1070,11 +1069,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
1070
1069
|
imports(entries) {
|
|
1071
1070
|
const map = new Map(entries);
|
|
1072
1071
|
observeImports(map, "./commons.js", 0);
|
|
1072
|
+
observeImports(map, "./strict-scope-terminator.js", 27);
|
|
1073
|
+
observeImports(map, "./sloppy-globals-scope-terminator.js", 28);
|
|
1074
|
+
observeImports(map, "./eval-scope.js", 29);
|
|
1075
|
+
observeImports(map, "./transforms.js", 31);
|
|
1076
|
+
observeImports(map, "./make-evaluate.js", 33);
|
|
1077
|
+
observeImports(map, "./error/assert.js", 11);
|
|
1073
1078
|
},
|
|
1074
1079
|
liveVar: {
|
|
1075
1080
|
},
|
|
1076
1081
|
onceVar: {
|
|
1077
|
-
|
|
1082
|
+
makeSafeEvaluator: cells[34].makeSafeEvaluator.set,
|
|
1078
1083
|
},
|
|
1079
1084
|
importMeta: {},
|
|
1080
1085
|
});
|
|
@@ -1086,37 +1091,31 @@ function observeImports(map, importName, importIndex) {
|
|
|
1086
1091
|
liveVar: {
|
|
1087
1092
|
},
|
|
1088
1093
|
onceVar: {
|
|
1089
|
-
|
|
1094
|
+
tameFunctionToString: cells[35].tameFunctionToString.set,
|
|
1090
1095
|
},
|
|
1091
1096
|
importMeta: {},
|
|
1092
1097
|
});
|
|
1093
1098
|
functors[36]({
|
|
1094
1099
|
imports(entries) {
|
|
1095
1100
|
const map = new Map(entries);
|
|
1096
|
-
observeImports(map, "
|
|
1101
|
+
observeImports(map, "./commons.js", 0);
|
|
1097
1102
|
},
|
|
1098
1103
|
liveVar: {
|
|
1099
1104
|
},
|
|
1100
1105
|
onceVar: {
|
|
1101
|
-
|
|
1102
|
-
consoleOtherMethods: cells[36].consoleOtherMethods.set,
|
|
1103
|
-
makeLoggingConsoleKit: cells[36].makeLoggingConsoleKit.set,
|
|
1104
|
-
pumpLogToConsole: cells[36].pumpLogToConsole.set,
|
|
1105
|
-
makeCausalConsole: cells[36].makeCausalConsole.set,
|
|
1106
|
-
defineCausalConsoleFromLogger: cells[36].defineCausalConsoleFromLogger.set,
|
|
1107
|
-
filterConsole: cells[36].filterConsole.set,
|
|
1106
|
+
tameDomains: cells[36].tameDomains.set,
|
|
1108
1107
|
},
|
|
1109
1108
|
importMeta: {},
|
|
1110
1109
|
});
|
|
1111
1110
|
functors[37]({
|
|
1112
1111
|
imports(entries) {
|
|
1113
1112
|
const map = new Map(entries);
|
|
1114
|
-
observeImports(map, "
|
|
1113
|
+
observeImports(map, "./commons.js", 0);
|
|
1115
1114
|
},
|
|
1116
1115
|
liveVar: {
|
|
1117
1116
|
},
|
|
1118
1117
|
onceVar: {
|
|
1119
|
-
|
|
1118
|
+
tameModuleSource: cells[37].tameModuleSource.set,
|
|
1120
1119
|
},
|
|
1121
1120
|
importMeta: {},
|
|
1122
1121
|
});
|
|
@@ -1124,14 +1123,17 @@ function observeImports(map, importName, importIndex) {
|
|
|
1124
1123
|
imports(entries) {
|
|
1125
1124
|
const map = new Map(entries);
|
|
1126
1125
|
observeImports(map, "../commons.js", 0);
|
|
1127
|
-
observeImports(map, "./assert.js", 9);
|
|
1128
|
-
observeImports(map, "./console.js", 36);
|
|
1129
|
-
observeImports(map, "./unhandled-rejection.js", 37);
|
|
1130
1126
|
},
|
|
1131
1127
|
liveVar: {
|
|
1132
1128
|
},
|
|
1133
1129
|
onceVar: {
|
|
1134
|
-
|
|
1130
|
+
consoleLevelMethods: cells[38].consoleLevelMethods.set,
|
|
1131
|
+
consoleOtherMethods: cells[38].consoleOtherMethods.set,
|
|
1132
|
+
makeLoggingConsoleKit: cells[38].makeLoggingConsoleKit.set,
|
|
1133
|
+
pumpLogToConsole: cells[38].pumpLogToConsole.set,
|
|
1134
|
+
makeCausalConsole: cells[38].makeCausalConsole.set,
|
|
1135
|
+
defineCausalConsoleFromLogger: cells[38].defineCausalConsoleFromLogger.set,
|
|
1136
|
+
filterConsole: cells[38].filterConsole.set,
|
|
1135
1137
|
},
|
|
1136
1138
|
importMeta: {},
|
|
1137
1139
|
});
|
|
@@ -1143,9 +1145,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1143
1145
|
liveVar: {
|
|
1144
1146
|
},
|
|
1145
1147
|
onceVar: {
|
|
1146
|
-
|
|
1147
|
-
shortenCallSiteString: cells[39].shortenCallSiteString.set,
|
|
1148
|
-
tameV8ErrorConstructor: cells[39].tameV8ErrorConstructor.set,
|
|
1148
|
+
makeRejectionHandlers: cells[39].makeRejectionHandlers.set,
|
|
1149
1149
|
},
|
|
1150
1150
|
importMeta: {},
|
|
1151
1151
|
});
|
|
@@ -1153,126 +1153,119 @@ function observeImports(map, importName, importIndex) {
|
|
|
1153
1153
|
imports(entries) {
|
|
1154
1154
|
const map = new Map(entries);
|
|
1155
1155
|
observeImports(map, "../commons.js", 0);
|
|
1156
|
-
observeImports(map, "
|
|
1157
|
-
observeImports(map, "./
|
|
1156
|
+
observeImports(map, "./assert.js", 11);
|
|
1157
|
+
observeImports(map, "./console.js", 38);
|
|
1158
|
+
observeImports(map, "./unhandled-rejection.js", 39);
|
|
1158
1159
|
},
|
|
1159
1160
|
liveVar: {
|
|
1160
1161
|
},
|
|
1161
1162
|
onceVar: {
|
|
1162
|
-
|
|
1163
|
+
tameConsole: cells[40].tameConsole.set,
|
|
1163
1164
|
},
|
|
1164
1165
|
importMeta: {},
|
|
1165
1166
|
});
|
|
1166
1167
|
functors[41]({
|
|
1167
1168
|
imports(entries) {
|
|
1168
1169
|
const map = new Map(entries);
|
|
1169
|
-
observeImports(map, "
|
|
1170
|
-
observeImports(map, "./commons.js", 0);
|
|
1171
|
-
observeImports(map, "./error/assert.js", 9);
|
|
1170
|
+
observeImports(map, "../commons.js", 0);
|
|
1172
1171
|
},
|
|
1173
1172
|
liveVar: {
|
|
1174
1173
|
},
|
|
1175
1174
|
onceVar: {
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1175
|
+
filterFileName: cells[41].filterFileName.set,
|
|
1176
|
+
shortenCallSiteString: cells[41].shortenCallSiteString.set,
|
|
1177
|
+
tameV8ErrorConstructor: cells[41].tameV8ErrorConstructor.set,
|
|
1179
1178
|
},
|
|
1180
1179
|
importMeta: {},
|
|
1181
1180
|
});
|
|
1182
1181
|
functors[42]({
|
|
1183
1182
|
imports(entries) {
|
|
1184
1183
|
const map = new Map(entries);
|
|
1185
|
-
observeImports(map, "
|
|
1186
|
-
observeImports(map, "
|
|
1187
|
-
observeImports(map, "./error
|
|
1184
|
+
observeImports(map, "../commons.js", 0);
|
|
1185
|
+
observeImports(map, "../permits.js", 14);
|
|
1186
|
+
observeImports(map, "./tame-v8-error-constructor.js", 41);
|
|
1188
1187
|
},
|
|
1189
1188
|
liveVar: {
|
|
1190
1189
|
},
|
|
1191
1190
|
onceVar: {
|
|
1192
|
-
|
|
1193
|
-
getDeferredExports: cells[42].getDeferredExports.set,
|
|
1191
|
+
default: cells[42].default.set,
|
|
1194
1192
|
},
|
|
1195
1193
|
importMeta: {},
|
|
1196
1194
|
});
|
|
1197
1195
|
functors[43]({
|
|
1198
1196
|
imports(entries) {
|
|
1199
1197
|
const map = new Map(entries);
|
|
1198
|
+
observeImports(map, "@endo/env-options", 3);
|
|
1200
1199
|
observeImports(map, "./commons.js", 0);
|
|
1201
|
-
observeImports(map, "./
|
|
1202
|
-
observeImports(map, "./make-safe-evaluator.js", 32);
|
|
1200
|
+
observeImports(map, "./error/assert.js", 11);
|
|
1203
1201
|
},
|
|
1204
1202
|
liveVar: {
|
|
1205
1203
|
},
|
|
1206
1204
|
onceVar: {
|
|
1207
|
-
|
|
1208
|
-
|
|
1205
|
+
makeAlias: cells[43].makeAlias.set,
|
|
1206
|
+
load: cells[43].load.set,
|
|
1207
|
+
loadNow: cells[43].loadNow.set,
|
|
1209
1208
|
},
|
|
1210
1209
|
importMeta: {},
|
|
1211
1210
|
});
|
|
1212
1211
|
functors[44]({
|
|
1213
1212
|
imports(entries) {
|
|
1214
1213
|
const map = new Map(entries);
|
|
1215
|
-
observeImports(map, "./
|
|
1216
|
-
observeImports(map, "./module-proxy.js", 42);
|
|
1214
|
+
observeImports(map, "./module-load.js", 43);
|
|
1217
1215
|
observeImports(map, "./commons.js", 0);
|
|
1218
|
-
observeImports(map, "./
|
|
1216
|
+
observeImports(map, "./error/assert.js", 11);
|
|
1219
1217
|
},
|
|
1220
1218
|
liveVar: {
|
|
1221
1219
|
},
|
|
1222
1220
|
onceVar: {
|
|
1223
|
-
|
|
1224
|
-
|
|
1221
|
+
deferExports: cells[44].deferExports.set,
|
|
1222
|
+
getDeferredExports: cells[44].getDeferredExports.set,
|
|
1225
1223
|
},
|
|
1226
1224
|
importMeta: {},
|
|
1227
1225
|
});
|
|
1228
1226
|
functors[45]({
|
|
1229
1227
|
imports(entries) {
|
|
1230
1228
|
const map = new Map(entries);
|
|
1231
|
-
observeImports(map, "./error/assert.js", 9);
|
|
1232
|
-
observeImports(map, "./module-instance.js", 44);
|
|
1233
1229
|
observeImports(map, "./commons.js", 0);
|
|
1230
|
+
observeImports(map, "./transforms.js", 31);
|
|
1231
|
+
observeImports(map, "./make-safe-evaluator.js", 34);
|
|
1234
1232
|
},
|
|
1235
1233
|
liveVar: {
|
|
1236
1234
|
},
|
|
1237
1235
|
onceVar: {
|
|
1238
|
-
|
|
1239
|
-
|
|
1236
|
+
provideCompartmentEvaluator: cells[45].provideCompartmentEvaluator.set,
|
|
1237
|
+
compartmentEvaluate: cells[45].compartmentEvaluate.set,
|
|
1240
1238
|
},
|
|
1241
1239
|
importMeta: {},
|
|
1242
1240
|
});
|
|
1243
1241
|
functors[46]({
|
|
1244
1242
|
imports(entries) {
|
|
1245
1243
|
const map = new Map(entries);
|
|
1244
|
+
observeImports(map, "./error/assert.js", 11);
|
|
1245
|
+
observeImports(map, "./module-proxy.js", 44);
|
|
1246
1246
|
observeImports(map, "./commons.js", 0);
|
|
1247
|
-
observeImports(map, "./
|
|
1248
|
-
observeImports(map, "./error/assert.js", 9);
|
|
1249
|
-
observeImports(map, "./permits.js", 12);
|
|
1250
|
-
observeImports(map, "./module-load.js", 41);
|
|
1251
|
-
observeImports(map, "./module-link.js", 45);
|
|
1252
|
-
observeImports(map, "./module-proxy.js", 42);
|
|
1253
|
-
observeImports(map, "./compartment-evaluate.js", 43);
|
|
1254
|
-
observeImports(map, "./make-safe-evaluator.js", 32);
|
|
1247
|
+
observeImports(map, "./compartment-evaluate.js", 45);
|
|
1255
1248
|
},
|
|
1256
1249
|
liveVar: {
|
|
1257
1250
|
},
|
|
1258
1251
|
onceVar: {
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
compartmentOptions: cells[46].compartmentOptions.set,
|
|
1262
|
-
makeCompartmentConstructor: cells[46].makeCompartmentConstructor.set,
|
|
1252
|
+
makeVirtualModuleInstance: cells[46].makeVirtualModuleInstance.set,
|
|
1253
|
+
makeModuleInstance: cells[46].makeModuleInstance.set,
|
|
1263
1254
|
},
|
|
1264
1255
|
importMeta: {},
|
|
1265
1256
|
});
|
|
1266
1257
|
functors[47]({
|
|
1267
1258
|
imports(entries) {
|
|
1268
1259
|
const map = new Map(entries);
|
|
1260
|
+
observeImports(map, "./error/assert.js", 11);
|
|
1261
|
+
observeImports(map, "./module-instance.js", 46);
|
|
1269
1262
|
observeImports(map, "./commons.js", 0);
|
|
1270
|
-
observeImports(map, "./compartment.js", 46);
|
|
1271
1263
|
},
|
|
1272
1264
|
liveVar: {
|
|
1273
1265
|
},
|
|
1274
1266
|
onceVar: {
|
|
1275
|
-
|
|
1267
|
+
link: cells[47].link.set,
|
|
1268
|
+
instantiate: cells[47].instantiate.set,
|
|
1276
1269
|
},
|
|
1277
1270
|
importMeta: {},
|
|
1278
1271
|
});
|
|
@@ -1280,11 +1273,22 @@ function observeImports(map, importName, importIndex) {
|
|
|
1280
1273
|
imports(entries) {
|
|
1281
1274
|
const map = new Map(entries);
|
|
1282
1275
|
observeImports(map, "./commons.js", 0);
|
|
1276
|
+
observeImports(map, "./global-object.js", 26);
|
|
1277
|
+
observeImports(map, "./error/assert.js", 11);
|
|
1278
|
+
observeImports(map, "./permits.js", 14);
|
|
1279
|
+
observeImports(map, "./module-load.js", 43);
|
|
1280
|
+
observeImports(map, "./module-link.js", 47);
|
|
1281
|
+
observeImports(map, "./module-proxy.js", 44);
|
|
1282
|
+
observeImports(map, "./compartment-evaluate.js", 45);
|
|
1283
|
+
observeImports(map, "./make-safe-evaluator.js", 34);
|
|
1283
1284
|
},
|
|
1284
1285
|
liveVar: {
|
|
1285
1286
|
},
|
|
1286
1287
|
onceVar: {
|
|
1287
|
-
|
|
1288
|
+
InertCompartment: cells[48].InertCompartment.set,
|
|
1289
|
+
CompartmentPrototype: cells[48].CompartmentPrototype.set,
|
|
1290
|
+
compartmentOptions: cells[48].compartmentOptions.set,
|
|
1291
|
+
makeCompartmentConstructor: cells[48].makeCompartmentConstructor.set,
|
|
1288
1292
|
},
|
|
1289
1293
|
importMeta: {},
|
|
1290
1294
|
});
|
|
@@ -1292,11 +1296,12 @@ function observeImports(map, importName, importIndex) {
|
|
|
1292
1296
|
imports(entries) {
|
|
1293
1297
|
const map = new Map(entries);
|
|
1294
1298
|
observeImports(map, "./commons.js", 0);
|
|
1299
|
+
observeImports(map, "./compartment.js", 48);
|
|
1295
1300
|
},
|
|
1296
1301
|
liveVar: {
|
|
1297
1302
|
},
|
|
1298
1303
|
onceVar: {
|
|
1299
|
-
|
|
1304
|
+
getAnonymousIntrinsics: cells[49].getAnonymousIntrinsics.set,
|
|
1300
1305
|
},
|
|
1301
1306
|
importMeta: {},
|
|
1302
1307
|
});
|
|
@@ -1308,8 +1313,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1308
1313
|
liveVar: {
|
|
1309
1314
|
},
|
|
1310
1315
|
onceVar: {
|
|
1311
|
-
|
|
1312
|
-
tameFauxDataProperties: cells[50].tameFauxDataProperties.set,
|
|
1316
|
+
tameHarden: cells[50].tameHarden.set,
|
|
1313
1317
|
},
|
|
1314
1318
|
importMeta: {},
|
|
1315
1319
|
});
|
|
@@ -1321,7 +1325,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1321
1325
|
liveVar: {
|
|
1322
1326
|
},
|
|
1323
1327
|
onceVar: {
|
|
1324
|
-
|
|
1328
|
+
tameSymbolConstructor: cells[51].tameSymbolConstructor.set,
|
|
1325
1329
|
},
|
|
1326
1330
|
importMeta: {},
|
|
1327
1331
|
});
|
|
@@ -1333,7 +1337,8 @@ function observeImports(map, importName, importIndex) {
|
|
|
1333
1337
|
liveVar: {
|
|
1334
1338
|
},
|
|
1335
1339
|
onceVar: {
|
|
1336
|
-
|
|
1340
|
+
tameFauxDataProperty: cells[52].tameFauxDataProperty.set,
|
|
1341
|
+
tameFauxDataProperties: cells[52].tameFauxDataProperties.set,
|
|
1337
1342
|
},
|
|
1338
1343
|
importMeta: {},
|
|
1339
1344
|
});
|
|
@@ -1341,88 +1346,86 @@ function observeImports(map, importName, importIndex) {
|
|
|
1341
1346
|
imports(entries) {
|
|
1342
1347
|
const map = new Map(entries);
|
|
1343
1348
|
observeImports(map, "./commons.js", 0);
|
|
1344
|
-
observeImports(map, "./error/assert.js", 9);
|
|
1345
1349
|
},
|
|
1346
1350
|
liveVar: {
|
|
1347
1351
|
},
|
|
1348
1352
|
onceVar: {
|
|
1349
|
-
|
|
1350
|
-
reportInGroup: cells[53].reportInGroup.set,
|
|
1353
|
+
tameRegeneratorRuntime: cells[53].tameRegeneratorRuntime.set,
|
|
1351
1354
|
},
|
|
1352
1355
|
importMeta: {},
|
|
1353
1356
|
});
|
|
1354
1357
|
functors[54]({
|
|
1355
1358
|
imports(entries) {
|
|
1356
1359
|
const map = new Map(entries);
|
|
1357
|
-
observeImports(map, "@endo/env-options", 3);
|
|
1358
1360
|
observeImports(map, "./commons.js", 0);
|
|
1359
|
-
observeImports(map, "./make-hardener.js", 10);
|
|
1360
|
-
observeImports(map, "./intrinsics.js", 13);
|
|
1361
|
-
observeImports(map, "./permits-intrinsics.js", 14);
|
|
1362
|
-
observeImports(map, "./tame-function-constructors.js", 15);
|
|
1363
|
-
observeImports(map, "./tame-date-constructor.js", 16);
|
|
1364
|
-
observeImports(map, "./tame-math-object.js", 17);
|
|
1365
|
-
observeImports(map, "./tame-regexp-constructor.js", 18);
|
|
1366
|
-
observeImports(map, "./enable-property-overrides.js", 20);
|
|
1367
|
-
observeImports(map, "./tame-locale-methods.js", 21);
|
|
1368
|
-
observeImports(map, "./global-object.js", 24);
|
|
1369
|
-
observeImports(map, "./make-safe-evaluator.js", 32);
|
|
1370
|
-
observeImports(map, "./permits.js", 12);
|
|
1371
|
-
observeImports(map, "./tame-function-tostring.js", 33);
|
|
1372
|
-
observeImports(map, "./tame-domains.js", 34);
|
|
1373
|
-
observeImports(map, "./tame-module-source.js", 35);
|
|
1374
|
-
observeImports(map, "./error/tame-console.js", 38);
|
|
1375
|
-
observeImports(map, "./error/tame-error-constructor.js", 40);
|
|
1376
|
-
observeImports(map, "./error/assert.js", 9);
|
|
1377
|
-
observeImports(map, "./get-anonymous-intrinsics.js", 47);
|
|
1378
|
-
observeImports(map, "./compartment.js", 46);
|
|
1379
|
-
observeImports(map, "./tame-harden.js", 48);
|
|
1380
|
-
observeImports(map, "./tame-symbol-constructor.js", 49);
|
|
1381
|
-
observeImports(map, "./tame-faux-data-properties.js", 50);
|
|
1382
|
-
observeImports(map, "./tame-regenerator-runtime.js", 51);
|
|
1383
|
-
observeImports(map, "./shim-arraybuffer-transfer.js", 52);
|
|
1384
|
-
observeImports(map, "./reporting.js", 53);
|
|
1385
1361
|
},
|
|
1386
1362
|
liveVar: {
|
|
1387
1363
|
},
|
|
1388
1364
|
onceVar: {
|
|
1389
|
-
|
|
1365
|
+
shimArrayBufferTransfer: cells[54].shimArrayBufferTransfer.set,
|
|
1390
1366
|
},
|
|
1391
1367
|
importMeta: {},
|
|
1392
1368
|
});
|
|
1393
1369
|
functors[55]({
|
|
1394
1370
|
imports(entries) {
|
|
1395
1371
|
const map = new Map(entries);
|
|
1396
|
-
observeImports(map, "./assert-sloppy-mode.js", 1);
|
|
1397
1372
|
observeImports(map, "./commons.js", 0);
|
|
1398
|
-
observeImports(map, "./
|
|
1373
|
+
observeImports(map, "./error/assert.js", 11);
|
|
1399
1374
|
},
|
|
1400
1375
|
liveVar: {
|
|
1401
1376
|
},
|
|
1402
1377
|
onceVar: {
|
|
1378
|
+
chooseReporter: cells[55].chooseReporter.set,
|
|
1379
|
+
reportInGroup: cells[55].reportInGroup.set,
|
|
1403
1380
|
},
|
|
1404
1381
|
importMeta: {},
|
|
1405
1382
|
});
|
|
1406
1383
|
functors[56]({
|
|
1407
1384
|
imports(entries) {
|
|
1408
1385
|
const map = new Map(entries);
|
|
1386
|
+
observeImports(map, "@endo/env-options", 3);
|
|
1387
|
+
observeImports(map, "@endo/immutable-arraybuffer/shim-hermes.js", 5);
|
|
1409
1388
|
observeImports(map, "./commons.js", 0);
|
|
1410
|
-
observeImports(map, "./
|
|
1411
|
-
observeImports(map, "./
|
|
1412
|
-
observeImports(map, "./intrinsics.js",
|
|
1413
|
-
observeImports(map, "./
|
|
1389
|
+
observeImports(map, "./make-hardener.js", 12);
|
|
1390
|
+
observeImports(map, "./intrinsics.js", 15);
|
|
1391
|
+
observeImports(map, "./permits-intrinsics.js", 16);
|
|
1392
|
+
observeImports(map, "./tame-function-constructors.js", 17);
|
|
1393
|
+
observeImports(map, "./tame-date-constructor.js", 18);
|
|
1394
|
+
observeImports(map, "./tame-math-object.js", 19);
|
|
1395
|
+
observeImports(map, "./tame-regexp-constructor.js", 20);
|
|
1396
|
+
observeImports(map, "./enable-property-overrides.js", 22);
|
|
1397
|
+
observeImports(map, "./tame-locale-methods.js", 23);
|
|
1398
|
+
observeImports(map, "./global-object.js", 26);
|
|
1399
|
+
observeImports(map, "./make-safe-evaluator.js", 34);
|
|
1400
|
+
observeImports(map, "./permits.js", 14);
|
|
1401
|
+
observeImports(map, "./tame-function-tostring.js", 35);
|
|
1402
|
+
observeImports(map, "./tame-domains.js", 36);
|
|
1403
|
+
observeImports(map, "./tame-module-source.js", 37);
|
|
1404
|
+
observeImports(map, "./error/tame-console.js", 40);
|
|
1405
|
+
observeImports(map, "./error/tame-error-constructor.js", 42);
|
|
1406
|
+
observeImports(map, "./error/assert.js", 11);
|
|
1407
|
+
observeImports(map, "./get-anonymous-intrinsics.js", 49);
|
|
1408
|
+
observeImports(map, "./compartment.js", 48);
|
|
1409
|
+
observeImports(map, "./tame-harden.js", 50);
|
|
1410
|
+
observeImports(map, "./tame-symbol-constructor.js", 51);
|
|
1411
|
+
observeImports(map, "./tame-faux-data-properties.js", 52);
|
|
1412
|
+
observeImports(map, "./tame-regenerator-runtime.js", 53);
|
|
1413
|
+
observeImports(map, "./shim-arraybuffer-transfer.js", 54);
|
|
1414
|
+
observeImports(map, "./reporting.js", 55);
|
|
1414
1415
|
},
|
|
1415
1416
|
liveVar: {
|
|
1416
1417
|
},
|
|
1417
1418
|
onceVar: {
|
|
1419
|
+
repairIntrinsics: cells[56].repairIntrinsics.set,
|
|
1418
1420
|
},
|
|
1419
1421
|
importMeta: {},
|
|
1420
1422
|
});
|
|
1421
1423
|
functors[57]({
|
|
1422
1424
|
imports(entries) {
|
|
1423
1425
|
const map = new Map(entries);
|
|
1426
|
+
observeImports(map, "./assert-sloppy-mode.js", 1);
|
|
1424
1427
|
observeImports(map, "./commons.js", 0);
|
|
1425
|
-
observeImports(map, "./
|
|
1428
|
+
observeImports(map, "./lockdown.js", 56);
|
|
1426
1429
|
},
|
|
1427
1430
|
liveVar: {
|
|
1428
1431
|
},
|
|
@@ -1434,8 +1437,10 @@ function observeImports(map, importName, importIndex) {
|
|
|
1434
1437
|
imports(entries) {
|
|
1435
1438
|
const map = new Map(entries);
|
|
1436
1439
|
observeImports(map, "./commons.js", 0);
|
|
1437
|
-
observeImports(map, "./
|
|
1438
|
-
observeImports(map, "./
|
|
1440
|
+
observeImports(map, "./compartment.js", 48);
|
|
1441
|
+
observeImports(map, "./tame-function-tostring.js", 35);
|
|
1442
|
+
observeImports(map, "./intrinsics.js", 15);
|
|
1443
|
+
observeImports(map, "./reporting.js", 55);
|
|
1439
1444
|
},
|
|
1440
1445
|
liveVar: {
|
|
1441
1446
|
},
|
|
@@ -1446,10 +1451,35 @@ function observeImports(map, importName, importIndex) {
|
|
|
1446
1451
|
functors[59]({
|
|
1447
1452
|
imports(entries) {
|
|
1448
1453
|
const map = new Map(entries);
|
|
1449
|
-
observeImports(map, "./
|
|
1450
|
-
observeImports(map, "./
|
|
1451
|
-
|
|
1452
|
-
|
|
1454
|
+
observeImports(map, "./commons.js", 0);
|
|
1455
|
+
observeImports(map, "./error/assert.js", 11);
|
|
1456
|
+
},
|
|
1457
|
+
liveVar: {
|
|
1458
|
+
},
|
|
1459
|
+
onceVar: {
|
|
1460
|
+
},
|
|
1461
|
+
importMeta: {},
|
|
1462
|
+
});
|
|
1463
|
+
functors[60]({
|
|
1464
|
+
imports(entries) {
|
|
1465
|
+
const map = new Map(entries);
|
|
1466
|
+
observeImports(map, "./commons.js", 0);
|
|
1467
|
+
observeImports(map, "./error/console.js", 38);
|
|
1468
|
+
observeImports(map, "./error/assert.js", 11);
|
|
1469
|
+
},
|
|
1470
|
+
liveVar: {
|
|
1471
|
+
},
|
|
1472
|
+
onceVar: {
|
|
1473
|
+
},
|
|
1474
|
+
importMeta: {},
|
|
1475
|
+
});
|
|
1476
|
+
functors[61]({
|
|
1477
|
+
imports(entries) {
|
|
1478
|
+
const map = new Map(entries);
|
|
1479
|
+
observeImports(map, "./src/lockdown-shim.js", 57);
|
|
1480
|
+
observeImports(map, "./src/compartment-shim.js", 58);
|
|
1481
|
+
observeImports(map, "./src/assert-shim.js", 59);
|
|
1482
|
+
observeImports(map, "./src/console-shim.js", 60);
|
|
1453
1483
|
},
|
|
1454
1484
|
liveVar: {
|
|
1455
1485
|
},
|
|
@@ -1462,7 +1492,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
1462
1492
|
})([
|
|
1463
1493
|
// === 0. ses ./src/commons.js ===
|
|
1464
1494
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);/**
|
|
1465
|
-
*
|
|
1495
|
+
* Captures native intrinsics during initialization, so vetted shims
|
|
1466
1496
|
* (running between initialization of SES and calling lockdown) are free to
|
|
1467
1497
|
* modify the environment without compromising the integrity of SES. For
|
|
1468
1498
|
* example, a vetted shim can modify Object.assign because we capture and
|
|
@@ -1472,6 +1502,8 @@ function observeImports(map, importName, importIndex) {
|
|
|
1472
1502
|
* This pattern of use is enforced by eslint rules no-restricted-globals and
|
|
1473
1503
|
* no-polymorphic-call.
|
|
1474
1504
|
* We maintain the list of restricted globals in ../package.json.
|
|
1505
|
+
*
|
|
1506
|
+
* @module
|
|
1475
1507
|
*/
|
|
1476
1508
|
|
|
1477
1509
|
/* global globalThis */
|
|
@@ -1946,6 +1978,7 @@ const Fail = (literals, ...args) => {
|
|
|
1946
1978
|
* names used.
|
|
1947
1979
|
*/
|
|
1948
1980
|
const makeEnvironmentCaptor = (aGlobal, dropNames = false) => {
|
|
1981
|
+
/** @type {string[]} */
|
|
1949
1982
|
const capturedEnvironmentOptionNames = [];
|
|
1950
1983
|
|
|
1951
1984
|
/**
|
|
@@ -2002,8 +2035,9 @@ const Fail = (literals, ...args) => {
|
|
|
2002
2035
|
freeze(getEnvironmentOption);
|
|
2003
2036
|
|
|
2004
2037
|
/**
|
|
2038
|
+
* @template {string} [T=string]
|
|
2005
2039
|
* @param {string} optionName
|
|
2006
|
-
* @returns {
|
|
2040
|
+
* @returns {T[]}
|
|
2007
2041
|
*/
|
|
2008
2042
|
const getEnvironmentOptionsList = optionName => {
|
|
2009
2043
|
const option = getEnvironmentOption(optionName, '');
|
|
@@ -2011,6 +2045,12 @@ const Fail = (literals, ...args) => {
|
|
|
2011
2045
|
};
|
|
2012
2046
|
freeze(getEnvironmentOptionsList);
|
|
2013
2047
|
|
|
2048
|
+
/**
|
|
2049
|
+
* @template {string} [T=string]
|
|
2050
|
+
* @param {string} optionName
|
|
2051
|
+
* @param {T} element
|
|
2052
|
+
* @returns {boolean}
|
|
2053
|
+
*/
|
|
2014
2054
|
const environmentOptionsListHas = (optionName, element) =>
|
|
2015
2055
|
arrayIncludes(getEnvironmentOptionsList(optionName), element);
|
|
2016
2056
|
|
|
@@ -2043,7 +2083,181 @@ freeze(makeEnvironmentCaptor);
|
|
|
2043
2083
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([["./src/env-options.js", []]]);
|
|
2044
2084
|
})()
|
|
2045
2085
|
,
|
|
2046
|
-
// === 4.
|
|
2086
|
+
// === 4. immutable-arraybuffer ./src/limited-pony-for-hermes.js ===
|
|
2087
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);const { apply } = Reflect;
|
|
2088
|
+
const { prototype: arrayBufferPrototype } = ArrayBuffer;
|
|
2089
|
+
|
|
2090
|
+
const { slice } = arrayBufferPrototype;
|
|
2091
|
+
|
|
2092
|
+
// Based on the real `../index.js` but lives within the restrictions of
|
|
2093
|
+
// current Hermes:
|
|
2094
|
+
// - No class syntax, therefore also no private fields
|
|
2095
|
+
// - No `ArrayBuffer.prototype.transfer`
|
|
2096
|
+
// - No `structuredClone`
|
|
2097
|
+
//
|
|
2098
|
+
// Within these restrictions we cannot emulate `transferToImmutable`, so
|
|
2099
|
+
// we omit it from the pony. We can emulate `sliceToImmutable` using
|
|
2100
|
+
// a different technique than used by the original. The omission of
|
|
2101
|
+
// `transferToImmutable` will be visible, enabling feature detection.
|
|
2102
|
+
// We perfectly emulate the `class` with a `function` function.
|
|
2103
|
+
// We perfectly emulate the private `this.#buffer` private field with
|
|
2104
|
+
// the encapsulated `buffers` WeakMap.
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* Enforces that `realBuffer` is a genuine `ArrayBuffer` exotic object.
|
|
2108
|
+
*
|
|
2109
|
+
* @param {ArrayBuffer} realBuffer
|
|
2110
|
+
* @param {number} [start]
|
|
2111
|
+
* @param {number} [end]
|
|
2112
|
+
* @returns {ArrayBuffer}
|
|
2113
|
+
*/
|
|
2114
|
+
const arrayBufferSlice = (realBuffer, start = undefined, end = undefined) =>
|
|
2115
|
+
apply(slice, realBuffer, [start, end]);
|
|
2116
|
+
|
|
2117
|
+
/**
|
|
2118
|
+
* Emulates the `this.#buffer` private field, including its use as a brand check.
|
|
2119
|
+
* Maps from all and only emulated Immutable ArrayBuffers to real ArrayBuffers.
|
|
2120
|
+
*/
|
|
2121
|
+
const buffers = new WeakMap();
|
|
2122
|
+
const getBuffer = immuAB => {
|
|
2123
|
+
const result = buffers.get(immuAB);
|
|
2124
|
+
if (result) {
|
|
2125
|
+
return result;
|
|
2126
|
+
}
|
|
2127
|
+
throw TypeError('Not an emulated Immutable ArrayBuffer');
|
|
2128
|
+
};
|
|
2129
|
+
|
|
2130
|
+
// Omits `constructor` so `Array.prototype.constructor` is inherited.
|
|
2131
|
+
const ImmutableArrayBufferInternalPrototype = {
|
|
2132
|
+
__proto__: arrayBufferPrototype,
|
|
2133
|
+
get byteLength() {
|
|
2134
|
+
return getBuffer(this).byteLength;
|
|
2135
|
+
},
|
|
2136
|
+
get detached() {
|
|
2137
|
+
getBuffer(this); // shim brand check
|
|
2138
|
+
return false;
|
|
2139
|
+
},
|
|
2140
|
+
get maxByteLength() {
|
|
2141
|
+
// Not underlying maxByteLength, which is irrelevant
|
|
2142
|
+
return getBuffer(this).byteLength;
|
|
2143
|
+
},
|
|
2144
|
+
get resizable() {
|
|
2145
|
+
getBuffer(this); // shim brand check
|
|
2146
|
+
return false;
|
|
2147
|
+
},
|
|
2148
|
+
get immutable() {
|
|
2149
|
+
getBuffer(this); // shim brand check
|
|
2150
|
+
return true;
|
|
2151
|
+
},
|
|
2152
|
+
slice(start = undefined, end = undefined) {
|
|
2153
|
+
return arrayBufferSlice(getBuffer(this), start, end);
|
|
2154
|
+
},
|
|
2155
|
+
sliceToImmutable(start = undefined, end = undefined) {
|
|
2156
|
+
// eslint-disable-next-line no-use-before-define
|
|
2157
|
+
return sliceBufferToImmutable(getBuffer(this), start, end);
|
|
2158
|
+
},
|
|
2159
|
+
resize(_newByteLength = undefined) {
|
|
2160
|
+
getBuffer(this); // shim brand check
|
|
2161
|
+
throw TypeError('Cannot resize an immutable ArrayBuffer');
|
|
2162
|
+
},
|
|
2163
|
+
};
|
|
2164
|
+
|
|
2165
|
+
/**
|
|
2166
|
+
* Emulates the encapsulated `ImmutableArrayBufferInternal` class constructor
|
|
2167
|
+
* from the original except this function takes the `realBuffer` which its
|
|
2168
|
+
* result encapsulates. Security demands that this result has exclusive access
|
|
2169
|
+
* to the `realBuffer` it is given, which its callers must ensure.
|
|
2170
|
+
*
|
|
2171
|
+
* @param {ArrayBuffer} realBuffer
|
|
2172
|
+
* @returns {ArrayBuffer}
|
|
2173
|
+
*/
|
|
2174
|
+
const makeImmutableArrayBufferInternal = realBuffer => {
|
|
2175
|
+
const result = { __proto__: ImmutableArrayBufferInternalPrototype };
|
|
2176
|
+
buffers.set(result, realBuffer);
|
|
2177
|
+
return /** @type {ArrayBuffer} */ (/** @type {unknown} */ (result));
|
|
2178
|
+
};
|
|
2179
|
+
// Since `makeImmutableArrayBufferInternal` MUST not escape,
|
|
2180
|
+
// this `freeze` is just belt-and-suspenders.
|
|
2181
|
+
Object.freeze(makeImmutableArrayBufferInternal);
|
|
2182
|
+
|
|
2183
|
+
const isBufferImmutable = buffer => buffers.has(buffer);
|
|
2184
|
+
|
|
2185
|
+
/**
|
|
2186
|
+
* Creates an immutable slice of the given buffer.
|
|
2187
|
+
* @param {ArrayBuffer} buffer The original buffer.
|
|
2188
|
+
* @param {number} [start] The start index.
|
|
2189
|
+
* @param {number} [end] The end index.
|
|
2190
|
+
* @returns {ArrayBuffer} The sliced immutable ArrayBuffer.
|
|
2191
|
+
*/$h͏_once.isBufferImmutable(isBufferImmutable);
|
|
2192
|
+
const sliceBufferToImmutable = (
|
|
2193
|
+
buffer,
|
|
2194
|
+
start = undefined,
|
|
2195
|
+
end = undefined,
|
|
2196
|
+
) => {
|
|
2197
|
+
let realBuffer = buffers.get(buffer);
|
|
2198
|
+
if (realBuffer === undefined) {
|
|
2199
|
+
realBuffer = buffer;
|
|
2200
|
+
}
|
|
2201
|
+
return makeImmutableArrayBufferInternal(
|
|
2202
|
+
arrayBufferSlice(realBuffer, start, end),
|
|
2203
|
+
);
|
|
2204
|
+
};$h͏_once.sliceBufferToImmutable(sliceBufferToImmutable);
|
|
2205
|
+
})()
|
|
2206
|
+
,
|
|
2207
|
+
// === 5. immutable-arraybuffer ./shim-hermes.js ===
|
|
2208
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let isBufferImmutable,sliceBufferToImmutable;$h͏_imports([["./src/limited-pony-for-hermes.js", [["isBufferImmutable",[$h͏_a => (isBufferImmutable = $h͏_a)]],["sliceBufferToImmutable",[$h͏_a => (sliceBufferToImmutable = $h͏_a)]]]]]);
|
|
2209
|
+
|
|
2210
|
+
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
const { getOwnPropertyDescriptors, defineProperties } = Object;
|
|
2214
|
+
const { prototype: arrayBufferPrototype } = ArrayBuffer;
|
|
2215
|
+
|
|
2216
|
+
const arrayBufferMethods = {
|
|
2217
|
+
/**
|
|
2218
|
+
* Creates an immutable slice of the given buffer.
|
|
2219
|
+
* @this {ArrayBuffer} buffer The original buffer.
|
|
2220
|
+
* @param {number} [start] The start index.
|
|
2221
|
+
* @param {number} [end] The end index.
|
|
2222
|
+
* @returns {ArrayBuffer} The sliced immutable ArrayBuffer.
|
|
2223
|
+
*/
|
|
2224
|
+
sliceToImmutable(start = undefined, end = undefined) {
|
|
2225
|
+
return sliceBufferToImmutable(this, start, end);
|
|
2226
|
+
},
|
|
2227
|
+
get immutable() {
|
|
2228
|
+
return isBufferImmutable(this);
|
|
2229
|
+
},
|
|
2230
|
+
};
|
|
2231
|
+
|
|
2232
|
+
if ('transfer' in arrayBufferPrototype) {
|
|
2233
|
+
console.warn(
|
|
2234
|
+
'Could have used the full shim, rather than the limited one for Hermes',
|
|
2235
|
+
);
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
if ('sliceToImmutable' in arrayBufferPrototype) {
|
|
2239
|
+
// Modern shim practice frowns on conditional installation, at least for
|
|
2240
|
+
// proposals prior to stage 3. This is so changes to the proposal since
|
|
2241
|
+
// an old shim was distributed don't need to worry about the proposal
|
|
2242
|
+
// breaking old code depending on the old shim. Thus, if we detect that
|
|
2243
|
+
// we're about to overwrite a prior installation, we simply issue this
|
|
2244
|
+
// warning and continue.
|
|
2245
|
+
//
|
|
2246
|
+
// TODO, if the primordials are frozen after the prior implementation, such as
|
|
2247
|
+
// by `lockdown`, then this precludes overwriting as expected. However, for
|
|
2248
|
+
// this case, the following warning text will be confusing.
|
|
2249
|
+
console.warn(
|
|
2250
|
+
'About to overwrite a prior implementation of "sliceToImmutable"',
|
|
2251
|
+
);
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
defineProperties(
|
|
2255
|
+
arrayBufferPrototype,
|
|
2256
|
+
getOwnPropertyDescriptors(arrayBufferMethods),
|
|
2257
|
+
);
|
|
2258
|
+
})()
|
|
2259
|
+
,
|
|
2260
|
+
// === 6. ses ./src/error/stringify-utils.js ===
|
|
2047
2261
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Set,String,isArray,arrayJoin,arraySlice,arraySort,arrayMap,keys,fromEntries,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h͏_imports([["../commons.js", [["Set",[$h͏_a => (Set = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["isArray",[$h͏_a => (isArray = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arraySlice",[$h͏_a => (arraySlice = $h͏_a)]],["arraySort",[$h͏_a => (arraySort = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["keys",[$h͏_a => (keys = $h͏_a)]],["fromEntries",[$h͏_a => (fromEntries = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["isError",[$h͏_a => (isError = $h͏_a)]],["setAdd",[$h͏_a => (setAdd = $h͏_a)]],["setHas",[$h͏_a => (setHas = $h͏_a)]],["stringIncludes",[$h͏_a => (stringIncludes = $h͏_a)]],["stringStartsWith",[$h͏_a => (stringStartsWith = $h͏_a)]],["stringifyJson",[$h͏_a => (stringifyJson = $h͏_a)]],["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]]]]]);
|
|
2048
2262
|
|
|
2049
2263
|
|
|
@@ -2240,7 +2454,7 @@ const bestEffortStringify = (payload, spaces = undefined) => {
|
|
|
2240
2454
|
freeze(bestEffortStringify);
|
|
2241
2455
|
})()
|
|
2242
2456
|
,
|
|
2243
|
-
// ===
|
|
2457
|
+
// === 7. ses ./src/error/types.js ===
|
|
2244
2458
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
|
|
2245
2459
|
|
|
2246
2460
|
/** @import {GenericErrorConstructor, AssertMakeErrorOptions, DetailsToken, StringablePayload} from '../../types.js' */
|
|
@@ -2302,7 +2516,7 @@ freeze(bestEffortStringify);
|
|
|
2302
2516
|
*/
|
|
2303
2517
|
})()
|
|
2304
2518
|
,
|
|
2305
|
-
// ===
|
|
2519
|
+
// === 8. ses ./src/error/internal-types.js ===
|
|
2306
2520
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
|
|
2307
2521
|
|
|
2308
2522
|
/**
|
|
@@ -2403,7 +2617,7 @@ freeze(bestEffortStringify);
|
|
|
2403
2617
|
*/
|
|
2404
2618
|
})()
|
|
2405
2619
|
,
|
|
2406
|
-
// ===
|
|
2620
|
+
// === 9. ses ./src/make-lru-cachemap.js ===
|
|
2407
2621
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);// @ts-check
|
|
2408
2622
|
/* eslint-disable @endo/no-polymorphic-call */
|
|
2409
2623
|
|
|
@@ -2627,7 +2841,7 @@ const spliceOut = cell => {
|
|
|
2627
2841
|
freeze(makeLRUCacheMap);
|
|
2628
2842
|
})()
|
|
2629
2843
|
,
|
|
2630
|
-
// ===
|
|
2844
|
+
// === 10. ses ./src/error/note-log-args.js ===
|
|
2631
2845
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let makeLRUCacheMap;$h͏_imports([["../make-lru-cachemap.js", [["makeLRUCacheMap",[$h͏_a => (makeLRUCacheMap = $h͏_a)]]]]]);
|
|
2632
2846
|
|
|
2633
2847
|
|
|
@@ -2706,7 +2920,7 @@ const defaultArgsPerErrorBudget = 100;
|
|
|
2706
2920
|
freeze(makeNoteLogArgsArrayKit);
|
|
2707
2921
|
})()
|
|
2708
2922
|
,
|
|
2709
|
-
// ===
|
|
2923
|
+
// === 11. ses ./src/error/assert.js ===
|
|
2710
2924
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,defineProperty,globalThis,is,isError,regexpTest,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,AggregateError,getOwnPropertyDescriptors,ownKeys,create,objectPrototype,objectHasOwnProperty,an,bestEffortStringify,makeNoteLogArgsArrayKit;$h͏_imports([["../commons.js", [["RangeError",[$h͏_a => (RangeError = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["WeakMap",[$h͏_a => (WeakMap = $h͏_a)]],["arrayJoin",[$h͏_a => (arrayJoin = $h͏_a)]],["arrayMap",[$h͏_a => (arrayMap = $h͏_a)]],["arrayPop",[$h͏_a => (arrayPop = $h͏_a)]],["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["is",[$h͏_a => (is = $h͏_a)]],["isError",[$h͏_a => (isError = $h͏_a)]],["regexpTest",[$h͏_a => (regexpTest = $h͏_a)]],["stringIndexOf",[$h͏_a => (stringIndexOf = $h͏_a)]],["stringReplace",[$h͏_a => (stringReplace = $h͏_a)]],["stringSlice",[$h͏_a => (stringSlice = $h͏_a)]],["stringStartsWith",[$h͏_a => (stringStartsWith = $h͏_a)]],["weakmapDelete",[$h͏_a => (weakmapDelete = $h͏_a)]],["weakmapGet",[$h͏_a => (weakmapGet = $h͏_a)]],["weakmapHas",[$h͏_a => (weakmapHas = $h͏_a)]],["weakmapSet",[$h͏_a => (weakmapSet = $h͏_a)]],["AggregateError",[$h͏_a => (AggregateError = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["create",[$h͏_a => (create = $h͏_a)]],["objectPrototype",[$h͏_a => (objectPrototype = $h͏_a)]],["objectHasOwnProperty",[$h͏_a => (objectHasOwnProperty = $h͏_a)]]]],["./stringify-utils.js", [["an",[$h͏_a => (an = $h͏_a)]],["bestEffortStringify",[$h͏_a => (bestEffortStringify = $h͏_a)]]]],["./types.js", []],["./internal-types.js", []],["./note-log-args.js", [["makeNoteLogArgsArrayKit",[$h͏_a => (makeNoteLogArgsArrayKit = $h͏_a)]]]]]);
|
|
2711
2925
|
|
|
2712
2926
|
|
|
@@ -3284,7 +3498,7 @@ const assert = makeAssert();$h͏_once.assert(assert);
|
|
|
3284
3498
|
const assertEqual = assert.equal;$h͏_once.assertEqual(assertEqual);
|
|
3285
3499
|
})()
|
|
3286
3500
|
,
|
|
3287
|
-
// ===
|
|
3501
|
+
// === 12. ses ./src/make-hardener.js ===
|
|
3288
3502
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Set,String,TypeError,WeakSet,globalThis,apply,arrayForEach,defineProperty,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getPrototypeOf,isInteger,isObject,objectHasOwnProperty,ownKeys,preventExtensions,setAdd,setForEach,setHas,toStringTagSymbol,typedArrayPrototype,weaksetAdd,weaksetHas,FERAL_STACK_GETTER,FERAL_STACK_SETTER,isError,assert;$h͏_imports([["./commons.js", [["Set",[$h͏_a => (Set = $h͏_a)]],["String",[$h͏_a => (String = $h͏_a)]],["TypeError",[$h͏_a => (TypeError = $h͏_a)]],["WeakSet",[$h͏_a => (WeakSet = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]],["apply",[$h͏_a => (apply = $h͏_a)]],["arrayForEach",[$h͏_a => (arrayForEach = $h͏_a)]],["defineProperty",[$h͏_a => (defineProperty = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["getOwnPropertyDescriptor",[$h͏_a => (getOwnPropertyDescriptor = $h͏_a)]],["getOwnPropertyDescriptors",[$h͏_a => (getOwnPropertyDescriptors = $h͏_a)]],["getPrototypeOf",[$h͏_a => (getPrototypeOf = $h͏_a)]],["isInteger",[$h͏_a => (isInteger = $h͏_a)]],["isObject",[$h͏_a => (isObject = $h͏_a)]],["objectHasOwnProperty",[$h͏_a => (objectHasOwnProperty = $h͏_a)]],["ownKeys",[$h͏_a => (ownKeys = $h͏_a)]],["preventExtensions",[$h͏_a => (preventExtensions = $h͏_a)]],["setAdd",[$h͏_a => (setAdd = $h͏_a)]],["setForEach",[$h͏_a => (setForEach = $h͏_a)]],["setHas",[$h͏_a => (setHas = $h͏_a)]],["toStringTagSymbol",[$h͏_a => (toStringTagSymbol = $h͏_a)]],["typedArrayPrototype",[$h͏_a => (typedArrayPrototype = $h͏_a)]],["weaksetAdd",[$h͏_a => (weaksetAdd = $h͏_a)]],["weaksetHas",[$h͏_a => (weaksetHas = $h͏_a)]],["FERAL_STACK_GETTER",[$h͏_a => (FERAL_STACK_GETTER = $h͏_a)]],["FERAL_STACK_SETTER",[$h͏_a => (FERAL_STACK_SETTER = $h͏_a)]],["isError",[$h͏_a => (isError = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
3289
3503
|
|
|
3290
3504
|
|
|
@@ -3562,7 +3776,7 @@ const freezeTypedArray = array => {
|
|
|
3562
3776
|
};$h͏_once.makeHardener(makeHardener);
|
|
3563
3777
|
})()
|
|
3564
3778
|
,
|
|
3565
|
-
// ===
|
|
3779
|
+
// === 13. ses ./src/cauterize-property.js ===
|
|
3566
3780
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let objectHasOwnProperty;$h͏_imports([["./commons.js", [["objectHasOwnProperty",[$h͏_a => (objectHasOwnProperty = $h͏_a)]]]]]);
|
|
3567
3781
|
|
|
3568
3782
|
/**
|
|
@@ -3634,7 +3848,7 @@ const freezeTypedArray = array => {
|
|
|
3634
3848
|
};$h͏_once.cauterizeProperty(cauterizeProperty);
|
|
3635
3849
|
})()
|
|
3636
3850
|
,
|
|
3637
|
-
// ===
|
|
3851
|
+
// === 14. ses ./src/permits.js ===
|
|
3638
3852
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let arrayPush,arrayForEach;$h͏_imports([["./commons.js", [["arrayPush",[$h͏_a => (arrayPush = $h͏_a)]],["arrayForEach",[$h͏_a => (arrayForEach = $h͏_a)]]]]]);
|
|
3639
3853
|
|
|
3640
3854
|
|
|
@@ -3643,12 +3857,14 @@ const freezeTypedArray = array => {
|
|
|
3643
3857
|
/** @import {GenericErrorConstructor} from '../types.js' */
|
|
3644
3858
|
|
|
3645
3859
|
/**
|
|
3646
|
-
*
|
|
3860
|
+
* Exports {@code permits}, a recursively defined
|
|
3647
3861
|
* JSON record enumerating all intrinsics and their properties
|
|
3648
3862
|
* according to ECMA specs.
|
|
3649
3863
|
*
|
|
3650
3864
|
* @author JF Paradis
|
|
3651
3865
|
* @author Mark S. Miller
|
|
3866
|
+
*
|
|
3867
|
+
* @module
|
|
3652
3868
|
*/
|
|
3653
3869
|
|
|
3654
3870
|
/**
|
|
@@ -4993,6 +5209,33 @@ const CommonMath = {
|
|
|
4993
5209
|
// https://github.com/tc39/proposal-arraybuffer-transfer
|
|
4994
5210
|
transferToFixedLength: fn,
|
|
4995
5211
|
detached: getter,
|
|
5212
|
+
// https://github.com/endojs/endo/pull/2309#issuecomment-2155513240
|
|
5213
|
+
// to be proposed
|
|
5214
|
+
transferToImmutable: fn,
|
|
5215
|
+
sliceToImmutable: fn,
|
|
5216
|
+
immutable: getter,
|
|
5217
|
+
},
|
|
5218
|
+
|
|
5219
|
+
// If this exists, it is purely an artifact of how we currently shim
|
|
5220
|
+
// `transferToImmutable`. As natively implemented, there would be no
|
|
5221
|
+
// such extra prototype.
|
|
5222
|
+
'%ImmutableArrayBufferPrototype%': {
|
|
5223
|
+
'[[Proto]]': '%ArrayBufferPrototype%',
|
|
5224
|
+
byteLength: getter,
|
|
5225
|
+
slice: fn,
|
|
5226
|
+
// See https://github.com/tc39/proposal-resizablearraybuffer
|
|
5227
|
+
transfer: fn,
|
|
5228
|
+
resize: fn,
|
|
5229
|
+
resizable: getter,
|
|
5230
|
+
maxByteLength: getter,
|
|
5231
|
+
// https://github.com/tc39/proposal-arraybuffer-transfer
|
|
5232
|
+
transferToFixedLength: fn,
|
|
5233
|
+
detached: getter,
|
|
5234
|
+
// https://github.com/endojs/endo/pull/2309#issuecomment-2155513240
|
|
5235
|
+
// to be proposed
|
|
5236
|
+
transferToImmutable: fn,
|
|
5237
|
+
sliceToImmutable: fn,
|
|
5238
|
+
immutable: getter,
|
|
4996
5239
|
},
|
|
4997
5240
|
|
|
4998
5241
|
// SharedArrayBuffer Objects
|
|
@@ -5367,7 +5610,7 @@ const CommonMath = {
|
|
|
5367
5610
|
};$h͏_once.permitted(permitted);
|
|
5368
5611
|
})()
|
|
5369
5612
|
,
|
|
5370
|
-
// ===
|
|
5613
|
+
// === 15. ses ./src/intrinsics.js ===
|
|
5371
5614
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
5372
5615
|
|
|
5373
5616
|
|
|
@@ -5562,7 +5805,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5562
5805
|
};$h͏_once.getGlobalIntrinsics(getGlobalIntrinsics);
|
|
5563
5806
|
})()
|
|
5564
5807
|
,
|
|
5565
|
-
// ===
|
|
5808
|
+
// === 16. ses ./src/permits-intrinsics.js ===
|
|
5566
5809
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
5567
5810
|
|
|
5568
5811
|
|
|
@@ -5856,7 +6099,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5856
6099
|
}$h͏_once.default( removeUnpermittedIntrinsics);
|
|
5857
6100
|
})()
|
|
5858
6101
|
,
|
|
5859
|
-
// ===
|
|
6102
|
+
// === 17. ses ./src/tame-function-constructors.js ===
|
|
5860
6103
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf,freeze,AsyncGeneratorFunctionInstance;$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)]],["AsyncGeneratorFunctionInstance",[$h͏_a => (AsyncGeneratorFunctionInstance = $h͏_a)]]]]]);
|
|
5861
6104
|
|
|
5862
6105
|
|
|
@@ -5999,7 +6242,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
5999
6242
|
}$h͏_once.default( tameFunctionConstructors);
|
|
6000
6243
|
})()
|
|
6001
6244
|
,
|
|
6002
|
-
// ===
|
|
6245
|
+
// === 18. ses ./src/tame-date-constructor.js ===
|
|
6003
6246
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
6004
6247
|
|
|
6005
6248
|
|
|
@@ -6129,7 +6372,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6129
6372
|
}$h͏_once.default( tameDateConstructor);
|
|
6130
6373
|
})()
|
|
6131
6374
|
,
|
|
6132
|
-
// ===
|
|
6375
|
+
// === 19. ses ./src/tame-math-object.js ===
|
|
6133
6376
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
6134
6377
|
|
|
6135
6378
|
|
|
@@ -6173,7 +6416,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6173
6416
|
}$h͏_once.default( tameMathObject);
|
|
6174
6417
|
})()
|
|
6175
6418
|
,
|
|
6176
|
-
// ===
|
|
6419
|
+
// === 20. ses ./src/tame-regexp-constructor.js ===
|
|
6177
6420
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
6178
6421
|
|
|
6179
6422
|
|
|
@@ -6184,9 +6427,6 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6184
6427
|
|
|
6185
6428
|
|
|
6186
6429
|
function tameRegExpConstructor(regExpTaming = 'safe') {
|
|
6187
|
-
if (regExpTaming !== 'safe' && regExpTaming !== 'unsafe') {
|
|
6188
|
-
throw TypeError(`unrecognized regExpTaming ${regExpTaming}`);
|
|
6189
|
-
}
|
|
6190
6430
|
const RegExpPrototype = FERAL_REG_EXP.prototype;
|
|
6191
6431
|
|
|
6192
6432
|
const makeRegExpConstructor = (_ = {}) => {
|
|
@@ -6244,17 +6484,19 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6244
6484
|
}$h͏_once.default( tameRegExpConstructor);
|
|
6245
6485
|
})()
|
|
6246
6486
|
,
|
|
6247
|
-
// ===
|
|
6487
|
+
// === 21. ses ./src/enablements.js ===
|
|
6248
6488
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
6249
6489
|
|
|
6250
6490
|
/**
|
|
6251
|
-
*
|
|
6491
|
+
* Exports {@code enablements}, a recursively defined
|
|
6252
6492
|
* JSON record defining the optimum set of intrinsics properties
|
|
6253
6493
|
* that need to be "repaired" before hardening is applied on
|
|
6254
6494
|
* enviromments subject to the override mistake.
|
|
6255
6495
|
*
|
|
6256
6496
|
* @author JF Paradis
|
|
6257
6497
|
* @author Mark S. Miller
|
|
6498
|
+
*
|
|
6499
|
+
* @module
|
|
6258
6500
|
*/
|
|
6259
6501
|
|
|
6260
6502
|
/**
|
|
@@ -6489,7 +6731,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6489
6731
|
};$h͏_once.severeEnablements(severeEnablements);
|
|
6490
6732
|
})()
|
|
6491
6733
|
,
|
|
6492
|
-
// ===
|
|
6734
|
+
// === 22. ses ./src/enable-property-overrides.js ===
|
|
6493
6735
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
6494
6736
|
|
|
6495
6737
|
|
|
@@ -6703,7 +6945,7 @@ function sampleGlobals(globalObject, newPropertyNames) {
|
|
|
6703
6945
|
}$h͏_once.default( enablePropertyOverrides);
|
|
6704
6946
|
})()
|
|
6705
6947
|
,
|
|
6706
|
-
// ===
|
|
6948
|
+
// === 23. ses ./src/tame-locale-methods.js ===
|
|
6707
6949
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
6708
6950
|
|
|
6709
6951
|
|
|
@@ -6750,9 +6992,6 @@ const nonLocaleCompare = tamedMethods.localeCompare;
|
|
|
6750
6992
|
const numberToString = tamedMethods.toString;
|
|
6751
6993
|
|
|
6752
6994
|
function tameLocaleMethods(intrinsics, localeTaming = 'safe') {
|
|
6753
|
-
if (localeTaming !== 'safe' && localeTaming !== 'unsafe') {
|
|
6754
|
-
throw TypeError(`unrecognized localeTaming ${localeTaming}`);
|
|
6755
|
-
}
|
|
6756
6995
|
if (localeTaming === 'unsafe') {
|
|
6757
6996
|
return;
|
|
6758
6997
|
}
|
|
@@ -6787,15 +7026,16 @@ const numberToString = tamedMethods.toString;
|
|
|
6787
7026
|
}$h͏_once.default( tameLocaleMethods);
|
|
6788
7027
|
})()
|
|
6789
7028
|
,
|
|
6790
|
-
// ===
|
|
7029
|
+
// === 24. ses ./src/make-eval-function.js ===
|
|
6791
7030
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([]);/**
|
|
6792
7031
|
* makeEvalFunction()
|
|
6793
7032
|
* A safe version of the native eval function which relies on
|
|
6794
|
-
* the safety of
|
|
7033
|
+
* the safety of `safe-eval` for confinement, unless `no-eval`
|
|
7034
|
+
* is specified (then a TypeError is thrown on use).
|
|
6795
7035
|
*
|
|
6796
|
-
* @param {Function}
|
|
7036
|
+
* @param {Function} evaluator
|
|
6797
7037
|
*/
|
|
6798
|
-
const makeEvalFunction =
|
|
7038
|
+
const makeEvalFunction = evaluator => {
|
|
6799
7039
|
// We use the concise method syntax to create an eval without a
|
|
6800
7040
|
// [[Construct]] behavior (such that the invocation "new eval()" throws
|
|
6801
7041
|
// TypeError: eval is not a constructor"), but which still accepts a
|
|
@@ -6809,7 +7049,7 @@ const numberToString = tamedMethods.toString;
|
|
|
6809
7049
|
// rule. Track.
|
|
6810
7050
|
return source;
|
|
6811
7051
|
}
|
|
6812
|
-
return
|
|
7052
|
+
return evaluator(source);
|
|
6813
7053
|
},
|
|
6814
7054
|
}.eval;
|
|
6815
7055
|
|
|
@@ -6817,7 +7057,7 @@ const numberToString = tamedMethods.toString;
|
|
|
6817
7057
|
};$h͏_once.makeEvalFunction(makeEvalFunction);
|
|
6818
7058
|
})()
|
|
6819
7059
|
,
|
|
6820
|
-
// ===
|
|
7060
|
+
// === 25. ses ./src/make-function-constructor.js ===
|
|
6821
7061
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
6822
7062
|
|
|
6823
7063
|
|
|
@@ -6832,9 +7072,10 @@ const { Fail } = assert;
|
|
|
6832
7072
|
/*
|
|
6833
7073
|
* makeFunctionConstructor()
|
|
6834
7074
|
* A safe version of the native Function which relies on
|
|
6835
|
-
* the safety of
|
|
7075
|
+
* the safety of `safe-eval` for confinement, unless `no-eval`
|
|
7076
|
+
* is specified (then a TypeError is thrown on use).
|
|
6836
7077
|
*/
|
|
6837
|
-
const makeFunctionConstructor =
|
|
7078
|
+
const makeFunctionConstructor = evaluator => {
|
|
6838
7079
|
// Define an unused parameter to ensure Function.length === 1
|
|
6839
7080
|
const newFunction = function Function(_body) {
|
|
6840
7081
|
// Sanitize all parameters at the entry point.
|
|
@@ -6874,7 +7115,7 @@ const { Fail } = assert;
|
|
|
6874
7115
|
// TODO: since we create an anonymous function, the 'this' value
|
|
6875
7116
|
// isn't bound to the global object as per specs, but set as undefined.
|
|
6876
7117
|
const src = `(function anonymous(${parameters}\n) {\n${bodyText}\n})`;
|
|
6877
|
-
return
|
|
7118
|
+
return evaluator(src);
|
|
6878
7119
|
};
|
|
6879
7120
|
|
|
6880
7121
|
defineProperties(newFunction, {
|
|
@@ -6892,13 +7133,13 @@ const { Fail } = assert;
|
|
|
6892
7133
|
getPrototypeOf(FERAL_FUNCTION) === FERAL_FUNCTION.prototype ||
|
|
6893
7134
|
Fail`Function prototype is the same accross compartments`;
|
|
6894
7135
|
getPrototypeOf(newFunction) === FERAL_FUNCTION.prototype ||
|
|
6895
|
-
Fail`Function constructor prototype is the same
|
|
7136
|
+
Fail`Function constructor prototype is the same across compartments`;
|
|
6896
7137
|
|
|
6897
7138
|
return newFunction;
|
|
6898
7139
|
};$h͏_once.makeFunctionConstructor(makeFunctionConstructor);
|
|
6899
7140
|
})()
|
|
6900
7141
|
,
|
|
6901
|
-
// ===
|
|
7142
|
+
// === 26. ses ./src/global-object.js ===
|
|
6902
7143
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
6903
7144
|
|
|
6904
7145
|
|
|
@@ -7076,7 +7317,7 @@ const { Fail } = assert;
|
|
|
7076
7317
|
};$h͏_once.setGlobalObjectEvaluators(setGlobalObjectEvaluators);
|
|
7077
7318
|
})()
|
|
7078
7319
|
,
|
|
7079
|
-
// ===
|
|
7320
|
+
// === 27. ses ./src/strict-scope-terminator.js ===
|
|
7080
7321
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Proxy,String,TypeError,ReferenceError,create,freeze,getOwnPropertyDescriptors,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)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
7081
7322
|
|
|
7082
7323
|
|
|
@@ -7178,7 +7419,7 @@ const scopeProxyHandlerProperties = {
|
|
|
7178
7419
|
);$h͏_once.strictScopeTerminator(strictScopeTerminator);
|
|
7179
7420
|
})()
|
|
7180
7421
|
,
|
|
7181
|
-
// ===
|
|
7422
|
+
// === 28. ses ./src/sloppy-globals-scope-terminator.js ===
|
|
7182
7423
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Proxy,create,freeze,getOwnPropertyDescriptors,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)]],["reflectSet",[$h͏_a => (reflectSet = $h͏_a)]]]],["./strict-scope-terminator.js", [["strictScopeTerminatorHandler",[$h͏_a => (strictScopeTerminatorHandler = $h͏_a)]],["alwaysThrowHandler",[$h͏_a => (alwaysThrowHandler = $h͏_a)]]]]]);
|
|
7183
7424
|
|
|
7184
7425
|
|
|
@@ -7242,7 +7483,7 @@ const objTarget = freeze({ __proto__: null });
|
|
|
7242
7483
|
freeze(createSloppyGlobalsScopeTerminator);
|
|
7243
7484
|
})()
|
|
7244
7485
|
,
|
|
7245
|
-
// ===
|
|
7486
|
+
// === 29. ses ./src/eval-scope.js ===
|
|
7246
7487
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
7247
7488
|
|
|
7248
7489
|
|
|
@@ -7334,7 +7575,7 @@ const { Fail } = assert;
|
|
|
7334
7575
|
};$h͏_once.makeEvalScopeKit(makeEvalScopeKit);
|
|
7335
7576
|
})()
|
|
7336
7577
|
,
|
|
7337
|
-
// ===
|
|
7578
|
+
// === 30. ses ./src/get-source-url.js ===
|
|
7338
7579
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
7339
7580
|
|
|
7340
7581
|
// Captures a key and value of the form #key=value or @key=value
|
|
@@ -7387,7 +7628,7 @@ const sourceMetaEntriesRegExp = new FERAL_REG_EXP(
|
|
|
7387
7628
|
};$h͏_once.getSourceURL(getSourceURL);
|
|
7388
7629
|
})()
|
|
7389
7630
|
,
|
|
7390
|
-
// ===
|
|
7631
|
+
// === 31. ses ./src/transforms.js ===
|
|
7391
7632
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
7392
7633
|
|
|
7393
7634
|
|
|
@@ -7657,7 +7898,7 @@ $h͏_once.applyTransforms(applyTransforms);const transforms=freeze({
|
|
|
7657
7898
|
});$h͏_once.transforms(transforms);
|
|
7658
7899
|
})()
|
|
7659
7900
|
,
|
|
7660
|
-
// ===
|
|
7901
|
+
// === 32. ses ./src/scope-constants.js ===
|
|
7661
7902
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
7662
7903
|
|
|
7663
7904
|
|
|
@@ -7840,7 +8081,7 @@ function isImmutableDataProperty(obj, name) {
|
|
|
7840
8081
|
};$h͏_once.getScopeConstants(getScopeConstants);
|
|
7841
8082
|
})()
|
|
7842
8083
|
,
|
|
7843
|
-
// ===
|
|
8084
|
+
// === 33. ses ./src/make-evaluate.js ===
|
|
7844
8085
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
7845
8086
|
|
|
7846
8087
|
|
|
@@ -7953,7 +8194,7 @@ function buildOptimizer(constants, name) {
|
|
|
7953
8194
|
};$h͏_once.makeEvaluate(makeEvaluate);
|
|
7954
8195
|
})()
|
|
7955
8196
|
,
|
|
7956
|
-
// ===
|
|
8197
|
+
// === 34. ses ./src/make-safe-evaluator.js ===
|
|
7957
8198
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let apply,arrayFlatMap,freeze,identity,strictScopeTerminator,createSloppyGlobalsScopeTerminator,makeEvalScopeKit,applyTransforms,mandatoryTransforms,makeEvaluate,assert;$h͏_imports([["./commons.js", [["apply",[$h͏_a => (apply = $h͏_a)]],["arrayFlatMap",[$h͏_a => (arrayFlatMap = $h͏_a)]],["freeze",[$h͏_a => (freeze = $h͏_a)]],["identity",[$h͏_a => (identity = $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)]]]]]);
|
|
7958
8199
|
|
|
7959
8200
|
|
|
@@ -8068,7 +8309,7 @@ const { Fail } = assert;
|
|
|
8068
8309
|
};$h͏_once.makeSafeEvaluator(makeSafeEvaluator);
|
|
8069
8310
|
})()
|
|
8070
8311
|
,
|
|
8071
|
-
// ===
|
|
8312
|
+
// === 35. ses ./src/tame-function-tostring.js ===
|
|
8072
8313
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
8073
8314
|
|
|
8074
8315
|
|
|
@@ -8121,7 +8362,7 @@ let markVirtualizedNativeFunction;
|
|
|
8121
8362
|
};$h͏_once.tameFunctionToString(tameFunctionToString);
|
|
8122
8363
|
})()
|
|
8123
8364
|
,
|
|
8124
|
-
// ===
|
|
8365
|
+
// === 36. ses ./src/tame-domains.js ===
|
|
8125
8366
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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);
|
|
8126
8367
|
|
|
8127
8368
|
|
|
@@ -8132,10 +8373,6 @@ let markVirtualizedNativeFunction;
|
|
|
8132
8373
|
|
|
8133
8374
|
|
|
8134
8375
|
function tameDomains(domainTaming = 'safe') {
|
|
8135
|
-
if (domainTaming !== 'safe' && domainTaming !== 'unsafe') {
|
|
8136
|
-
throw TypeError(`unrecognized domainTaming ${domainTaming}`);
|
|
8137
|
-
}
|
|
8138
|
-
|
|
8139
8376
|
if (domainTaming === 'unsafe') {
|
|
8140
8377
|
return;
|
|
8141
8378
|
}
|
|
@@ -8169,7 +8406,7 @@ let markVirtualizedNativeFunction;
|
|
|
8169
8406
|
}
|
|
8170
8407
|
})()
|
|
8171
8408
|
,
|
|
8172
|
-
// ===
|
|
8409
|
+
// === 37. ses ./src/tame-module-source.js ===
|
|
8173
8410
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
8174
8411
|
|
|
8175
8412
|
|
|
@@ -8223,7 +8460,7 @@ let markVirtualizedNativeFunction;
|
|
|
8223
8460
|
};$h͏_once.tameModuleSource(tameModuleSource);
|
|
8224
8461
|
})()
|
|
8225
8462
|
,
|
|
8226
|
-
// ===
|
|
8463
|
+
// === 38. ses ./src/error/console.js ===
|
|
8227
8464
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
8228
8465
|
|
|
8229
8466
|
|
|
@@ -8767,7 +9004,7 @@ freeze(defineCausalConsoleFromLogger);
|
|
|
8767
9004
|
freeze(filterConsole);
|
|
8768
9005
|
})()
|
|
8769
9006
|
,
|
|
8770
|
-
// ===
|
|
9007
|
+
// === 39. ses ./src/error/unhandled-rejection.js ===
|
|
8771
9008
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
8772
9009
|
|
|
8773
9010
|
|
|
@@ -8892,7 +9129,7 @@ freeze(filterConsole);
|
|
|
8892
9129
|
};$h͏_once.makeRejectionHandlers(makeRejectionHandlers);
|
|
8893
9130
|
})()
|
|
8894
9131
|
,
|
|
8895
|
-
// ===
|
|
9132
|
+
// === 40. ses ./src/error/tame-console.js ===
|
|
8896
9133
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
8897
9134
|
|
|
8898
9135
|
|
|
@@ -8936,10 +9173,6 @@ const wrapLogger = (logger, thisArg) =>
|
|
|
8936
9173
|
unhandledRejectionTrapping = 'report',
|
|
8937
9174
|
optGetStackString = undefined,
|
|
8938
9175
|
) => {
|
|
8939
|
-
consoleTaming === 'safe' ||
|
|
8940
|
-
consoleTaming === 'unsafe' ||
|
|
8941
|
-
failFast(`unrecognized consoleTaming ${consoleTaming}`);
|
|
8942
|
-
|
|
8943
9176
|
let loggedErrorHandler;
|
|
8944
9177
|
if (optGetStackString === undefined) {
|
|
8945
9178
|
loggedErrorHandler = defaultHandler;
|
|
@@ -9096,7 +9329,7 @@ const wrapLogger = (logger, thisArg) =>
|
|
|
9096
9329
|
};$h͏_once.tameConsole(tameConsole);
|
|
9097
9330
|
})()
|
|
9098
9331
|
,
|
|
9099
|
-
// ===
|
|
9332
|
+
// === 41. ses ./src/error/tame-v8-error-constructor.js ===
|
|
9100
9333
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
9101
9334
|
|
|
9102
9335
|
|
|
@@ -9170,10 +9403,9 @@ const FILENAME_NODE_DEPENDENTS_CENSOR = /\/node_modules\//;
|
|
|
9170
9403
|
// stack traces.
|
|
9171
9404
|
const FILENAME_NODE_INTERNALS_CENSOR = /^(?:node:)?internal\//;
|
|
9172
9405
|
|
|
9173
|
-
// Frames within
|
|
9174
|
-
//
|
|
9175
|
-
|
|
9176
|
-
const FILENAME_ASSERT_CENSOR = /\/packages\/ses\/src\/error\/assert.js$/;
|
|
9406
|
+
// Frames within SES `assert.js` should be dropped from concise stack traces, as
|
|
9407
|
+
// these are just steps towards creating the error object in question.
|
|
9408
|
+
const FILENAME_ASSERT_CENSOR = /\/packages\/ses\/src\/error\/assert\.js$/;
|
|
9177
9409
|
|
|
9178
9410
|
// Frames within the `eventual-send` shim should be dropped so that concise
|
|
9179
9411
|
// deep stacks omit the internals of the eventual-sending mechanism causing
|
|
@@ -9182,6 +9414,10 @@ const FILENAME_ASSERT_CENSOR = /\/packages\/ses\/src\/error\/assert.js$/;
|
|
|
9182
9414
|
// Endo, so this rule will be of general interest.
|
|
9183
9415
|
const FILENAME_EVENTUAL_SEND_CENSOR = /\/packages\/eventual-send\/src\//;
|
|
9184
9416
|
|
|
9417
|
+
// Frames within the `ses-ava` package should be dropped from concise stack
|
|
9418
|
+
// traces, as they just support exposing error details to AVA.
|
|
9419
|
+
const FILENAME_SES_AVA_CENSOR = /\/packages\/ses-ava\/src\/ses-ava-test\.js$/;
|
|
9420
|
+
|
|
9185
9421
|
// Any stack frame whose `fileName` matches any of these censor patterns
|
|
9186
9422
|
// will be omitted from concise stacks.
|
|
9187
9423
|
// TODO Enable users to configure FILENAME_CENSORS via `lockdown` options.
|
|
@@ -9190,6 +9426,7 @@ const FILENAME_CENSORS = [
|
|
|
9190
9426
|
FILENAME_NODE_INTERNALS_CENSOR,
|
|
9191
9427
|
FILENAME_ASSERT_CENSOR,
|
|
9192
9428
|
FILENAME_EVENTUAL_SEND_CENSOR,
|
|
9429
|
+
FILENAME_SES_AVA_CENSOR,
|
|
9193
9430
|
];
|
|
9194
9431
|
|
|
9195
9432
|
// Should a stack frame with this as its fileName be included in a concise
|
|
@@ -9213,34 +9450,64 @@ const FILENAME_CENSORS = [
|
|
|
9213
9450
|
// likely url-path prefix, ending in a `/.../` should get dropped.
|
|
9214
9451
|
// Anything to the left of the likely path text is kept.
|
|
9215
9452
|
// Everything to the right of `/.../` is kept. Thus
|
|
9216
|
-
// `'Object.bar (/vat-v1/.../eventual-send/test/
|
|
9453
|
+
// `'Object.bar (/vat-v1/.../eventual-send/test/deep-send.test.js:13:21)'`
|
|
9454
|
+
// simplifies to
|
|
9455
|
+
// `'Object.bar (eventual-send/test/deep-send.test.js:13:21)'`.
|
|
9456
|
+
//
|
|
9457
|
+
// See thread starting at
|
|
9458
|
+
// https://github.com/Agoric/agoric-sdk/issues/2326#issuecomment-773020389
|
|
9459
|
+
$h͏_once.filterFileName(filterFileName);const CALLSITE_ELLIPSIS_PATTERN1=/^((?:.*[( ])?)[:/\w_-]*\/\.\.\.\/(.+)$/;
|
|
9460
|
+
|
|
9461
|
+
// The ad-hoc rule of the current pattern is that any likely-file-path or
|
|
9462
|
+
// likely url-path prefix consisting of `.../` should get dropped.
|
|
9463
|
+
// Anything to the left of the likely path text is kept.
|
|
9464
|
+
// Everything to the right of `.../` is kept. Thus
|
|
9465
|
+
// `'Object.bar (.../eventual-send/test/deep-send.test.js:13:21)'`
|
|
9217
9466
|
// simplifies to
|
|
9218
|
-
// `'Object.bar (eventual-send/test/
|
|
9467
|
+
// `'Object.bar (eventual-send/test/deep-send.test.js:13:21)'`.
|
|
9219
9468
|
//
|
|
9220
9469
|
// See thread starting at
|
|
9221
9470
|
// https://github.com/Agoric/agoric-sdk/issues/2326#issuecomment-773020389
|
|
9222
|
-
|
|
9471
|
+
const CALLSITE_ELLIPSIS_PATTERN2 = /^((?:.*[( ])?)\.\.\.\/(.+)$/;
|
|
9223
9472
|
|
|
9224
9473
|
// The ad-hoc rule of the current pattern is that any likely-file-path or
|
|
9225
9474
|
// likely url-path prefix, ending in a `/` and prior to `package/` should get
|
|
9226
9475
|
// dropped.
|
|
9227
9476
|
// Anything to the left of the likely path prefix text is kept. `package/` and
|
|
9228
9477
|
// everything to its right is kept. Thus
|
|
9229
|
-
// `'Object.bar (/Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/eventual-send/test/
|
|
9478
|
+
// `'Object.bar (/Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/eventual-send/test/deep-send.test.js:13:21)'`
|
|
9230
9479
|
// simplifies to
|
|
9231
|
-
// `'Object.bar (packages/eventual-send/test/
|
|
9480
|
+
// `'Object.bar (packages/eventual-send/test/deep-send.test.js:13:21)'`.
|
|
9232
9481
|
// Note that `/packages/` is a convention for monorepos encouraged by
|
|
9233
9482
|
// lerna.
|
|
9234
9483
|
const CALLSITE_PACKAGES_PATTERN = /^((?:.*[( ])?)[:/\w_-]*\/(packages\/.+)$/;
|
|
9235
9484
|
|
|
9485
|
+
// The ad-hoc rule of the current pattern is that any likely-file-path or
|
|
9486
|
+
// likely url-path prefix of the form `file://` but not `file:///` gets
|
|
9487
|
+
// dropped.
|
|
9488
|
+
// Anything to the left of the likely path prefix text is kept. Everything to
|
|
9489
|
+
// the right of `file://` is kept. Thus
|
|
9490
|
+
// `'Object.bar (file:///Users/markmiller/src/ongithub/endojs/endo/packages/eventual-send/test/deep-send.test.js:13:21)'` is unchanged but
|
|
9491
|
+
// `'Object.bar (file://test/deep-send.test.js:13:21)'`
|
|
9492
|
+
|
|
9493
|
+
// simplifies to
|
|
9494
|
+
// `'Object.bar (test/deep-send.test.js:13:21)'`.
|
|
9495
|
+
// The reason is that `file:///` usually precedes an absolute path which is
|
|
9496
|
+
// clickable without removing the `file:///`, whereas `file://` usually precedes
|
|
9497
|
+
// a relative path which, for whatever vscode reason, is not clickable until the
|
|
9498
|
+
// `file://` is removed.
|
|
9499
|
+
const CALLSITE_FILE_2SLASH_PATTERN = /^((?:.*[( ])?)file:\/\/([^/].*)$/;
|
|
9500
|
+
|
|
9236
9501
|
// The use of these callSite patterns below assumes that any match will bind
|
|
9237
9502
|
// capture groups containing the parts of the original string we want
|
|
9238
9503
|
// to keep. The parts outside those capture groups will be dropped from concise
|
|
9239
9504
|
// stacks.
|
|
9240
9505
|
// TODO Enable users to configure CALLSITE_PATTERNS via `lockdown` options.
|
|
9241
9506
|
const CALLSITE_PATTERNS = [
|
|
9242
|
-
|
|
9507
|
+
CALLSITE_ELLIPSIS_PATTERN1,
|
|
9508
|
+
CALLSITE_ELLIPSIS_PATTERN2,
|
|
9243
9509
|
CALLSITE_PACKAGES_PATTERN,
|
|
9510
|
+
CALLSITE_FILE_2SLASH_PATTERN,
|
|
9244
9511
|
];
|
|
9245
9512
|
|
|
9246
9513
|
// For a stack frame that should be included in a concise stack trace, if
|
|
@@ -9248,6 +9515,9 @@ const CALLSITE_PATTERNS = [
|
|
|
9248
9515
|
// possibly-shorter stringified stack frame that should be shown instead.
|
|
9249
9516
|
// Exported only so it can be unit tested.
|
|
9250
9517
|
// TODO Move so that it applies not just to v8.
|
|
9518
|
+
/**
|
|
9519
|
+
* @param {string} callSiteString
|
|
9520
|
+
*/
|
|
9251
9521
|
const shortenCallSiteString = callSiteString => {
|
|
9252
9522
|
for (const filter of CALLSITE_PATTERNS) {
|
|
9253
9523
|
const match = regexpExec(filter, callSiteString);
|
|
@@ -9274,18 +9544,24 @@ const CALLSITE_PATTERNS = [
|
|
|
9274
9544
|
|
|
9275
9545
|
const originalCaptureStackTrace = OriginalError.captureStackTrace;
|
|
9276
9546
|
|
|
9547
|
+
const omitFrames =
|
|
9548
|
+
stackFiltering === 'concise' || stackFiltering === 'omit-frames';
|
|
9549
|
+
|
|
9550
|
+
const shortenPaths =
|
|
9551
|
+
stackFiltering === 'concise' || stackFiltering === 'shorten-paths';
|
|
9552
|
+
|
|
9277
9553
|
// const callSiteFilter = _callSite => true;
|
|
9278
9554
|
const callSiteFilter = callSite => {
|
|
9279
|
-
if (
|
|
9280
|
-
|
|
9555
|
+
if (omitFrames) {
|
|
9556
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
9557
|
+
return filterFileName(callSite.getFileName());
|
|
9281
9558
|
}
|
|
9282
|
-
|
|
9283
|
-
return filterFileName(callSite.getFileName());
|
|
9559
|
+
return true;
|
|
9284
9560
|
};
|
|
9285
9561
|
|
|
9286
9562
|
const callSiteStringifier = callSite => {
|
|
9287
9563
|
let callSiteString = `${callSite}`;
|
|
9288
|
-
if (
|
|
9564
|
+
if (shortenPaths) {
|
|
9289
9565
|
callSiteString = shortenCallSiteString(callSiteString);
|
|
9290
9566
|
}
|
|
9291
9567
|
return `\n at ${callSiteString}`;
|
|
@@ -9442,9 +9718,8 @@ const CALLSITE_PATTERNS = [
|
|
|
9442
9718
|
};$h͏_once.tameV8ErrorConstructor(tameV8ErrorConstructor);
|
|
9443
9719
|
})()
|
|
9444
9720
|
,
|
|
9445
|
-
// ===
|
|
9446
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_ERROR,
|
|
9447
|
-
|
|
9721
|
+
// === 42. ses ./src/error/tame-error-constructor.js ===
|
|
9722
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_ERROR,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,defineProperty,getOwnPropertyDescriptors,NativeErrors,tameV8ErrorConstructor;$h͏_imports([["../commons.js", [["FERAL_ERROR",[$h͏_a => (FERAL_ERROR = $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)]]]]]);
|
|
9448
9723
|
|
|
9449
9724
|
|
|
9450
9725
|
|
|
@@ -9481,16 +9756,6 @@ let initialGetStackString = tamedMethods.getStackString;
|
|
|
9481
9756
|
errorTaming = 'safe',
|
|
9482
9757
|
stackFiltering = 'concise',
|
|
9483
9758
|
) {
|
|
9484
|
-
if (
|
|
9485
|
-
errorTaming !== 'safe' &&
|
|
9486
|
-
errorTaming !== 'unsafe' &&
|
|
9487
|
-
errorTaming !== 'unsafe-debug'
|
|
9488
|
-
) {
|
|
9489
|
-
throw TypeError(`unrecognized errorTaming ${errorTaming}`);
|
|
9490
|
-
}
|
|
9491
|
-
if (stackFiltering !== 'concise' && stackFiltering !== 'verbose') {
|
|
9492
|
-
throw TypeError(`unrecognized stackFiltering ${stackFiltering}`);
|
|
9493
|
-
}
|
|
9494
9759
|
const ErrorPrototype = FERAL_ERROR.prototype;
|
|
9495
9760
|
|
|
9496
9761
|
const { captureStackTrace: originalCaptureStackTrace } = FERAL_ERROR;
|
|
@@ -9740,7 +10005,7 @@ let initialGetStackString = tamedMethods.getStackString;
|
|
|
9740
10005
|
}$h͏_once.default( tameErrorConstructor);
|
|
9741
10006
|
})()
|
|
9742
10007
|
,
|
|
9743
|
-
// ===
|
|
10008
|
+
// === 43. ses ./src/module-load.js ===
|
|
9744
10009
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
9745
10010
|
|
|
9746
10011
|
|
|
@@ -10250,18 +10515,17 @@ const memoizedLoadWithErrorAnnotation = (
|
|
|
10250
10515
|
return moduleLoading;
|
|
10251
10516
|
};
|
|
10252
10517
|
|
|
10253
|
-
const asyncJobQueue = () => {
|
|
10518
|
+
const asyncJobQueue = (errors = []) => {
|
|
10254
10519
|
/** @type {Set<Promise<undefined>>} */
|
|
10255
10520
|
const pendingJobs = new Set();
|
|
10256
|
-
/** @type {Array<Error>} */
|
|
10257
|
-
const errors = [];
|
|
10258
10521
|
|
|
10259
10522
|
/**
|
|
10260
10523
|
* Enqueues a job that starts immediately but won't be awaited until drainQueue is called.
|
|
10261
10524
|
*
|
|
10262
|
-
* @template {any[]}
|
|
10263
|
-
* @param {
|
|
10264
|
-
* @param {
|
|
10525
|
+
* @template {(...args: any[]) => Promise<void>} F
|
|
10526
|
+
* @param {F} func - An async function to execute
|
|
10527
|
+
* @param {Parameters<F>} args - Arguments to pass to the function
|
|
10528
|
+
* @returns {void}
|
|
10265
10529
|
*/
|
|
10266
10530
|
const enqueueJob = (func, args) => {
|
|
10267
10531
|
setAdd(
|
|
@@ -10273,8 +10537,6 @@ const asyncJobQueue = () => {
|
|
|
10273
10537
|
};
|
|
10274
10538
|
/**
|
|
10275
10539
|
* Sequentially awaits pending jobs and returns an array of errors
|
|
10276
|
-
*
|
|
10277
|
-
* @returns {Promise<Array<Error>>}
|
|
10278
10540
|
*/
|
|
10279
10541
|
const drainQueue =async function(){
|
|
10280
10542
|
await null;
|
|
@@ -10282,9 +10544,42 @@ const asyncJobQueue = () => {
|
|
|
10282
10544
|
// eslint-disable-next-line no-await-in-loop
|
|
10283
10545
|
await job;
|
|
10284
10546
|
}
|
|
10285
|
-
return errors;
|
|
10286
10547
|
};
|
|
10287
|
-
return { enqueueJob, drainQueue };
|
|
10548
|
+
return { enqueueJob, drainQueue, errors };
|
|
10549
|
+
};
|
|
10550
|
+
|
|
10551
|
+
const syncJobQueue = (errors = []) => {
|
|
10552
|
+
let current = [];
|
|
10553
|
+
let next = [];
|
|
10554
|
+
|
|
10555
|
+
/**
|
|
10556
|
+
* Enqueues a job
|
|
10557
|
+
*
|
|
10558
|
+
* @template {(...args: any[]) => void} F
|
|
10559
|
+
* @param {F} func - An async function to execute
|
|
10560
|
+
* @param {Parameters<F>} args - Arguments to pass to the function
|
|
10561
|
+
* @returns {void}
|
|
10562
|
+
*/
|
|
10563
|
+
const enqueueJob = (func, args) => {
|
|
10564
|
+
arrayPush(next, [func, args]);
|
|
10565
|
+
};
|
|
10566
|
+
const drainQueue = () => {
|
|
10567
|
+
// Attention: load bearing flow order. Calling another enqueued function in the
|
|
10568
|
+
// synchronous usecase must happen after the one that enqueued it has finished.
|
|
10569
|
+
// Jobs enqueued in one pass do not interleave with jobs resulting from them.
|
|
10570
|
+
// It's necessary for efficient memoization and to break cycles.
|
|
10571
|
+
for (const [func, args] of current) {
|
|
10572
|
+
try {
|
|
10573
|
+
func(...args);
|
|
10574
|
+
} catch (error) {
|
|
10575
|
+
arrayPush(errors, error);
|
|
10576
|
+
}
|
|
10577
|
+
}
|
|
10578
|
+
current = next;
|
|
10579
|
+
next = [];
|
|
10580
|
+
if (current.length > 0) drainQueue();
|
|
10581
|
+
};
|
|
10582
|
+
return { enqueueJob, drainQueue, errors };
|
|
10288
10583
|
};
|
|
10289
10584
|
|
|
10290
10585
|
/**
|
|
@@ -10296,7 +10591,8 @@ const throwAggregateError = ({ errors, errorPrefix }) => {
|
|
|
10296
10591
|
// Throw an aggregate error if there were any errors.
|
|
10297
10592
|
if (errors.length > 0) {
|
|
10298
10593
|
const verbose =
|
|
10299
|
-
|
|
10594
|
+
/** @type {'' | 'verbose'} */
|
|
10595
|
+
(getenv('COMPARTMENT_LOAD_ERRORS', '', ['verbose'])) === 'verbose';
|
|
10300
10596
|
throw TypeError(
|
|
10301
10597
|
`${errorPrefix} (${errors.length} underlying failures: ${arrayJoin(
|
|
10302
10598
|
arrayMap(errors, error => error.message + (verbose ? error.stack : '')),
|
|
@@ -10330,7 +10626,7 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10330
10626
|
/** @type {Map<object, Map<string, Promise<Record<any, any>>>>} */
|
|
10331
10627
|
const moduleLoads = new Map();
|
|
10332
10628
|
|
|
10333
|
-
const { enqueueJob, drainQueue } = asyncJobQueue();
|
|
10629
|
+
const { enqueueJob, drainQueue, errors } = asyncJobQueue();
|
|
10334
10630
|
|
|
10335
10631
|
enqueueJob(memoizedLoadWithErrorAnnotation, [
|
|
10336
10632
|
compartmentPrivateFields,
|
|
@@ -10342,8 +10638,7 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10342
10638
|
moduleLoads,
|
|
10343
10639
|
]);
|
|
10344
10640
|
|
|
10345
|
-
|
|
10346
|
-
const errors = await drainQueue();
|
|
10641
|
+
await drainQueue();
|
|
10347
10642
|
|
|
10348
10643
|
throwAggregateError({
|
|
10349
10644
|
errors,
|
|
@@ -10374,16 +10669,7 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10374
10669
|
/** @type {Map<object, Map<string, Promise<Record<any, any>>>>} */
|
|
10375
10670
|
const moduleLoads = new Map();
|
|
10376
10671
|
|
|
10377
|
-
|
|
10378
|
-
const errors = [];
|
|
10379
|
-
|
|
10380
|
-
const enqueueJob = (func, args) => {
|
|
10381
|
-
try {
|
|
10382
|
-
func(...args);
|
|
10383
|
-
} catch (error) {
|
|
10384
|
-
arrayPush(errors, error);
|
|
10385
|
-
}
|
|
10386
|
-
};
|
|
10672
|
+
const { enqueueJob, drainQueue, errors } = syncJobQueue();
|
|
10387
10673
|
|
|
10388
10674
|
enqueueJob(memoizedLoadWithErrorAnnotation, [
|
|
10389
10675
|
compartmentPrivateFields,
|
|
@@ -10395,6 +10681,8 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10395
10681
|
moduleLoads,
|
|
10396
10682
|
]);
|
|
10397
10683
|
|
|
10684
|
+
drainQueue();
|
|
10685
|
+
|
|
10398
10686
|
throwAggregateError({
|
|
10399
10687
|
errors,
|
|
10400
10688
|
errorPrefix: `Failed to load module ${q(moduleSpecifier)} in package ${q(
|
|
@@ -10404,7 +10692,7 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
|
|
|
10404
10692
|
};$h͏_once.loadNow(loadNow);
|
|
10405
10693
|
})()
|
|
10406
10694
|
,
|
|
10407
|
-
// ===
|
|
10695
|
+
// === 44. ses ./src/module-proxy.js ===
|
|
10408
10696
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
10409
10697
|
|
|
10410
10698
|
|
|
@@ -10607,7 +10895,7 @@ const { quote: q } = assert;
|
|
|
10607
10895
|
};$h͏_once.getDeferredExports(getDeferredExports);
|
|
10608
10896
|
})()
|
|
10609
10897
|
,
|
|
10610
|
-
// ===
|
|
10898
|
+
// === 45. ses ./src/compartment-evaluate.js ===
|
|
10611
10899
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
10612
10900
|
|
|
10613
10901
|
|
|
@@ -10703,7 +10991,7 @@ const { quote: q } = assert;
|
|
|
10703
10991
|
};$h͏_once.compartmentEvaluate(compartmentEvaluate);
|
|
10704
10992
|
})()
|
|
10705
10993
|
,
|
|
10706
|
-
// ===
|
|
10994
|
+
// === 46. ses ./src/module-instance.js ===
|
|
10707
10995
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
10708
10996
|
|
|
10709
10997
|
|
|
@@ -11203,7 +11491,7 @@ $h͏_once.makeVirtualModuleInstance(makeVirtualModuleInstance);const makeModuleI
|
|
|
11203
11491
|
};$h͏_once.makeModuleInstance(makeModuleInstance);
|
|
11204
11492
|
})()
|
|
11205
11493
|
,
|
|
11206
|
-
// ===
|
|
11494
|
+
// === 47. ses ./src/module-link.js ===
|
|
11207
11495
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
11208
11496
|
|
|
11209
11497
|
|
|
@@ -11365,7 +11653,7 @@ function validateModuleSource(moduleSource, moduleSpecifier) {
|
|
|
11365
11653
|
};$h͏_once.instantiate(instantiate);
|
|
11366
11654
|
})()
|
|
11367
11655
|
,
|
|
11368
|
-
// ===
|
|
11656
|
+
// === 48. ses ./src/compartment.js ===
|
|
11369
11657
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let Map,TypeError,WeakMap,arrayFlatMap,assign,defineProperties,identity,promiseThen,toStringTagSymbol,weakmapGet,weakmapSet,setGlobalObjectSymbolUnscopables,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,assert,assertEqual,q,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)]],["arrayFlatMap",[$h͏_a => (arrayFlatMap = $h͏_a)]],["assign",[$h͏_a => (assign = $h͏_a)]],["defineProperties",[$h͏_a => (defineProperties = $h͏_a)]],["identity",[$h͏_a => (identity = $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)]],["q",[$h͏_a => (q = $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)]]]]]);
|
|
11370
11658
|
|
|
11371
11659
|
|
|
@@ -11431,6 +11719,8 @@ function validateModuleSource(moduleSource, moduleSpecifier) {
|
|
|
11431
11719
|
|
|
11432
11720
|
|
|
11433
11721
|
|
|
11722
|
+
|
|
11723
|
+
|
|
11434
11724
|
|
|
11435
11725
|
|
|
11436
11726
|
|
|
@@ -11775,8 +12065,9 @@ defineProperties(InertCompartment, {
|
|
|
11775
12065
|
};$h͏_once.makeCompartmentConstructor(makeCompartmentConstructor);
|
|
11776
12066
|
})()
|
|
11777
12067
|
,
|
|
11778
|
-
// ===
|
|
11779
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,assign,AsyncGeneratorFunctionInstance,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)]],["assign",[$h͏_a => (assign = $h͏_a)]],["AsyncGeneratorFunctionInstance",[$h͏_a => (AsyncGeneratorFunctionInstance = $h͏_a)]]]],["./compartment.js", [["InertCompartment",[$h͏_a => (InertCompartment = $h͏_a)]]]]]);
|
|
12068
|
+
// === 49. ses ./src/get-anonymous-intrinsics.js ===
|
|
12069
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,globalThis,assign,AsyncGeneratorFunctionInstance,ArrayBuffer,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)]],["assign",[$h͏_a => (assign = $h͏_a)]],["AsyncGeneratorFunctionInstance",[$h͏_a => (AsyncGeneratorFunctionInstance = $h͏_a)]],["ArrayBuffer",[$h͏_a => (ArrayBuffer = $h͏_a)]]]],["./compartment.js", [["InertCompartment",[$h͏_a => (InertCompartment = $h͏_a)]]]]]);
|
|
12070
|
+
|
|
11780
12071
|
|
|
11781
12072
|
|
|
11782
12073
|
|
|
@@ -11944,22 +12235,28 @@ function makeArguments() {
|
|
|
11944
12235
|
);
|
|
11945
12236
|
}
|
|
11946
12237
|
|
|
12238
|
+
const ab = new ArrayBuffer(0);
|
|
12239
|
+
// @ts-expect-error TODO How do I add sliceToImmutable to ArrayBuffer type?
|
|
12240
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
12241
|
+
const iab = ab.sliceToImmutable();
|
|
12242
|
+
const iabProto = getPrototypeOf(iab);
|
|
12243
|
+
if (iabProto !== ArrayBuffer.prototype) {
|
|
12244
|
+
// In a native implementation, these will be the same prototype
|
|
12245
|
+
intrinsics['%ImmutableArrayBufferPrototype%'] = iabProto;
|
|
12246
|
+
}
|
|
12247
|
+
|
|
11947
12248
|
return intrinsics;
|
|
11948
12249
|
};$h͏_once.getAnonymousIntrinsics(getAnonymousIntrinsics);
|
|
11949
12250
|
})()
|
|
11950
12251
|
,
|
|
11951
|
-
// ===
|
|
11952
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let
|
|
12252
|
+
// === 50. ses ./src/tame-harden.js ===
|
|
12253
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let freeze;$h͏_imports([["./commons.js", [["freeze",[$h͏_a => (freeze = $h͏_a)]]]]]);
|
|
11953
12254
|
|
|
11954
12255
|
|
|
11955
12256
|
/** @import {Harden} from '../types.js'; */
|
|
11956
12257
|
|
|
11957
12258
|
/** @type {(safeHarden: Harden, hardenTaming: 'safe' | 'unsafe') => Harden} */
|
|
11958
12259
|
const tameHarden = (safeHarden, hardenTaming) => {
|
|
11959
|
-
if (hardenTaming !== 'safe' && hardenTaming !== 'unsafe') {
|
|
11960
|
-
throw TypeError(`unrecognized fakeHardenOption ${hardenTaming}`);
|
|
11961
|
-
}
|
|
11962
|
-
|
|
11963
12260
|
if (hardenTaming === 'safe') {
|
|
11964
12261
|
return safeHarden;
|
|
11965
12262
|
}
|
|
@@ -11984,7 +12281,7 @@ function makeArguments() {
|
|
|
11984
12281
|
freeze(tameHarden);
|
|
11985
12282
|
})()
|
|
11986
12283
|
,
|
|
11987
|
-
// ===
|
|
12284
|
+
// === 51. ses ./src/tame-symbol-constructor.js ===
|
|
11988
12285
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
11989
12286
|
|
|
11990
12287
|
|
|
@@ -12051,7 +12348,7 @@ freeze(tameHarden);
|
|
|
12051
12348
|
};$h͏_once.tameSymbolConstructor(tameSymbolConstructor);
|
|
12052
12349
|
})()
|
|
12053
12350
|
,
|
|
12054
|
-
// ===
|
|
12351
|
+
// === 52. ses ./src/tame-faux-data-properties.js ===
|
|
12055
12352
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
12056
12353
|
|
|
12057
12354
|
|
|
@@ -12264,7 +12561,7 @@ const throws = thunk => {
|
|
|
12264
12561
|
};$h͏_once.tameFauxDataProperties(tameFauxDataProperties);
|
|
12265
12562
|
})()
|
|
12266
12563
|
,
|
|
12267
|
-
// ===
|
|
12564
|
+
// === 53. ses ./src/tame-regenerator-runtime.js ===
|
|
12268
12565
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
12269
12566
|
|
|
12270
12567
|
|
|
@@ -12296,7 +12593,7 @@ const throws = thunk => {
|
|
|
12296
12593
|
};$h͏_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
|
|
12297
12594
|
})()
|
|
12298
12595
|
,
|
|
12299
|
-
// ===
|
|
12596
|
+
// === 54. ses ./src/shim-arraybuffer-transfer.js ===
|
|
12300
12597
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
12301
12598
|
|
|
12302
12599
|
|
|
@@ -12310,7 +12607,6 @@ const throws = thunk => {
|
|
|
12310
12607
|
|
|
12311
12608
|
|
|
12312
12609
|
const shimArrayBufferTransfer = () => {
|
|
12313
|
-
// @ts-expect-error TODO extend ArrayBuffer type to include transfer, etc.
|
|
12314
12610
|
if (typeof arrayBufferPrototype.transfer === 'function') {
|
|
12315
12611
|
// Assume already exists so does not need to be shimmed.
|
|
12316
12612
|
// Such conditional shimming is ok in this case since ArrayBuffer.p.transfer
|
|
@@ -12385,8 +12681,8 @@ const throws = thunk => {
|
|
|
12385
12681
|
};$h͏_once.shimArrayBufferTransfer(shimArrayBufferTransfer);
|
|
12386
12682
|
})()
|
|
12387
12683
|
,
|
|
12388
|
-
// ===
|
|
12389
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let
|
|
12684
|
+
// === 55. ses ./src/reporting.js ===
|
|
12685
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';let functionBind,globalThis,assert;$h͏_imports([["./commons.js", [["functionBind",[$h͏_a => (functionBind = $h͏_a)]],["globalThis",[$h͏_a => (globalThis = $h͏_a)]]]],["./error/assert.js", [["assert",[$h͏_a => (assert = $h͏_a)]]]]]);
|
|
12390
12686
|
|
|
12391
12687
|
|
|
12392
12688
|
/**
|
|
@@ -12439,9 +12735,6 @@ const mute = () => {};
|
|
|
12439
12735
|
if (reporting === 'none') {
|
|
12440
12736
|
return makeReportPrinter(mute);
|
|
12441
12737
|
}
|
|
12442
|
-
if (reporting !== 'platform' && reporting !== 'console') {
|
|
12443
|
-
throw new TypeError(`Invalid lockdown reporting option: ${reporting}`);
|
|
12444
|
-
}
|
|
12445
12738
|
if (
|
|
12446
12739
|
reporting === 'console' ||
|
|
12447
12740
|
globalThis.window === globalThis ||
|
|
@@ -12496,8 +12789,9 @@ const mute = () => {};
|
|
|
12496
12789
|
};$h͏_once.reportInGroup(reportInGroup);
|
|
12497
12790
|
})()
|
|
12498
12791
|
,
|
|
12499
|
-
// ===
|
|
12500
|
-
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
12792
|
+
// === 56. ses ./src/lockdown.js ===
|
|
12793
|
+
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]],["@endo/immutable-arraybuffer/shim-hermes.js", []],["./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)]]]]]);
|
|
12794
|
+
|
|
12501
12795
|
|
|
12502
12796
|
|
|
12503
12797
|
|
|
@@ -12599,10 +12893,32 @@ const safeHarden = makeHardener();
|
|
|
12599
12893
|
// only ever need to be called once and that simplifying lockdown will improve
|
|
12600
12894
|
// the quality of audits.
|
|
12601
12895
|
|
|
12602
|
-
const
|
|
12603
|
-
let
|
|
12896
|
+
const probeHostEvaluators = () => {
|
|
12897
|
+
let functionAllowed;
|
|
12898
|
+
try {
|
|
12899
|
+
functionAllowed = FERAL_FUNCTION('return true')();
|
|
12900
|
+
} catch (_error) {
|
|
12901
|
+
// We reach here if the Function() constructor is outright forbidden by a
|
|
12902
|
+
// strict Content Security Policy (containing either a `default-src` or a
|
|
12903
|
+
// `script-src` directive), not been implemented in the host, or the host
|
|
12904
|
+
// is configured to throw an exception instead of `new Function`.
|
|
12905
|
+
functionAllowed = false;
|
|
12906
|
+
}
|
|
12907
|
+
|
|
12908
|
+
let evalAllowed;
|
|
12604
12909
|
try {
|
|
12605
|
-
|
|
12910
|
+
evalAllowed = FERAL_EVAL('true');
|
|
12911
|
+
} catch (_error) {
|
|
12912
|
+
// We reach here if `eval` is outright forbidden by a strict Content Security Policy,
|
|
12913
|
+
// not implemented in the host, or the host is configured to throw an exception.
|
|
12914
|
+
// We allow this for SES usage that delegates the responsibility to isolate
|
|
12915
|
+
// guest code to production code generation.
|
|
12916
|
+
evalAllowed = false;
|
|
12917
|
+
}
|
|
12918
|
+
|
|
12919
|
+
let directEvalAllowed;
|
|
12920
|
+
if (functionAllowed && evalAllowed) {
|
|
12921
|
+
directEvalAllowed = FERAL_FUNCTION(
|
|
12606
12922
|
'eval',
|
|
12607
12923
|
'SES_changed',
|
|
12608
12924
|
`\
|
|
@@ -12614,21 +12930,12 @@ const assertDirectEvalAvailable = () => {
|
|
|
12614
12930
|
// and indirect, which generally creates a new global.
|
|
12615
12931
|
// We are going to throw an exception for failing to initialize SES, but
|
|
12616
12932
|
// good neighbors clean up.
|
|
12617
|
-
if (!
|
|
12933
|
+
if (!directEvalAllowed) {
|
|
12618
12934
|
delete globalThis.SES_changed;
|
|
12619
12935
|
}
|
|
12620
|
-
} catch (_error) {
|
|
12621
|
-
// We reach here if eval is outright forbidden by a Content Security Policy.
|
|
12622
|
-
// We allow this for SES usage that delegates the responsibility to isolate
|
|
12623
|
-
// guest code to production code generation.
|
|
12624
|
-
allowed = true;
|
|
12625
|
-
}
|
|
12626
|
-
if (!allowed) {
|
|
12627
|
-
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_DIRECT_EVAL.md
|
|
12628
|
-
throw TypeError(
|
|
12629
|
-
`SES cannot initialize unless 'eval' is the original intrinsic 'eval', suitable for direct-eval (dynamically scoped eval) (SES_DIRECT_EVAL)`,
|
|
12630
|
-
);
|
|
12631
12936
|
}
|
|
12937
|
+
|
|
12938
|
+
return { functionAllowed, evalAllowed, directEvalAllowed };
|
|
12632
12939
|
};
|
|
12633
12940
|
|
|
12634
12941
|
/**
|
|
@@ -12651,65 +12958,85 @@ const assertDirectEvalAvailable = () => {
|
|
|
12651
12958
|
// The `stackFiltering` is not a safety issue. Rather it is a tradeoff
|
|
12652
12959
|
// between relevance and completeness of the stack frames shown on the
|
|
12653
12960
|
// console. Setting`stackFiltering` to `'verbose'` applies no filters, providing
|
|
12654
|
-
// the raw stack frames that can be quite
|
|
12961
|
+
// the raw stack frames that can be quite verbose. Setting
|
|
12655
12962
|
// `stackFrameFiltering` to`'concise'` limits the display to the stack frame
|
|
12656
12963
|
// information most likely to be relevant, eliminating distracting frames
|
|
12657
12964
|
// such as those from the infrastructure. However, the bug you're trying to
|
|
12658
|
-
// track down might be in the
|
|
12965
|
+
// track down might be in the infrastructure, in which case the `'verbose'` setting
|
|
12659
12966
|
// is useful. See
|
|
12660
12967
|
// [`stackFiltering` options](https://github.com/Agoric/SES-shim/blob/master/packages/ses/docs/lockdown.md#stackfiltering-options)
|
|
12661
12968
|
// for an explanation.
|
|
12662
12969
|
|
|
12663
12970
|
const {
|
|
12664
|
-
errorTaming =
|
|
12665
|
-
|
|
12666
|
-
getenv('LOCKDOWN_ERROR_TRAPPING', 'platform')
|
|
12971
|
+
errorTaming = /** @type {'safe' | 'unsafe' | 'unsafe-debug'} */ (
|
|
12972
|
+
getenv('LOCKDOWN_ERROR_TAMING', 'safe', ['unsafe', 'unsafe-debug'])
|
|
12667
12973
|
),
|
|
12668
|
-
|
|
12669
|
-
getenv('
|
|
12974
|
+
errorTrapping = /** @type {'platform' | 'none' | 'report' | 'abort' | 'exit'} */ (
|
|
12975
|
+
getenv('LOCKDOWN_ERROR_TRAPPING', 'platform', [
|
|
12976
|
+
'none',
|
|
12977
|
+
'report',
|
|
12978
|
+
'abort',
|
|
12979
|
+
'exit',
|
|
12980
|
+
])
|
|
12670
12981
|
),
|
|
12671
|
-
|
|
12672
|
-
getenv('
|
|
12982
|
+
reporting = /** @type {'platform' | 'console' | 'none'} */ (
|
|
12983
|
+
getenv('LOCKDOWN_REPORTING', 'platform', ['console', 'none'])
|
|
12984
|
+
),
|
|
12985
|
+
unhandledRejectionTrapping = /** @type {'none' | 'report'} */ (
|
|
12986
|
+
getenv('LOCKDOWN_UNHANDLED_REJECTION_TRAPPING', 'report', ['none'])
|
|
12987
|
+
),
|
|
12988
|
+
regExpTaming = /** @type {'safe' | 'unsafe'} */ (
|
|
12989
|
+
getenv('LOCKDOWN_REGEXP_TAMING', 'safe', ['unsafe'])
|
|
12990
|
+
),
|
|
12991
|
+
localeTaming = /** @type {'safe' | 'unsafe'} */ (
|
|
12992
|
+
getenv('LOCKDOWN_LOCALE_TAMING', 'safe', ['unsafe'])
|
|
12673
12993
|
),
|
|
12674
|
-
regExpTaming = getenv('LOCKDOWN_REGEXP_TAMING', 'safe'),
|
|
12675
|
-
localeTaming = getenv('LOCKDOWN_LOCALE_TAMING', 'safe'),
|
|
12676
|
-
|
|
12677
12994
|
consoleTaming = /** @type {'unsafe' | 'safe'} */ (
|
|
12678
|
-
getenv('LOCKDOWN_CONSOLE_TAMING', 'safe')
|
|
12995
|
+
getenv('LOCKDOWN_CONSOLE_TAMING', 'safe', ['unsafe'])
|
|
12679
12996
|
),
|
|
12680
12997
|
overrideTaming = /** @type {'moderate' | 'min' | 'severe'} */ (
|
|
12681
|
-
getenv('LOCKDOWN_OVERRIDE_TAMING', 'moderate')
|
|
12998
|
+
getenv('LOCKDOWN_OVERRIDE_TAMING', 'moderate', ['min', 'severe'])
|
|
12999
|
+
),
|
|
13000
|
+
stackFiltering = /** @type {'concise' | 'omit-frames' | 'shorten-paths' | 'verbose'} */ (
|
|
13001
|
+
getenv('LOCKDOWN_STACK_FILTERING', 'concise', [
|
|
13002
|
+
'omit-frames',
|
|
13003
|
+
'shorten-paths',
|
|
13004
|
+
'verbose',
|
|
13005
|
+
])
|
|
13006
|
+
),
|
|
13007
|
+
domainTaming = /** @type {'safe' | 'unsafe'} */ (
|
|
13008
|
+
getenv('LOCKDOWN_DOMAIN_TAMING', 'safe', ['unsafe'])
|
|
12682
13009
|
),
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
13010
|
+
evalTaming = /** @type {'safe-eval' | 'unsafe-eval' | 'no-eval'} */ (
|
|
13011
|
+
getenv('LOCKDOWN_EVAL_TAMING', 'safe-eval', [
|
|
13012
|
+
'unsafe-eval',
|
|
13013
|
+
'no-eval',
|
|
13014
|
+
// deprecated
|
|
13015
|
+
'safeEval',
|
|
13016
|
+
'unsafeEval',
|
|
13017
|
+
'noEval',
|
|
13018
|
+
])
|
|
12690
13019
|
),
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
13020
|
+
overrideDebug = /** @type {string[]} */ (
|
|
13021
|
+
arrayFilter(
|
|
13022
|
+
stringSplit(getenv('LOCKDOWN_OVERRIDE_DEBUG', ''), ','),
|
|
13023
|
+
/** @param {string} debugName */
|
|
13024
|
+
debugName => debugName !== '',
|
|
13025
|
+
)
|
|
13026
|
+
),
|
|
13027
|
+
legacyRegeneratorRuntimeTaming = /** @type {'safe' | 'unsafe-ignore'} */ (
|
|
13028
|
+
getenv('LOCKDOWN_LEGACY_REGENERATOR_RUNTIME_TAMING', 'safe', [
|
|
13029
|
+
'unsafe-ignore',
|
|
13030
|
+
])
|
|
13031
|
+
),
|
|
13032
|
+
__hardenTaming__ = /** @type {'safe' | 'unsafe'} */ (
|
|
13033
|
+
getenv('LOCKDOWN_HARDEN_TAMING', 'safe', ['unsafe'])
|
|
12694
13034
|
),
|
|
12695
|
-
__hardenTaming__ = getenv('LOCKDOWN_HARDEN_TAMING', 'safe'),
|
|
12696
13035
|
dateTaming, // deprecated
|
|
12697
13036
|
mathTaming, // deprecated
|
|
12698
13037
|
...extraOptions
|
|
12699
13038
|
} = options;
|
|
12700
13039
|
|
|
12701
|
-
legacyRegeneratorRuntimeTaming === 'safe' ||
|
|
12702
|
-
legacyRegeneratorRuntimeTaming === 'unsafe-ignore' ||
|
|
12703
|
-
Fail`lockdown(): non supported option legacyRegeneratorRuntimeTaming: ${q(legacyRegeneratorRuntimeTaming)}`;
|
|
12704
|
-
|
|
12705
|
-
evalTaming === 'unsafe-eval' ||
|
|
12706
|
-
evalTaming === 'unsafeEval' || // deprecated
|
|
12707
|
-
evalTaming === 'safe-eval' ||
|
|
12708
|
-
evalTaming === 'safeEval' || // deprecated
|
|
12709
|
-
evalTaming === 'no-eval' ||
|
|
12710
|
-
evalTaming === 'noEval' || // deprecated
|
|
12711
|
-
Fail`lockdown(): non supported option evalTaming: ${q(evalTaming)}`;
|
|
12712
|
-
|
|
12713
13040
|
// Assert that only supported options were passed.
|
|
12714
13041
|
// Use Reflect.ownKeys to reject symbol-named properties as well.
|
|
12715
13042
|
const extraOptionsNames = ownKeys(extraOptions);
|
|
@@ -12720,13 +13047,11 @@ const assertDirectEvalAvailable = () => {
|
|
|
12720
13047
|
const { warn } = reporter;
|
|
12721
13048
|
|
|
12722
13049
|
if (dateTaming !== undefined) {
|
|
12723
|
-
// eslint-disable-next-line no-console
|
|
12724
13050
|
warn(
|
|
12725
13051
|
`SES The 'dateTaming' option is deprecated and does nothing. In the future specifying it will be an error.`,
|
|
12726
13052
|
);
|
|
12727
13053
|
}
|
|
12728
13054
|
if (mathTaming !== undefined) {
|
|
12729
|
-
// eslint-disable-next-line no-console
|
|
12730
13055
|
warn(
|
|
12731
13056
|
`SES The 'mathTaming' option is deprecated and does nothing. In the future specifying it will be an error.`,
|
|
12732
13057
|
);
|
|
@@ -12744,7 +13069,19 @@ const assertDirectEvalAvailable = () => {
|
|
|
12744
13069
|
// trace retained:
|
|
12745
13070
|
priorRepairIntrinsics.stack;
|
|
12746
13071
|
|
|
12747
|
-
|
|
13072
|
+
const { functionAllowed, evalAllowed, directEvalAllowed } =
|
|
13073
|
+
probeHostEvaluators();
|
|
13074
|
+
|
|
13075
|
+
if (
|
|
13076
|
+
directEvalAllowed === false &&
|
|
13077
|
+
evalTaming === 'safe-eval' &&
|
|
13078
|
+
(functionAllowed || evalAllowed)
|
|
13079
|
+
) {
|
|
13080
|
+
// See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_DIRECT_EVAL.md
|
|
13081
|
+
throw TypeError(
|
|
13082
|
+
"SES cannot initialize unless 'eval' is the original intrinsic 'eval', suitable for direct eval (dynamically scoped eval) (SES_DIRECT_EVAL)",
|
|
13083
|
+
);
|
|
13084
|
+
}
|
|
12748
13085
|
|
|
12749
13086
|
/**
|
|
12750
13087
|
* Because of packagers and bundlers, etc, multiple invocations of lockdown
|
|
@@ -12799,7 +13136,6 @@ const assertDirectEvalAvailable = () => {
|
|
|
12799
13136
|
const { addIntrinsics, completePrototypes, finalIntrinsics } =
|
|
12800
13137
|
makeIntrinsicsCollector(reporter);
|
|
12801
13138
|
|
|
12802
|
-
// @ts-expect-error __hardenTaming__ could be any string
|
|
12803
13139
|
const tamedHarden = tameHarden(safeHarden, __hardenTaming__);
|
|
12804
13140
|
addIntrinsics({ harden: tamedHarden });
|
|
12805
13141
|
|
|
@@ -13014,7 +13350,7 @@ const assertDirectEvalAvailable = () => {
|
|
|
13014
13350
|
};$h͏_once.repairIntrinsics(repairIntrinsics);
|
|
13015
13351
|
})()
|
|
13016
13352
|
,
|
|
13017
|
-
// ===
|
|
13353
|
+
// === 57. ses ./src/lockdown-shim.js ===
|
|
13018
13354
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
13019
13355
|
|
|
13020
13356
|
|
|
@@ -13054,7 +13390,7 @@ globalThis.repairIntrinsics = options => {
|
|
|
13054
13390
|
};
|
|
13055
13391
|
})()
|
|
13056
13392
|
,
|
|
13057
|
-
// ===
|
|
13393
|
+
// === 58. ses ./src/compartment-shim.js ===
|
|
13058
13394
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
13059
13395
|
|
|
13060
13396
|
|
|
@@ -13079,14 +13415,14 @@ globalThis.Compartment = makeCompartmentConstructor(
|
|
|
13079
13415
|
);
|
|
13080
13416
|
})()
|
|
13081
13417
|
,
|
|
13082
|
-
// ===
|
|
13418
|
+
// === 59. ses ./src/assert-shim.js ===
|
|
13083
13419
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
13084
13420
|
|
|
13085
13421
|
|
|
13086
13422
|
globalThis.assert = assert;
|
|
13087
13423
|
})()
|
|
13088
13424
|
,
|
|
13089
|
-
// ===
|
|
13425
|
+
// === 60. ses ./src/console-shim.js ===
|
|
13090
13426
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,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)]]]]]);
|
|
13091
13427
|
|
|
13092
13428
|
|
|
@@ -13139,7 +13475,7 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA] =
|
|
|
13139
13475
|
makeCausalConsoleFromLoggerForSesAva;
|
|
13140
13476
|
})()
|
|
13141
13477
|
,
|
|
13142
|
-
// ===
|
|
13478
|
+
// === 61. ses ./index.js ===
|
|
13143
13479
|
({imports:$h͏_imports,liveVar:$h͏_live,onceVar:$h͏_once,import:$h͏_import,importMeta:$h͏____meta})=>(function(){'use strict';$h͏_imports([["./src/lockdown-shim.js", []],["./src/compartment-shim.js", []],["./src/assert-shim.js", []],["./src/console-shim.js", []]]);
|
|
13144
13480
|
})()
|
|
13145
13481
|
,
|