Complete destructor for HhvmDeclProvider
commitf318993022b9cfd0162d67e099d0240e11cdb82a
authorSteve Cao <shiqicao@fb.com>
Fri, 16 Jul 2021 01:16:57 +0000 (15 18:16 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 16 Jul 2021 01:18:52 +0000 (15 18:18 -0700)
tree62044d3984d5761dd57e15e3b6b35e12c20a338a
parentf9f85c714db9f8e3ee1bb78186ca5b443e3de918
Complete destructor for HhvmDeclProvider

Summary:
- move `DeclResult` into `internal` module, so all fields are not accessible by parent module. All constructing/desctructing must go through `new` and `into_parts`, this guarantees the raw pointer is leaked from a `Box`.
- added `hackc_free_decl_result`, which re-box a leaked value, then it will be correctly dropped at the end of the function scope.

Reviewed By: shayne-fletcher

Differential Revision: D29475320

fbshipit-source-id: 78669a23a20c93ae096195d3db2cc756deff7dcd
hphp/hack/src/decl/cpp_ffi/decl_cpp_ffi.rs
hphp/hack/src/decl/cpp_ffi/decl_ffi.h
hphp/hack/src/decl/cpp_ffi/decl_ffi_types.h
hphp/runtime/vm/hhvm_decl_provider.cpp
hphp/runtime/vm/hhvm_decl_provider.h