( compartmentPrivateFields, moduleAliases, compartment, moduleSpecifier)
| 8962 | // property descriptors for their exports, which the Compartment proxies with |
| 8963 | // the actual `ModuleNamespace`. |
| 8964 | const link= ( |
| 8965 | compartmentPrivateFields, |
| 8966 | moduleAliases, |
| 8967 | compartment, |
| 8968 | moduleSpecifier)=> |
| 8969 | { |
| 8970 | const { name: compartmentName, moduleRecords}= weakmapGet( |
| 8971 | compartmentPrivateFields, |
| 8972 | compartment); |
| 8973 | |
| 8974 | |
| 8975 | const moduleRecord= mapGet(moduleRecords, moduleSpecifier); |
| 8976 | if( moduleRecord=== undefined) { |
| 8977 | throw ReferenceError( |
| 8978 | `Missing link to module ${q(moduleSpecifier)} from compartment ${q( |
| 8979 | compartmentName) |
| 8980 | }`); |
| 8981 | |
| 8982 | } |
| 8983 | |
| 8984 | // Mutual recursion so there's no confusion about which |
| 8985 | // compartment is in context: the module record may be in another |
| 8986 | // compartment, denoted by moduleRecord.compartment. |
| 8987 | // eslint-disable-next-line no-use-before-define |
| 8988 | return instantiate(compartmentPrivateFields, moduleAliases, moduleRecord); |
| 8989 | };$h_once.link(link); |
| 8990 | |
| 8991 | function isPrecompiled(staticModuleRecord) { |
| 8992 | return typeof staticModuleRecord.__syncModuleProgram__=== 'string'; |
no test coverage detected