| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 71a715c1bb28b20189b91421f7605518f9174f98..45a62aba109f2951760e749593a22f4280ad8591 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -2919,6 +2919,60 @@ bool Object::SetAccessor(Handle<String> name,
|
| }
|
|
|
|
|
| +bool v8::Object::DefineGetter(Handle<String> name, Handle<Value> fun) {
|
| + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| + ON_BAILOUT(isolate, "v8::Object::DefineGetter()", return false);
|
| + ENTER_V8(isolate);
|
| + i::HandleScope scope(isolate);
|
| + i::Handle<i::Object> result = i::SetAccessor(Utils::OpenHandle(this),
|
| + Utils::OpenHandle(*name),
|
| + true,
|
| + Utils::OpenHandle(*fun),
|
| + NONE);
|
| + return !result.is_null() && !result->IsUndefined();
|
| +}
|
| +
|
| +
|
| +bool v8::Object::DefineSetter(Handle<String> name, Handle<Value> fun) {
|
| + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| + ON_BAILOUT(isolate, "v8::Object::DefineSetter()", return false);
|
| + ENTER_V8(isolate);
|
| + i::HandleScope scope(isolate);
|
| + i::Handle<i::Object> result = i::SetAccessor(Utils::OpenHandle(this),
|
| + Utils::OpenHandle(*name),
|
| + false,
|
| + Utils::OpenHandle(*fun),
|
| + NONE);
|
| + return !result.is_null() && !result->IsUndefined();
|
| +}
|
| +
|
| +
|
| +Local<v8::Value> v8::Object::LookupGetter(Handle<String> name) {
|
| + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| + ON_BAILOUT(isolate, "v8::Object::LookupGetter()",
|
| + return Local<v8::Value>());
|
| + ENTER_V8(isolate);
|
| + i::HandleScope scope(isolate);
|
| + i::Handle<i::Object> result = i::GetAccessor(Utils::OpenHandle(this),
|
| + Utils::OpenHandle(*name),
|
| + true);
|
| + return v8::Utils::ToLocal(scope.CloseAndEscape(result));
|
| +}
|
| +
|
| +
|
| +Local<v8::Value> v8::Object::LookupSetter(Handle<String> name) {
|
| + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| + ON_BAILOUT(isolate, "v8::Object::LookupSetter()",
|
| + return Local<v8::Value>());
|
| + ENTER_V8(isolate);
|
| + i::HandleScope scope(isolate);
|
| + i::Handle<i::Object> result = i::GetAccessor(Utils::OpenHandle(this),
|
| + Utils::OpenHandle(*name),
|
| + false);
|
| + return v8::Utils::ToLocal(scope.CloseAndEscape(result));
|
| +}
|
| +
|
| +
|
| bool v8::Object::HasOwnProperty(Handle<String> key) {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| ON_BAILOUT(isolate, "v8::Object::HasOwnProperty()",
|
|
|