| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
| 6 | 6 |
| 7 #include "config.h" | 7 #include "config.h" |
| 8 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
| 9 #include "V8TestInterfacePython.h" | 9 #include "V8TestInterfacePython.h" |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfacePythonAttribute())
, impl); | 60 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfacePythonAttribute())
, impl); |
| 61 } | 61 } |
| 62 | 62 |
| 63 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 63 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 64 { | 64 { |
| 65 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 65 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 66 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt
ributeGetter(info); | 66 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt
ributeGetter(info); |
| 67 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 67 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 68 } | 68 } |
| 69 | 69 |
| 70 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsV
alue, const v8::PropertyCallbackInfo<void>& info) | 70 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 71 { | 71 { |
| 72 v8::Handle<v8::Object> holder = info.Holder(); | 72 v8::Handle<v8::Object> holder = info.Holder(); |
| 73 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceP
ythonAttribute", "TestInterfacePython", holder, info.GetIsolate()); | 73 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceP
ythonAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
| 74 if (!isUndefinedOrNull(jsValue) && !V8TestInterfacePython::hasInstance(jsVal
ue, info.GetIsolate())) { | 74 if (!isUndefinedOrNull(v8Value) && !V8TestInterfacePython::hasInstance(v8Val
ue, info.GetIsolate())) { |
| 75 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfacePython'."); | 75 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terfacePython'."); |
| 76 exceptionState.throwIfNeeded(); | 76 exceptionState.throwIfNeeded(); |
| 77 return; | 77 return; |
| 78 } | 78 } |
| 79 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 79 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 80 V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfac
ePython::toNativeWithTypeCheck(info.GetIsolate(), jsValue)); | 80 V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfac
ePython::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); |
| 81 impl->setTestInterfacePythonAttribute(WTF::getPtr(cppValue)); | 81 impl->setTestInterfacePythonAttribute(WTF::getPtr(cppValue)); |
| 82 } | 82 } |
| 83 | 83 |
| 84 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 84 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 85 { | 85 { |
| 86 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 86 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 87 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt
ributeSetter(jsValue, info); | 87 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt
ributeSetter(v8Value, info); |
| 88 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 88 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 89 } | 89 } |
| 90 | 90 |
| 91 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 91 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 92 { | 92 { |
| 93 v8SetReturnValueString(info, TestInterfacePythonImplementation::staticString
Attribute(), info.GetIsolate()); | 93 v8SetReturnValueString(info, TestInterfacePythonImplementation::staticString
Attribute(), info.GetIsolate()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 96 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 97 { | 97 { |
| 98 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 98 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 99 TestInterfacePythonImplementationV8Internal::staticStringAttributeAttributeG
etter(info); | 99 TestInterfacePythonImplementationV8Internal::staticStringAttributeAttributeG
etter(info); |
| 100 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 100 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 101 } | 101 } |
| 102 | 102 |
| 103 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 103 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 104 { | 104 { |
| 105 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 105 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 106 TestInterfacePythonImplementation::setStaticStringAttribute(cppValue); | 106 TestInterfacePythonImplementation::setStaticStringAttribute(cppValue); |
| 107 } | 107 } |
| 108 | 108 |
| 109 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 109 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 110 { | 110 { |
| 111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 112 TestInterfacePythonImplementationV8Internal::staticStringAttributeAttributeS
etter(jsValue, info); | 112 TestInterfacePythonImplementationV8Internal::staticStringAttributeAttributeS
etter(v8Value, info); |
| 113 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 113 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 114 } | 114 } |
| 115 | 115 |
| 116 static void perWorldBindingsStringAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 116 static void perWorldBindingsStringAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 117 { | 117 { |
| 118 v8::Handle<v8::Object> holder = info.Holder(); | 118 v8::Handle<v8::Object> holder = info.Holder(); |
| 119 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 119 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 120 v8SetReturnValueString(info, impl->perWorldBindingsStringAttribute(), info.G
etIsolate()); | 120 v8SetReturnValueString(info, impl->perWorldBindingsStringAttribute(), info.G
etIsolate()); |
| 121 } | 121 } |
| 122 | 122 |
| 123 static void perWorldBindingsStringAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 123 static void perWorldBindingsStringAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 124 { | 124 { |
| 125 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 125 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 126 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute
AttributeGetter(info); | 126 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute
AttributeGetter(info); |
| 127 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 127 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 128 } | 128 } |
| 129 | 129 |
| 130 static void perWorldBindingsStringAttributeAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 130 static void perWorldBindingsStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 131 { | 131 { |
| 132 v8::Handle<v8::Object> holder = info.Holder(); | 132 v8::Handle<v8::Object> holder = info.Holder(); |
| 133 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 133 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 134 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 134 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 135 impl->setPerWorldBindingsStringAttribute(cppValue); | 135 impl->setPerWorldBindingsStringAttribute(cppValue); |
| 136 } | 136 } |
| 137 | 137 |
| 138 static void perWorldBindingsStringAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) | 138 static void perWorldBindingsStringAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 139 { | 139 { |
| 140 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 140 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 141 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute
AttributeSetter(jsValue, info); | 141 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute
AttributeSetter(v8Value, info); |
| 142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 143 } | 143 } |
| 144 | 144 |
| 145 static void perWorldBindingsStringAttributeAttributeGetterForMainWorld(const v8:
:PropertyCallbackInfo<v8::Value>& info) | 145 static void perWorldBindingsStringAttributeAttributeGetterForMainWorld(const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 146 { | 146 { |
| 147 v8::Handle<v8::Object> holder = info.Holder(); | 147 v8::Handle<v8::Object> holder = info.Holder(); |
| 148 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 148 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 149 v8SetReturnValueString(info, impl->perWorldBindingsStringAttribute(), info.G
etIsolate()); | 149 v8SetReturnValueString(info, impl->perWorldBindingsStringAttribute(), info.G
etIsolate()); |
| 150 } | 150 } |
| 151 | 151 |
| 152 static void perWorldBindingsStringAttributeAttributeGetterCallbackForMainWorld(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 152 static void perWorldBindingsStringAttributeAttributeGetterCallbackForMainWorld(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 153 { | 153 { |
| 154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 155 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute
AttributeGetterForMainWorld(info); | 155 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute
AttributeGetterForMainWorld(info); |
| 156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 157 } | 157 } |
| 158 | 158 |
| 159 static void perWorldBindingsStringAttributeAttributeSetterForMainWorld(v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 159 static void perWorldBindingsStringAttributeAttributeSetterForMainWorld(v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 160 { | 160 { |
| 161 v8::Handle<v8::Object> holder = info.Holder(); | 161 v8::Handle<v8::Object> holder = info.Holder(); |
| 162 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 162 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 163 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 163 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 164 impl->setPerWorldBindingsStringAttribute(cppValue); | 164 impl->setPerWorldBindingsStringAttribute(cppValue); |
| 165 } | 165 } |
| 166 | 166 |
| 167 static void perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld(v
8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn
fo<void>& info) | 167 static void perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld(v
8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn
fo<void>& info) |
| 168 { | 168 { |
| 169 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 169 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 170 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute
AttributeSetterForMainWorld(jsValue, info); | 170 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute
AttributeSetterForMainWorld(v8Value, info); |
| 171 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 171 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 172 } | 172 } |
| 173 | 173 |
| 174 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 174 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 175 { | 175 { |
| 176 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyLongAttrib
ute()); | 176 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyLongAttrib
ute()); |
| 177 } | 177 } |
| 178 | 178 |
| 179 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 179 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 180 { | 180 { |
| 181 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 181 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 182 TestInterfacePythonImplementationV8Internal::implementsStaticReadOnlyLongAtt
ributeAttributeGetter(info); | 182 TestInterfacePythonImplementationV8Internal::implementsStaticReadOnlyLongAtt
ributeAttributeGetter(info); |
| 183 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 183 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 184 } | 184 } |
| 185 | 185 |
| 186 static void implementsStaticStringAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 186 static void implementsStaticStringAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 187 { | 187 { |
| 188 v8SetReturnValueString(info, TestImplements::implementsStaticStringAttribute
(), info.GetIsolate()); | 188 v8SetReturnValueString(info, TestImplements::implementsStaticStringAttribute
(), info.GetIsolate()); |
| 189 } | 189 } |
| 190 | 190 |
| 191 static void implementsStaticStringAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 191 static void implementsStaticStringAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 192 { | 192 { |
| 193 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 193 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 194 TestInterfacePythonImplementationV8Internal::implementsStaticStringAttribute
AttributeGetter(info); | 194 TestInterfacePythonImplementationV8Internal::implementsStaticStringAttribute
AttributeGetter(info); |
| 195 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 195 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 196 } | 196 } |
| 197 | 197 |
| 198 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 198 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 199 { | 199 { |
| 200 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 200 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 201 TestImplements::setImplementsStaticStringAttribute(cppValue); | 201 TestImplements::setImplementsStaticStringAttribute(cppValue); |
| 202 } | 202 } |
| 203 | 203 |
| 204 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) | 204 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 205 { | 205 { |
| 206 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 206 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 207 TestInterfacePythonImplementationV8Internal::implementsStaticStringAttribute
AttributeSetter(jsValue, info); | 207 TestInterfacePythonImplementationV8Internal::implementsStaticStringAttribute
AttributeSetter(v8Value, info); |
| 208 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 208 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 209 } | 209 } |
| 210 | 210 |
| 211 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) | 211 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) |
| 212 { | 212 { |
| 213 v8::Handle<v8::Object> holder = info.Holder(); | 213 v8::Handle<v8::Object> holder = info.Holder(); |
| 214 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 214 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 215 ASSERT(impl); | 215 ASSERT(impl); |
| 216 v8SetReturnValueString(info, TestImplements::implementsReadonlyStringAttribu
te(*impl), info.GetIsolate()); | 216 v8SetReturnValueString(info, TestImplements::implementsReadonlyStringAttribu
te(*impl), info.GetIsolate()); |
| 217 } | 217 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 231 v8SetReturnValueString(info, TestImplements::implementsStringAttribute(*impl
), info.GetIsolate()); | 231 v8SetReturnValueString(info, TestImplements::implementsStringAttribute(*impl
), info.GetIsolate()); |
| 232 } | 232 } |
| 233 | 233 |
| 234 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 234 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 235 { | 235 { |
| 236 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 236 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 237 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib
uteGetter(info); | 237 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib
uteGetter(info); |
| 238 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 238 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 239 } | 239 } |
| 240 | 240 |
| 241 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 241 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 242 { | 242 { |
| 243 v8::Handle<v8::Object> holder = info.Holder(); | 243 v8::Handle<v8::Object> holder = info.Holder(); |
| 244 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 244 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 245 ASSERT(impl); | 245 ASSERT(impl); |
| 246 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 246 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 247 TestImplements::setImplementsStringAttribute(*impl, cppValue); | 247 TestImplements::setImplementsStringAttribute(*impl, cppValue); |
| 248 } | 248 } |
| 249 | 249 |
| 250 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 250 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 251 { | 251 { |
| 252 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 252 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 253 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib
uteSetter(jsValue, info); | 253 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib
uteSetter(v8Value, info); |
| 254 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 254 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 255 } | 255 } |
| 256 | 256 |
| 257 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 257 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 258 { | 258 { |
| 259 v8::Handle<v8::Object> holder = info.Holder(); | 259 v8::Handle<v8::Object> holder = info.Holder(); |
| 260 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 260 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 261 ASSERT(impl); | 261 ASSERT(impl); |
| 262 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsNodeAttribu
te(*impl)), impl); | 262 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsNodeAttribu
te(*impl)), impl); |
| 263 } | 263 } |
| 264 | 264 |
| 265 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 265 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 266 { | 266 { |
| 267 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 267 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 268 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut
eGetter(info); | 268 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut
eGetter(info); |
| 269 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 269 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 270 } | 270 } |
| 271 | 271 |
| 272 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 272 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 273 { | 273 { |
| 274 v8::Handle<v8::Object> holder = info.Holder(); | 274 v8::Handle<v8::Object> holder = info.Holder(); |
| 275 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode
Attribute", "TestInterfacePython", holder, info.GetIsolate()); | 275 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode
Attribute", "TestInterfacePython", holder, info.GetIsolate()); |
| 276 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso
late())) { | 276 if (!isUndefinedOrNull(v8Value) && !V8Node::hasInstance(v8Value, info.GetIso
late())) { |
| 277 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 277 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 278 exceptionState.throwIfNeeded(); | 278 exceptionState.throwIfNeeded(); |
| 279 return; | 279 return; |
| 280 } | 280 } |
| 281 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 281 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 282 ASSERT(impl); | 282 ASSERT(impl); |
| 283 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola
te(), jsValue)); | 283 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola
te(), v8Value)); |
| 284 TestImplements::setImplementsNodeAttribute(*impl, WTF::getPtr(cppValue)); | 284 TestImplements::setImplementsNodeAttribute(*impl, WTF::getPtr(cppValue)); |
| 285 } | 285 } |
| 286 | 286 |
| 287 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 287 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 288 { | 288 { |
| 289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 290 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut
eSetter(jsValue, info); | 290 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut
eSetter(v8Value, info); |
| 291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 292 } | 292 } |
| 293 | 293 |
| 294 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 294 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 295 { | 295 { |
| 296 v8::Handle<v8::Object> holder = info.Holder(); | 296 v8::Handle<v8::Object> holder = info.Holder(); |
| 297 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 297 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 298 ASSERT(impl); | 298 ASSERT(impl); |
| 299 EventListener* jsValue = TestImplements::implementsEventHandlerAttribute(*im
pl); | 299 EventListener* v8Value = TestImplements::implementsEventHandlerAttribute(*im
pl); |
| 300 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); | 300 v8SetReturnValue(info, v8Value ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(v8Value)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); |
| 301 } | 301 } |
| 302 | 302 |
| 303 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 303 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 304 { | 304 { |
| 305 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 305 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 306 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute
AttributeGetter(info); | 306 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute
AttributeGetter(info); |
| 307 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 307 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 308 } | 308 } |
| 309 | 309 |
| 310 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 310 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 311 { | 311 { |
| 312 v8::Handle<v8::Object> holder = info.Holder(); | 312 v8::Handle<v8::Object> holder = info.Holder(); |
| 313 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 313 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 314 ASSERT(impl); | 314 ASSERT(impl); |
| 315 moveEventListenerToNewWrapper(holder, TestImplements::implementsEventHandler
Attribute(*impl), jsValue, V8TestInterfacePython::eventListenerCacheIndex, info.
GetIsolate()); | 315 moveEventListenerToNewWrapper(holder, TestImplements::implementsEventHandler
Attribute(*impl), v8Value, V8TestInterfacePython::eventListenerCacheIndex, info.
GetIsolate()); |
| 316 TestImplements::setImplementsEventHandlerAttribute(*impl, V8EventListenerLis
t::getEventListener(jsValue, true, ListenerFindOrCreate)); | 316 TestImplements::setImplementsEventHandlerAttribute(*impl, V8EventListenerLis
t::getEventListener(v8Value, true, ListenerFindOrCreate)); |
| 317 } | 317 } |
| 318 | 318 |
| 319 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) | 319 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 320 { | 320 { |
| 321 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 321 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 322 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute
AttributeSetter(jsValue, info); | 322 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute
AttributeSetter(v8Value, info); |
| 323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 324 } | 324 } |
| 325 | 325 |
| 326 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 326 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 327 { | 327 { |
| 328 v8::Handle<v8::Object> holder = info.Holder(); | 328 v8::Handle<v8::Object> holder = info.Holder(); |
| 329 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 329 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 330 ASSERT(impl); | 330 ASSERT(impl); |
| 331 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsRuntimeEnab
ledNodeAttribute(*impl)), impl); | 331 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsRuntimeEnab
ledNodeAttribute(*impl)), impl); |
| 332 } | 332 } |
| 333 | 333 |
| 334 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 334 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 335 { | 335 { |
| 336 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 336 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 337 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt
ributeAttributeGetter(info); | 337 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt
ributeAttributeGetter(info); |
| 338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 339 } | 339 } |
| 340 | 340 |
| 341 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 341 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 342 { | 342 { |
| 343 v8::Handle<v8::Object> holder = info.Holder(); | 343 v8::Handle<v8::Object> holder = info.Holder(); |
| 344 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt
imeEnabledNodeAttribute", "TestInterfacePython", holder, info.GetIsolate()); | 344 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt
imeEnabledNodeAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
| 345 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso
late())) { | 345 if (!isUndefinedOrNull(v8Value) && !V8Node::hasInstance(v8Value, info.GetIso
late())) { |
| 346 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 346 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 347 exceptionState.throwIfNeeded(); | 347 exceptionState.throwIfNeeded(); |
| 348 return; | 348 return; |
| 349 } | 349 } |
| 350 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 350 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 351 ASSERT(impl); | 351 ASSERT(impl); |
| 352 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola
te(), jsValue)); | 352 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola
te(), v8Value)); |
| 353 TestImplements::setImplementsRuntimeEnabledNodeAttribute(*impl, WTF::getPtr(
cppValue)); | 353 TestImplements::setImplementsRuntimeEnabledNodeAttribute(*impl, WTF::getPtr(
cppValue)); |
| 354 } | 354 } |
| 355 | 355 |
| 356 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) | 356 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) |
| 357 { | 357 { |
| 358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 359 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt
ributeAttributeSetter(jsValue, info); | 359 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt
ributeAttributeSetter(v8Value, info); |
| 360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 361 } | 361 } |
| 362 | 362 |
| 363 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 363 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 364 { | 364 { |
| 365 v8::Handle<v8::Object> holder = info.Holder(); | 365 v8::Handle<v8::Object> holder = info.Holder(); |
| 366 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 366 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 367 ASSERT(impl); | 367 ASSERT(impl); |
| 368 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsPerContextE
nabledNodeAttribute(*impl)), impl); | 368 v8SetReturnValueFast(info, WTF::getPtr(TestImplements::implementsPerContextE
nabledNodeAttribute(*impl)), impl); |
| 369 } | 369 } |
| 370 | 370 |
| 371 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 371 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 372 { | 372 { |
| 373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 374 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode
AttributeAttributeGetter(info); | 374 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode
AttributeAttributeGetter(info); |
| 375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 376 } | 376 } |
| 377 | 377 |
| 378 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 378 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 379 { | 379 { |
| 380 v8::Handle<v8::Object> holder = info.Holder(); | 380 v8::Handle<v8::Object> holder = info.Holder(); |
| 381 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC
ontextEnabledNodeAttribute", "TestInterfacePython", holder, info.GetIsolate()); | 381 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC
ontextEnabledNodeAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
| 382 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso
late())) { | 382 if (!isUndefinedOrNull(v8Value) && !V8Node::hasInstance(v8Value, info.GetIso
late())) { |
| 383 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 383 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 384 exceptionState.throwIfNeeded(); | 384 exceptionState.throwIfNeeded(); |
| 385 return; | 385 return; |
| 386 } | 386 } |
| 387 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 387 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 388 ASSERT(impl); | 388 ASSERT(impl); |
| 389 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola
te(), jsValue)); | 389 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola
te(), v8Value)); |
| 390 TestImplements::setImplementsPerContextEnabledNodeAttribute(*impl, WTF::getP
tr(cppValue)); | 390 TestImplements::setImplementsPerContextEnabledNodeAttribute(*impl, WTF::getP
tr(cppValue)); |
| 391 } | 391 } |
| 392 | 392 |
| 393 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 393 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
| 394 { | 394 { |
| 395 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 395 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 396 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode
AttributeAttributeSetter(jsValue, info); | 396 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode
AttributeAttributeSetter(v8Value, info); |
| 397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 398 } | 398 } |
| 399 | 399 |
| 400 static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 400 static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 401 { | 401 { |
| 402 v8SetReturnValueString(info, TestImplements2Implementation::implements2Stati
cStringAttribute(), info.GetIsolate()); | 402 v8SetReturnValueString(info, TestImplements2Implementation::implements2Stati
cStringAttribute(), info.GetIsolate()); |
| 403 } | 403 } |
| 404 | 404 |
| 405 static void implements2StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 405 static void implements2StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 406 { | 406 { |
| 407 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 407 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 408 TestInterfacePythonImplementationV8Internal::implements2StaticStringAttribut
eAttributeGetter(info); | 408 TestInterfacePythonImplementationV8Internal::implements2StaticStringAttribut
eAttributeGetter(info); |
| 409 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 409 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 410 } | 410 } |
| 411 | 411 |
| 412 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 412 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 413 { | 413 { |
| 414 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 414 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 415 TestImplements2Implementation::setImplements2StaticStringAttribute(cppValue)
; | 415 TestImplements2Implementation::setImplements2StaticStringAttribute(cppValue)
; |
| 416 } | 416 } |
| 417 | 417 |
| 418 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) | 418 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 419 { | 419 { |
| 420 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 420 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 421 TestInterfacePythonImplementationV8Internal::implements2StaticStringAttribut
eAttributeSetter(jsValue, info); | 421 TestInterfacePythonImplementationV8Internal::implements2StaticStringAttribut
eAttributeSetter(v8Value, info); |
| 422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 423 } | 423 } |
| 424 | 424 |
| 425 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 425 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 426 { | 426 { |
| 427 v8::Handle<v8::Object> holder = info.Holder(); | 427 v8::Handle<v8::Object> holder = info.Holder(); |
| 428 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 428 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 429 ASSERT(impl); | 429 ASSERT(impl); |
| 430 v8SetReturnValueString(info, TestImplements2Implementation::implements2Strin
gAttribute(*impl), info.GetIsolate()); | 430 v8SetReturnValueString(info, TestImplements2Implementation::implements2Strin
gAttribute(*impl), info.GetIsolate()); |
| 431 } | 431 } |
| 432 | 432 |
| 433 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 433 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 434 { | 434 { |
| 435 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 435 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 436 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri
buteGetter(info); | 436 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri
buteGetter(info); |
| 437 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 437 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 438 } | 438 } |
| 439 | 439 |
| 440 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> jsVal
ue, const v8::PropertyCallbackInfo<void>& info) | 440 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 441 { | 441 { |
| 442 v8::Handle<v8::Object> holder = info.Holder(); | 442 v8::Handle<v8::Object> holder = info.Holder(); |
| 443 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 443 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 444 ASSERT(impl); | 444 ASSERT(impl); |
| 445 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 445 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 446 TestImplements2Implementation::setImplements2StringAttribute(*impl, cppValue
); | 446 TestImplements2Implementation::setImplements2StringAttribute(*impl, cppValue
); |
| 447 } | 447 } |
| 448 | 448 |
| 449 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 449 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 450 { | 450 { |
| 451 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 451 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 452 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri
buteSetter(jsValue, info); | 452 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri
buteSetter(v8Value, info); |
| 453 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 453 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 454 } | 454 } |
| 455 | 455 |
| 456 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 456 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 457 { | 457 { |
| 458 v8::Handle<v8::Object> holder = info.Holder(); | 458 v8::Handle<v8::Object> holder = info.Holder(); |
| 459 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 459 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 460 v8SetReturnValueString(info, impl->implements3StringAttribute(), info.GetIso
late()); | 460 v8SetReturnValueString(info, impl->implements3StringAttribute(), info.GetIso
late()); |
| 461 } | 461 } |
| 462 | 462 |
| 463 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 463 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 464 { | 464 { |
| 465 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 465 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 466 TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttri
buteGetter(info); | 466 TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttri
buteGetter(info); |
| 467 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 467 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 468 } | 468 } |
| 469 | 469 |
| 470 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> jsVal
ue, const v8::PropertyCallbackInfo<void>& info) | 470 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 471 { | 471 { |
| 472 v8::Handle<v8::Object> holder = info.Holder(); | 472 v8::Handle<v8::Object> holder = info.Holder(); |
| 473 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 473 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 474 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 474 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 475 impl->setImplements3StringAttribute(cppValue); | 475 impl->setImplements3StringAttribute(cppValue); |
| 476 } | 476 } |
| 477 | 477 |
| 478 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 478 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 479 { | 479 { |
| 480 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 480 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 481 TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttri
buteSetter(jsValue, info); | 481 TestInterfacePythonImplementationV8Internal::implements3StringAttributeAttri
buteSetter(v8Value, info); |
| 482 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 482 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 483 } | 483 } |
| 484 | 484 |
| 485 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 485 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 486 { | 486 { |
| 487 v8SetReturnValueString(info, TestInterfacePythonImplementation::implements3S
taticStringAttribute(), info.GetIsolate()); | 487 v8SetReturnValueString(info, TestInterfacePythonImplementation::implements3S
taticStringAttribute(), info.GetIsolate()); |
| 488 } | 488 } |
| 489 | 489 |
| 490 static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 490 static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 491 { | 491 { |
| 492 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 492 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 493 TestInterfacePythonImplementationV8Internal::implements3StaticStringAttribut
eAttributeGetter(info); | 493 TestInterfacePythonImplementationV8Internal::implements3StaticStringAttribut
eAttributeGetter(info); |
| 494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 495 } | 495 } |
| 496 | 496 |
| 497 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 497 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 498 { | 498 { |
| 499 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 499 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 500 TestInterfacePythonImplementation::setImplements3StaticStringAttribute(cppVa
lue); | 500 TestInterfacePythonImplementation::setImplements3StaticStringAttribute(cppVa
lue); |
| 501 } | 501 } |
| 502 | 502 |
| 503 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) | 503 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 504 { | 504 { |
| 505 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 505 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 506 TestInterfacePythonImplementationV8Internal::implements3StaticStringAttribut
eAttributeSetter(jsValue, info); | 506 TestInterfacePythonImplementationV8Internal::implements3StaticStringAttribut
eAttributeSetter(v8Value, info); |
| 507 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 507 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 508 } | 508 } |
| 509 | 509 |
| 510 #if ENABLE(PARTIAL_CONDITION) | 510 #if ENABLE(PARTIAL_CONDITION) |
| 511 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 511 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 512 { | 512 { |
| 513 v8::Handle<v8::Object> holder = info.Holder(); | 513 v8::Handle<v8::Object> holder = info.Holder(); |
| 514 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 514 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 515 ASSERT(impl); | 515 ASSERT(impl); |
| 516 v8SetReturnValueInt(info, TestPartialInterfacePython::partialLongAttribute(*
impl)); | 516 v8SetReturnValueInt(info, TestPartialInterfacePython::partialLongAttribute(*
impl)); |
| 517 } | 517 } |
| 518 #endif // ENABLE(PARTIAL_CONDITION) | 518 #endif // ENABLE(PARTIAL_CONDITION) |
| 519 | 519 |
| 520 #if ENABLE(PARTIAL_CONDITION) | 520 #if ENABLE(PARTIAL_CONDITION) |
| 521 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 521 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 522 { | 522 { |
| 523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 524 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeGe
tter(info); | 524 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeGe
tter(info); |
| 525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 526 } | 526 } |
| 527 #endif // ENABLE(PARTIAL_CONDITION) | 527 #endif // ENABLE(PARTIAL_CONDITION) |
| 528 | 528 |
| 529 #if ENABLE(PARTIAL_CONDITION) | 529 #if ENABLE(PARTIAL_CONDITION) |
| 530 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 530 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 531 { | 531 { |
| 532 v8::Handle<v8::Object> holder = info.Holder(); | 532 v8::Handle<v8::Object> holder = info.Holder(); |
| 533 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt
ribute", "TestInterfacePython", holder, info.GetIsolate()); | 533 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt
ribute", "TestInterfacePython", holder, info.GetIsolate()); |
| 534 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 534 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 535 ASSERT(impl); | 535 ASSERT(impl); |
| 536 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 536 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 537 TestPartialInterfacePython::setPartialLongAttribute(*impl, cppValue); | 537 TestPartialInterfacePython::setPartialLongAttribute(*impl, cppValue); |
| 538 } | 538 } |
| 539 #endif // ENABLE(PARTIAL_CONDITION) | 539 #endif // ENABLE(PARTIAL_CONDITION) |
| 540 | 540 |
| 541 #if ENABLE(PARTIAL_CONDITION) | 541 #if ENABLE(PARTIAL_CONDITION) |
| 542 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 542 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 543 { | 543 { |
| 544 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 544 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 545 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeSe
tter(jsValue, info); | 545 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeSe
tter(v8Value, info); |
| 546 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 546 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 547 } | 547 } |
| 548 #endif // ENABLE(PARTIAL_CONDITION) | 548 #endif // ENABLE(PARTIAL_CONDITION) |
| 549 | 549 |
| 550 #if ENABLE(PARTIAL_CONDITION) | 550 #if ENABLE(PARTIAL_CONDITION) |
| 551 static void partialStaticLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 551 static void partialStaticLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 552 { | 552 { |
| 553 v8SetReturnValueInt(info, TestPartialInterfacePython::partialStaticLongAttri
bute()); | 553 v8SetReturnValueInt(info, TestPartialInterfacePython::partialStaticLongAttri
bute()); |
| 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 partialStaticLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 558 static void partialStaticLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 559 { | 559 { |
| 560 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 560 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 561 TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttri
buteGetter(info); | 561 TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttri
buteGetter(info); |
| 562 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 562 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 563 } | 563 } |
| 564 #endif // ENABLE(PARTIAL_CONDITION) | 564 #endif // ENABLE(PARTIAL_CONDITION) |
| 565 | 565 |
| 566 #if ENABLE(PARTIAL_CONDITION) | 566 #if ENABLE(PARTIAL_CONDITION) |
| 567 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> jsVal
ue, const v8::PropertyCallbackInfo<void>& info) | 567 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 568 { | 568 { |
| 569 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL
ongAttribute", "TestInterfacePython", holder, info.GetIsolate()); | 569 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL
ongAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
| 570 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 570 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 571 TestPartialInterfacePython::setPartialStaticLongAttribute(cppValue); | 571 TestPartialInterfacePython::setPartialStaticLongAttribute(cppValue); |
| 572 } | 572 } |
| 573 #endif // ENABLE(PARTIAL_CONDITION) | 573 #endif // ENABLE(PARTIAL_CONDITION) |
| 574 | 574 |
| 575 #if ENABLE(PARTIAL_CONDITION) | 575 #if ENABLE(PARTIAL_CONDITION) |
| 576 static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 576 static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 577 { | 577 { |
| 578 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 578 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 579 TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttri
buteSetter(jsValue, info); | 579 TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttri
buteSetter(v8Value, info); |
| 580 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 580 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 581 } | 581 } |
| 582 #endif // ENABLE(PARTIAL_CONDITION) | 582 #endif // ENABLE(PARTIAL_CONDITION) |
| 583 | 583 |
| 584 #if ENABLE(PARTIAL_CONDITION) | 584 #if ENABLE(PARTIAL_CONDITION) |
| 585 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 585 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 586 { | 586 { |
| 587 v8::Handle<v8::Object> holder = info.Holder(); | 587 v8::Handle<v8::Object> holder = info.Holder(); |
| 588 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 588 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 589 ASSERT(impl); | 589 ASSERT(impl); |
| 590 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 590 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
| 591 v8SetReturnValueInt(info, TestPartialInterfacePython::partialCallWithExecuti
onContextLongAttribute(scriptContext, *impl)); | 591 v8SetReturnValueInt(info, TestPartialInterfacePython::partialCallWithExecuti
onContextLongAttribute(scriptContext, *impl)); |
| 592 } | 592 } |
| 593 #endif // ENABLE(PARTIAL_CONDITION) | 593 #endif // ENABLE(PARTIAL_CONDITION) |
| 594 | 594 |
| 595 #if ENABLE(PARTIAL_CONDITION) | 595 #if ENABLE(PARTIAL_CONDITION) |
| 596 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 596 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 597 { | 597 { |
| 598 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 598 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 599 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext
LongAttributeAttributeGetter(info); | 599 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext
LongAttributeAttributeGetter(info); |
| 600 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 600 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 601 } | 601 } |
| 602 #endif // ENABLE(PARTIAL_CONDITION) | 602 #endif // ENABLE(PARTIAL_CONDITION) |
| 603 | 603 |
| 604 #if ENABLE(PARTIAL_CONDITION) | 604 #if ENABLE(PARTIAL_CONDITION) |
| 605 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 605 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 606 { | 606 { |
| 607 v8::Handle<v8::Object> holder = info.Holder(); | 607 v8::Handle<v8::Object> holder = info.Holder(); |
| 608 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit
hExecutionContextLongAttribute", "TestInterfacePython", holder, info.GetIsolate(
)); | 608 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit
hExecutionContextLongAttribute", "TestInterfacePython", holder, info.GetIsolate(
)); |
| 609 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 609 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 610 ASSERT(impl); | 610 ASSERT(impl); |
| 611 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 611 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 612 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 612 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
| 613 TestPartialInterfacePython::setPartialCallWithExecutionContextLongAttribute(
scriptContext, *impl, cppValue); | 613 TestPartialInterfacePython::setPartialCallWithExecutionContextLongAttribute(
scriptContext, *impl, cppValue); |
| 614 } | 614 } |
| 615 #endif // ENABLE(PARTIAL_CONDITION) | 615 #endif // ENABLE(PARTIAL_CONDITION) |
| 616 | 616 |
| 617 #if ENABLE(PARTIAL_CONDITION) | 617 #if ENABLE(PARTIAL_CONDITION) |
| 618 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI
nfo<void>& info) | 618 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
| 619 { | 619 { |
| 620 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 620 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 621 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext
LongAttributeAttributeSetter(jsValue, info); | 621 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext
LongAttributeAttributeSetter(v8Value, info); |
| 622 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 622 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 623 } | 623 } |
| 624 #endif // ENABLE(PARTIAL_CONDITION) | 624 #endif // ENABLE(PARTIAL_CONDITION) |
| 625 | 625 |
| 626 #if ENABLE(PARTIAL_CONDITION) | 626 #if ENABLE(PARTIAL_CONDITION) |
| 627 static void enumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 627 static void enumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 628 { | 628 { |
| 629 v8::Handle<v8::Object> holder = info.Holder(); | 629 v8::Handle<v8::Object> holder = info.Holder(); |
| 630 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 630 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 631 ASSERT(impl); | 631 ASSERT(impl); |
| 632 v8SetReturnValueString(info, TestPartialInterfacePython::enumAttribute(*impl
), info.GetIsolate()); | 632 v8SetReturnValueString(info, TestPartialInterfacePython::enumAttribute(*impl
), info.GetIsolate()); |
| 633 } | 633 } |
| 634 #endif // ENABLE(PARTIAL_CONDITION) | 634 #endif // ENABLE(PARTIAL_CONDITION) |
| 635 | 635 |
| 636 #if ENABLE(PARTIAL_CONDITION) | 636 #if ENABLE(PARTIAL_CONDITION) |
| 637 static void enumAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 637 static void enumAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 638 { | 638 { |
| 639 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 639 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 640 TestInterfacePythonImplementationV8Internal::enumAttributeAttributeGetter(in
fo); | 640 TestInterfacePythonImplementationV8Internal::enumAttributeAttributeGetter(in
fo); |
| 641 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 641 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 642 } | 642 } |
| 643 #endif // ENABLE(PARTIAL_CONDITION) | 643 #endif // ENABLE(PARTIAL_CONDITION) |
| 644 | 644 |
| 645 #if ENABLE(PARTIAL_CONDITION) | 645 #if ENABLE(PARTIAL_CONDITION) |
| 646 static void enumAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8:
:PropertyCallbackInfo<void>& info) | 646 static void enumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 647 { | 647 { |
| 648 v8::Handle<v8::Object> holder = info.Holder(); | 648 v8::Handle<v8::Object> holder = info.Holder(); |
| 649 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 649 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 650 ASSERT(impl); | 650 ASSERT(impl); |
| 651 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 651 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 652 String string = cppValue; | 652 String string = cppValue; |
| 653 if (!(string == "foo" || string == "bar")) | 653 if (!(string == "foo" || string == "bar")) |
| 654 return; | 654 return; |
| 655 TestPartialInterfacePython::setEnumAttribute(*impl, cppValue); | 655 TestPartialInterfacePython::setEnumAttribute(*impl, cppValue); |
| 656 } | 656 } |
| 657 #endif // ENABLE(PARTIAL_CONDITION) | 657 #endif // ENABLE(PARTIAL_CONDITION) |
| 658 | 658 |
| 659 #if ENABLE(PARTIAL_CONDITION) | 659 #if ENABLE(PARTIAL_CONDITION) |
| 660 static void enumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 660 static void enumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 661 { | 661 { |
| 662 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 662 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 663 TestInterfacePythonImplementationV8Internal::enumAttributeAttributeSetter(js
Value, info); | 663 TestInterfacePythonImplementationV8Internal::enumAttributeAttributeSetter(v8
Value, info); |
| 664 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 664 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 665 } | 665 } |
| 666 #endif // ENABLE(PARTIAL_CONDITION) | 666 #endif // ENABLE(PARTIAL_CONDITION) |
| 667 | 667 |
| 668 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 668 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 669 { | 669 { |
| 670 v8::Handle<v8::Object> holder = info.Holder(); | 670 v8::Handle<v8::Object> holder = info.Holder(); |
| 671 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 671 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 672 ASSERT(impl); | 672 ASSERT(impl); |
| 673 v8SetReturnValueInt(info, TestPartialInterfacePythonImplementation::partial2
LongAttribute(*impl)); | 673 v8SetReturnValueInt(info, TestPartialInterfacePythonImplementation::partial2
LongAttribute(*impl)); |
| 674 } | 674 } |
| 675 | 675 |
| 676 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 676 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 677 { | 677 { |
| 678 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 678 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 679 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeG
etter(info); | 679 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeG
etter(info); |
| 680 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 680 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 681 } | 681 } |
| 682 | 682 |
| 683 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 683 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 684 { | 684 { |
| 685 v8::Handle<v8::Object> holder = info.Holder(); | 685 v8::Handle<v8::Object> holder = info.Holder(); |
| 686 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt
tribute", "TestInterfacePython", holder, info.GetIsolate()); | 686 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt
tribute", "TestInterfacePython", holder, info.GetIsolate()); |
| 687 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); | 687 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(ho
lder); |
| 688 ASSERT(impl); | 688 ASSERT(impl); |
| 689 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 689 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 690 TestPartialInterfacePythonImplementation::setPartial2LongAttribute(*impl, cp
pValue); | 690 TestPartialInterfacePythonImplementation::setPartial2LongAttribute(*impl, cp
pValue); |
| 691 } | 691 } |
| 692 | 692 |
| 693 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 693 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 694 { | 694 { |
| 695 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 695 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 696 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeS
etter(jsValue, info); | 696 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeS
etter(v8Value, info); |
| 697 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 697 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 698 } | 698 } |
| 699 | 699 |
| 700 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 700 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 701 { | 701 { |
| 702 v8SetReturnValueInt(info, TestPartialInterfacePythonImplementation::partial2
StaticLongAttribute()); | 702 v8SetReturnValueInt(info, TestPartialInterfacePythonImplementation::partial2
StaticLongAttribute()); |
| 703 } | 703 } |
| 704 | 704 |
| 705 static void partial2StaticLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 705 static void partial2StaticLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 706 { | 706 { |
| 707 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 707 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 708 TestInterfacePythonImplementationV8Internal::partial2StaticLongAttributeAttr
ibuteGetter(info); | 708 TestInterfacePythonImplementationV8Internal::partial2StaticLongAttributeAttr
ibuteGetter(info); |
| 709 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 709 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 710 } | 710 } |
| 711 | 711 |
| 712 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) | 712 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 713 { | 713 { |
| 714 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static
LongAttribute", "TestInterfacePython", holder, info.GetIsolate()); | 714 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static
LongAttribute", "TestInterfacePython", holder, info.GetIsolate()); |
| 715 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 715 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 716 TestPartialInterfacePythonImplementation::setPartial2StaticLongAttribute(cpp
Value); | 716 TestPartialInterfacePythonImplementation::setPartial2StaticLongAttribute(cpp
Value); |
| 717 } | 717 } |
| 718 | 718 |
| 719 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 719 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 720 { | 720 { |
| 721 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 721 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 722 TestInterfacePythonImplementationV8Internal::partial2StaticLongAttributeAttr
ibuteSetter(jsValue, info); | 722 TestInterfacePythonImplementationV8Internal::partial2StaticLongAttributeAttr
ibuteSetter(v8Value, info); |
| 723 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 723 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 724 } | 724 } |
| 725 | 725 |
| 726 static void TestInterfacePythonImplementationConstructorGetter(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 726 static void TestInterfacePythonImplementationConstructorGetter(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 727 { | 727 { |
| 728 v8::Handle<v8::Value> data = info.Data(); | 728 v8::Handle<v8::Value> data = info.Data(); |
| 729 ASSERT(data->IsExternal()); | 729 ASSERT(data->IsExternal()); |
| 730 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 730 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
| 731 if (!perContextData) | 731 if (!perContextData) |
| 732 return; | 732 return; |
| 733 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 733 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
| 734 } | 734 } |
| 735 | 735 |
| 736 static void TestInterfacePythonImplementationReplaceableAttributeSetter(v8::Loca
l<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) | 736 static void TestInterfacePythonImplementationReplaceableAttributeSetter(v8::Loca
l<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) |
| 737 { | 737 { |
| 738 info.This()->ForceSet(name, jsValue); | 738 info.This()->ForceSet(name, v8Value); |
| 739 } | 739 } |
| 740 | 740 |
| 741 static void TestInterfacePythonImplementationReplaceableAttributeSetterCallback(
v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCall
backInfo<void>& info) | 741 static void TestInterfacePythonImplementationReplaceableAttributeSetterCallback(
v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) |
| 742 { | 742 { |
| 743 TestInterfacePythonImplementationV8Internal::TestInterfacePythonImplementati
onReplaceableAttributeSetter(name, jsValue, info); | 743 TestInterfacePythonImplementationV8Internal::TestInterfacePythonImplementati
onReplaceableAttributeSetter(name, v8Value, info); |
| 744 } | 744 } |
| 745 | 745 |
| 746 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 746 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 747 { | 747 { |
| 748 if (UNLIKELY(info.Length() < 1)) { | 748 if (UNLIKELY(info.Length() < 1)) { |
| 749 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa
ceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, inf
o.Length())), info.GetIsolate()); | 749 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa
ceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, inf
o.Length())), info.GetIsolate()); |
| 750 return; | 750 return; |
| 751 } | 751 } |
| 752 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in
fo.Holder()); | 752 TestInterfacePythonImplementation* impl = V8TestInterfacePython::toNative(in
fo.Holder()); |
| 753 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge
tIsolate())) { | 753 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge
tIsolate())) { |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 if (!result.IsEmpty()) | 1171 if (!result.IsEmpty()) |
| 1172 return result; | 1172 return result; |
| 1173 | 1173 |
| 1174 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 1174 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
| 1175 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); | 1175 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); |
| 1176 configureV8TestInterfacePythonTemplate(result, isolate); | 1176 configureV8TestInterfacePythonTemplate(result, isolate); |
| 1177 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; | 1177 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; |
| 1178 return result; | 1178 return result; |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 bool V8TestInterfacePython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isola
te* isolate) | 1181 bool V8TestInterfacePython::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isola
te* isolate) |
| 1182 { | 1182 { |
| 1183 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e); | 1183 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 v8::Handle<v8::Object> V8TestInterfacePython::findInstanceInPrototypeChain(v8::H
andle<v8::Value> jsValue, v8::Isolate* isolate) | 1186 v8::Handle<v8::Object> V8TestInterfacePython::findInstanceInPrototypeChain(v8::H
andle<v8::Value> v8Value, v8::Isolate* isolate) |
| 1187 { | 1187 { |
| 1188 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, jsValue); | 1188 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 TestInterfacePythonImplementation* V8TestInterfacePython::toNativeWithTypeCheck(
v8::Isolate* isolate, v8::Handle<v8::Value> value) | 1191 TestInterfacePythonImplementation* V8TestInterfacePython::toNativeWithTypeCheck(
v8::Isolate* isolate, v8::Handle<v8::Value> value) |
| 1192 { | 1192 { |
| 1193 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 1193 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
| 1194 } | 1194 } |
| 1195 | 1195 |
| 1196 void V8TestInterfacePython::installPerContextEnabledProperties(v8::Handle<v8::Ob
ject> instanceTemplate, TestInterfacePythonImplementation* impl, v8::Isolate* is
olate) | 1196 void V8TestInterfacePython::installPerContextEnabledProperties(v8::Handle<v8::Ob
ject> instanceTemplate, TestInterfacePythonImplementation* impl, v8::Isolate* is
olate) |
| 1197 { | 1197 { |
| 1198 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan
ceTemplate->GetPrototype()); | 1198 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan
ceTemplate->GetPrototype()); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1214 } | 1214 } |
| 1215 | 1215 |
| 1216 template<> | 1216 template<> |
| 1217 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) | 1217 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 1218 { | 1218 { |
| 1219 return toV8(impl, creationContext, isolate); | 1219 return toV8(impl, creationContext, isolate); |
| 1220 } | 1220 } |
| 1221 | 1221 |
| 1222 } // namespace WebCore | 1222 } // namespace WebCore |
| 1223 #endif // ENABLE(CONDITION) | 1223 #endif // ENABLE(CONDITION) |
| OLD | NEW |