0
0
mirror of https://github.com/phpv8/v8js.git synced 2025-01-03 15:41:55 +00:00

Merge pull request #74 from cscott/dtor-simple

Simplify php_v8js_weak_object_callback.
This commit is contained in:
Patrick Reilly 2013-10-27 10:32:14 -07:00
commit 6eeafc0f83

View File

@ -260,12 +260,7 @@ static void php_v8js_weak_object_callback(const v8::WeakCallbackData<v8::Object,
v8::Isolate *isolate = data.GetIsolate(); v8::Isolate *isolate = data.GetIsolate();
zval *value = data.GetParameter(); zval *value = data.GetParameter();
V8JS_TSRMLS_FETCH(); V8JS_TSRMLS_FETCH();
if (READY_TO_DESTROY(value)) { zval_ptr_dtor(&value);
zval_dtor(value);
FREE_ZVAL(value);
} else {
Z_DELREF_P(value);
}
v8::V8::AdjustAmountOfExternalAllocatedMemory(-1024); v8::V8::AdjustAmountOfExternalAllocatedMemory(-1024);
} }