Selaa lähdekoodia

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 10 vuotta sitten
vanhempi
commit
50b36d2cf5
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  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