( file, cacheEntry, size )
| 956 | * @param {number} size size |
| 957 | */ |
| 958 | const updateFileWithReplacementSource = ( |
| 959 | file, |
| 960 | cacheEntry, |
| 961 | size |
| 962 | ) => { |
| 963 | class="cm">// Create a replacement resource which only allows to ask for size |
| 964 | class="cm">// This allows to GC all memory allocated by the Source |
| 965 | class="cm">// (expect when the Source is stored in any other cache) |
| 966 | if (!cacheEntry.sizeOnlySource) { |
| 967 | cacheEntry.sizeOnlySource = new SizeOnlySource(size); |
| 968 | } |
| 969 | compilation.updateAsset(file, cacheEntry.sizeOnlySource, { |
| 970 | size |
| 971 | }); |
| 972 | }; |
| 973 | |
| 974 | /** |
| 975 | * Process existing file. |
nothing calls this directly
no test coverage detected