Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 91946417719a56490131ce34e77346d1fbbb05f0..761f7083dd16b9369296be2e15c22f1ef9418fd4 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -3255,6 +3255,18 @@ int v8::Object::GetIndexedPropertiesExternalArrayDataLength() { |
} |
+bool v8::Object::IsCallable() { |
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
+ ON_BAILOUT(isolate, "v8::Object::IsCallable()", return false); |
+ ENTER_V8(isolate); |
+ i::HandleScope scope(isolate); |
+ i::Handle<i::JSObject> obj = Utils::OpenHandle(this); |
+ if (obj->IsJSFunction()) |
Mads Ager (chromium)
2011/05/09 11:38:52
Either make this a one-liner or use braces.
|
+ return true; |
Mads Ager (chromium)
2011/05/09 11:38:52
Two-space indent please.
|
+ return i::Execution::GetFunctionDelegate(obj)->IsJSFunction(); |
+} |
+ |
+ |
Local<v8::Value> Object::CallAsFunction(v8::Handle<v8::Object> recv, int argc, |
v8::Handle<v8::Value> argv[]) { |
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |