Use weakref in libxml
commit230beaa2bb28e1968b73c762520a784192f0cccf
authorEmil Hesslow <emil@fb.com>
Wed, 3 Apr 2019 17:13:08 +0000 (3 10:13 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 3 Apr 2019 17:24:09 +0000 (3 10:24 -0700)
tree3ec5d20079298beae34e56445bf1a9c2a6b404ad
parentb83b9a25a22606266d3a690dbda2089800943eb2
Use weakref in libxml

Summary:
- Using ObjectData* is not safe
- Because we may decref the object it points to but not free it yet.
- We may then use the ObjectData* to create a reference to it again. And going from 0 to 1 refcount is not allowed

Reviewed By: jano, alexeyt

Differential Revision: D14685358

fbshipit-source-id: 5d47910b6f052c3a0ce2fdf7c0a77aff3efdf476
hphp/runtime/ext/domdocument/ext_domdocument.h
hphp/runtime/ext/libxml/ext_libxml.h