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