Fix refcounting issue in Map
commit5faefc41be4debbfb4e43ccc36c4949fb9df202f
authorShaunak Kishore <kshaunak@fb.com>
Wed, 10 Jun 2020 22:29:09 +0000 (10 15:29 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 10 Jun 2020 22:32:36 +0000 (10 15:32 -0700)
tree8196509274c92640b3dcad68585c2b9b777ea4c6
parent9a04ef62b82c117fd7cd30cf78032db395f62aef
Fix refcounting issue in Map

Summary: I was a fool to try to use a smart pointer here. The behavior of our core array functions is not "homogenous" in refcount - for example, toDict produces a refcount if it creates a new array, but it has no refcounting effect if executes in place. We need to handle each step carefully, and differently.

Reviewed By: alexeyt, leikahing

Differential Revision: D21975816

fbshipit-source-id: b310d118f2d3673d4d1274aecd130ddc3819a7be
hphp/runtime/ext/collections/ext_collections-map.cpp