archives

« Bugzilla Issues Index

#3013 — [[Module]] isn't a Module object, its a ModuleLinkage Record


The definition in

15.2.3.2 Load Records and LoadRequest Objects

[[Module]] The Module object produced by this load, or undefined

compounds the confusion caused by the unfortunately ambiguous naming of [[Module]] and newModule().

As far as I can tell [[Module]] is a ModuleLinkage record, that is metatdata about a module created by 15.2.5.1.1 CreateModuleLinkageRecord. It includes a property `.module` set in 15.2.5.6 LinkDynamicModules. This property has the properties of a "Module Instance Object" which is not defined in the spec, but seem to be the type that should be returned by `newModule()`. In other words, "[[Module]].module" isA Module.

Changing the definition above to "The ModuleLinkage record produced by this load or undefined" would help a bit. Changing [[Module]] to [[ModuleLinkage]] would help dramatically. Then we could say "[[ModuleLinkage]].module isA Module".


fixed in rev28 editor's draft


fixed in rev28