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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 if (setter != 0) obj->set_setter(*FromCData(setter)); | 879 if (setter != 0) obj->set_setter(*FromCData(setter)); |
880 if (query != 0) obj->set_query(*FromCData(query)); | 880 if (query != 0) obj->set_query(*FromCData(query)); |
881 if (remover != 0) obj->set_deleter(*FromCData(remover)); | 881 if (remover != 0) obj->set_deleter(*FromCData(remover)); |
882 if (enumerator != 0) obj->set_enumerator(*FromCData(enumerator)); | 882 if (enumerator != 0) obj->set_enumerator(*FromCData(enumerator)); |
883 if (data.IsEmpty()) data = v8::Undefined(); | 883 if (data.IsEmpty()) data = v8::Undefined(); |
884 obj->set_data(*Utils::OpenHandle(*data)); | 884 obj->set_data(*Utils::OpenHandle(*data)); |
885 Utils::OpenHandle(this)->set_named_property_handler(*obj); | 885 Utils::OpenHandle(this)->set_named_property_handler(*obj); |
886 } | 886 } |
887 | 887 |
888 | 888 |
889 void FunctionTemplate::SetIndexedInstancePropertyHandler( | 889 void FunctionTemplate::SetIndexedInstancePropertyHandlerImpl( |
890 IndexedPropertyGetter getter, | 890 IndexedPropertyGetter getter, |
891 IndexedPropertySetter setter, | 891 IndexedPropertySetter setter, |
892 IndexedPropertyQuery query, | 892 IndexedPropertyQueryImpl query, |
893 IndexedPropertyDeleter remover, | 893 IndexedPropertyDeleter remover, |
894 IndexedPropertyEnumerator enumerator, | 894 IndexedPropertyEnumerator enumerator, |
895 Handle<Value> data) { | 895 Handle<Value> data) { |
896 if (IsDeadCheck( | 896 if (IsDeadCheck( |
897 "v8::FunctionTemplate::SetIndexedInstancePropertyHandler()")) { | 897 "v8::FunctionTemplate::SetIndexedInstancePropertyHandler()")) { |
898 return; | 898 return; |
899 } | 899 } |
900 ENTER_V8; | 900 ENTER_V8; |
901 HandleScope scope; | 901 HandleScope scope; |
902 i::Handle<i::Struct> struct_obj = | 902 i::Handle<i::Struct> struct_obj = |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 info->set_data(*Utils::OpenHandle(*data)); | 1047 info->set_data(*Utils::OpenHandle(*data)); |
1048 | 1048 |
1049 i::FunctionTemplateInfo* constructor = | 1049 i::FunctionTemplateInfo* constructor = |
1050 i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor()); | 1050 i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor()); |
1051 i::Handle<i::FunctionTemplateInfo> cons(constructor); | 1051 i::Handle<i::FunctionTemplateInfo> cons(constructor); |
1052 cons->set_access_check_info(*info); | 1052 cons->set_access_check_info(*info); |
1053 cons->set_needs_access_check(turned_on_by_default); | 1053 cons->set_needs_access_check(turned_on_by_default); |
1054 } | 1054 } |
1055 | 1055 |
1056 | 1056 |
1057 void ObjectTemplate::SetIndexedPropertyHandler( | 1057 void ObjectTemplate::SetIndexedPropertyHandlerImpl( |
1058 IndexedPropertyGetter getter, | 1058 IndexedPropertyGetter getter, |
1059 IndexedPropertySetter setter, | 1059 IndexedPropertySetter setter, |
1060 IndexedPropertyQuery query, | 1060 IndexedPropertyQueryImpl query, |
1061 IndexedPropertyDeleter remover, | 1061 IndexedPropertyDeleter remover, |
1062 IndexedPropertyEnumerator enumerator, | 1062 IndexedPropertyEnumerator enumerator, |
1063 Handle<Value> data) { | 1063 Handle<Value> data) { |
1064 if (IsDeadCheck("v8::ObjectTemplate::SetIndexedPropertyHandler()")) return; | 1064 if (IsDeadCheck("v8::ObjectTemplate::SetIndexedPropertyHandler()")) return; |
1065 ENTER_V8; | 1065 ENTER_V8; |
1066 HandleScope scope; | 1066 HandleScope scope; |
1067 EnsureConstructor(this); | 1067 EnsureConstructor(this); |
1068 i::FunctionTemplateInfo* constructor = | 1068 i::FunctionTemplateInfo* constructor = |
1069 i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor()); | 1069 i::FunctionTemplateInfo::cast(Utils::OpenHandle(this)->constructor()); |
1070 i::Handle<i::FunctionTemplateInfo> cons(constructor); | 1070 i::Handle<i::FunctionTemplateInfo> cons(constructor); |
1071 Utils::ToLocal(cons)->SetIndexedInstancePropertyHandler(getter, | 1071 Utils::ToLocal(cons)->SetIndexedInstancePropertyHandlerImpl(getter, |
1072 setter, | 1072 setter, |
1073 query, | 1073 query, |
1074 remover, | 1074 remover, |
1075 enumerator, | 1075 enumerator, |
1076 data); | 1076 data); |
1077 } | 1077 } |
1078 | 1078 |
1079 | 1079 |
1080 void ObjectTemplate::SetCallAsFunctionHandler(InvocationCallback callback, | 1080 void ObjectTemplate::SetCallAsFunctionHandler(InvocationCallback callback, |
1081 Handle<Value> data) { | 1081 Handle<Value> data) { |
1082 if (IsDeadCheck("v8::ObjectTemplate::SetCallAsFunctionHandler()")) return; | 1082 if (IsDeadCheck("v8::ObjectTemplate::SetCallAsFunctionHandler()")) return; |
1083 ENTER_V8; | 1083 ENTER_V8; |
1084 HandleScope scope; | 1084 HandleScope scope; |
1085 EnsureConstructor(this); | 1085 EnsureConstructor(this); |
1086 i::FunctionTemplateInfo* constructor = | 1086 i::FunctionTemplateInfo* constructor = |
(...skipping 3720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4807 | 4807 |
4808 | 4808 |
4809 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 4809 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
4810 HandleScopeImplementer* thread_local = | 4810 HandleScopeImplementer* thread_local = |
4811 reinterpret_cast<HandleScopeImplementer*>(storage); | 4811 reinterpret_cast<HandleScopeImplementer*>(storage); |
4812 thread_local->IterateThis(v); | 4812 thread_local->IterateThis(v); |
4813 return storage + ArchiveSpacePerThread(); | 4813 return storage + ArchiveSpacePerThread(); |
4814 } | 4814 } |
4815 | 4815 |
4816 } } // namespace v8::internal | 4816 } } // namespace v8::internal |
OLD | NEW |