OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
877 array.add(Utils::OpenHandle(*value)); | 877 array.add(Utils::OpenHandle(*value)); |
878 array.add(Utils::OpenHandle(*v8::Integer::New(attribute))); | 878 array.add(Utils::OpenHandle(*v8::Integer::New(attribute))); |
879 } | 879 } |
880 | 880 |
881 | 881 |
882 // --- F u n c t i o n T e m p l a t e --- | 882 // --- F u n c t i o n T e m p l a t e --- |
883 static void InitializeFunctionTemplate( | 883 static void InitializeFunctionTemplate( |
884 i::Handle<i::FunctionTemplateInfo> info) { | 884 i::Handle<i::FunctionTemplateInfo> info) { |
885 info->set_tag(i::Smi::FromInt(Consts::FUNCTION_TEMPLATE)); | 885 info->set_tag(i::Smi::FromInt(Consts::FUNCTION_TEMPLATE)); |
886 info->set_flag(0); | 886 info->set_flag(0); |
887 info->set_prototype_properties(i::Smi::FromInt(v8::None)); | |
887 } | 888 } |
888 | 889 |
889 | 890 |
890 Local<ObjectTemplate> FunctionTemplate::PrototypeTemplate() { | 891 Local<ObjectTemplate> FunctionTemplate::PrototypeTemplate() { |
891 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 892 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
892 if (IsDeadCheck(isolate, "v8::FunctionTemplate::PrototypeTemplate()")) { | 893 if (IsDeadCheck(isolate, "v8::FunctionTemplate::PrototypeTemplate()")) { |
893 return Local<ObjectTemplate>(); | 894 return Local<ObjectTemplate>(); |
894 } | 895 } |
895 ENTER_V8(isolate); | 896 ENTER_V8(isolate); |
896 i::Handle<i::Object> result(Utils::OpenHandle(this)->prototype_template()); | 897 i::Handle<i::Object> result(Utils::OpenHandle(this)->prototype_template()); |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1099 void FunctionTemplate::SetHiddenPrototype(bool value) { | 1100 void FunctionTemplate::SetHiddenPrototype(bool value) { |
1100 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 1101 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
1101 if (IsDeadCheck(isolate, "v8::FunctionTemplate::SetHiddenPrototype()")) { | 1102 if (IsDeadCheck(isolate, "v8::FunctionTemplate::SetHiddenPrototype()")) { |
1102 return; | 1103 return; |
1103 } | 1104 } |
1104 ENTER_V8(isolate); | 1105 ENTER_V8(isolate); |
1105 Utils::OpenHandle(this)->set_hidden_prototype(value); | 1106 Utils::OpenHandle(this)->set_hidden_prototype(value); |
1106 } | 1107 } |
1107 | 1108 |
1108 | 1109 |
1110 void FunctionTemplate::SetPrototypeProperties(int flags) { | |
Mads Ager (chromium)
2011/06/22 12:13:46
SetPrototypeAttributes or SetPrototypePropertyAttr
Jakob Kummerow
2011/06/22 12:36:59
Done.
"SetPrototypeAttributes" is long enough, so
| |
1111 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | |
1112 if (IsDeadCheck(isolate, "v8::FunctionTemplate::SetPrototypeProperties()")) { | |
1113 return; | |
1114 } | |
1115 ENTER_V8(isolate); | |
1116 Utils::OpenHandle(this)->set_prototype_properties(i::Smi::FromInt(flags)); | |
1117 } | |
1118 | |
1119 | |
1109 void FunctionTemplate::SetNamedInstancePropertyHandler( | 1120 void FunctionTemplate::SetNamedInstancePropertyHandler( |
1110 NamedPropertyGetter getter, | 1121 NamedPropertyGetter getter, |
1111 NamedPropertySetter setter, | 1122 NamedPropertySetter setter, |
1112 NamedPropertyQuery query, | 1123 NamedPropertyQuery query, |
1113 NamedPropertyDeleter remover, | 1124 NamedPropertyDeleter remover, |
1114 NamedPropertyEnumerator enumerator, | 1125 NamedPropertyEnumerator enumerator, |
1115 Handle<Value> data) { | 1126 Handle<Value> data) { |
1116 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 1127 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
1117 if (IsDeadCheck(isolate, | 1128 if (IsDeadCheck(isolate, |
1118 "v8::FunctionTemplate::SetNamedInstancePropertyHandler()")) { | 1129 "v8::FunctionTemplate::SetNamedInstancePropertyHandler()")) { |
(...skipping 5017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6136 | 6147 |
6137 | 6148 |
6138 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6149 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6139 HandleScopeImplementer* scope_implementer = | 6150 HandleScopeImplementer* scope_implementer = |
6140 reinterpret_cast<HandleScopeImplementer*>(storage); | 6151 reinterpret_cast<HandleScopeImplementer*>(storage); |
6141 scope_implementer->IterateThis(v); | 6152 scope_implementer->IterateThis(v); |
6142 return storage + ArchiveSpacePerThread(); | 6153 return storage + ArchiveSpacePerThread(); |
6143 } | 6154 } |
6144 | 6155 |
6145 } } // namespace v8::internal | 6156 } } // namespace v8::internal |
OLD | NEW |