Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: Source/bindings/tests/results/V8TestObjectPython.cpp

Issue 30493002: IDL compiler: EventHandler for setters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Briefer Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "bindings/v8/ExceptionState.h" 42 #include "bindings/v8/ExceptionState.h"
43 #include "bindings/v8/ScriptController.h" 43 #include "bindings/v8/ScriptController.h"
44 #include "bindings/v8/ScriptPromise.h" 44 #include "bindings/v8/ScriptPromise.h"
45 #include "bindings/v8/ScriptValue.h" 45 #include "bindings/v8/ScriptValue.h"
46 #include "bindings/v8/SerializedScriptValue.h" 46 #include "bindings/v8/SerializedScriptValue.h"
47 #include "bindings/v8/V8AbstractEventListener.h" 47 #include "bindings/v8/V8AbstractEventListener.h"
48 #include "bindings/v8/V8Binding.h" 48 #include "bindings/v8/V8Binding.h"
49 #include "bindings/v8/V8DOMActivityLogger.h" 49 #include "bindings/v8/V8DOMActivityLogger.h"
50 #include "bindings/v8/V8DOMConfiguration.h" 50 #include "bindings/v8/V8DOMConfiguration.h"
51 #include "bindings/v8/V8DOMWrapper.h" 51 #include "bindings/v8/V8DOMWrapper.h"
52 #include "bindings/v8/V8EventListenerList.h"
52 #include "bindings/v8/V8HiddenPropertyName.h" 53 #include "bindings/v8/V8HiddenPropertyName.h"
53 #include "bindings/v8/custom/V8ArrayBufferCustom.h" 54 #include "bindings/v8/custom/V8ArrayBufferCustom.h"
54 #include "bindings/v8/custom/V8Float32ArrayCustom.h" 55 #include "bindings/v8/custom/V8Float32ArrayCustom.h"
55 #include "bindings/v8/custom/V8Uint8ArrayCustom.h" 56 #include "bindings/v8/custom/V8Uint8ArrayCustom.h"
56 #include "core/dom/ContextFeatures.h" 57 #include "core/dom/ContextFeatures.h"
57 #include "core/dom/Document.h" 58 #include "core/dom/Document.h"
58 #include "core/page/UseCounter.h" 59 #include "core/page/UseCounter.h"
59 #include "platform/TraceEvent.h" 60 #include "platform/TraceEvent.h"
60 #include "wtf/GetPtr.h" 61 #include "wtf/GetPtr.h"
61 #include "wtf/RefPtr.h" 62 #include "wtf/RefPtr.h"
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 v8SetReturnValueInt(info, TestObjectPython::staticReadonlyLongAttribute()); 1075 v8SetReturnValueInt(info, TestObjectPython::staticReadonlyLongAttribute());
1075 } 1076 }
1076 1077
1077 static void staticReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::Str ing> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1078 static void staticReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::Str ing> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1078 { 1079 {
1079 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1080 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1080 TestObjectPythonV8Internal::staticReadonlyLongAttributeAttributeGetter(name, info); 1081 TestObjectPythonV8Internal::staticReadonlyLongAttributeAttributeGetter(name, info);
1081 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1082 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1082 } 1083 }
1083 1084
1084 static void readonlyEventHandlerAttributeAttributeGetter(v8::Local<v8::String> n ame, const v8::PropertyCallbackInfo<v8::Value>& info) 1085 static void eventHandlerAttributeAttributeGetter(v8::Local<v8::String> name, con st v8::PropertyCallbackInfo<v8::Value>& info)
1085 { 1086 {
1086 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1087 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1087 EventListener* jsValue = imp->readonlyEventHandlerAttribute(isolatedWorldFor Isolate(info.GetIsolate())); 1088 EventListener* jsValue = imp->eventHandlerAttribute(isolatedWorldForIsolate( info.GetIsolate()));
1088 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate()))); 1089 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate())));
1089 } 1090 }
1090 1091
1091 static void readonlyEventHandlerAttributeAttributeGetterCallback(v8::Local<v8::S tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1092 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String> n ame, const v8::PropertyCallbackInfo<v8::Value>& info)
1092 { 1093 {
1093 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1094 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1094 TestObjectPythonV8Internal::readonlyEventHandlerAttributeAttributeGetter(nam e, info); 1095 TestObjectPythonV8Internal::eventHandlerAttributeAttributeGetter(name, info) ;
1095 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1096 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1096 } 1097 }
1097 1098
1099 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::String> name, v8: :Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1100 {
1101 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1102 if (!jsValue->IsNull() && !jsValue->IsFunction())
1103 jsValue = v8::Null(info.GetIsolate());
1104 transferHiddenDependency(info.Holder(), imp->eventHandlerAttribute(isolatedW orldForIsolate(info.GetIsolate())), jsValue, V8TestObjectPython::eventListenerCa cheIndex, info.GetIsolate());
1105 imp->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue, true, ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate()));
1106 }
1107
1108 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String> n ame, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1109 {
1110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1111 TestObjectPythonV8Internal::eventHandlerAttributeAttributeSetter(name, jsVal ue, info);
1112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1113 }
1114
1098 static void promiseAttributeAttributeGetter(v8::Local<v8::String> name, const v8 ::PropertyCallbackInfo<v8::Value>& info) 1115 static void promiseAttributeAttributeGetter(v8::Local<v8::String> name, const v8 ::PropertyCallbackInfo<v8::Value>& info)
1099 { 1116 {
1100 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1117 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1101 v8SetReturnValue(info, imp->promiseAttribute().v8Value()); 1118 v8SetReturnValue(info, imp->promiseAttribute().v8Value());
1102 } 1119 }
1103 1120
1104 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1121 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1105 { 1122 {
1106 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1123 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1107 TestObjectPythonV8Internal::promiseAttributeAttributeGetter(name, info); 1124 TestObjectPythonV8Internal::promiseAttributeAttributeGetter(name, info);
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 {"self", TestObjectPythonV8Internal::selfAttributeGetterCallback, 0, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */}, 2070 {"self", TestObjectPythonV8Internal::selfAttributeGetterCallback, 0, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */},
2054 {"readonlyWindowAttribute", TestObjectPythonV8Internal::readonlyWindowAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 2071 {"readonlyWindowAttribute", TestObjectPythonV8Internal::readonlyWindowAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2055 {"readonlyHTMLCollectionAttribute", TestObjectPythonV8Internal::readonlyHTML CollectionAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessCo ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta nce */}, 2072 {"readonlyHTMLCollectionAttribute", TestObjectPythonV8Internal::readonlyHTML CollectionAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessCo ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta nce */},
2056 {"readonlyHTMLElementAttribute", TestObjectPythonV8Internal::readonlyHTMLEle mentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl> (v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */ }, 2073 {"readonlyHTMLElementAttribute", TestObjectPythonV8Internal::readonlyHTMLEle mentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl> (v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */ },
2057 {"readonlyStringArrayAttribute", TestObjectPythonV8Internal::readonlyStringA rrayAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl> (v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */ }, 2074 {"readonlyStringArrayAttribute", TestObjectPythonV8Internal::readonlyStringA rrayAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl> (v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */ },
2058 {"readonlyTestInterfaceEmptyArrayAttribute", TestObjectPythonV8Internal::rea donlyTestInterfaceEmptyArrayAttributeAttributeGetterCallback, 0, 0, 0, 0, static _cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No ne), 0 /* on instance */}, 2075 {"readonlyTestInterfaceEmptyArrayAttribute", TestObjectPythonV8Internal::rea donlyTestInterfaceEmptyArrayAttributeAttributeGetterCallback, 0, 0, 0, 0, static _cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No ne), 0 /* on instance */},
2059 {"readonlyFloatArrayAttribute", TestObjectPythonV8Internal::readonlyFloatArr ayAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v 8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 2076 {"readonlyFloatArrayAttribute", TestObjectPythonV8Internal::readonlyFloatArr ayAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v 8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2060 {"nullableStringAttribute", TestObjectPythonV8Internal::nullableStringAttrib uteAttributeGetterCallback, TestObjectPythonV8Internal::nullableStringAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 2077 {"nullableStringAttribute", TestObjectPythonV8Internal::nullableStringAttrib uteAttributeGetterCallback, TestObjectPythonV8Internal::nullableStringAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2061 {"nullableLongAttribute", TestObjectPythonV8Internal::nullableLongAttributeA ttributeGetterCallback, TestObjectPythonV8Internal::nullableLongAttributeAttribu teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 2078 {"nullableLongAttribute", TestObjectPythonV8Internal::nullableLongAttributeA ttributeGetterCallback, TestObjectPythonV8Internal::nullableLongAttributeAttribu teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2062 {"readonlyTestEnumAttribute", TestObjectPythonV8Internal::readonlyTestEnumAt tributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::D EFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 2079 {"readonlyTestEnumAttribute", TestObjectPythonV8Internal::readonlyTestEnumAt tributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::D EFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2063 {"readonlyEventHandlerAttribute", TestObjectPythonV8Internal::readonlyEventH andlerAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessContro l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 2080 {"eventHandlerAttribute", TestObjectPythonV8Internal::eventHandlerAttributeA ttributeGetterCallback, TestObjectPythonV8Internal::eventHandlerAttributeAttribu teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2064 {"promiseAttribute", TestObjectPythonV8Internal::promiseAttributeAttributeGe tterCallback, TestObjectPythonV8Internal::promiseAttributeAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), 0 /* on instance */}, 2081 {"promiseAttribute", TestObjectPythonV8Internal::promiseAttributeAttributeGe tterCallback, TestObjectPythonV8Internal::promiseAttributeAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), 0 /* on instance */},
2065 {"activityLogAccessReadonlyLongAttribute", TestObjectPythonV8Internal::activ ityLogAccessReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cas t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 2082 {"activityLogAccessReadonlyLongAttribute", TestObjectPythonV8Internal::activ ityLogAccessReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cas t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2066 {"activityLogGetterReadonlyLongAttribute", TestObjectPythonV8Internal::activ ityLogGetterReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cas t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 2083 {"activityLogGetterReadonlyLongAttribute", TestObjectPythonV8Internal::activ ityLogGetterReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cas t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2067 {"cachedAttributeAnyAttribute", TestObjectPythonV8Internal::cachedAttributeA nyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::cachedAttributeA nyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:: DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 2084 {"cachedAttributeAnyAttribute", TestObjectPythonV8Internal::cachedAttributeA nyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::cachedAttributeA nyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:: DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
2068 {"callWithExecutionContextAnyAttribute", TestObjectPythonV8Internal::callWit hExecutionContextAnyAttributeAttributeGetterCallback, TestObjectPythonV8Internal ::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, static_c ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None ), 0 /* on instance */}, 2085 {"callWithExecutionContextAnyAttribute", TestObjectPythonV8Internal::callWit hExecutionContextAnyAttributeAttributeGetterCallback, TestObjectPythonV8Internal ::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, static_c ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None ), 0 /* on instance */},
2069 {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectPythonV8Internal ::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), 0 /* on instance */}, 2086 {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectPythonV8Internal ::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), 0 /* on instance */},
2070 #if ENABLE(Condition) 2087 #if ENABLE(Condition)
2071 {"conditionalReadonlyLongAttribute", TestObjectPythonV8Internal::conditional ReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */}, 2088 {"conditionalReadonlyLongAttribute", TestObjectPythonV8Internal::conditional ReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */},
2072 #endif // ENABLE(Condition) 2089 #endif // ENABLE(Condition)
2073 #if ENABLE(Condition1) && ENABLE(Condition2) 2090 #if ENABLE(Condition1) && ENABLE(Condition2)
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2216 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &info, wr apper, isolate, WrapperConfiguration::Independent); 2233 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &info, wr apper, isolate, WrapperConfiguration::Independent);
2217 return wrapper; 2234 return wrapper;
2218 } 2235 }
2219 2236
2220 void V8TestObjectPython::derefObject(void* object) 2237 void V8TestObjectPython::derefObject(void* object)
2221 { 2238 {
2222 fromInternalPointer(object)->deref(); 2239 fromInternalPointer(object)->deref();
2223 } 2240 }
2224 2241
2225 } // namespace WebCore 2242 } // namespace WebCore
OLDNEW
« Source/bindings/templates/attributes.cpp ('K') | « Source/bindings/tests/idls/TestObjectPython.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698