Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 538071af1924a2dd24b627a6bcfb813a9bcfc2fc..00db4e316e00e2bc965f70d3e825ab2da9b65242 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -2383,6 +2383,14 @@ bool Value::IsNumber() const { |
} |
+bool Value::IsArgumentsObject() const { |
+ i::Handle<i::Object> obj = Utils::OpenHandle(this); |
+ if (!obj->IsHeapObject()) return false; |
+ i::Isolate* isolate = i::HeapObject::cast(*obj)->GetIsolate(); |
+ return obj->HasSpecificClassOf(isolate->heap()->Arguments_string()); |
Yang
2014/08/12 10:53:46
I don't think this is fool-proof. You could always
|
+} |
+ |
+ |
bool Value::IsBoolean() const { |
return Utils::OpenHandle(this)->IsBoolean(); |
} |