Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 (function () { | |
| 2 var xhr = new XMLHttpRequest(); | |
| 3 xhr.open('GET', 'does-not-exist.js'); | |
| 4 xhr.onerror = () => { postMessage('done'); }; | |
| 5 xhr.send(); | |
| 6 })(); | |
| 7 // |xhr| isn't in scope, but it will signal pending activity | |
| 8 // when the GC runs, hence will be kept alive and allowed to | |
| 9 // run to completion. | |
| 10 self.gc(); | |
| OLD | NEW |