mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-03 18:01:53 +00:00
TODO Fixme for v8js_v8object_get_gc()
This commit is contained in:
parent
79fffb6418
commit
d7af84b7dd
@ -211,15 +211,18 @@ static HashTable *v8js_v8object_get_properties(zval *object) /* {{{ */
|
|||||||
|
|
||||||
if (obj->properties == NULL) {
|
if (obj->properties == NULL) {
|
||||||
#if PHP_VERSION_ID >= 70300
|
#if PHP_VERSION_ID >= 70300
|
||||||
zend_gc_status gc_status;
|
/*
|
||||||
zend_gc_get_status(&gc_status);
|
TODO: Fixme
|
||||||
if (gc_status.runs) {
|
The right way to handle this is to implement a get_gc() handler,
|
||||||
|
which is called instead of get_properties() during GC.
|
||||||
|
https://github.com/phpv8/v8js/pull/363#pullrequestreview-134439462
|
||||||
|
*/
|
||||||
#else
|
#else
|
||||||
if (GC_G(gc_active)) {
|
if (GC_G(gc_active)) {
|
||||||
#endif
|
|
||||||
/* the garbage collector is running, don't create more zvals */
|
/* the garbage collector is running, don't create more zvals */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ALLOC_HASHTABLE(obj->properties);
|
ALLOC_HASHTABLE(obj->properties);
|
||||||
zend_hash_init(obj->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
zend_hash_init(obj->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user