Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 71a715c1bb28b20189b91421f7605518f9174f98..e2ca7f6ad66141327f7b94ece8a78417f18dc946 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -2712,6 +2712,22 @@ Local<Value> v8::Object::Get(uint32_t index) { |
} |
+PropertyAttribute v8::Object::GetPropertyAttribute(v8::Handle<Value> key) { |
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
+ ON_BAILOUT(isolate, "v8::Object::GetPropertyAttribute()", |
+ return static_cast<PropertyAttribute>(NONE)); |
+ ENTER_V8(isolate); |
+ i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
+ i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); |
+ EXCEPTION_PREAMBLE(isolate); |
+ i::Handle<i::String> name = i::Handle<i::String>::cast(key_obj); |
Mads Ager (chromium)
2011/07/12 07:51:30
This will not work if you pass in some other objec
|
+ PropertyAttributes result = self->GetPropertyAttribute(*name); |
+ has_pending_exception = (result == ABSENT); |
Mads Ager (chromium)
2011/07/12 07:51:30
Let's not misuse has_pending_exception for this. J
|
+ EXCEPTION_BAILOUT_CHECK(isolate, static_cast<PropertyAttribute>(NONE)); |
+ return static_cast<PropertyAttribute>(result); |
+} |
+ |
+ |
Local<Value> v8::Object::GetPrototype() { |
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
ON_BAILOUT(isolate, "v8::Object::GetPrototype()", |