* restore unsafe cache data * @param {UnsafeCacheData} unsafeCacheData data from getUnsafeCacheData * @param {NormalModuleFactory} normalModuleFactory the normal module factory handling the unsafe caching
(unsafeCacheData, normalModuleFactory)
| 1072 | * @param {NormalModuleFactory} normalModuleFactory the normal module factory handling the unsafe caching |
| 1073 | */ |
| 1074 | _restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory) { |
| 1075 | super._restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory); |
| 1076 | this.parserOptions = unsafeCacheData.parserOptions; |
| 1077 | this.parser = normalModuleFactory.getParser(this.type, this.parserOptions); |
| 1078 | this.generatorOptions = unsafeCacheData.generatorOptions; |
| 1079 | this.generator = normalModuleFactory.getGenerator( |
| 1080 | this.type, |
| 1081 | this.generatorOptions |
| 1082 | ); |
| 1083 | // we assume the generator behaves identically and keep cached sourceTypes/Sizes |
| 1084 | } |
| 1085 | |
| 1086 | /** |
| 1087 | * @param {string} context the compilation context |
no test coverage detected