* Sets the value for the given key, associated with the given module * instance. * @param {string[]} keys array of urls to index the value entry. * @param {*} sourceMapData the value entry. * @param {object} moduleInstance an object that can be weakly referenced and * invalidate the
(keys, sourceMapData, moduleInstance)
| 65 | * invalidate the [key, value] entry after this object is reclaimed. |
| 66 | */ |
| 67 | set(keys, sourceMapData, moduleInstance) { |
| 68 | const weakRef = new SafeWeakRef(moduleInstance); |
| 69 | ArrayPrototypeForEach(keys, (key) => this.#weakModuleMap.set(key, weakRef)); |
| 70 | moduleInstance[source_map_data_private_symbol] = sourceMapData; |
| 71 | this.#finalizationRegistry.register(moduleInstance, { keys }); |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Get an entry by the given key. |
no test coverage detected