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
In presenting the updated proposal at TG3 today, @ljharb brought up the question of whether we should be freezing the ModuleSource object, to avoid mutations from applying to all source phase importers of the same source.
There seem to be three options here:
Freeze the entire object
Freeze the ModuleSource instance, while leaving its prototype unfrozen, this would allow hardened environments to then freeze the prototype object to create the secure context.
The default path - not freezing, and then to separately ensure instrumentation is always possible.
In the case where not freezing is followed, we discussed a source phase hook in the instancing / loader model to ensure that it would be possible to provide this, with the caveat that only a real source phase (with the source phase internal slot) would be able to be provided.
This also relates somewhat to the concept of resolution metadata, where every source object would be associated with host-loader-local resolution information. So that all sources provided to users should be explicitly hooked somehow to ensure existence in this local set as soon as they are available.
The text was updated successfully, but these errors were encountered:
Option 1 we basically don't ever do unless it's a null object; option 2 would be reasonable. However, from discussion in today's TG3 meeting, it doesn't seem critical, and option 3 would also be acceptable.
In presenting the updated proposal at TG3 today, @ljharb brought up the question of whether we should be freezing the
ModuleSource
object, to avoid mutations from applying to all source phase importers of the same source.There seem to be three options here:
ModuleSource
instance, while leaving its prototype unfrozen, this would allow hardened environments to then freeze the prototype object to create the secure context.In the case where not freezing is followed, we discussed a source phase hook in the instancing / loader model to ensure that it would be possible to provide this, with the caveat that only a real source phase (with the source phase internal slot) would be able to be provided.
This also relates somewhat to the concept of resolution metadata, where every source object would be associated with host-loader-local resolution information. So that all sources provided to users should be explicitly hooked somehow to ensure existence in this local set as soon as they are available.
The text was updated successfully, but these errors were encountered: