Reland of Fix async/await memory leak (patchset #1 id:1 of...
Reland of Fix async/await memory leak (patchset #1 id:1 of https://codereview.chromium.org/2348403003/ ) This patch closes a memory leak in async/await where the desugaring was creating a situation analagous to that described in v8:5002. Intermediate Promises were being kept alive, so a long-running loop would cause linear memory usage on the heap. This patch returns undefined to the 'then' callback passed into PerformPromiseThen in order to avoid this hazard. Test expectations are fixed to remove expecting extraneous events which occurred on Promises that are now not given unnecessarily complex resolution paths before being thrown away. This patch is a reland; originally, tests which exercised the memory exhaustion were checked in. Although it's possible to find good parameters for running such tests locally, it is difficult to automate the tests between the rock of timeouts and the hard place of too-small heaps causing memory exhaustion in some modes even when there is no leak. BUG=v8:5390 Review-Url: https://codereview.chromium.org/2352933002 Cr-Commit-Position: refs/heads/master@{#39520}
Showing
Please
register
or
sign in
to comment