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

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

Issue 202203009: Rename |imp| => |impl| in bindings generation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: custom/v8 too Created 6 years, 9 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 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 namespace WebCore { 78 namespace WebCore {
79 const WrapperTypeInfo V8TestInterfacePython::wrapperTypeInfo = { gin::kEmbedderB link, V8TestInterfacePython::domTemplate, V8TestInterfacePython::derefObject, V8 TestInterfacePython::toActiveDOMObject, 0, V8TestInterfacePython::visitDOMWrappe r, V8TestInterfacePython::installPerContextEnabledMethods, &V8TestInterfaceEmpty ::wrapperTypeInfo, WrapperTypeObjectPrototype, false }; 79 const WrapperTypeInfo V8TestInterfacePython::wrapperTypeInfo = { gin::kEmbedderB link, V8TestInterfacePython::domTemplate, V8TestInterfacePython::derefObject, V8 TestInterfacePython::toActiveDOMObject, 0, V8TestInterfacePython::visitDOMWrappe r, V8TestInterfacePython::installPerContextEnabledMethods, &V8TestInterfaceEmpty ::wrapperTypeInfo, WrapperTypeObjectPrototype, false };
80 80
81 namespace TestInterfacePythonImplementationV8Internal { 81 namespace TestInterfacePythonImplementationV8Internal {
82 82
83 template <typename T> void V8_USE(T) { } 83 template <typename T> void V8_USE(T) { }
84 84
85 static void testInterfacePythonAttributeAttributeGetter(const v8::PropertyCallba ckInfo<v8::Value>& info) 85 static void testInterfacePythonAttributeAttributeGetter(const v8::PropertyCallba ckInfo<v8::Value>& info)
86 { 86 {
87 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 87 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
88 v8SetReturnValueFast(info, WTF::getPtr(imp->testInterfacePythonAttribute()), imp); 88 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfacePythonAttribute()) , impl);
89 } 89 }
90 90
91 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::St ring>, const v8::PropertyCallbackInfo<v8::Value>& info) 91 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::St ring>, const v8::PropertyCallbackInfo<v8::Value>& info)
92 { 92 {
93 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 93 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
94 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt ributeGetter(info); 94 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt ributeGetter(info);
95 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 95 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
96 } 96 }
97 97
98 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsV alue, const v8::PropertyCallbackInfo<void>& info) 98 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsV alue, const v8::PropertyCallbackInfo<void>& info)
99 { 99 {
100 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceP ythonAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate()); 100 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceP ythonAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate());
101 if (!isUndefinedOrNull(jsValue) && !V8TestInterfacePython::hasInstance(jsVal ue, info.GetIsolate())) { 101 if (!isUndefinedOrNull(jsValue) && !V8TestInterfacePython::hasInstance(jsVal ue, info.GetIsolate())) {
102 exceptionState.throwTypeError("The provided value is not of type 'TestIn terfacePython'."); 102 exceptionState.throwTypeError("The provided value is not of type 'TestIn terfacePython'.");
103 exceptionState.throwIfNeeded(); 103 exceptionState.throwIfNeeded();
104 return; 104 return;
105 } 105 }
106 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 106 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
107 V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfac ePython::toNativeWithTypeCheck(info.GetIsolate(), jsValue)); 107 V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfac ePython::toNativeWithTypeCheck(info.GetIsolate(), jsValue));
108 imp->setTestInterfacePythonAttribute(WTF::getPtr(cppValue)); 108 impl->setTestInterfacePythonAttribute(WTF::getPtr(cppValue));
109 } 109 }
110 110
111 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 111 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
112 { 112 {
113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
114 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt ributeSetter(jsValue, info); 114 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt ributeSetter(jsValue, info);
115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
116 } 116 }
117 117
118 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 118 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
(...skipping 16 matching lines...) Expand all
135 135
136 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 136 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
137 { 137 {
138 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 138 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
139 TestInterfacePythonImplementationV8Internal::staticStringAttributeAttributeS etter(jsValue, info); 139 TestInterfacePythonImplementationV8Internal::staticStringAttributeAttributeS etter(jsValue, info);
140 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 140 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
141 } 141 }
142 142
143 static void perWorldBindingsStringAttributeAttributeGetter(const v8::PropertyCal lbackInfo<v8::Value>& info) 143 static void perWorldBindingsStringAttributeAttributeGetter(const v8::PropertyCal lbackInfo<v8::Value>& info)
144 { 144 {
145 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 145 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
146 v8SetReturnValueString(info, imp->perWorldBindingsStringAttribute(), info.Ge tIsolate()); 146 v8SetReturnValueString(info, impl->perWorldBindingsStringAttribute(), info.G etIsolate());
147 } 147 }
148 148
149 static void perWorldBindingsStringAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info) 149 static void perWorldBindingsStringAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info)
150 { 150 {
151 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 151 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
152 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute AttributeGetter(info); 152 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute AttributeGetter(info);
153 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 153 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
154 } 154 }
155 155
156 static void perWorldBindingsStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 156 static void perWorldBindingsStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
157 { 157 {
158 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 158 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
159 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 159 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
160 imp->setPerWorldBindingsStringAttribute(cppValue); 160 impl->setPerWorldBindingsStringAttribute(cppValue);
161 } 161 }
162 162
163 static void perWorldBindingsStringAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo) 163 static void perWorldBindingsStringAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo)
164 { 164 {
165 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 165 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
166 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute AttributeSetter(jsValue, info); 166 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute AttributeSetter(jsValue, info);
167 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 167 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
168 } 168 }
169 169
170 static void perWorldBindingsStringAttributeAttributeGetterForMainWorld(const v8: :PropertyCallbackInfo<v8::Value>& info) 170 static void perWorldBindingsStringAttributeAttributeGetterForMainWorld(const v8: :PropertyCallbackInfo<v8::Value>& info)
171 { 171 {
172 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 172 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
173 v8SetReturnValueString(info, imp->perWorldBindingsStringAttribute(), info.Ge tIsolate()); 173 v8SetReturnValueString(info, impl->perWorldBindingsStringAttribute(), info.G etIsolate());
174 } 174 }
175 175
176 static void perWorldBindingsStringAttributeAttributeGetterCallbackForMainWorld(v 8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 176 static void perWorldBindingsStringAttributeAttributeGetterCallbackForMainWorld(v 8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
177 { 177 {
178 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 178 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
179 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute AttributeGetterForMainWorld(info); 179 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute AttributeGetterForMainWorld(info);
180 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 180 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
181 } 181 }
182 182
183 static void perWorldBindingsStringAttributeAttributeSetterForMainWorld(v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 183 static void perWorldBindingsStringAttributeAttributeSetterForMainWorld(v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
184 { 184 {
185 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 185 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
186 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 186 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
187 imp->setPerWorldBindingsStringAttribute(cppValue); 187 impl->setPerWorldBindingsStringAttribute(cppValue);
188 } 188 }
189 189
190 static void perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld(v 8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn fo<void>& info) 190 static void perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld(v 8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn fo<void>& info)
191 { 191 {
192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
193 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute AttributeSetterForMainWorld(jsValue, info); 193 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute AttributeSetterForMainWorld(jsValue, info);
194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
195 } 195 }
196 196
197 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info) 197 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info)
(...skipping 28 matching lines...) Expand all
226 226
227 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo) 227 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo)
228 { 228 {
229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
230 TestInterfacePythonImplementationV8Internal::implementsStaticStringAttribute AttributeSetter(jsValue, info); 230 TestInterfacePythonImplementationV8Internal::implementsStaticStringAttribute AttributeSetter(jsValue, info);
231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
232 } 232 }
233 233
234 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info) 234 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info)
235 { 235 {
236 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 236 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
237 ASSERT(imp); 237 ASSERT(impl);
238 v8SetReturnValueString(info, TestImplements::implementsReadonlyStringAttribu te(*imp), info.GetIsolate()); 238 v8SetReturnValueString(info, TestImplements::implementsReadonlyStringAttribu te(*impl), info.GetIsolate());
239 } 239 }
240 240
241 static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 241 static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
242 { 242 {
243 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 243 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
244 TestInterfacePythonImplementationV8Internal::implementsReadonlyStringAttribu teAttributeGetter(info); 244 TestInterfacePythonImplementationV8Internal::implementsReadonlyStringAttribu teAttributeGetter(info);
245 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 245 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
246 } 246 }
247 247
248 static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 248 static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
249 { 249 {
250 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 250 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
251 ASSERT(imp); 251 ASSERT(impl);
252 v8SetReturnValueString(info, TestImplements::implementsStringAttribute(*imp) , info.GetIsolate()); 252 v8SetReturnValueString(info, TestImplements::implementsStringAttribute(*impl ), info.GetIsolate());
253 } 253 }
254 254
255 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 255 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
256 { 256 {
257 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 257 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
258 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib uteGetter(info); 258 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib uteGetter(info);
259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
260 } 260 }
261 261
262 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 262 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
263 { 263 {
264 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 264 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
265 ASSERT(imp); 265 ASSERT(impl);
266 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 266 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
267 TestImplements::setImplementsStringAttribute(*imp, cppValue); 267 TestImplements::setImplementsStringAttribute(*impl, cppValue);
268 } 268 }
269 269
270 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 270 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
271 { 271 {
272 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 272 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
273 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib uteSetter(jsValue, info); 273 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib uteSetter(jsValue, info);
274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
275 } 275 }
276 276
277 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info) 277 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
278 { 278 {
279 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 279 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
280 ASSERT(imp); 280 ASSERT(impl);
281 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsNodeAttribu te(*imp)), imp); 281 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsNodeAttribu te(*impl)), impl);
282 } 282 }
283 283
284 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 284 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
285 { 285 {
286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
287 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut eGetter(info); 287 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut eGetter(info);
288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
289 } 289 }
290 290
291 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 291 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
292 { 292 {
293 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterfacePython", info.Holder(), info.GetIsolate()); 293 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterfacePython", info.Holder(), info.GetIsolate());
294 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) { 294 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) {
295 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 295 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
296 exceptionState.throwIfNeeded(); 296 exceptionState.throwIfNeeded();
297 return; 297 return;
298 } 298 }
299 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 299 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
300 ASSERT(imp); 300 ASSERT(impl);
301 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue)); 301 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue));
302 TestImplements::setImplementsNodeAttribute(*imp, WTF::getPtr(cppValue)); 302 TestImplements::setImplementsNodeAttribute(*impl, WTF::getPtr(cppValue));
303 } 303 }
304 304
305 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 305 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
306 { 306 {
307 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 307 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
308 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut eSetter(jsValue, info); 308 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut eSetter(jsValue, info);
309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
310 } 310 }
311 311
312 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal lbackInfo<v8::Value>& info) 312 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal lbackInfo<v8::Value>& info)
313 { 313 {
314 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 314 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
315 ASSERT(imp); 315 ASSERT(impl);
316 EventListener* jsValue = TestImplements::implementsEventHandlerAttribute(*im p); 316 EventListener* jsValue = TestImplements::implementsEventHandlerAttribute(*im pl);
317 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate()))); 317 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(impl->executionContext())) : v8::Handle<v8: :Value>(v8::Null(info.GetIsolate())));
318 } 318 }
319 319
320 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info) 320 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info)
321 { 321 {
322 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 322 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
323 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute AttributeGetter(info); 323 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute AttributeGetter(info);
324 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 324 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
325 } 325 }
326 326
327 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 327 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
328 { 328 {
329 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 329 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
330 ASSERT(imp); 330 ASSERT(impl);
331 moveEventListenerToNewWrapper(info.Holder(), TestImplements::implementsEvent HandlerAttribute(*imp), jsValue, V8TestInterfacePython::eventListenerCacheIndex, info.GetIsolate()); 331 moveEventListenerToNewWrapper(info.Holder(), TestImplements::implementsEvent HandlerAttribute(*impl), jsValue, V8TestInterfacePython::eventListenerCacheIndex , info.GetIsolate());
332 TestImplements::setImplementsEventHandlerAttribute(*imp, V8EventListenerList ::getEventListener(jsValue, true, ListenerFindOrCreate)); 332 TestImplements::setImplementsEventHandlerAttribute(*impl, V8EventListenerLis t::getEventListener(jsValue, true, ListenerFindOrCreate));
333 } 333 }
334 334
335 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo) 335 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo)
336 { 336 {
337 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 337 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
338 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute AttributeSetter(jsValue, info); 338 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute AttributeSetter(jsValue, info);
339 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 339 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
340 } 340 }
341 341
342 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info) 342 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info)
343 { 343 {
344 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 344 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
345 ASSERT(imp); 345 ASSERT(impl);
346 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsRuntimeEnab ledNodeAttribute(*imp)), imp); 346 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsRuntimeEnab ledNodeAttribute(*impl)), impl);
347 } 347 }
348 348
349 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 349 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
350 { 350 {
351 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 351 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
352 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt ributeAttributeGetter(info); 352 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt ributeAttributeGetter(info);
353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
354 } 354 }
355 355
356 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 356 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
357 { 357 {
358 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate( )); 358 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate( ));
359 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) { 359 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) {
360 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 360 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
361 exceptionState.throwIfNeeded(); 361 exceptionState.throwIfNeeded();
362 return; 362 return;
363 } 363 }
364 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 364 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
365 ASSERT(imp); 365 ASSERT(impl);
366 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue)); 366 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue));
367 TestImplements::setImplementsRuntimeEnabledNodeAttribute(*imp, WTF::getPtr(c ppValue)); 367 TestImplements::setImplementsRuntimeEnabledNodeAttribute(*impl, WTF::getPtr( cppValue));
368 } 368 }
369 369
370 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info) 370 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info)
371 { 371 {
372 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 372 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
373 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt ributeAttributeSetter(jsValue, info); 373 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt ributeAttributeSetter(jsValue, info);
374 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 374 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
375 } 375 }
376 376
377 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info) 377 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info)
378 { 378 {
379 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 379 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
380 ASSERT(imp); 380 ASSERT(impl);
381 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsPerContextE nabledNodeAttribute(*imp)), imp); 381 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsPerContextE nabledNodeAttribute(*impl)), impl);
382 } 382 }
383 383
384 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 384 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
385 { 385 {
386 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 386 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
387 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode AttributeAttributeGetter(info); 387 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode AttributeAttributeGetter(info);
388 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 388 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
389 } 389 }
390 390
391 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 391 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
392 { 392 {
393 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC ontextEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsola te()); 393 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC ontextEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsola te());
394 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) { 394 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) {
395 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 395 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
396 exceptionState.throwIfNeeded(); 396 exceptionState.throwIfNeeded();
397 return; 397 return;
398 } 398 }
399 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 399 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
400 ASSERT(imp); 400 ASSERT(impl);
401 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue)); 401 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue));
402 TestImplements::setImplementsPerContextEnabledNodeAttribute(*imp, WTF::getPt r(cppValue)); 402 TestImplements::setImplementsPerContextEnabledNodeAttribute(*impl, WTF::getP tr(cppValue));
403 } 403 }
404 404
405 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info) 405 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info)
406 { 406 {
407 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 407 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
408 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode AttributeAttributeSetter(jsValue, info); 408 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode AttributeAttributeSetter(jsValue, info);
409 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 409 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
410 } 410 }
411 411
412 static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCa llbackInfo<v8::Value>& info) 412 static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCa llbackInfo<v8::Value>& info)
(...skipping 16 matching lines...) Expand all
429 429
430 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i nfo) 430 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i nfo)
431 { 431 {
432 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 432 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
433 TestInterfacePythonImplementationV8Internal::implements2StaticStringAttribut eAttributeSetter(jsValue, info); 433 TestInterfacePythonImplementationV8Internal::implements2StaticStringAttribut eAttributeSetter(jsValue, info);
434 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 434 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
435 } 435 }
436 436
437 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info) 437 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info)
438 { 438 {
439 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 439 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
440 ASSERT(imp); 440 ASSERT(impl);
441 v8SetReturnValueString(info, TestImplements2Implementation::implements2Strin gAttribute(*imp), info.GetIsolate()); 441 v8SetReturnValueString(info, TestImplements2Implementation::implements2Strin gAttribute(*impl), info.GetIsolate());
442 } 442 }
443 443
444 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info) 444 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info)
445 { 445 {
446 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 446 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
447 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri buteGetter(info); 447 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri buteGetter(info);
448 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 448 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
449 } 449 }
450 450
451 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> jsVal ue, const v8::PropertyCallbackInfo<void>& info) 451 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> jsVal ue, const v8::PropertyCallbackInfo<void>& info)
452 { 452 {
453 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 453 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
454 ASSERT(imp); 454 ASSERT(impl);
455 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 455 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
456 TestImplements2Implementation::setImplements2StringAttribute(*imp, cppValue) ; 456 TestImplements2Implementation::setImplements2StringAttribute(*impl, cppValue );
457 } 457 }
458 458
459 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 459 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
460 { 460 {
461 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 461 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
462 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri buteSetter(jsValue, info); 462 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri buteSetter(jsValue, info);
463 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 463 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
464 } 464 }
465 465
466 #if ENABLE(PARTIAL_CONDITION) 466 #if ENABLE(PARTIAL_CONDITION)
467 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info) 467 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
468 { 468 {
469 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 469 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
470 ASSERT(imp); 470 ASSERT(impl);
471 v8SetReturnValueInt(info, TestPartialInterfacePython::partialLongAttribute(* imp)); 471 v8SetReturnValueInt(info, TestPartialInterfacePython::partialLongAttribute(* impl));
472 } 472 }
473 #endif // ENABLE(PARTIAL_CONDITION) 473 #endif // ENABLE(PARTIAL_CONDITION)
474 474
475 #if ENABLE(PARTIAL_CONDITION) 475 #if ENABLE(PARTIAL_CONDITION)
476 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 476 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
477 { 477 {
478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
479 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeGe tter(info); 479 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeGe tter(info);
480 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 480 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
481 } 481 }
482 #endif // ENABLE(PARTIAL_CONDITION) 482 #endif // ENABLE(PARTIAL_CONDITION)
483 483
484 #if ENABLE(PARTIAL_CONDITION) 484 #if ENABLE(PARTIAL_CONDITION)
485 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 485 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
486 { 486 {
487 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt ribute", "TestInterfacePython", info.Holder(), info.GetIsolate()); 487 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt ribute", "TestInterfacePython", info.Holder(), info.GetIsolate());
488 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 488 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
489 ASSERT(imp); 489 ASSERT(impl);
490 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState); 490 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
491 TestPartialInterfacePython::setPartialLongAttribute(*imp, cppValue); 491 TestPartialInterfacePython::setPartialLongAttribute(*impl, cppValue);
492 } 492 }
493 #endif // ENABLE(PARTIAL_CONDITION) 493 #endif // ENABLE(PARTIAL_CONDITION)
494 494
495 #if ENABLE(PARTIAL_CONDITION) 495 #if ENABLE(PARTIAL_CONDITION)
496 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 496 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
497 { 497 {
498 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 498 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
499 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeSe tter(jsValue, info); 499 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeSe tter(jsValue, info);
500 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 500 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
501 } 501 }
(...skipping 29 matching lines...) Expand all
531 { 531 {
532 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 532 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
533 TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttri buteSetter(jsValue, info); 533 TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttri buteSetter(jsValue, info);
534 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 534 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
535 } 535 }
536 #endif // ENABLE(PARTIAL_CONDITION) 536 #endif // ENABLE(PARTIAL_CONDITION)
537 537
538 #if ENABLE(PARTIAL_CONDITION) 538 #if ENABLE(PARTIAL_CONDITION)
539 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info) 539 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info)
540 { 540 {
541 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 541 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
542 ASSERT(imp); 542 ASSERT(impl);
543 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 543 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
544 v8SetReturnValueInt(info, TestPartialInterfacePython::partialCallWithExecuti onContextLongAttribute(scriptContext, *imp)); 544 v8SetReturnValueInt(info, TestPartialInterfacePython::partialCallWithExecuti onContextLongAttribute(scriptContext, *impl));
545 } 545 }
546 #endif // ENABLE(PARTIAL_CONDITION) 546 #endif // ENABLE(PARTIAL_CONDITION)
547 547
548 #if ENABLE(PARTIAL_CONDITION) 548 #if ENABLE(PARTIAL_CONDITION)
549 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 549 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
550 { 550 {
551 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 551 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
552 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext LongAttributeAttributeGetter(info); 552 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext LongAttributeAttributeGetter(info);
553 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 553 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
554 } 554 }
555 #endif // ENABLE(PARTIAL_CONDITION) 555 #endif // ENABLE(PARTIAL_CONDITION)
556 556
557 #if ENABLE(PARTIAL_CONDITION) 557 #if ENABLE(PARTIAL_CONDITION)
558 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 558 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
559 { 559 {
560 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterfacePython", info.Holder(), info.GetI solate()); 560 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterfacePython", info.Holder(), info.GetI solate());
561 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 561 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
562 ASSERT(imp); 562 ASSERT(impl);
563 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState); 563 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
564 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 564 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
565 TestPartialInterfacePython::setPartialCallWithExecutionContextLongAttribute( scriptContext, *imp, cppValue); 565 TestPartialInterfacePython::setPartialCallWithExecutionContextLongAttribute( scriptContext, *impl, cppValue);
566 } 566 }
567 #endif // ENABLE(PARTIAL_CONDITION) 567 #endif // ENABLE(PARTIAL_CONDITION)
568 568
569 #if ENABLE(PARTIAL_CONDITION) 569 #if ENABLE(PARTIAL_CONDITION)
570 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI nfo<void>& info) 570 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI nfo<void>& info)
571 { 571 {
572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
573 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext LongAttributeAttributeSetter(jsValue, info); 573 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext LongAttributeAttributeSetter(jsValue, info);
574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
575 } 575 }
576 #endif // ENABLE(PARTIAL_CONDITION) 576 #endif // ENABLE(PARTIAL_CONDITION)
577 577
578 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 578 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
579 { 579 {
580 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 580 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
581 ASSERT(imp); 581 ASSERT(impl);
582 v8SetReturnValueInt(info, TestPartialInterfacePythonImplementation::partial2 LongAttribute(*imp)); 582 v8SetReturnValueInt(info, TestPartialInterfacePythonImplementation::partial2 LongAttribute(*impl));
583 } 583 }
584 584
585 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 585 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
586 { 586 {
587 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 587 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
588 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeG etter(info); 588 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeG etter(info);
589 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 589 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
590 } 590 }
591 591
592 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 592 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
593 { 593 {
594 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt tribute", "TestInterfacePython", info.Holder(), info.GetIsolate()); 594 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt tribute", "TestInterfacePython", info.Holder(), info.GetIsolate());
595 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 595 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
596 ASSERT(imp); 596 ASSERT(impl);
597 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState); 597 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
598 TestPartialInterfacePythonImplementation::setPartial2LongAttribute(*imp, cpp Value); 598 TestPartialInterfacePythonImplementation::setPartial2LongAttribute(*impl, cp pValue);
599 } 599 }
600 600
601 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 601 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
602 { 602 {
603 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 603 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
604 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeS etter(jsValue, info); 604 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeS etter(jsValue, info);
605 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 605 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
606 } 606 }
607 607
608 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info) 608 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 { 650 {
651 TestInterfacePythonImplementationV8Internal::TestInterfacePythonImplementati onReplaceableAttributeSetter(name, jsValue, info); 651 TestInterfacePythonImplementationV8Internal::TestInterfacePythonImplementati onReplaceableAttributeSetter(name, jsValue, info);
652 } 652 }
653 653
654 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 654 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
655 { 655 {
656 if (UNLIKELY(info.Length() < 1)) { 656 if (UNLIKELY(info.Length() < 1)) {
657 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, inf o.Length())), info.GetIsolate()); 657 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, inf o.Length())), info.GetIsolate());
658 return; 658 return;
659 } 659 }
660 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 660 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
661 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge tIsolate())) { 661 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge tIsolate())) {
662 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", "parameter 1 is not of type 'TestInterfaceEm pty'."), info.GetIsolate()); 662 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", "parameter 1 is not of type 'TestInterfaceEm pty'."), info.GetIsolate());
663 return; 663 return;
664 } 664 }
665 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); 665 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
666 imp->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 666 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
667 } 667 }
668 668
669 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 669 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
670 { 670 {
671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
672 TestInterfacePythonImplementationV8Internal::voidMethodTestInterfaceEmptyArg Method(info); 672 TestInterfacePythonImplementationV8Internal::voidMethodTestInterfaceEmptyArg Method(info);
673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
674 } 674 }
675 675
676 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 676 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
677 { 677 {
678 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 678 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
679 imp->voidMethod(); 679 impl->voidMethod();
680 } 680 }
681 681
682 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 682 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
683 { 683 {
684 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 684 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
685 TestInterfacePythonImplementationV8Internal::voidMethodMethod(info); 685 TestInterfacePythonImplementationV8Internal::voidMethodMethod(info);
686 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 686 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
687 } 687 }
688 688
689 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu e>& info) 689 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu e>& info)
690 { 690 {
691 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 691 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
692 imp->voidMethod(); 692 impl->voidMethod();
693 } 693 }
694 694
695 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info) 695 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info)
696 { 696 {
697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
698 TestInterfacePythonImplementationV8Internal::voidMethodMethodForMainWorld(in fo); 698 TestInterfacePythonImplementationV8Internal::voidMethodMethodForMainWorld(in fo);
699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
700 } 700 }
701 701
702 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 702 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
703 { 703 {
704 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 704 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
705 ASSERT(imp); 705 ASSERT(impl);
706 TestImplements::implementsVoidMethod(*imp); 706 TestImplements::implementsVoidMethod(*impl);
707 } 707 }
708 708
709 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 709 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
710 { 710 {
711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
712 TestInterfacePythonImplementationV8Internal::implementsVoidMethodMethod(info ); 712 TestInterfacePythonImplementationV8Internal::implementsVoidMethodMethod(info );
713 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 713 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
714 } 714 }
715 715
716 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 716 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
717 { 717 {
718 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterfacePython", info.Holder(), info.GetIsolate()); 718 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterfacePython", info.Holder(), info.GetIsolate());
719 if (UNLIKELY(info.Length() < 2)) { 719 if (UNLIKELY(info.Length() < 2)) {
720 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 720 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
721 exceptionState.throwIfNeeded(); 721 exceptionState.throwIfNeeded();
722 return; 722 return;
723 } 723 }
724 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 724 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
725 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 725 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
726 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], info.Ge tIsolate())) { 726 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], info.Ge tIsolate())) {
727 exceptionState.throwTypeError("parameter 2 is not of type 'TestInterface Empty'."); 727 exceptionState.throwTypeError("parameter 2 is not of type 'TestInterface Empty'.");
728 exceptionState.throwIfNeeded(); 728 exceptionState.throwIfNeeded();
729 return; 729 return;
730 } 730 }
731 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[1])); 731 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
732 ASSERT(imp); 732 ASSERT(impl);
733 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 733 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
734 RefPtr<TestInterfaceEmpty> result = TestImplements::implementsComplexMethod( scriptContext, *imp, strArg, testInterfaceEmptyArg, exceptionState); 734 RefPtr<TestInterfaceEmpty> result = TestImplements::implementsComplexMethod( scriptContext, *impl, strArg, testInterfaceEmptyArg, exceptionState);
735 if (exceptionState.throwIfNeeded()) 735 if (exceptionState.throwIfNeeded())
736 return; 736 return;
737 v8SetReturnValue(info, result.release()); 737 v8SetReturnValue(info, result.release());
738 } 738 }
739 739
740 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 740 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
741 { 741 {
742 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 742 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
743 TestInterfacePythonImplementationV8Internal::implementsComplexMethodMethod(i nfo); 743 TestInterfacePythonImplementationV8Internal::implementsComplexMethodMethod(i nfo);
744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
(...skipping 13 matching lines...) Expand all
758 758
759 static void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 759 static void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
760 { 760 {
761 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 761 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
762 TestInterfacePythonImplementationV8Internal::implementsStaticVoidMethodMetho d(info); 762 TestInterfacePythonImplementationV8Internal::implementsStaticVoidMethodMetho d(info);
763 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 763 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
764 } 764 }
765 765
766 static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 766 static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
767 { 767 {
768 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 768 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
769 ASSERT(imp); 769 ASSERT(impl);
770 TestImplements2Implementation::implements2VoidMethod(*imp); 770 TestImplements2Implementation::implements2VoidMethod(*impl);
771 } 771 }
772 772
773 static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 773 static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
774 { 774 {
775 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 775 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
776 TestInterfacePythonImplementationV8Internal::implements2VoidMethodMethod(inf o); 776 TestInterfacePythonImplementationV8Internal::implements2VoidMethodMethod(inf o);
777 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 777 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
778 } 778 }
779 779
780 #if ENABLE(PARTIAL_CONDITION) 780 #if ENABLE(PARTIAL_CONDITION)
781 static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 781 static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
782 { 782 {
783 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 783 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
784 ASSERT(imp); 784 ASSERT(impl);
785 TestPartialInterfacePython::partialVoidMethod(*imp); 785 TestPartialInterfacePython::partialVoidMethod(*impl);
786 } 786 }
787 #endif // ENABLE(PARTIAL_CONDITION) 787 #endif // ENABLE(PARTIAL_CONDITION)
788 788
789 #if ENABLE(PARTIAL_CONDITION) 789 #if ENABLE(PARTIAL_CONDITION)
790 static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 790 static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
791 { 791 {
792 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 792 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
793 TestInterfacePythonImplementationV8Internal::partialVoidMethodMethod(info); 793 TestInterfacePythonImplementationV8Internal::partialVoidMethodMethod(info);
794 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 794 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
795 } 795 }
(...skipping 17 matching lines...) Expand all
813 813
814 #if ENABLE(PARTIAL_CONDITION) 814 #if ENABLE(PARTIAL_CONDITION)
815 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 815 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
816 { 816 {
817 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodLongArg", "TestInterfacePython", info.Holder(), info.GetIsolate()); 817 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodLongArg", "TestInterfacePython", info.Holder(), info.GetIsolate());
818 if (UNLIKELY(info.Length() < 1)) { 818 if (UNLIKELY(info.Length() < 1)) {
819 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 819 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
820 exceptionState.throwIfNeeded(); 820 exceptionState.throwIfNeeded();
821 return; 821 return;
822 } 822 }
823 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 823 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
824 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState); 824 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
825 ASSERT(imp); 825 ASSERT(impl);
826 TestPartialInterfacePython::partialVoidMethodLongArg(*imp, longArg); 826 TestPartialInterfacePython::partialVoidMethodLongArg(*impl, longArg);
827 } 827 }
828 #endif // ENABLE(PARTIAL_CONDITION) 828 #endif // ENABLE(PARTIAL_CONDITION)
829 829
830 #if ENABLE(PARTIAL_CONDITION) 830 #if ENABLE(PARTIAL_CONDITION)
831 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 831 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
832 { 832 {
833 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 833 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
834 TestInterfacePythonImplementationV8Internal::partialVoidMethodLongArgMethod( info); 834 TestInterfacePythonImplementationV8Internal::partialVoidMethodLongArgMethod( info);
835 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 835 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
836 } 836 }
837 #endif // ENABLE(PARTIAL_CONDITION) 837 #endif // ENABLE(PARTIAL_CONDITION)
838 838
839 #if ENABLE(PARTIAL_CONDITION) 839 #if ENABLE(PARTIAL_CONDITION)
840 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 840 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
841 { 841 {
842 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterfacePython", info.Hold er(), info.GetIsolate()); 842 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterfacePython", info.Hold er(), info.GetIsolate());
843 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 843 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
844 ASSERT(imp); 844 ASSERT(impl);
845 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 845 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
846 TestPartialInterfacePython::partialCallWithExecutionContextRaisesExceptionVo idMethod(scriptContext, *imp, exceptionState); 846 TestPartialInterfacePython::partialCallWithExecutionContextRaisesExceptionVo idMethod(scriptContext, *impl, exceptionState);
847 if (exceptionState.throwIfNeeded()) 847 if (exceptionState.throwIfNeeded())
848 return; 848 return;
849 } 849 }
850 #endif // ENABLE(PARTIAL_CONDITION) 850 #endif // ENABLE(PARTIAL_CONDITION)
851 851
852 #if ENABLE(PARTIAL_CONDITION) 852 #if ENABLE(PARTIAL_CONDITION)
853 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 853 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
854 { 854 {
855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
856 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext RaisesExceptionVoidMethodMethod(info); 856 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext RaisesExceptionVoidMethodMethod(info);
857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
858 } 858 }
859 #endif // ENABLE(PARTIAL_CONDITION) 859 #endif // ENABLE(PARTIAL_CONDITION)
860 860
861 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 861 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
862 { 862 {
863 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 863 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in fo.Holder());
864 ASSERT(imp); 864 ASSERT(impl);
865 TestPartialInterfacePythonImplementation::partial2VoidMethod(*imp); 865 TestPartialInterfacePythonImplementation::partial2VoidMethod(*impl);
866 } 866 }
867 867
868 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 868 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
869 { 869 {
870 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 870 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
871 TestInterfacePythonImplementationV8Internal::partial2VoidMethodMethod(info); 871 TestInterfacePythonImplementationV8Internal::partial2VoidMethodMethod(info);
872 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 872 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
873 } 873 }
874 874
875 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 875 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 } 1059 }
1060 1060
1061 template<> 1061 template<>
1062 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate) 1062 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate)
1063 { 1063 {
1064 return toV8(impl, creationContext, isolate); 1064 return toV8(impl, creationContext, isolate);
1065 } 1065 }
1066 1066
1067 } // namespace WebCore 1067 } // namespace WebCore
1068 #endif // ENABLE(CONDITION) 1068 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698