From d7af84b7ddd2626a8138efe471587510840e2bf0 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Thu, 5 Jul 2018 09:21:36 +0200 Subject: [PATCH] TODO Fixme for v8js_v8object_get_gc() --- v8js_v8object_class.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/v8js_v8object_class.cc b/v8js_v8object_class.cc index 79cc07a..9e4680b 100644 --- a/v8js_v8object_class.cc +++ b/v8js_v8object_class.cc @@ -211,15 +211,18 @@ static HashTable *v8js_v8object_get_properties(zval *object) /* {{{ */ if (obj->properties == NULL) { #if PHP_VERSION_ID >= 70300 - zend_gc_status gc_status; - zend_gc_get_status(&gc_status); - if (gc_status.runs) { + /* + TODO: Fixme + 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 if (GC_G(gc_active)) { -#endif /* the garbage collector is running, don't create more zvals */ return NULL; } +#endif ALLOC_HASHTABLE(obj->properties); zend_hash_init(obj->properties, 0, NULL, ZVAL_PTR_DTOR, 0);