While debugging an issue around OOM on page reload today, I discovered that opening devtools may impact the reason for running OOM.
When devtools is open (or opened), we create a WasmTranslation to be able to map WebAssembly byte code to a textual representation for presentation in dev tools. As disassembling bytecode is costly and doing so eagerly when opening devtools leads to long pauses, we aim to do it lazily. This, however, requires that the WasmTranslation holds on the the wirebytes for later decoding. That is implemented by holding a reference to the corresponding WasmModuleObject.
Debugtools seem to keep the translation alive long enough after a page reload, that the module remains while the new module is being compiled. Hence we need twice the address space than under normal page load conditions.
Comment 1 by herhut@chromium.org
, Dec 7