| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 9ee23698cf6f578e76e5316c204b8ab17a40658c..71947f35f9fe3e626728e4ada1904f48e44ddf13 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -3072,6 +3072,31 @@ bool v8::Object::Set(uint32_t index, v8::Handle<Value> value) {
|
| }
|
|
|
|
|
| +bool v8::Object::Set(v8::Object::CachedProperty key,
|
| + v8::Handle<Value> value,
|
| + v8::PropertyAttribute attribs) {
|
| + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| + ON_BAILOUT(isolate, "v8::Object::Set()", return false);
|
| + ENTER_V8(isolate);
|
| + i::HandleScope scope(isolate);
|
| + i::Handle<i::Object> self = Utils::OpenHandle(this);
|
| + i::Handle<i::Object> key_obj = Utils::OpenHandle(*key.key_);
|
| + i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
|
| + EXCEPTION_PREAMBLE(isolate);
|
| + i::Handle<i::Object> obj = i::SetProperty(
|
| + isolate,
|
| + self,
|
| + key_obj,
|
| + value_obj,
|
| + static_cast<PropertyAttributes>(attribs),
|
| + i::kNonStrictMode,
|
| + key.cache_);
|
| + has_pending_exception = obj.is_null();
|
| + EXCEPTION_BAILOUT_CHECK(isolate, false);
|
| + return true;
|
| +}
|
| +
|
| +
|
| bool v8::Object::ForceSet(v8::Handle<Value> key,
|
| v8::Handle<Value> value,
|
| v8::PropertyAttribute attribs) {
|
| @@ -3145,6 +3170,24 @@ Local<Value> v8::Object::Get(uint32_t index) {
|
| }
|
|
|
|
|
| +Local<Value> v8::Object::Get(v8::Object::CachedProperty key) {
|
| + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| + ON_BAILOUT(isolate, "v8::Object::Get()", return Local<v8::Value>());
|
| + ENTER_V8(isolate);
|
| + i::Handle<i::Object> self = Utils::OpenHandle(this);
|
| + i::Handle<i::Object> key_obj = Utils::OpenHandle(*key.key_);
|
| + EXCEPTION_PREAMBLE(isolate);
|
| + i::Handle<i::Object> result = i::GetProperty(isolate,
|
| + self,
|
| + key_obj,
|
| + key.cache_);
|
| + has_pending_exception = result.is_null();
|
| + EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>());
|
| +
|
| + return Utils::ToLocal(result);
|
| +}
|
| +
|
| +
|
| PropertyAttribute v8::Object::GetPropertyAttributes(v8::Handle<Value> key) {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| ON_BAILOUT(isolate, "v8::Object::GetPropertyAttribute()",
|
| @@ -5494,6 +5537,13 @@ bool v8::String::CanMakeExternal() {
|
| }
|
|
|
|
|
| +v8::Object::CachedProperty::CachedProperty(v8::Handle<v8::String> key) {
|
| + i::Isolate* isolate = Utils::OpenHandle(*key)->GetIsolate();
|
| + key_ = Persistent<String>::New(reinterpret_cast<v8::Isolate*>(isolate), key);
|
| + cache_ = new i::LookupCache(isolate);
|
| +}
|
| +
|
| +
|
| Local<v8::Object> v8::Object::New() {
|
| i::Isolate* isolate = i::Isolate::Current();
|
| EnsureInitializedForIsolate(isolate, "v8::Object::New()");
|
|
|