You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
link SourceTextModuleRecord "https://tc39.es/ecma262/multipage/ecmascript-language-scripts-and-modules.html#sourctextmodule-record"
74
+
note for SourceTextModuleRecord "<ahref=https://tc39.es/ecma262/multipage/ecmascript-language-scripts-and-modules.html#sec-source-text-module-record-initialize-environment>InitializeEnvironment()</a><br>to use [[ScopeCeiling]]<br>instead of realm.[[GlobalEnv]]<br>for NewModuleEnvironment(OuterEnv)<br>if [[ScopeCeiling]] not EMPTY"
75
+
76
+
class ScopeCeiling:::added {
77
+
[[OuterEnv]] = null
78
+
[[BindingObject]] handles the globalThis binding and var
79
+
:
80
+
inheriting from ObjectEnvironmentRecord is sufficient,
81
+
but all bindings are dynamic andcould be slower than
82
+
a mix of ObjectRecord and DeclarativeRecord
83
+
}
84
+
85
+
class EnvironmentRecord {
86
+
<<abstract>>
87
+
[[OuterEnv]] : Environment Record | null
88
+
}
89
+
link EnvironmentRecord "https://tc39.es/ecma262/#sec-environment-records"
90
+
91
+
92
+
93
+
class DeclarativeEnvironmentRecord {
94
+
}
95
+
link DeclarativeEnvironmentRecord "https://tc39.es/ecma262/#sec-declarative-environment-records"
96
+
97
+
class ObjectEnvironmentRecord {
98
+
[[BindingObject]] : Object
99
+
[[IsWithEnvironment]] : Boolean
100
+
}
101
+
102
+
class GlobalEnvironmentRecord {
103
+
[[ObjectRecord]] : Object Environment Record
104
+
[[GlobalThisValue]] : Object
105
+
[[DeclarativeRecord]] : Declarative Environment Record
106
+
[[OuterEnv]] = null
107
+
}
108
+
109
+
class ModuleEnvironmentRecord {
110
+
[[OuterEnv]] : Environment Record
111
+
}
112
+
link ModuleEnvironmentRecord "https://tc39.es/ecma262/#sec-module-environment-records"
113
+
114
+
class RealmRecord {
115
+
[[AgentSignifier]]
116
+
[[Intrinsics]]
117
+
[[GlobalObject]] : Object
118
+
[[GlobalEnv]] : Global Environment Record
119
+
[[TemplateMap]]
120
+
[[LoadedModules]]
121
+
[[HostDefined]]
122
+
}
123
+
124
+
class ExecutionContext {
125
+
code evaluation state
126
+
Function : function object | null
127
+
Realm : Realm Record
128
+
ScriptOrModule : Module Record | Script Record | null
129
+
}
130
+
link ExecutionContext "https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-execution-contexts"
131
+
note for ExecutionContext "<ahref=https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-resolvebinding>ResolveBinding()</a> consults ModuleEnvironmentRecord"
132
+
133
+
class ECMAScriptCodeExecutionContext {
134
+
LexicalEnvironment : Environment Record
135
+
VariableEnvironment : Environment Record
136
+
PrivateEnvironment : PrivateEnvironment Record | null
137
+
}
138
+
link ECMAScriptCodeExecutionContext "https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#ecmascript-code-execution-context"
No updates, other than supply-chain security concerns escalating
21
+
Updates external to this proposal:
22
+
23
+
- Severity of supply-chain security concerns
24
+
- Support from 1Password
25
+
26
+
---
27
+
28
+

29
+
30
+
---
31
+
32
+
> How standards help LavaMoat and us: LavaMoat currently relies on a SES shim and uses string-based evaluation and `with` statements to construct compartments. Language support for compartmentalization would provide a better foundation for these protections as the JavaScript ecosystem evolves and would minimize the compatibility and performance issues stemming from the shim’s fidelity.
33
+
22
34
23
35
---
24
36
## Problem statement review
25
37
26
38
We got Stage 1 for the following problem statement:
27
39
> A way to evaluate a module and its dependencies in the context of a new global scope within the same Realm
28
40
29
-
Aiming to achieve it by severing the tie to the `GlobalEnvironmentRecord` in `ModuleEnvironmentRecord` instances (optionally)
30
-
by setting `[[OuterEnv]]` to a different record than `module.[[Realm]].[[GlobalEnv]]`, replacing it with user-defined emulation of a global
41
+
Aiming to achieve it by severing the tie to the `GlobalEnvironmentRecord` in `ModuleEnvironmentRecord` instances by allowing setting `[[OuterEnv]]` to a different record than `module.[[Realm]].[[GlobalEnv]]`, replacing it with user-defined emulation of a global.
31
42
32
43
Feedback addressed: No multiple Globals in one Realm
33
44
@@ -36,6 +47,19 @@ Feedback addressed: No multiple Globals in one Realm
0 commit comments