Skip to content

Commit

Permalink
Merge pull request phpv8#74 from cscott/dtor-simple
Browse files Browse the repository at this point in the history
Simplify php_v8js_weak_object_callback.
  • Loading branch information
satoshi75nakamoto committed Oct 27, 2013
2 parents 38837af + 892c654 commit 6eeafc0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions v8js_convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6eeafc0

Please sign in to comment.