| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 } // namespace TestEventTargetV8Internal | 159 } // namespace TestEventTargetV8Internal |
| 160 | 160 |
| 161 static const V8DOMConfiguration::BatchedMethod V8TestEventTargetMethods[] = { | 161 static const V8DOMConfiguration::BatchedMethod V8TestEventTargetMethods[] = { |
| 162 {"item", TestEventTargetV8Internal::itemMethodCallback, 0, 1}, | 162 {"item", TestEventTargetV8Internal::itemMethodCallback, 0, 1}, |
| 163 {"namedItem", TestEventTargetV8Internal::namedItemMethodCallback, 0, 1}, | 163 {"namedItem", TestEventTargetV8Internal::namedItemMethodCallback, 0, 1}, |
| 164 {"addEventListener", TestEventTargetV8Internal::addEventListenerMethodCallba
ck, 0, 2}, | 164 {"addEventListener", TestEventTargetV8Internal::addEventListenerMethodCallba
ck, 0, 2}, |
| 165 {"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethod
Callback, 0, 2}, | 165 {"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethod
Callback, 0, 2}, |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 v8::Handle<v8::Value> V8TestEventTarget::indexedPropertyGetter(uint32_t index, c
onst v8::AccessorInfo& info) | 168 void V8TestEventTarget::indexedPropertyGetter(uint32_t index, const v8::Property
CallbackInfo<v8::Value>& info) |
| 169 { | 169 { |
| 170 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | 170 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
| 171 TestEventTarget* collection = toNative(info.Holder()); | 171 TestEventTarget* collection = toNative(info.Holder()); |
| 172 RefPtr<Node> element = collection->item(index); | 172 RefPtr<Node> element = collection->item(index); |
| 173 if (!element) | 173 if (!element) |
| 174 return v8Undefined(); | 174 return; |
| 175 return toV8Fast(element.release(), info, collection); | 175 v8SetReturnValue(info, toV8Fast(element.release(), info, collection)); |
| 176 } | 176 } |
| 177 | 177 |
| 178 v8::Handle<v8::Boolean> V8TestEventTarget::indexedPropertyDeleter(unsigned index
, const v8::AccessorInfo& info) | 178 void V8TestEventTarget::indexedPropertyDeleter(unsigned index, const v8::Propert
yCallbackInfo<v8::Boolean>& info) |
| 179 { | 179 { |
| 180 TestEventTarget* collection = toNative(info.Holder()); | 180 TestEventTarget* collection = toNative(info.Holder()); |
| 181 ExceptionCode ec = 0; | 181 ExceptionCode ec = 0; |
| 182 bool result = collection->anonymousIndexedDeleter(index, ec); | 182 bool result = collection->anonymousIndexedDeleter(index, ec); |
| 183 if (ec) { | 183 if (ec) { |
| 184 setDOMException(ec, info.GetIsolate()); | 184 setDOMException(ec, info.GetIsolate()); |
| 185 return v8::Handle<v8::Boolean>(); | 185 return; |
| 186 } | 186 } |
| 187 return v8Boolean(result); | 187 return v8SetReturnValueBool(info, result); |
| 188 } | 188 } |
| 189 | 189 |
| 190 v8::Handle<v8::Value> V8TestEventTarget::namedPropertyGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) | 190 void V8TestEventTarget::namedPropertyGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 191 { | 191 { |
| 192 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 192 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 193 return v8Undefined(); | 193 return; |
| 194 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 194 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
| 195 return v8Undefined(); | 195 return; |
| 196 if (info.Holder()->HasRealNamedProperty(name)) | 196 if (info.Holder()->HasRealNamedProperty(name)) |
| 197 return v8Undefined(); | 197 return; |
| 198 | 198 |
| 199 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | 199 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
| 200 TestEventTarget* collection = toNative(info.Holder()); | 200 TestEventTarget* collection = toNative(info.Holder()); |
| 201 AtomicString propertyName = toWebCoreAtomicString(name); | 201 AtomicString propertyName = toWebCoreAtomicString(name); |
| 202 RefPtr<Node> element = collection->namedItem(propertyName); | 202 RefPtr<Node> element = collection->namedItem(propertyName); |
| 203 if (!element) | 203 if (!element) |
| 204 return v8Undefined(); | 204 return; |
| 205 return toV8Fast(element.release(), info, collection); | 205 v8SetReturnValue(info, toV8Fast(element.release(), info, collection)); |
| 206 } | 206 } |
| 207 | 207 |
| 208 v8::Handle<v8::Value> V8TestEventTarget::namedPropertySetter(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 208 void V8TestEventTarget::namedPropertySetter(v8::Local<v8::String> name, v8::Loca
l<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 209 { | 209 { |
| 210 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 210 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 211 return v8Undefined(); | 211 return; |
| 212 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 212 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
| 213 return v8Undefined(); | 213 return; |
| 214 if (info.Holder()->HasRealNamedProperty(name)) | 214 if (info.Holder()->HasRealNamedProperty(name)) |
| 215 return v8Undefined(); | 215 return; |
| 216 TestEventTarget* collection = toNative(info.Holder()); | 216 TestEventTarget* collection = toNative(info.Holder()); |
| 217 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, propertyName, name); | 217 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name)
; |
| 218 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, propertyValue, value); | 218 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, valu
e); |
| 219 bool result; | 219 bool result; |
| 220 if (value->IsUndefined()) | 220 if (value->IsUndefined()) |
| 221 result = collection->anonymousNamedSetterUndefined(propertyName); | 221 result = collection->anonymousNamedSetterUndefined(propertyName); |
| 222 else | 222 else |
| 223 result = collection->anonymousNamedSetter(propertyName, propertyValue); | 223 result = collection->anonymousNamedSetter(propertyName, propertyValue); |
| 224 if (!result) | 224 if (!result) |
| 225 return v8Undefined(); | 225 return; |
| 226 return value; | 226 v8SetReturnValue(info, value); |
| 227 } | 227 } |
| 228 | 228 |
| 229 v8::Handle<v8::Boolean> V8TestEventTarget::namedPropertyDeleter(v8::Local<v8::St
ring> name, const v8::AccessorInfo& info) | 229 void V8TestEventTarget::namedPropertyDeleter(v8::Local<v8::String> name, const v
8::PropertyCallbackInfo<v8::Boolean>& info) |
| 230 { | 230 { |
| 231 TestEventTarget* collection = toNative(info.Holder()); | 231 TestEventTarget* collection = toNative(info.Holder()); |
| 232 AtomicString propertyName = toWebCoreAtomicString(name); | 232 AtomicString propertyName = toWebCoreAtomicString(name); |
| 233 bool result = collection->anonymousNamedDeleter(propertyName); | 233 bool result = collection->anonymousNamedDeleter(propertyName); |
| 234 return v8Boolean(result); | 234 return v8SetReturnValueBool(info, result); |
| 235 } | 235 } |
| 236 | 236 |
| 237 v8::Handle<v8::Array> V8TestEventTarget::namedPropertyEnumerator(const v8::Acces
sorInfo& info) | 237 void V8TestEventTarget::namedPropertyEnumerator(const v8::PropertyCallbackInfo<v
8::Array>& info) |
| 238 { | 238 { |
| 239 ExceptionCode ec = 0; | 239 ExceptionCode ec = 0; |
| 240 TestEventTarget* collection = toNative(info.Holder()); | 240 TestEventTarget* collection = toNative(info.Holder()); |
| 241 Vector<String> names; | 241 Vector<String> names; |
| 242 collection->namedPropertyEnumerator(names, ec); | 242 collection->namedPropertyEnumerator(names, ec); |
| 243 if (ec) { | 243 if (ec) { |
| 244 setDOMException(ec, info.GetIsolate()); | 244 setDOMException(ec, info.GetIsolate()); |
| 245 return v8::Handle<v8::Array>(); | 245 return; |
| 246 } | 246 } |
| 247 v8::Handle<v8::Array> v8names = v8::Array::New(names.size()); | 247 v8::Handle<v8::Array> v8names = v8::Array::New(names.size()); |
| 248 for (size_t i = 0; i < names.size(); ++i) | 248 for (size_t i = 0; i < names.size(); ++i) |
| 249 v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.Ge
tIsolate())); | 249 v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.Ge
tIsolate())); |
| 250 return v8names; | 250 v8SetReturnValue(info, v8names); |
| 251 } | 251 } |
| 252 | 252 |
| 253 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v8::H
andle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType current
WorldType) | 253 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v8::H
andle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType current
WorldType) |
| 254 { | 254 { |
| 255 desc->ReadOnlyPrototype(); | 255 desc->ReadOnlyPrototype(); |
| 256 | 256 |
| 257 v8::Local<v8::Signature> defaultSignature; | 257 v8::Local<v8::Signature> defaultSignature; |
| 258 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestEventTar
get", v8::Local<v8::FunctionTemplate>(), V8TestEventTarget::internalFieldCount, | 258 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestEventTar
get", v8::Local<v8::FunctionTemplate>(), V8TestEventTarget::internalFieldCount, |
| 259 0, 0, | 259 0, 0, |
| 260 V8TestEventTargetMethods, WTF_ARRAY_LENGTH(V8TestEventTargetMethods), is
olate, currentWorldType); | 260 V8TestEventTargetMethods, WTF_ARRAY_LENGTH(V8TestEventTargetMethods), is
olate, currentWorldType); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 installPerContextProperties(wrapper, impl.get(), isolate); | 322 installPerContextProperties(wrapper, impl.get(), isolate); |
| 323 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Independent); | 323 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Independent); |
| 324 return wrapper; | 324 return wrapper; |
| 325 } | 325 } |
| 326 void V8TestEventTarget::derefObject(void* object) | 326 void V8TestEventTarget::derefObject(void* object) |
| 327 { | 327 { |
| 328 static_cast<TestEventTarget*>(object)->deref(); | 328 static_cast<TestEventTarget*>(object)->deref(); |
| 329 } | 329 } |
| 330 | 330 |
| 331 } // namespace WebCore | 331 } // namespace WebCore |
| OLD | NEW |