| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1981 } | 1981 } |
| 1982 return Utils::ToLocal(i::Handle<i::JSObject>(object)); | 1982 return Utils::ToLocal(i::Handle<i::JSObject>(object)); |
| 1983 } | 1983 } |
| 1984 | 1984 |
| 1985 | 1985 |
| 1986 Local<Array> v8::Object::GetPropertyNames() { | 1986 Local<Array> v8::Object::GetPropertyNames() { |
| 1987 ON_BAILOUT("v8::Object::GetPropertyNames()", return Local<v8::Array>()); | 1987 ON_BAILOUT("v8::Object::GetPropertyNames()", return Local<v8::Array>()); |
| 1988 ENTER_V8; | 1988 ENTER_V8; |
| 1989 v8::HandleScope scope; | 1989 v8::HandleScope scope; |
| 1990 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 1990 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 1991 i::Handle<i::FixedArray> value = i::GetKeysInFixedArrayFor(self); | 1991 i::Handle<i::FixedArray> value = |
| 1992 i::GetKeysInFixedArrayFor(self, i::INCLUDE_PROTOS); |
| 1992 // Because we use caching to speed up enumeration it is important | 1993 // Because we use caching to speed up enumeration it is important |
| 1993 // to never change the result of the basic enumeration function so | 1994 // to never change the result of the basic enumeration function so |
| 1994 // we clone the result. | 1995 // we clone the result. |
| 1995 i::Handle<i::FixedArray> elms = i::Factory::CopyFixedArray(value); | 1996 i::Handle<i::FixedArray> elms = i::Factory::CopyFixedArray(value); |
| 1996 i::Handle<i::JSArray> result = i::Factory::NewJSArrayWithElements(elms); | 1997 i::Handle<i::JSArray> result = i::Factory::NewJSArrayWithElements(elms); |
| 1997 return scope.Close(Utils::ToLocal(result)); | 1998 return scope.Close(Utils::ToLocal(result)); |
| 1998 } | 1999 } |
| 1999 | 2000 |
| 2000 | 2001 |
| 2001 Local<String> v8::Object::ObjectProtoToString() { | 2002 Local<String> v8::Object::ObjectProtoToString() { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2148 ENTER_V8; | 2149 ENTER_V8; |
| 2149 i::Handle<i::JSObject> obj = Utils::OpenHandle(this); | 2150 i::Handle<i::JSObject> obj = Utils::OpenHandle(this); |
| 2150 | 2151 |
| 2151 i::Handle<i::Map> new_map = | 2152 i::Handle<i::Map> new_map = |
| 2152 i::Factory::CopyMapDropTransitions(i::Handle<i::Map>(obj->map())); | 2153 i::Factory::CopyMapDropTransitions(i::Handle<i::Map>(obj->map())); |
| 2153 new_map->set_is_access_check_needed(true); | 2154 new_map->set_is_access_check_needed(true); |
| 2154 obj->set_map(*new_map); | 2155 obj->set_map(*new_map); |
| 2155 } | 2156 } |
| 2156 | 2157 |
| 2157 | 2158 |
| 2159 bool v8::Object::IsDirty() { |
| 2160 return Utils::OpenHandle(this)->IsDirty(); |
| 2161 } |
| 2162 |
| 2163 |
| 2158 Local<v8::Object> v8::Object::Clone() { | 2164 Local<v8::Object> v8::Object::Clone() { |
| 2159 ON_BAILOUT("v8::Object::Clone()", return Local<Object>()); | 2165 ON_BAILOUT("v8::Object::Clone()", return Local<Object>()); |
| 2160 ENTER_V8; | 2166 ENTER_V8; |
| 2161 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2167 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2162 EXCEPTION_PREAMBLE(); | 2168 EXCEPTION_PREAMBLE(); |
| 2163 i::Handle<i::JSObject> result = i::Copy(self); | 2169 i::Handle<i::JSObject> result = i::Copy(self); |
| 2164 has_pending_exception = result.is_null(); | 2170 has_pending_exception = result.is_null(); |
| 2165 EXCEPTION_BAILOUT_CHECK(Local<Object>()); | 2171 EXCEPTION_BAILOUT_CHECK(Local<Object>()); |
| 2166 return Utils::ToLocal(result); | 2172 return Utils::ToLocal(result); |
| 2167 } | 2173 } |
| (...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3725 | 3731 |
| 3726 | 3732 |
| 3727 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 3733 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 3728 HandleScopeImplementer* thread_local = | 3734 HandleScopeImplementer* thread_local = |
| 3729 reinterpret_cast<HandleScopeImplementer*>(storage); | 3735 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 3730 thread_local->IterateThis(v); | 3736 thread_local->IterateThis(v); |
| 3731 return storage + ArchiveSpacePerThread(); | 3737 return storage + ArchiveSpacePerThread(); |
| 3732 } | 3738 } |
| 3733 | 3739 |
| 3734 } } // namespace v8::internal | 3740 } } // namespace v8::internal |
| OLD | NEW |