[wasm] Properly terminate the wasmparser worker.

Before we had been leaking all the wasmparser workers.

Bug: chromium:1071432
Change-Id: Ice230c7aa4355facd85202aec02ed01d7fe9c447
Fixed: chromium:1091230
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230505
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
This commit is contained in:
Benedikt Meurer
2020-06-04 13:24:47 +00:00
committed by Commit Bot
parent 12fe69628a
commit f4bb2ff0dc
+1 -1
View File
@@ -330,8 +330,8 @@ export class SourceFrameImpl extends UI.View.SimpleView {
worker.onerror = reject;
});
worker.postMessage({method: 'disassemble', params: {content}});
const {source, offsets, functionBodyOffsets} = await promise;
worker.terminate();
this._rawContent = source;
this._wasmDisassembly = new Common.WasmDisassembly.WasmDisassembly(offsets, functionBodyOffsets);
}