mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 14:01:53 +00:00
Merge pull request #74 from cscott/dtor-simple
Simplify php_v8js_weak_object_callback.
This commit is contained in:
commit
6eeafc0f83
@ -260,12 +260,7 @@ static void php_v8js_weak_object_callback(const v8::WeakCallbackData<v8::Object,
|
||||
v8::Isolate *isolate = data.GetIsolate();
|
||||
zval *value = data.GetParameter();
|
||||
V8JS_TSRMLS_FETCH();
|
||||
if (READY_TO_DESTROY(value)) {
|
||||
zval_dtor(value);
|
||||
FREE_ZVAL(value);
|
||||
} else {
|
||||
Z_DELREF_P(value);
|
||||
}
|
||||
zval_ptr_dtor(&value);
|
||||
|
||||
v8::V8::AdjustAmountOfExternalAllocatedMemory(-1024);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user