소스 검색

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 년 전
부모
커밋
50b36d2cf5
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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