| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3057 v8::Handle<Value> data, | 3057 v8::Handle<Value> data, |
| 3058 AccessControl settings, | 3058 AccessControl settings, |
| 3059 PropertyAttribute attributes) { | 3059 PropertyAttribute attributes) { |
| 3060 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3060 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 3061 ON_BAILOUT(isolate, "v8::Object::SetAccessor()", return false); | 3061 ON_BAILOUT(isolate, "v8::Object::SetAccessor()", return false); |
| 3062 ENTER_V8(isolate); | 3062 ENTER_V8(isolate); |
| 3063 i::HandleScope scope(isolate); | 3063 i::HandleScope scope(isolate); |
| 3064 i::Handle<i::AccessorInfo> info = MakeAccessorInfo(name, | 3064 i::Handle<i::AccessorInfo> info = MakeAccessorInfo(name, |
| 3065 getter, setter, data, | 3065 getter, setter, data, |
| 3066 settings, attributes); | 3066 settings, attributes); |
| 3067 bool fast = Utils::OpenHandle(this)->HasFastProperties(); |
| 3067 i::Handle<i::Object> result = i::SetAccessor(Utils::OpenHandle(this), info); | 3068 i::Handle<i::Object> result = i::SetAccessor(Utils::OpenHandle(this), info); |
| 3068 return !result.is_null() && !result->IsUndefined(); | 3069 if (result.is_null() || result->IsUndefined()) return false; |
| 3070 if (fast) i::JSObject::TransformToFastProperties(Utils::OpenHandle(this), 0); |
| 3071 return true; |
| 3069 } | 3072 } |
| 3070 | 3073 |
| 3071 | 3074 |
| 3072 bool v8::Object::HasOwnProperty(Handle<String> key) { | 3075 bool v8::Object::HasOwnProperty(Handle<String> key) { |
| 3073 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3076 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 3074 ON_BAILOUT(isolate, "v8::Object::HasOwnProperty()", | 3077 ON_BAILOUT(isolate, "v8::Object::HasOwnProperty()", |
| 3075 return false); | 3078 return false); |
| 3076 return Utils::OpenHandle(this)->HasLocalProperty( | 3079 return Utils::OpenHandle(this)->HasLocalProperty( |
| 3077 *Utils::OpenHandle(*key)); | 3080 *Utils::OpenHandle(*key)); |
| 3078 } | 3081 } |
| (...skipping 3152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6231 | 6234 |
| 6232 | 6235 |
| 6233 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6236 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6234 HandleScopeImplementer* scope_implementer = | 6237 HandleScopeImplementer* scope_implementer = |
| 6235 reinterpret_cast<HandleScopeImplementer*>(storage); | 6238 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6236 scope_implementer->IterateThis(v); | 6239 scope_implementer->IterateThis(v); |
| 6237 return storage + ArchiveSpacePerThread(); | 6240 return storage + ArchiveSpacePerThread(); |
| 6238 } | 6241 } |
| 6239 | 6242 |
| 6240 } } // namespace v8::internal | 6243 } } // namespace v8::internal |
| OLD | NEW |