archives

« Bugzilla Issues Index

#3118 — Reflect.Loader.prototype.set should reject non-module arguments


LinkDeclarativeModules assumes that modules in the Loader's [[Modules]] registry are actual Module objects:

- Step 3 makes a List 'resolvedDeps' of Records mapping module names to Module Objects. Items from the Loader's [[Modules]] registry can be stored in this List. The List is stored in pair.[[Module]].[[Dependencies]].

- Step 5 calls ResolveImportEntries and LinkImports, which are meant to use the module's [[Dependencies]] to link it to the other modules it depends on.

Anyway -- as far as I know, because linking requires actual module objects, Reflect.Loader.prototype.set must do a type check and refuse to add non-module objects to the registry.


concerns old module spec.