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

Side by Side Diff: src/api.cc

Issue 2576003: First phase of migration to new named property query callbacks. (Closed)
Patch Set: Better version Created 10 years, 6 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
« no previous file with comments | « include/v8.h ('k') | src/objects.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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 } 846 }
847 847
848 848
849 void FunctionTemplate::SetHiddenPrototype(bool value) { 849 void FunctionTemplate::SetHiddenPrototype(bool value) {
850 if (IsDeadCheck("v8::FunctionTemplate::SetHiddenPrototype()")) return; 850 if (IsDeadCheck("v8::FunctionTemplate::SetHiddenPrototype()")) return;
851 ENTER_V8; 851 ENTER_V8;
852 Utils::OpenHandle(this)->set_hidden_prototype(value); 852 Utils::OpenHandle(this)->set_hidden_prototype(value);
853 } 853 }
854 854
855 855
856 void FunctionTemplate::SetNamedInstancePropertyHandler( 856 void FunctionTemplate::SetNamedInstancePropertyHandlerImpl(
857 NamedPropertyGetter getter, 857 NamedPropertyGetter getter,
858 NamedPropertySetter setter, 858 NamedPropertySetter setter,
859 NamedPropertyQuery query, 859 NamedPropertyQueryImpl query,
860 NamedPropertyDeleter remover, 860 NamedPropertyDeleter remover,
861 NamedPropertyEnumerator enumerator, 861 NamedPropertyEnumerator enumerator,
862 Handle<Value> data) { 862 Handle<Value> data) {
863 if (IsDeadCheck("v8::FunctionTemplate::SetNamedInstancePropertyHandler()")) { 863 if (IsDeadCheck("v8::FunctionTemplate::SetNamedInstancePropertyHandler()")) {
864 return; 864 return;
865 } 865 }
866 ENTER_V8; 866 ENTER_V8;
867 HandleScope scope; 867 HandleScope scope;
868 i::Handle<i::Struct> struct_obj = 868 i::Handle<i::Struct> struct_obj =
869 i::Factory::NewStruct(i::INTERCEPTOR_INFO_TYPE); 869 i::Factory::NewStruct(i::INTERCEPTOR_INFO_TYPE);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 i::Handle<i::FunctionTemplateInfo> cons(constructor); 980 i::Handle<i::FunctionTemplateInfo> cons(constructor);
981 Utils::ToLocal(cons)->AddInstancePropertyAccessor(name, 981 Utils::ToLocal(cons)->AddInstancePropertyAccessor(name,
982 getter, 982 getter,
983 setter, 983 setter,
984 data, 984 data,
985 settings, 985 settings,
986 attribute); 986 attribute);
987 } 987 }
988 988
989 989
990 void ObjectTemplate::SetNamedPropertyHandler(NamedPropertyGetter getter, 990 void ObjectTemplate::SetNamedPropertyHandlerImpl(NamedPropertyGetter getter,
991 NamedPropertySetter setter, 991 NamedPropertySetter setter,
992 NamedPropertyQuery query, 992 NamedPropertyQueryImpl query,
993 NamedPropertyDeleter remover, 993 NamedPropertyDeleter remover,
994 NamedPropertyEnumerator enumerator, 994 NamedPropertyEnumerator
995 Handle<Value> data) { 995 enumerator,
996 Handle<Value> data) {
996 if (IsDeadCheck("v8::ObjectTemplate::SetNamedPropertyHandler()")) return; 997 if (IsDeadCheck("v8::ObjectTemplate::SetNamedPropertyHandler()")) return;
997 ENTER_V8; 998 ENTER_V8;
998 HandleScope scope; 999 HandleScope scope;
999 EnsureConstructor(this); 1000 EnsureConstructor(this);
1000 i::FunctionTemplateInfo* constructor = 1001 i::FunctionTemplateInfo* constructor =
1001 i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor()); 1002 i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor());
1002 i::Handle<i::FunctionTemplateInfo> cons(constructor); 1003 i::Handle<i::FunctionTemplateInfo> cons(constructor);
1003 Utils::ToLocal(cons)->SetNamedInstancePropertyHandler(getter, 1004 Utils::ToLocal(cons)->SetNamedInstancePropertyHandlerImpl(getter,
1004 setter, 1005 setter,
1005 query, 1006 query,
1006 remover, 1007 remover,
1007 enumerator, 1008 enumerator,
1008 data); 1009 data);
1009 } 1010 }
1010 1011
1011 1012
1012 void ObjectTemplate::MarkAsUndetectable() { 1013 void ObjectTemplate::MarkAsUndetectable() {
1013 if (IsDeadCheck("v8::ObjectTemplate::MarkAsUndetectable()")) return; 1014 if (IsDeadCheck("v8::ObjectTemplate::MarkAsUndetectable()")) return;
1014 ENTER_V8; 1015 ENTER_V8;
1015 HandleScope scope; 1016 HandleScope scope;
1016 EnsureConstructor(this); 1017 EnsureConstructor(this);
1017 i::FunctionTemplateInfo* constructor = 1018 i::FunctionTemplateInfo* constructor =
1018 i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor()); 1019 i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor());
(...skipping 3416 matching lines...) Expand 10 before | Expand all | Expand 10 after
4435 4436
4436 4437
4437 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 4438 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
4438 HandleScopeImplementer* thread_local = 4439 HandleScopeImplementer* thread_local =
4439 reinterpret_cast<HandleScopeImplementer*>(storage); 4440 reinterpret_cast<HandleScopeImplementer*>(storage);
4440 thread_local->IterateThis(v); 4441 thread_local->IterateThis(v);
4441 return storage + ArchiveSpacePerThread(); 4442 return storage + ArchiveSpacePerThread();
4442 } 4443 }
4443 4444
4444 } } // namespace v8::internal 4445 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698