Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 0d88047aa212f4d0abcba489cae3247774e6e397..e3596bef7a2f06e65e3383946d8f459aaf6f7046 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -3031,6 +3031,17 @@ Local<String> v8::Object::ObjectProtoToString() { |
} |
+Local<Value> v8::Object::GetConstructor() { |
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
+ ON_BAILOUT(isolate, "v8::Object::GetConstructor()", |
+ return Local<v8::Function>()); |
+ ENTER_V8(isolate); |
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
+ i::Handle<i::Object> constructor(self->GetConstructor()); |
+ return Utils::ToLocal(constructor); |
+} |
+ |
+ |
Local<String> v8::Object::GetConstructorName() { |
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
ON_BAILOUT(isolate, "v8::Object::GetConstructorName()", |