Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/api.cc

Issue 214051: Pushed 1.3.12 to trunk. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/SConscript ('k') | src/arm/builtins-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « src/SConscript ('k') | src/arm/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698