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:
commit
6eeafc0f83
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user