OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
9 | 9 |
10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
(...skipping 4702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4713 } | 4713 } |
4714 | 4714 |
4715 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { | 4715 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { |
4716 args.GetReturnValue().Set(args.Holder()); | 4716 args.GetReturnValue().Set(args.Holder()); |
4717 return; | 4717 return; |
4718 } | 4718 } |
4719 | 4719 |
4720 TestObjV8Internal::constructor(args); | 4720 TestObjV8Internal::constructor(args); |
4721 } | 4721 } |
4722 | 4722 |
4723 v8::Handle<v8::Value> V8TestObject::indexedPropertyGetter(uint32_t index, const
v8::AccessorInfo& info) | 4723 void V8TestObject::indexedPropertyGetter(uint32_t index, const v8::PropertyCallb
ackInfo<v8::Value>& info) |
4724 { | 4724 { |
4725 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | 4725 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
4726 TestObj* collection = toNative(info.Holder()); | 4726 TestObj* collection = toNative(info.Holder()); |
4727 RefPtr<Node> element = collection->item(index); | 4727 RefPtr<Node> element = collection->item(index); |
4728 if (!element) | 4728 if (!element) |
4729 return v8Undefined(); | 4729 return; |
4730 return toV8Fast(element.release(), info, collection); | 4730 v8SetReturnValue(info, toV8Fast(element.release(), info, collection)); |
4731 } | 4731 } |
4732 | 4732 |
4733 v8::Handle<v8::Value> V8TestObject::namedPropertyGetter(v8::Local<v8::String> na
me, const v8::AccessorInfo& info) | 4733 void V8TestObject::namedPropertyGetter(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
4734 { | 4734 { |
4735 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 4735 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
4736 return v8Undefined(); | 4736 return; |
4737 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 4737 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
4738 return v8Undefined(); | 4738 return; |
4739 if (info.Holder()->HasRealNamedProperty(name)) | 4739 if (info.Holder()->HasRealNamedProperty(name)) |
4740 return v8Undefined(); | 4740 return; |
4741 | 4741 |
4742 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | 4742 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
4743 TestObj* collection = toNative(info.Holder()); | 4743 TestObj* collection = toNative(info.Holder()); |
4744 AtomicString propertyName = toWebCoreAtomicString(name); | 4744 AtomicString propertyName = toWebCoreAtomicString(name); |
4745 String element = collection->namedItem(propertyName); | 4745 String element = collection->namedItem(propertyName); |
4746 if (element.isNull()) | 4746 if (element.isNull()) |
4747 return v8Undefined(); | 4747 return; |
4748 return v8String(element, info.GetIsolate()); | 4748 v8SetReturnValue(info, v8String(element, info.GetIsolate())); |
4749 } | 4749 } |
4750 | 4750 |
4751 v8::Handle<v8::Array> V8TestObject::namedPropertyEnumerator(const v8::AccessorIn
fo& info) | 4751 void V8TestObject::namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Ar
ray>& info) |
4752 { | 4752 { |
4753 ExceptionCode ec = 0; | 4753 ExceptionCode ec = 0; |
4754 TestObj* collection = toNative(info.Holder()); | 4754 TestObj* collection = toNative(info.Holder()); |
4755 Vector<String> names; | 4755 Vector<String> names; |
4756 collection->namedPropertyEnumerator(names, ec); | 4756 collection->namedPropertyEnumerator(names, ec); |
4757 if (ec) { | 4757 if (ec) { |
4758 setDOMException(ec, info.GetIsolate()); | 4758 setDOMException(ec, info.GetIsolate()); |
4759 return v8::Handle<v8::Array>(); | 4759 return; |
4760 } | 4760 } |
4761 v8::Handle<v8::Array> v8names = v8::Array::New(names.size()); | 4761 v8::Handle<v8::Array> v8names = v8::Array::New(names.size()); |
4762 for (size_t i = 0; i < names.size(); ++i) | 4762 for (size_t i = 0; i < names.size(); ++i) |
4763 v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.Ge
tIsolate())); | 4763 v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.Ge
tIsolate())); |
4764 return v8names; | 4764 v8SetReturnValue(info, v8names); |
4765 } | 4765 } |
4766 | 4766 |
4767 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectTemplate(v8::Handle
<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorld
Type) | 4767 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectTemplate(v8::Handle
<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorld
Type) |
4768 { | 4768 { |
4769 desc->ReadOnlyPrototype(); | 4769 desc->ReadOnlyPrototype(); |
4770 | 4770 |
4771 v8::Local<v8::Signature> defaultSignature; | 4771 v8::Local<v8::Signature> defaultSignature; |
4772 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestObject",
v8::Local<v8::FunctionTemplate>(), V8TestObject::internalFieldCount, | 4772 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestObject",
v8::Local<v8::FunctionTemplate>(), V8TestObject::internalFieldCount, |
4773 V8TestObjectAttrs, WTF_ARRAY_LENGTH(V8TestObjectAttrs), | 4773 V8TestObjectAttrs, WTF_ARRAY_LENGTH(V8TestObjectAttrs), |
4774 V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods), isolate, cur
rentWorldType); | 4774 V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods), isolate, cur
rentWorldType); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4942 installPerContextProperties(wrapper, impl.get(), isolate); | 4942 installPerContextProperties(wrapper, impl.get(), isolate); |
4943 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Independent); | 4943 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Independent); |
4944 return wrapper; | 4944 return wrapper; |
4945 } | 4945 } |
4946 void V8TestObject::derefObject(void* object) | 4946 void V8TestObject::derefObject(void* object) |
4947 { | 4947 { |
4948 static_cast<TestObj*>(object)->deref(); | 4948 static_cast<TestObj*>(object)->deref(); |
4949 } | 4949 } |
4950 | 4950 |
4951 } // namespace WebCore | 4951 } // namespace WebCore |
OLD | NEW |