Do not retrieve wait handle off AsyncGenerator if it has failed
commit8649441c20ce125e32410dec7123bf39bbe74688
authorMichael Colavita <mcolavita@fb.com>
Thu, 15 Jul 2021 03:50:14 +0000 (14 20:50 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 15 Jul 2021 03:51:20 +0000 (14 20:51 -0700)
treeba58db8a348fc6daa64e421326ec7169c0b273d1
parentca5b64bc0efeb81cab35a82094f27c67b5301e06
Do not retrieve wait handle off AsyncGenerator if it has failed

Summary:
When retrieving the resumed wait handle, we must be careful not to extract the
wait handle from a failed generator, even if it still exists on the stack.

Reviewed By: ricklavoie

Differential Revision: D29704013

fbshipit-source-id: 36a2c571e8e6e3bb890d096b5cd699f3d3971bc8
hphp/runtime/ext/asio/ext_asio.cpp
hphp/test/slow/generator_fail.php [new file with mode: 0644]
hphp/test/slow/generator_fail.php.expectf [new file with mode: 0644]