Explorar o código

Don't explicitly indicate constructor, let V8 figure out

The GetConstructor function was removed from v8::Object which
would require some work to find out.  But V8 can do it
internally, so just leave it to V8 :)
Stefan Siegl %!s(int64=10) %!d(string=hai) anos
pai
achega
50b36d2cf5
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      v8js_convert.cc

+ 3 - 1
v8js_convert.cc

@@ -654,7 +654,9 @@ static inline v8::Local<v8::Value> php_v8js_named_property_callback(v8::Local<v8
 	) {
 		if (callback_type == V8JS_PROP_GETTER) {
 			if (is_constructor) {
-				ret_value = self->GetConstructor();
+				// Don't set a return value here, i.e. indicate that we don't
+				// have a special value.  V8 "knows" the constructor anyways
+				// (from the template) and will use that.
 			} else {
 				if (is_magic_call && method_ptr==NULL) {
 					// Fake __call implementation