mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-14 03:48:41 +00:00
Skip unnecessary v8::FunctionTemplate fluff
This commit is contained in:
parent
3f6ea8fcfd
commit
1121d5f4d0
@ -948,10 +948,7 @@ static void php_v8js_array_access_length(v8::Local<v8::String> property, const v
|
|||||||
|
|
||||||
static v8::Handle<v8::Value> php_v8js_array_access_to_jsobj(zval *value, v8::Isolate *isolate TSRMLS_DC) /* {{{ */
|
static v8::Handle<v8::Value> php_v8js_array_access_to_jsobj(zval *value, v8::Isolate *isolate TSRMLS_DC) /* {{{ */
|
||||||
{
|
{
|
||||||
v8::Local<v8::FunctionTemplate> aa_tpl = v8::FunctionTemplate::New(isolate, 0);
|
v8::Local<v8::ObjectTemplate> inst_tpl = v8::ObjectTemplate::New(isolate);
|
||||||
aa_tpl->SetClassName(V8JS_SYM("ArrayAccess"));
|
|
||||||
|
|
||||||
v8::Local<v8::ObjectTemplate> inst_tpl = aa_tpl->InstanceTemplate();
|
|
||||||
inst_tpl->SetIndexedPropertyHandler(php_v8js_array_access_getter);
|
inst_tpl->SetIndexedPropertyHandler(php_v8js_array_access_getter);
|
||||||
inst_tpl->SetAccessor(V8JS_STR("length"), php_v8js_array_access_length);
|
inst_tpl->SetAccessor(V8JS_STR("length"), php_v8js_array_access_length);
|
||||||
inst_tpl->SetInternalFieldCount(1);
|
inst_tpl->SetInternalFieldCount(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user