OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2721 | 2721 |
2722 | 2722 |
2723 bool v8::Object::Set(uint32_t index, v8::Handle<Value> value) { | 2723 bool v8::Object::Set(uint32_t index, v8::Handle<Value> value) { |
2724 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 2724 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
2725 ON_BAILOUT(isolate, "v8::Object::Set()", return false); | 2725 ON_BAILOUT(isolate, "v8::Object::Set()", return false); |
2726 ENTER_V8(isolate); | 2726 ENTER_V8(isolate); |
2727 i::HandleScope scope(isolate); | 2727 i::HandleScope scope(isolate); |
2728 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2728 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
2729 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); | 2729 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); |
2730 EXCEPTION_PREAMBLE(isolate); | 2730 EXCEPTION_PREAMBLE(isolate); |
2731 i::Handle<i::Object> obj = i::SetElement( | 2731 i::Handle<i::Object> obj = i::JSObject::SetElement( |
2732 self, | 2732 self, |
2733 index, | 2733 index, |
2734 value_obj, | 2734 value_obj, |
2735 i::kNonStrictMode); | 2735 i::kNonStrictMode); |
2736 has_pending_exception = obj.is_null(); | 2736 has_pending_exception = obj.is_null(); |
2737 EXCEPTION_BAILOUT_CHECK(isolate, false); | 2737 EXCEPTION_BAILOUT_CHECK(isolate, false); |
2738 return true; | 2738 return true; |
2739 } | 2739 } |
2740 | 2740 |
2741 | 2741 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2827 return static_cast<PropertyAttribute>(result); | 2827 return static_cast<PropertyAttribute>(result); |
2828 } | 2828 } |
2829 | 2829 |
2830 | 2830 |
2831 Local<Value> v8::Object::GetPrototype() { | 2831 Local<Value> v8::Object::GetPrototype() { |
2832 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 2832 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
2833 ON_BAILOUT(isolate, "v8::Object::GetPrototype()", | 2833 ON_BAILOUT(isolate, "v8::Object::GetPrototype()", |
2834 return Local<v8::Value>()); | 2834 return Local<v8::Value>()); |
2835 ENTER_V8(isolate); | 2835 ENTER_V8(isolate); |
2836 i::Handle<i::Object> self = Utils::OpenHandle(this); | 2836 i::Handle<i::Object> self = Utils::OpenHandle(this); |
2837 i::Handle<i::Object> result = i::GetPrototype(self); | 2837 i::Handle<i::Object> result = i::Object::GetPrototype(self); |
Kevin Millikin (Chromium)
2012/01/04 13:00:32
i::Handle<i::Object> result(self->GetPrototype());
ulan
2012/01/05 11:16:35
Done.
| |
2838 return Utils::ToLocal(result); | 2838 return Utils::ToLocal(result); |
2839 } | 2839 } |
2840 | 2840 |
2841 | 2841 |
2842 bool v8::Object::SetPrototype(Handle<Value> value) { | 2842 bool v8::Object::SetPrototype(Handle<Value> value) { |
2843 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 2843 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
2844 ON_BAILOUT(isolate, "v8::Object::SetPrototype()", return false); | 2844 ON_BAILOUT(isolate, "v8::Object::SetPrototype()", return false); |
2845 ENTER_V8(isolate); | 2845 ENTER_V8(isolate); |
2846 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2846 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
2847 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); | 2847 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2981 } | 2981 } |
2982 | 2982 |
2983 | 2983 |
2984 bool v8::Object::Delete(v8::Handle<String> key) { | 2984 bool v8::Object::Delete(v8::Handle<String> key) { |
2985 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 2985 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
2986 ON_BAILOUT(isolate, "v8::Object::Delete()", return false); | 2986 ON_BAILOUT(isolate, "v8::Object::Delete()", return false); |
2987 ENTER_V8(isolate); | 2987 ENTER_V8(isolate); |
2988 i::HandleScope scope(isolate); | 2988 i::HandleScope scope(isolate); |
2989 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2989 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
2990 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); | 2990 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); |
2991 return i::DeleteProperty(self, key_obj)->IsTrue(); | 2991 return i::JSObject::DeleteProperty(self, key_obj)->IsTrue(); |
2992 } | 2992 } |
2993 | 2993 |
2994 | 2994 |
2995 bool v8::Object::Has(v8::Handle<String> key) { | 2995 bool v8::Object::Has(v8::Handle<String> key) { |
2996 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 2996 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
2997 ON_BAILOUT(isolate, "v8::Object::Has()", return false); | 2997 ON_BAILOUT(isolate, "v8::Object::Has()", return false); |
2998 ENTER_V8(isolate); | 2998 ENTER_V8(isolate); |
2999 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2999 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
3000 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); | 3000 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); |
3001 return self->HasProperty(*key_obj); | 3001 return self->HasProperty(*key_obj); |
3002 } | 3002 } |
3003 | 3003 |
3004 | 3004 |
3005 bool v8::Object::Delete(uint32_t index) { | 3005 bool v8::Object::Delete(uint32_t index) { |
3006 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3006 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3007 ON_BAILOUT(isolate, "v8::Object::DeleteProperty()", | 3007 ON_BAILOUT(isolate, "v8::Object::DeleteProperty()", |
3008 return false); | 3008 return false); |
3009 ENTER_V8(isolate); | 3009 ENTER_V8(isolate); |
3010 HandleScope scope; | 3010 HandleScope scope; |
3011 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3011 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
3012 return i::DeleteElement(self, index)->IsTrue(); | 3012 return i::JSObject::DeleteElement(self, index)->IsTrue(); |
3013 } | 3013 } |
3014 | 3014 |
3015 | 3015 |
3016 bool v8::Object::Has(uint32_t index) { | 3016 bool v8::Object::Has(uint32_t index) { |
3017 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3017 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3018 ON_BAILOUT(isolate, "v8::Object::HasProperty()", return false); | 3018 ON_BAILOUT(isolate, "v8::Object::HasProperty()", return false); |
3019 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3019 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
3020 return self->HasElement(index); | 3020 return self->HasElement(index); |
3021 } | 3021 } |
3022 | 3022 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3207 return Utils::ToLocal(i::Handle<i::Context>(context)); | 3207 return Utils::ToLocal(i::Handle<i::Context>(context)); |
3208 } | 3208 } |
3209 | 3209 |
3210 | 3210 |
3211 int v8::Object::GetIdentityHash() { | 3211 int v8::Object::GetIdentityHash() { |
3212 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3212 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3213 ON_BAILOUT(isolate, "v8::Object::GetIdentityHash()", return 0); | 3213 ON_BAILOUT(isolate, "v8::Object::GetIdentityHash()", return 0); |
3214 ENTER_V8(isolate); | 3214 ENTER_V8(isolate); |
3215 i::HandleScope scope(isolate); | 3215 i::HandleScope scope(isolate); |
3216 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3216 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
3217 return i::GetIdentityHash(self); | 3217 return i::JSObject::GetIdentityHash(self); |
3218 } | 3218 } |
3219 | 3219 |
3220 | 3220 |
3221 bool v8::Object::SetHiddenValue(v8::Handle<v8::String> key, | 3221 bool v8::Object::SetHiddenValue(v8::Handle<v8::String> key, |
3222 v8::Handle<v8::Value> value) { | 3222 v8::Handle<v8::Value> value) { |
3223 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3223 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3224 ON_BAILOUT(isolate, "v8::Object::SetHiddenValue()", return false); | 3224 ON_BAILOUT(isolate, "v8::Object::SetHiddenValue()", return false); |
3225 ENTER_V8(isolate); | 3225 ENTER_V8(isolate); |
3226 i::HandleScope scope(isolate); | 3226 i::HandleScope scope(isolate); |
3227 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3227 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
3228 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); | 3228 i::Handle<i::String> key_obj = Utils::OpenHandle(*key); |
3229 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); | 3229 i::Handle<i::Object> value_obj = Utils::OpenHandle(*value); |
3230 i::Handle<i::Object> result = i::SetHiddenProperty(self, key_obj, value_obj); | 3230 i::Handle<i::Object> result = |
3231 i::JSObject::SetHiddenProperty(self, key_obj, value_obj); | |
3231 return *result == *self; | 3232 return *result == *self; |
3232 } | 3233 } |
3233 | 3234 |
3234 | 3235 |
3235 v8::Local<v8::Value> v8::Object::GetHiddenValue(v8::Handle<v8::String> key) { | 3236 v8::Local<v8::Value> v8::Object::GetHiddenValue(v8::Handle<v8::String> key) { |
3236 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3237 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
3237 ON_BAILOUT(isolate, "v8::Object::GetHiddenValue()", | 3238 ON_BAILOUT(isolate, "v8::Object::GetHiddenValue()", |
3238 return Local<v8::Value>()); | 3239 return Local<v8::Value>()); |
3239 ENTER_V8(isolate); | 3240 ENTER_V8(isolate); |
3240 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3241 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
(...skipping 2880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6121 | 6122 |
6122 | 6123 |
6123 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6124 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6124 HandleScopeImplementer* scope_implementer = | 6125 HandleScopeImplementer* scope_implementer = |
6125 reinterpret_cast<HandleScopeImplementer*>(storage); | 6126 reinterpret_cast<HandleScopeImplementer*>(storage); |
6126 scope_implementer->IterateThis(v); | 6127 scope_implementer->IterateThis(v); |
6127 return storage + ArchiveSpacePerThread(); | 6128 return storage + ArchiveSpacePerThread(); |
6128 } | 6129 } |
6129 | 6130 |
6130 } } // namespace v8::internal | 6131 } } // namespace v8::internal |
OLD | NEW |