| 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 "V8TestInterface.h" | 9 #include "V8TestInterface.h" |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 if (!perContextData) | 74 if (!perContextData) |
| 75 break; | 75 break; |
| 76 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data); | 76 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data); |
| 77 if (!wrapperTypeInfo) | 77 if (!wrapperTypeInfo) |
| 78 break; | 78 break; |
| 79 TestInterfaceImplementationForceSetAttributeOnThis(v8String(info.GetIsol
ate(), wrapperTypeInfo->interfaceName), v8Value, info); | 79 TestInterfaceImplementationForceSetAttributeOnThis(v8String(info.GetIsol
ate(), wrapperTypeInfo->interfaceName), v8Value, info); |
| 80 } while (false); // do ... while (false) just for use of break | 80 } while (false); // do ... while (false) just for use of break |
| 81 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 81 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 82 } | 82 } |
| 83 | 83 |
| 84 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) | 84 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 85 { | 85 { |
| 86 v8::Local<v8::Object> holder = info.Holder(); | 86 v8::Local<v8::Object> holder = info.Holder(); |
| 87 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 87 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 88 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | 88 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); |
| 89 } | 89 } |
| 90 | 90 |
| 91 static void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 91 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 92 { | 92 { |
| 93 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 93 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 94 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib
uteGetter); | 94 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib
uteGetter); |
| 95 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter
(info); | 95 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter
(info); |
| 96 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 96 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 97 } | 97 } |
| 98 | 98 |
| 99 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 99 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 100 { | 100 { |
| 101 v8::Local<v8::Object> holder = info.Holder(); | 101 v8::Local<v8::Object> holder = info.Holder(); |
| 102 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface", holder, info.GetIsolate()); | 102 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 103 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 103 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 104 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 104 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 105 if (!cppValue) { | 105 if (!cppValue) { |
| 106 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 106 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 107 exceptionState.throwIfNeeded(); | 107 exceptionState.throwIfNeeded(); |
| 108 return; | 108 return; |
| 109 } | 109 } |
| 110 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 110 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 111 } | 111 } |
| 112 | 112 |
| 113 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 113 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 114 { | 114 { |
| 115 v8::Local<v8::Value> v8Value = info[0]; | |
| 116 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 115 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 117 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib
uteSetter); | 116 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib
uteSetter); |
| 118 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter
(v8Value, info); | 117 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter
(v8Value, info); |
| 119 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 120 } | 119 } |
| 121 | 120 |
| 122 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) | 121 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 123 { | 122 { |
| 124 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceConstructorAttribute"); | 123 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceConstructorAttribute"); |
| 125 TestInterfaceImplementationForceSetAttributeOnThis(propertyName, v8Value, in
fo); | 124 TestInterfaceImplementationForceSetAttributeOnThis(propertyName, v8Value, in
fo); |
| 126 } | 125 } |
| 127 | 126 |
| 128 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v
8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 127 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v
8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 129 { | 128 { |
| 130 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 129 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 131 TestInterfaceImplementationV8Internal::testInterfaceConstructorAttributeAttr
ibuteSetter(v8Value, info); | 130 TestInterfaceImplementationV8Internal::testInterfaceConstructorAttributeAttr
ibuteSetter(v8Value, info); |
| 132 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 131 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 133 } | 132 } |
| 134 | 133 |
| 135 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 134 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 136 { | 135 { |
| 137 v8::Local<v8::Object> holder = info.Holder(); | 136 v8::Local<v8::Object> holder = info.Holder(); |
| 138 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 137 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 139 v8SetReturnValue(info, impl->doubleAttribute()); | 138 v8SetReturnValue(info, impl->doubleAttribute()); |
| 140 } | 139 } |
| 141 | 140 |
| 142 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 141 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 143 { | 142 { |
| 144 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 145 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info); | 144 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info); |
| 146 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 147 } | 146 } |
| 148 | 147 |
| 149 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) | 148 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 150 { | 149 { |
| 151 v8::Local<v8::Object> holder = info.Holder(); | 150 v8::Local<v8::Object> holder = info.Holder(); |
| 152 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface", holder, info.GetIsolate()); | 151 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface", holder, info.GetIsolate()); |
| 153 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 152 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 154 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt
ate); | 153 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt
ate); |
| 155 if (exceptionState.throwIfNeeded()) | 154 if (exceptionState.throwIfNeeded()) |
| 156 return; | 155 return; |
| 157 impl->setDoubleAttribute(cppValue); | 156 impl->setDoubleAttribute(cppValue); |
| 158 } | 157 } |
| 159 | 158 |
| 160 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 159 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 161 { | 160 { |
| 162 v8::Local<v8::Value> v8Value = info[0]; | |
| 163 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 161 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 164 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu
e, info); | 162 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu
e, info); |
| 165 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 163 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 166 } | 164 } |
| 167 | 165 |
| 168 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 166 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 169 { | 167 { |
| 170 v8::Local<v8::Object> holder = info.Holder(); | 168 v8::Local<v8::Object> holder = info.Holder(); |
| 171 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 169 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 172 v8SetReturnValue(info, impl->floatAttribute()); | 170 v8SetReturnValue(info, impl->floatAttribute()); |
| 173 } | 171 } |
| 174 | 172 |
| 175 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 173 static void floatAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 176 { | 174 { |
| 177 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 175 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 178 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); | 176 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); |
| 179 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 177 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 180 } | 178 } |
| 181 | 179 |
| 182 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) | 180 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 183 { | 181 { |
| 184 v8::Local<v8::Object> holder = info.Holder(); | 182 v8::Local<v8::Object> holder = info.Holder(); |
| 185 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface", holder, info.GetIsolate()); | 183 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface", holder, info.GetIsolate()); |
| 186 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 184 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 187 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat
e); | 185 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat
e); |
| 188 if (exceptionState.throwIfNeeded()) | 186 if (exceptionState.throwIfNeeded()) |
| 189 return; | 187 return; |
| 190 impl->setFloatAttribute(cppValue); | 188 impl->setFloatAttribute(cppValue); |
| 191 } | 189 } |
| 192 | 190 |
| 193 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 191 static void floatAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 194 { | 192 { |
| 195 v8::Local<v8::Value> v8Value = info[0]; | |
| 196 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 193 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 197 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value
, info); | 194 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value
, info); |
| 198 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 195 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 199 } | 196 } |
| 200 | 197 |
| 201 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 198 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 202 { | 199 { |
| 203 v8::Local<v8::Object> holder = info.Holder(); | 200 v8::Local<v8::Object> holder = info.Holder(); |
| 204 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 201 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 205 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 202 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
| 206 } | 203 } |
| 207 | 204 |
| 208 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 205 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 209 { | 206 { |
| 210 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 207 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 211 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG
etter(info); | 208 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG
etter(info); |
| 212 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 209 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 213 } | 210 } |
| 214 | 211 |
| 215 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) | 212 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 216 { | 213 { |
| 217 v8::Local<v8::Object> holder = info.Holder(); | 214 v8::Local<v8::Object> holder = info.Holder(); |
| 218 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface", holder, info.GetIsolate()); | 215 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface", holder, info.GetIsolate()); |
| 219 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 216 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 220 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); | 217 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); |
| 221 if (exceptionState.throwIfNeeded()) | 218 if (exceptionState.throwIfNeeded()) |
| 222 return; | 219 return; |
| 223 impl->setUnrestrictedDoubleAttribute(cppValue); | 220 impl->setUnrestrictedDoubleAttribute(cppValue); |
| 224 } | 221 } |
| 225 | 222 |
| 226 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 223 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 227 { | 224 { |
| 228 v8::Local<v8::Value> v8Value = info[0]; | |
| 229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 225 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 230 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS
etter(v8Value, info); | 226 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS
etter(v8Value, info); |
| 231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 227 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 232 } | 228 } |
| 233 | 229 |
| 234 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) | 230 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 235 { | 231 { |
| 236 v8::Local<v8::Object> holder = info.Holder(); | 232 v8::Local<v8::Object> holder = info.Holder(); |
| 237 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 233 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 238 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 234 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
| 239 } | 235 } |
| 240 | 236 |
| 241 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 237 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 242 { | 238 { |
| 243 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 239 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 244 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe
tter(info); | 240 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe
tter(info); |
| 245 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 241 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 246 } | 242 } |
| 247 | 243 |
| 248 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) | 244 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 249 { | 245 { |
| 250 v8::Local<v8::Object> holder = info.Holder(); | 246 v8::Local<v8::Object> holder = info.Holder(); |
| 251 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface", holder, info.GetIsolate()); | 247 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface", holder, info.GetIsolate()); |
| 252 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 248 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 253 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); | 249 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); |
| 254 if (exceptionState.throwIfNeeded()) | 250 if (exceptionState.throwIfNeeded()) |
| 255 return; | 251 return; |
| 256 impl->setUnrestrictedFloatAttribute(cppValue); | 252 impl->setUnrestrictedFloatAttribute(cppValue); |
| 257 } | 253 } |
| 258 | 254 |
| 259 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 255 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 260 { | 256 { |
| 261 v8::Local<v8::Value> v8Value = info[0]; | |
| 262 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 257 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 263 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe
tter(v8Value, info); | 258 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe
tter(v8Value, info); |
| 264 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 259 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 265 } | 260 } |
| 266 | 261 |
| 267 static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::
Value>& info) | 262 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 268 { | 263 { |
| 269 v8::Local<v8::Object> holder = info.Holder(); | 264 v8::Local<v8::Object> holder = info.Holder(); |
| 270 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 265 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 271 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); | 266 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); |
| 272 } | 267 } |
| 273 | 268 |
| 274 static void testEnumAttributeAttributeGetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 269 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::Name>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 275 { | 270 { |
| 276 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 271 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 277 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info
); | 272 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info
); |
| 278 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 273 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 279 } | 274 } |
| 280 | 275 |
| 281 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::FunctionCallbackInfo<v8::Value>& info) | 276 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 282 { | 277 { |
| 283 v8::Local<v8::Object> holder = info.Holder(); | 278 v8::Local<v8::Object> holder = info.Holder(); |
| 284 ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumAttrib
ute", "TestInterface", holder, info.GetIsolate()); | 279 ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumAttrib
ute", "TestInterface", holder, info.GetIsolate()); |
| 285 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 280 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 286 V8StringResource<> cppValue = v8Value; | 281 V8StringResource<> cppValue = v8Value; |
| 287 if (!cppValue.prepare()) | 282 if (!cppValue.prepare()) |
| 288 return; | 283 return; |
| 289 static const char* validValues[] = { | 284 static const char* validValues[] = { |
| 290 "", | 285 "", |
| 291 "EnumValue1", | 286 "EnumValue1", |
| 292 "EnumValue2", | 287 "EnumValue2", |
| 293 "EnumValue3", | 288 "EnumValue3", |
| 294 }; | 289 }; |
| 295 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test
Enum", exceptionState)) { | 290 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test
Enum", exceptionState)) { |
| 296 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); | 291 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); |
| 297 return; | 292 return; |
| 298 } | 293 } |
| 299 impl->setTestEnumAttribute(cppValue); | 294 impl->setTestEnumAttribute(cppValue); |
| 300 } | 295 } |
| 301 | 296 |
| 302 static void testEnumAttributeAttributeSetterCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 297 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 303 { | 298 { |
| 304 v8::Local<v8::Value> v8Value = info[0]; | |
| 305 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 299 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 306 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va
lue, info); | 300 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va
lue, info); |
| 307 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 301 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 308 } | 302 } |
| 309 | 303 |
| 310 static void stringOrDoubleAttributeAttributeGetter(const v8::FunctionCallbackInf
o<v8::Value>& info) | 304 static void stringOrDoubleAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 311 { | 305 { |
| 312 v8::Local<v8::Object> holder = info.Holder(); | 306 v8::Local<v8::Object> holder = info.Holder(); |
| 313 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 307 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 314 StringOrDouble result; | 308 StringOrDouble result; |
| 315 impl->stringOrDoubleAttribute(result); | 309 impl->stringOrDoubleAttribute(result); |
| 316 v8SetReturnValue(info, result); | 310 v8SetReturnValue(info, result); |
| 317 } | 311 } |
| 318 | 312 |
| 319 static void stringOrDoubleAttributeAttributeGetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 313 static void stringOrDoubleAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 320 { | 314 { |
| 321 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 315 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 322 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette
r(info); | 316 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette
r(info); |
| 323 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 317 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 324 } | 318 } |
| 325 | 319 |
| 326 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 320 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 327 { | 321 { |
| 328 v8::Local<v8::Object> holder = info.Holder(); | 322 v8::Local<v8::Object> holder = info.Holder(); |
| 329 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble
Attribute", "TestInterface", holder, info.GetIsolate()); | 323 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble
Attribute", "TestInterface", holder, info.GetIsolate()); |
| 330 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 324 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 331 StringOrDouble cppValue; | 325 StringOrDouble cppValue; |
| 332 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, exceptionStat
e); | 326 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, exceptionStat
e); |
| 333 if (exceptionState.throwIfNeeded()) | 327 if (exceptionState.throwIfNeeded()) |
| 334 return; | 328 return; |
| 335 impl->setStringOrDoubleAttribute(cppValue); | 329 impl->setStringOrDoubleAttribute(cppValue); |
| 336 } | 330 } |
| 337 | 331 |
| 338 static void stringOrDoubleAttributeAttributeSetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 332 static void stringOrDoubleAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 339 { | 333 { |
| 340 v8::Local<v8::Value> v8Value = info[0]; | |
| 341 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 334 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 342 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette
r(v8Value, info); | 335 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette
r(v8Value, info); |
| 343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 336 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 344 } | 337 } |
| 345 | 338 |
| 346 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 339 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 347 { | 340 { |
| 348 v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttrib
ute(), info.GetIsolate()); | 341 v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttrib
ute(), info.GetIsolate()); |
| 349 } | 342 } |
| 350 | 343 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 363 TestInterfaceImplementation::setStaticStringAttribute(cppValue); | 356 TestInterfaceImplementation::setStaticStringAttribute(cppValue); |
| 364 } | 357 } |
| 365 | 358 |
| 366 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 359 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 367 { | 360 { |
| 368 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 361 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 369 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(
v8Value, info); | 362 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(
v8Value, info); |
| 370 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 363 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 371 } | 364 } |
| 372 | 365 |
| 373 static void legacyInterfaceTypeCheckingAttributeAttributeGetter(const v8::Functi
onCallbackInfo<v8::Value>& info) | 366 static void legacyInterfaceTypeCheckingAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 374 { | 367 { |
| 375 v8::Local<v8::Object> holder = info.Holder(); | 368 v8::Local<v8::Object> holder = info.Holder(); |
| 376 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 369 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 377 v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingAttr
ibute()), impl); | 370 v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingAttr
ibute()), impl); |
| 378 } | 371 } |
| 379 | 372 |
| 380 static void legacyInterfaceTypeCheckingAttributeAttributeGetterCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 373 static void legacyInterfaceTypeCheckingAttributeAttributeGetterCallback(v8::Loca
l<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 381 { | 374 { |
| 382 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 375 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 383 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA
ttributeGetter(info); | 376 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA
ttributeGetter(info); |
| 384 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 377 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 385 } | 378 } |
| 386 | 379 |
| 387 static void legacyInterfaceTypeCheckingAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 380 static void legacyInterfaceTypeCheckingAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 388 { | 381 { |
| 389 v8::Local<v8::Object> holder = info.Holder(); | 382 v8::Local<v8::Object> holder = info.Holder(); |
| 390 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 383 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 391 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); | 384 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); |
| 392 impl->setLegacyInterfaceTypeCheckingAttribute(WTF::getPtr(cppValue)); | 385 impl->setLegacyInterfaceTypeCheckingAttribute(WTF::getPtr(cppValue)); |
| 393 } | 386 } |
| 394 | 387 |
| 395 static void legacyInterfaceTypeCheckingAttributeAttributeSetterCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 388 static void legacyInterfaceTypeCheckingAttributeAttributeSetterCallback(v8::Loca
l<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 396 { | 389 { |
| 397 v8::Local<v8::Value> v8Value = info[0]; | |
| 398 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 390 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 399 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA
ttributeSetter(v8Value, info); | 391 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA
ttributeSetter(v8Value, info); |
| 400 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 392 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 401 } | 393 } |
| 402 | 394 |
| 403 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) | 395 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 404 { | 396 { |
| 405 v8::Local<v8::Object> holder = info.Holder(); | 397 v8::Local<v8::Object> holder = info.Holder(); |
| 406 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 398 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 407 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); | 399 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
| 408 } | 400 } |
| 409 | 401 |
| 410 static void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 402 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 411 { | 403 { |
| 412 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 404 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 413 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter
(info); | 405 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter
(info); |
| 414 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 406 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 415 } | 407 } |
| 416 | 408 |
| 417 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 409 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 418 { | 410 { |
| 419 v8::Local<v8::Object> holder = info.Holder(); | 411 v8::Local<v8::Object> holder = info.Holder(); |
| 420 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 412 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 421 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 413 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 422 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 414 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
| 423 if (exceptionState.throwIfNeeded()) | 415 if (exceptionState.throwIfNeeded()) |
| 424 return; | 416 return; |
| 425 impl->setAlwaysExposedAttribute(cppValue); | 417 impl->setAlwaysExposedAttribute(cppValue); |
| 426 } | 418 } |
| 427 | 419 |
| 428 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 420 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 429 { | 421 { |
| 430 v8::Local<v8::Value> v8Value = info[0]; | |
| 431 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 422 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 432 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter
(v8Value, info); | 423 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter
(v8Value, info); |
| 433 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 424 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 434 } | 425 } |
| 435 | 426 |
| 436 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) | 427 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 437 { | 428 { |
| 438 v8::Local<v8::Object> holder = info.Holder(); | 429 v8::Local<v8::Object> holder = info.Holder(); |
| 439 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 430 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 440 v8SetReturnValueInt(info, impl->workerExposedAttribute()); | 431 v8SetReturnValueInt(info, impl->workerExposedAttribute()); |
| 441 } | 432 } |
| 442 | 433 |
| 443 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 434 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 444 { | 435 { |
| 445 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 436 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 446 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter
(info); | 437 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter
(info); |
| 447 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 438 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 448 } | 439 } |
| 449 | 440 |
| 450 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 441 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 451 { | 442 { |
| 452 v8::Local<v8::Object> holder = info.Holder(); | 443 v8::Local<v8::Object> holder = info.Holder(); |
| 453 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 444 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 454 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 445 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 455 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 446 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
| 456 if (exceptionState.throwIfNeeded()) | 447 if (exceptionState.throwIfNeeded()) |
| 457 return; | 448 return; |
| 458 impl->setWorkerExposedAttribute(cppValue); | 449 impl->setWorkerExposedAttribute(cppValue); |
| 459 } | 450 } |
| 460 | 451 |
| 461 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 452 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 462 { | 453 { |
| 463 v8::Local<v8::Value> v8Value = info[0]; | |
| 464 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 454 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 465 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter
(v8Value, info); | 455 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter
(v8Value, info); |
| 466 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 456 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 467 } | 457 } |
| 468 | 458 |
| 469 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) | 459 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 470 { | 460 { |
| 471 v8::Local<v8::Object> holder = info.Holder(); | 461 v8::Local<v8::Object> holder = info.Holder(); |
| 472 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 462 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 473 v8SetReturnValueInt(info, impl->windowExposedAttribute()); | 463 v8SetReturnValueInt(info, impl->windowExposedAttribute()); |
| 474 } | 464 } |
| 475 | 465 |
| 476 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 466 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 477 { | 467 { |
| 478 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 468 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 479 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter
(info); | 469 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter
(info); |
| 480 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 470 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 481 } | 471 } |
| 482 | 472 |
| 483 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 473 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 484 { | 474 { |
| 485 v8::Local<v8::Object> holder = info.Holder(); | 475 v8::Local<v8::Object> holder = info.Holder(); |
| 486 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 476 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 487 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 477 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 488 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 478 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
| 489 if (exceptionState.throwIfNeeded()) | 479 if (exceptionState.throwIfNeeded()) |
| 490 return; | 480 return; |
| 491 impl->setWindowExposedAttribute(cppValue); | 481 impl->setWindowExposedAttribute(cppValue); |
| 492 } | 482 } |
| 493 | 483 |
| 494 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 484 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 495 { | 485 { |
| 496 v8::Local<v8::Value> v8Value = info[0]; | |
| 497 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 486 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 498 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter
(v8Value, info); | 487 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter
(v8Value, info); |
| 499 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 488 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 500 } | 489 } |
| 501 | 490 |
| 502 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 491 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 503 { | 492 { |
| 504 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO
nlyLongAttribute()); | 493 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO
nlyLongAttribute()); |
| 505 } | 494 } |
| 506 | 495 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 531 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue); | 520 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue); |
| 532 } | 521 } |
| 533 | 522 |
| 534 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 523 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 535 { | 524 { |
| 536 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 525 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 537 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteSetter(v8Value, info); | 526 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteSetter(v8Value, info); |
| 538 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 527 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 539 } | 528 } |
| 540 | 529 |
| 541 static void implementsReadonlyStringAttributeAttributeGetter(const v8::FunctionC
allbackInfo<v8::Value>& info) | 530 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) |
| 542 { | 531 { |
| 543 v8::Local<v8::Object> holder = info.Holder(); | 532 v8::Local<v8::Object> holder = info.Holder(); |
| 544 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 533 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 545 v8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info
.GetIsolate()); | 534 v8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info
.GetIsolate()); |
| 546 } | 535 } |
| 547 | 536 |
| 548 static void implementsReadonlyStringAttributeAttributeGetterCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 537 static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v
8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 549 { | 538 { |
| 550 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 539 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 551 TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttr
ibuteGetter(info); | 540 TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttr
ibuteGetter(info); |
| 552 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 541 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 553 } | 542 } |
| 554 | 543 |
| 555 static void implementsStringAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 544 static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 556 { | 545 { |
| 557 v8::Local<v8::Object> holder = info.Holder(); | 546 v8::Local<v8::Object> holder = info.Holder(); |
| 558 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 547 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 559 v8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsol
ate()); | 548 v8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsol
ate()); |
| 560 } | 549 } |
| 561 | 550 |
| 562 static void implementsStringAttributeAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 551 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Name>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 563 { | 552 { |
| 564 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 553 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 565 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet
ter(info); | 554 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet
ter(info); |
| 566 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 555 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 567 } | 556 } |
| 568 | 557 |
| 569 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) | 558 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 570 { | 559 { |
| 571 v8::Local<v8::Object> holder = info.Holder(); | 560 v8::Local<v8::Object> holder = info.Holder(); |
| 572 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 561 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 573 V8StringResource<> cppValue = v8Value; | 562 V8StringResource<> cppValue = v8Value; |
| 574 if (!cppValue.prepare()) | 563 if (!cppValue.prepare()) |
| 575 return; | 564 return; |
| 576 impl->setImplementsStringAttribute(cppValue); | 565 impl->setImplementsStringAttribute(cppValue); |
| 577 } | 566 } |
| 578 | 567 |
| 579 static void implementsStringAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 568 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Name>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 580 { | 569 { |
| 581 v8::Local<v8::Value> v8Value = info[0]; | |
| 582 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 570 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 583 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet
ter(v8Value, info); | 571 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet
ter(v8Value, info); |
| 584 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 572 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 585 } | 573 } |
| 586 | 574 |
| 587 static void implementsNodeAttributeAttributeGetter(const v8::FunctionCallbackInf
o<v8::Value>& info) | 575 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 588 { | 576 { |
| 589 v8::Local<v8::Object> holder = info.Holder(); | 577 v8::Local<v8::Object> holder = info.Holder(); |
| 590 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 578 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 591 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsNodeAttribute()), imp
l); | 579 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsNodeAttribute()), imp
l); |
| 592 } | 580 } |
| 593 | 581 |
| 594 static void implementsNodeAttributeAttributeGetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 582 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 595 { | 583 { |
| 596 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 584 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 597 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGette
r(info); | 585 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGette
r(info); |
| 598 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 586 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 599 } | 587 } |
| 600 | 588 |
| 601 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 589 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 602 { | 590 { |
| 603 v8::Local<v8::Object> holder = info.Holder(); | 591 v8::Local<v8::Object> holder = info.Holder(); |
| 604 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode
Attribute", "TestInterface", holder, info.GetIsolate()); | 592 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode
Attribute", "TestInterface", holder, info.GetIsolate()); |
| 605 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 593 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 606 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 594 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 607 if (!cppValue) { | 595 if (!cppValue) { |
| 608 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 596 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 609 exceptionState.throwIfNeeded(); | 597 exceptionState.throwIfNeeded(); |
| 610 return; | 598 return; |
| 611 } | 599 } |
| 612 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue)); | 600 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue)); |
| 613 } | 601 } |
| 614 | 602 |
| 615 static void implementsNodeAttributeAttributeSetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 603 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 616 { | 604 { |
| 617 v8::Local<v8::Value> v8Value = info[0]; | |
| 618 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 605 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 619 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette
r(v8Value, info); | 606 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette
r(v8Value, info); |
| 620 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 607 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 621 } | 608 } |
| 622 | 609 |
| 623 static void implementsEventHandlerAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 610 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 624 { | 611 { |
| 625 v8::Local<v8::Object> holder = info.Holder(); | 612 v8::Local<v8::Object> holder = info.Holder(); |
| 626 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 613 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 627 EventListener* cppValue(impl->implementsEventHandlerAttribute()); | 614 EventListener* cppValue(impl->implementsEventHandlerAttribute()); |
| 628 v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListen
er::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Local<v8:
:Value>(v8::Null(info.GetIsolate()))); | 615 v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListen
er::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Local<v8:
:Value>(v8::Null(info.GetIsolate()))); |
| 629 } | 616 } |
| 630 | 617 |
| 631 static void implementsEventHandlerAttributeAttributeGetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 618 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8:
:Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 632 { | 619 { |
| 633 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 620 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 634 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib
uteGetter(info); | 621 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib
uteGetter(info); |
| 635 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 622 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 636 } | 623 } |
| 637 | 624 |
| 638 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 625 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 639 { | 626 { |
| 640 v8::Local<v8::Object> holder = info.Holder(); | 627 v8::Local<v8::Object> holder = info.Holder(); |
| 641 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 628 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 642 moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->implementsEve
ntHandlerAttribute(), v8Value, V8TestInterface::eventListenerCacheIndex); | 629 moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->implementsEve
ntHandlerAttribute(), v8Value, V8TestInterface::eventListenerCacheIndex); |
| 643 impl->setImplementsEventHandlerAttribute(V8EventListenerList::getEventListen
er(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)
); | 630 impl->setImplementsEventHandlerAttribute(V8EventListenerList::getEventListen
er(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)
); |
| 644 } | 631 } |
| 645 | 632 |
| 646 static void implementsEventHandlerAttributeAttributeSetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 633 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8:
:Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 647 { | 634 { |
| 648 v8::Local<v8::Value> v8Value = info[0]; | |
| 649 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 635 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 650 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib
uteSetter(v8Value, info); | 636 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib
uteSetter(v8Value, info); |
| 651 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 637 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 652 } | 638 } |
| 653 | 639 |
| 654 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 640 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 655 { | 641 { |
| 656 v8::Local<v8::Object> holder = info.Holder(); | 642 v8::Local<v8::Object> holder = info.Holder(); |
| 657 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 643 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 658 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsRuntimeEnabledNodeAtt
ribute()), impl); | 644 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsRuntimeEnabledNodeAtt
ribute()), impl); |
| 659 } | 645 } |
| 660 | 646 |
| 661 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 647 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc
al<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 662 { | 648 { |
| 663 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 649 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 664 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute
AttributeGetter(info); | 650 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute
AttributeGetter(info); |
| 665 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 651 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 666 } | 652 } |
| 667 | 653 |
| 668 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 654 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 669 { | 655 { |
| 670 v8::Local<v8::Object> holder = info.Holder(); | 656 v8::Local<v8::Object> holder = info.Holder(); |
| 671 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt
imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); | 657 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt
imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); |
| 672 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 658 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 673 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 659 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 674 if (!cppValue) { | 660 if (!cppValue) { |
| 675 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 661 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 676 exceptionState.throwIfNeeded(); | 662 exceptionState.throwIfNeeded(); |
| 677 return; | 663 return; |
| 678 } | 664 } |
| 679 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue)); | 665 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue)); |
| 680 } | 666 } |
| 681 | 667 |
| 682 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 668 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc
al<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>
& info) |
| 683 { | 669 { |
| 684 v8::Local<v8::Value> v8Value = info[0]; | |
| 685 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 670 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 686 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute
AttributeSetter(v8Value, info); | 671 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute
AttributeSetter(v8Value, info); |
| 687 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 672 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 688 } | 673 } |
| 689 | 674 |
| 690 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 675 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 691 { | 676 { |
| 692 v8::Local<v8::Object> holder = info.Holder(); | 677 v8::Local<v8::Object> holder = info.Holder(); |
| 693 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 678 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 694 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsPerContextEnabledNode
Attribute()), impl); | 679 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsPerContextEnabledNode
Attribute()), impl); |
| 695 } | 680 } |
| 696 | 681 |
| 697 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 682 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8::
Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 698 { | 683 { |
| 699 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 684 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 700 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib
uteAttributeGetter(info); | 685 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib
uteAttributeGetter(info); |
| 701 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 686 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 702 } | 687 } |
| 703 | 688 |
| 704 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 689 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 705 { | 690 { |
| 706 v8::Local<v8::Object> holder = info.Holder(); | 691 v8::Local<v8::Object> holder = info.Holder(); |
| 707 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC
ontextEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); | 692 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC
ontextEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); |
| 708 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 693 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 709 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 694 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 710 if (!cppValue) { | 695 if (!cppValue) { |
| 711 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 696 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 712 exceptionState.throwIfNeeded(); | 697 exceptionState.throwIfNeeded(); |
| 713 return; | 698 return; |
| 714 } | 699 } |
| 715 impl->setImplementsPerContextEnabledNodeAttribute(WTF::getPtr(cppValue)); | 700 impl->setImplementsPerContextEnabledNodeAttribute(WTF::getPtr(cppValue)); |
| 716 } | 701 } |
| 717 | 702 |
| 718 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 703 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8::
Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
| 719 { | 704 { |
| 720 v8::Local<v8::Value> v8Value = info[0]; | |
| 721 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 705 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 722 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib
uteAttributeSetter(v8Value, info); | 706 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib
uteAttributeSetter(v8Value, info); |
| 723 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 707 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 724 } | 708 } |
| 725 | 709 |
| 726 static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 710 static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 727 { | 711 { |
| 728 v8SetReturnValueString(info, TestImplements2::implements2StaticStringAttribu
te(), info.GetIsolate()); | 712 v8SetReturnValueString(info, TestImplements2::implements2StaticStringAttribu
te(), info.GetIsolate()); |
| 729 } | 713 } |
| 730 | 714 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 743 TestImplements2::setImplements2StaticStringAttribute(cppValue); | 727 TestImplements2::setImplements2StaticStringAttribute(cppValue); |
| 744 } | 728 } |
| 745 | 729 |
| 746 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | 730 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 747 { | 731 { |
| 748 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 732 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 749 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteSetter(v8Value, info); | 733 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteSetter(v8Value, info); |
| 750 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 734 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 751 } | 735 } |
| 752 | 736 |
| 753 static void implements2StringAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) | 737 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 754 { | 738 { |
| 755 v8::Local<v8::Object> holder = info.Holder(); | 739 v8::Local<v8::Object> holder = info.Holder(); |
| 756 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 740 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 757 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im
pl), info.GetIsolate()); | 741 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im
pl), info.GetIsolate()); |
| 758 } | 742 } |
| 759 | 743 |
| 760 static void implements2StringAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 744 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 761 { | 745 { |
| 762 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 763 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe
tter(info); | 747 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe
tter(info); |
| 764 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 765 } | 749 } |
| 766 | 750 |
| 767 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) | 751 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 768 { | 752 { |
| 769 v8::Local<v8::Object> holder = info.Holder(); | 753 v8::Local<v8::Object> holder = info.Holder(); |
| 770 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 754 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 771 V8StringResource<> cppValue = v8Value; | 755 V8StringResource<> cppValue = v8Value; |
| 772 if (!cppValue.prepare()) | 756 if (!cppValue.prepare()) |
| 773 return; | 757 return; |
| 774 TestImplements2::setImplements2StringAttribute(*impl, cppValue); | 758 TestImplements2::setImplements2StringAttribute(*impl, cppValue); |
| 775 } | 759 } |
| 776 | 760 |
| 777 static void implements2StringAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 761 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 778 { | 762 { |
| 779 v8::Local<v8::Value> v8Value = info[0]; | |
| 780 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 763 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 781 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe
tter(v8Value, info); | 764 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe
tter(v8Value, info); |
| 782 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 765 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 783 } | 766 } |
| 784 | 767 |
| 785 static void implements3StringAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) | 768 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 786 { | 769 { |
| 787 v8::Local<v8::Object> holder = info.Holder(); | 770 v8::Local<v8::Object> holder = info.Holder(); |
| 788 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 771 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 789 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin
gAttribute(*impl), info.GetIsolate()); | 772 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin
gAttribute(*impl), info.GetIsolate()); |
| 790 } | 773 } |
| 791 | 774 |
| 792 static void implements3StringAttributeAttributeGetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 775 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 793 { | 776 { |
| 794 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 777 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 795 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe
tter(info); | 778 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe
tter(info); |
| 796 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 797 } | 780 } |
| 798 | 781 |
| 799 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) | 782 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 800 { | 783 { |
| 801 v8::Local<v8::Object> holder = info.Holder(); | 784 v8::Local<v8::Object> holder = info.Holder(); |
| 802 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 785 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 803 V8StringResource<> cppValue = v8Value; | 786 V8StringResource<> cppValue = v8Value; |
| 804 if (!cppValue.prepare()) | 787 if (!cppValue.prepare()) |
| 805 return; | 788 return; |
| 806 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue
); | 789 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue
); |
| 807 } | 790 } |
| 808 | 791 |
| 809 static void implements3StringAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 792 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 810 { | 793 { |
| 811 v8::Local<v8::Value> v8Value = info[0]; | |
| 812 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 794 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 813 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe
tter(v8Value, info); | 795 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe
tter(v8Value, info); |
| 814 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 796 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 815 } | 797 } |
| 816 | 798 |
| 817 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 799 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 818 { | 800 { |
| 819 v8SetReturnValueString(info, TestImplements3Implementation::implements3Stati
cStringAttribute(), info.GetIsolate()); | 801 v8SetReturnValueString(info, TestImplements3Implementation::implements3Stati
cStringAttribute(), info.GetIsolate()); |
| 820 } | 802 } |
| 821 | 803 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 835 } | 817 } |
| 836 | 818 |
| 837 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | 819 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 838 { | 820 { |
| 839 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 821 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 840 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteSetter(v8Value, info); | 822 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteSetter(v8Value, info); |
| 841 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 823 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 842 } | 824 } |
| 843 | 825 |
| 844 #if ENABLE(PARTIAL_CONDITION) | 826 #if ENABLE(PARTIAL_CONDITION) |
| 845 static void partialLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v
8::Value>& info) | 827 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 846 { | 828 { |
| 847 v8::Local<v8::Object> holder = info.Holder(); | 829 v8::Local<v8::Object> holder = info.Holder(); |
| 848 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 830 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 849 v8SetReturnValueInt(info, TestPartialInterface::partialLongAttribute(*impl))
; | 831 v8SetReturnValueInt(info, TestPartialInterface::partialLongAttribute(*impl))
; |
| 850 } | 832 } |
| 851 #endif // ENABLE(PARTIAL_CONDITION) | 833 #endif // ENABLE(PARTIAL_CONDITION) |
| 852 | 834 |
| 853 #if ENABLE(PARTIAL_CONDITION) | 835 #if ENABLE(PARTIAL_CONDITION) |
| 854 static void partialLongAttributeAttributeGetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 836 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 855 { | 837 { |
| 856 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 838 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 857 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(i
nfo); | 839 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(i
nfo); |
| 858 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 840 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 859 } | 841 } |
| 860 #endif // ENABLE(PARTIAL_CONDITION) | 842 #endif // ENABLE(PARTIAL_CONDITION) |
| 861 | 843 |
| 862 #if ENABLE(PARTIAL_CONDITION) | 844 #if ENABLE(PARTIAL_CONDITION) |
| 863 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 845 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 864 { | 846 { |
| 865 v8::Local<v8::Object> holder = info.Holder(); | 847 v8::Local<v8::Object> holder = info.Holder(); |
| 866 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt
ribute", "TestInterface", holder, info.GetIsolate()); | 848 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt
ribute", "TestInterface", holder, info.GetIsolate()); |
| 867 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 849 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 868 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 850 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
| 869 if (exceptionState.throwIfNeeded()) | 851 if (exceptionState.throwIfNeeded()) |
| 870 return; | 852 return; |
| 871 TestPartialInterface::setPartialLongAttribute(*impl, cppValue); | 853 TestPartialInterface::setPartialLongAttribute(*impl, cppValue); |
| 872 } | 854 } |
| 873 #endif // ENABLE(PARTIAL_CONDITION) | 855 #endif // ENABLE(PARTIAL_CONDITION) |
| 874 | 856 |
| 875 #if ENABLE(PARTIAL_CONDITION) | 857 #if ENABLE(PARTIAL_CONDITION) |
| 876 static void partialLongAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 858 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 877 { | 859 { |
| 878 v8::Local<v8::Value> v8Value = info[0]; | |
| 879 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 860 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 880 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v
8Value, info); | 861 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v
8Value, info); |
| 881 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 862 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 882 } | 863 } |
| 883 #endif // ENABLE(PARTIAL_CONDITION) | 864 #endif // ENABLE(PARTIAL_CONDITION) |
| 884 | 865 |
| 885 #if ENABLE(PARTIAL_CONDITION) | 866 #if ENABLE(PARTIAL_CONDITION) |
| 886 static void partialStaticLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 867 static void partialStaticLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 887 { | 868 { |
| 888 v8SetReturnValueInt(info, TestPartialInterface::partialStaticLongAttribute()
); | 869 v8SetReturnValueInt(info, TestPartialInterface::partialStaticLongAttribute()
); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 913 #if ENABLE(PARTIAL_CONDITION) | 894 #if ENABLE(PARTIAL_CONDITION) |
| 914 static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 895 static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 915 { | 896 { |
| 916 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 897 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 917 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe
tter(v8Value, info); | 898 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe
tter(v8Value, info); |
| 918 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 899 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 919 } | 900 } |
| 920 #endif // ENABLE(PARTIAL_CONDITION) | 901 #endif // ENABLE(PARTIAL_CONDITION) |
| 921 | 902 |
| 922 #if ENABLE(PARTIAL_CONDITION) | 903 #if ENABLE(PARTIAL_CONDITION) |
| 923 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8
::FunctionCallbackInfo<v8::Value>& info) | 904 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 924 { | 905 { |
| 925 v8::Local<v8::Object> holder = info.Holder(); | 906 v8::Local<v8::Object> holder = info.Holder(); |
| 926 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 907 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 927 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 908 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 928 v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionCont
extLongAttribute(executionContext, *impl)); | 909 v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionCont
extLongAttribute(executionContext, *impl)); |
| 929 } | 910 } |
| 930 #endif // ENABLE(PARTIAL_CONDITION) | 911 #endif // ENABLE(PARTIAL_CONDITION) |
| 931 | 912 |
| 932 #if ENABLE(PARTIAL_CONDITION) | 913 #if ENABLE(PARTIAL_CONDITION) |
| 933 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | 914 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback(
v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 934 { | 915 { |
| 935 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 916 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 936 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeGetter(info); | 917 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeGetter(info); |
| 937 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 918 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 938 } | 919 } |
| 939 #endif // ENABLE(PARTIAL_CONDITION) | 920 #endif // ENABLE(PARTIAL_CONDITION) |
| 940 | 921 |
| 941 #if ENABLE(PARTIAL_CONDITION) | 922 #if ENABLE(PARTIAL_CONDITION) |
| 942 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 923 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 943 { | 924 { |
| 944 v8::Local<v8::Object> holder = info.Holder(); | 925 v8::Local<v8::Object> holder = info.Holder(); |
| 945 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit
hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); | 926 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit
hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); |
| 946 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 927 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 947 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 928 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
| 948 if (exceptionState.throwIfNeeded()) | 929 if (exceptionState.throwIfNeeded()) |
| 949 return; | 930 return; |
| 950 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 931 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 951 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut
ionContext, *impl, cppValue); | 932 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut
ionContext, *impl, cppValue); |
| 952 } | 933 } |
| 953 #endif // ENABLE(PARTIAL_CONDITION) | 934 #endif // ENABLE(PARTIAL_CONDITION) |
| 954 | 935 |
| 955 #if ENABLE(PARTIAL_CONDITION) | 936 #if ENABLE(PARTIAL_CONDITION) |
| 956 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | 937 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(
v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) |
| 957 { | 938 { |
| 958 v8::Local<v8::Value> v8Value = info[0]; | |
| 959 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 939 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 960 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeSetter(v8Value, info); | 940 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeSetter(v8Value, info); |
| 961 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 941 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 962 } | 942 } |
| 963 #endif // ENABLE(PARTIAL_CONDITION) | 943 #endif // ENABLE(PARTIAL_CONDITION) |
| 964 | 944 |
| 965 #if ENABLE(PARTIAL_CONDITION) | 945 #if ENABLE(PARTIAL_CONDITION) |
| 966 static void partialPartialEnumTypeAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 946 static void partialPartialEnumTypeAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 967 { | 947 { |
| 968 v8::Local<v8::Object> holder = info.Holder(); | 948 v8::Local<v8::Object> holder = info.Holder(); |
| 969 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 949 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 970 v8SetReturnValueString(info, TestPartialInterface::partialPartialEnumTypeAtt
ribute(*impl), info.GetIsolate()); | 950 v8SetReturnValueString(info, TestPartialInterface::partialPartialEnumTypeAtt
ribute(*impl), info.GetIsolate()); |
| 971 } | 951 } |
| 972 #endif // ENABLE(PARTIAL_CONDITION) | 952 #endif // ENABLE(PARTIAL_CONDITION) |
| 973 | 953 |
| 974 #if ENABLE(PARTIAL_CONDITION) | 954 #if ENABLE(PARTIAL_CONDITION) |
| 975 static void partialPartialEnumTypeAttributeAttributeGetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 955 static void partialPartialEnumTypeAttributeAttributeGetterCallback(v8::Local<v8:
:Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 976 { | 956 { |
| 977 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 957 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 978 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteGetter(info); | 958 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteGetter(info); |
| 979 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 959 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 980 } | 960 } |
| 981 #endif // ENABLE(PARTIAL_CONDITION) | 961 #endif // ENABLE(PARTIAL_CONDITION) |
| 982 | 962 |
| 983 #if ENABLE(PARTIAL_CONDITION) | 963 #if ENABLE(PARTIAL_CONDITION) |
| 984 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 964 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 985 { | 965 { |
| 986 v8::Local<v8::Object> holder = info.Holder(); | 966 v8::Local<v8::Object> holder = info.Holder(); |
| 987 ExceptionState exceptionState(ExceptionState::SetterContext, "partialPartial
EnumTypeAttribute", "TestInterface", holder, info.GetIsolate()); | 967 ExceptionState exceptionState(ExceptionState::SetterContext, "partialPartial
EnumTypeAttribute", "TestInterface", holder, info.GetIsolate()); |
| 988 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 968 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 989 V8StringResource<> cppValue = v8Value; | 969 V8StringResource<> cppValue = v8Value; |
| 990 if (!cppValue.prepare()) | 970 if (!cppValue.prepare()) |
| 991 return; | 971 return; |
| 992 static const char* validValues[] = { | 972 static const char* validValues[] = { |
| 993 "foo", | 973 "foo", |
| 994 "bar", | 974 "bar", |
| 995 }; | 975 }; |
| 996 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Part
ialEnumType", exceptionState)) { | 976 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Part
ialEnumType", exceptionState)) { |
| 997 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); | 977 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); |
| 998 return; | 978 return; |
| 999 } | 979 } |
| 1000 TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue); | 980 TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue); |
| 1001 } | 981 } |
| 1002 #endif // ENABLE(PARTIAL_CONDITION) | 982 #endif // ENABLE(PARTIAL_CONDITION) |
| 1003 | 983 |
| 1004 #if ENABLE(PARTIAL_CONDITION) | 984 #if ENABLE(PARTIAL_CONDITION) |
| 1005 static void partialPartialEnumTypeAttributeAttributeSetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 985 static void partialPartialEnumTypeAttributeAttributeSetterCallback(v8::Local<v8:
:Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 1006 { | 986 { |
| 1007 v8::Local<v8::Value> v8Value = info[0]; | |
| 1008 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 987 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1009 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteSetter(v8Value, info); | 988 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteSetter(v8Value, info); |
| 1010 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 989 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1011 } | 990 } |
| 1012 #endif // ENABLE(PARTIAL_CONDITION) | 991 #endif // ENABLE(PARTIAL_CONDITION) |
| 1013 | 992 |
| 1014 #if ENABLE(PARTIAL_CONDITION) | 993 #if ENABLE(PARTIAL_CONDITION) |
| 1015 static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 994 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 1016 { | 995 { |
| 1017 v8::Local<v8::Object> holder = info.Holder(); | 996 v8::Local<v8::Object> holder = info.Holder(); |
| 1018 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 997 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 1019 String result; | 998 String result; |
| 1020 if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toLocalF
rame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &resul
t)) | 999 if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toLocalF
rame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &resul
t)) |
| 1021 return; | 1000 return; |
| 1022 v8SetReturnValueString(info, result, info.GetIsolate()); | 1001 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 1023 } | 1002 } |
| 1024 #endif // ENABLE(PARTIAL_CONDITION) | 1003 #endif // ENABLE(PARTIAL_CONDITION) |
| 1025 | 1004 |
| 1026 #if ENABLE(PARTIAL_CONDITION) | 1005 #if ENABLE(PARTIAL_CONDITION) |
| 1027 static void stringAttributeAttributeGetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 1006 static void stringAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 1028 { | 1007 { |
| 1029 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1008 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1030 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); | 1009 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); |
| 1031 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1010 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1032 } | 1011 } |
| 1033 #endif // ENABLE(PARTIAL_CONDITION) | 1012 #endif // ENABLE(PARTIAL_CONDITION) |
| 1034 | 1013 |
| 1035 #if ENABLE(PARTIAL_CONDITION) | 1014 #if ENABLE(PARTIAL_CONDITION) |
| 1036 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) | 1015 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 1037 { | 1016 { |
| 1038 v8::Local<v8::Object> holder = info.Holder(); | 1017 v8::Local<v8::Object> holder = info.Holder(); |
| 1039 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 1018 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 1040 V8StringResource<> cppValue = v8Value; | 1019 V8StringResource<> cppValue = v8Value; |
| 1041 if (!cppValue.prepare()) | 1020 if (!cppValue.prepare()) |
| 1042 return; | 1021 return; |
| 1043 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); | 1022 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
| 1044 } | 1023 } |
| 1045 #endif // ENABLE(PARTIAL_CONDITION) | 1024 #endif // ENABLE(PARTIAL_CONDITION) |
| 1046 | 1025 |
| 1047 #if ENABLE(PARTIAL_CONDITION) | 1026 #if ENABLE(PARTIAL_CONDITION) |
| 1048 static void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 1027 static void stringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1049 { | 1028 { |
| 1050 v8::Local<v8::Value> v8Value = info[0]; | |
| 1051 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1029 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1052 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu
e, info); | 1030 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu
e, info); |
| 1053 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1031 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1054 } | 1032 } |
| 1055 #endif // ENABLE(PARTIAL_CONDITION) | 1033 #endif // ENABLE(PARTIAL_CONDITION) |
| 1056 | 1034 |
| 1057 static void partial2LongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) | 1035 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1058 { | 1036 { |
| 1059 v8::Local<v8::Object> holder = info.Holder(); | 1037 v8::Local<v8::Object> holder = info.Holder(); |
| 1060 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 1038 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 1061 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2LongAt
tribute(*impl)); | 1039 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2LongAt
tribute(*impl)); |
| 1062 } | 1040 } |
| 1063 | 1041 |
| 1064 static void partial2LongAttributeAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 1042 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1065 { | 1043 { |
| 1066 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1044 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1067 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter(
info); | 1045 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter(
info); |
| 1068 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1046 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1069 } | 1047 } |
| 1070 | 1048 |
| 1071 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 1049 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1072 { | 1050 { |
| 1073 v8::Local<v8::Object> holder = info.Holder(); | 1051 v8::Local<v8::Object> holder = info.Holder(); |
| 1074 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt
tribute", "TestInterface", holder, info.GetIsolate()); | 1052 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt
tribute", "TestInterface", holder, info.GetIsolate()); |
| 1075 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 1053 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 1076 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 1054 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
| 1077 if (exceptionState.throwIfNeeded()) | 1055 if (exceptionState.throwIfNeeded()) |
| 1078 return; | 1056 return; |
| 1079 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue
); | 1057 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue
); |
| 1080 } | 1058 } |
| 1081 | 1059 |
| 1082 static void partial2LongAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 1060 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1083 { | 1061 { |
| 1084 v8::Local<v8::Value> v8Value = info[0]; | |
| 1085 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1062 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1086 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter(
v8Value, info); | 1063 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter(
v8Value, info); |
| 1087 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1064 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1088 } | 1065 } |
| 1089 | 1066 |
| 1090 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1067 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 1091 { | 1068 { |
| 1092 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2Static
LongAttribute()); | 1069 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2Static
LongAttribute()); |
| 1093 } | 1070 } |
| 1094 | 1071 |
| (...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2162 TestInterfaceImplementation* referencedName = impl->referencedName(); | 2139 TestInterfaceImplementation* referencedName = impl->referencedName(); |
| 2163 if (referencedName) { | 2140 if (referencedName) { |
| 2164 if (!DOMDataStore::containsWrapper(referencedName, isolate)) | 2141 if (!DOMDataStore::containsWrapper(referencedName, isolate)) |
| 2165 referencedName->wrap(creationContext, isolate); | 2142 referencedName->wrap(creationContext, isolate); |
| 2166 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate); | 2143 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate); |
| 2167 } | 2144 } |
| 2168 setObjectGroup(isolate, scriptWrappable, wrapper); | 2145 setObjectGroup(isolate, scriptWrappable, wrapper); |
| 2169 } | 2146 } |
| 2170 | 2147 |
| 2171 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute
s[] = { | 2148 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute
s[] = { |
| 2149 {"testInterfaceAttribute", TestInterfaceImplementationV8Internal::testInterf
aceAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::test
InterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro
l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio
n::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2172 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte
rfaceImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetterC
allback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo),
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn
stance}, | 2150 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte
rfaceImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetterC
allback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo),
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn
stance}, |
| 2173 {"TestInterface", v8ConstructorAttributeGetter, TestInterfaceImplementationV
8Internal::TestInterfaceImplementationConstructorAttributeSetterCallback, 0, 0,
const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8:
:AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum),
V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 2151 {"TestInterface", v8ConstructorAttributeGetter, TestInterfaceImplementationV
8Internal::TestInterfaceImplementationConstructorAttributeSetterCallback, 0, 0,
const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8:
:AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum),
V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2174 {"TestInterface2", v8ConstructorAttributeGetter, TestInterfaceImplementation
V8Internal::TestInterfaceImplementationConstructorAttributeSetterCallback, 0, 0,
const_cast<WrapperTypeInfo*>(&V8TestInterface2::wrapperTypeInfo), static_cast<v
8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 2152 {"TestInterface2", v8ConstructorAttributeGetter, TestInterfaceImplementation
V8Internal::TestInterfaceImplementationConstructorAttributeSetterCallback, 0, 0,
const_cast<WrapperTypeInfo*>(&V8TestInterface2::wrapperTypeInfo), static_cast<v
8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2175 }; | 2153 {"doubleAttribute", TestInterfaceImplementationV8Internal::doubleAttributeAt
tributeGetterCallback, TestInterfaceImplementationV8Internal::doubleAttributeAtt
ributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stat
ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScript
s, V8DOMConfiguration::OnInstance}, |
| 2176 | 2154 {"floatAttribute", TestInterfaceImplementationV8Internal::floatAttributeAttr
ibuteGetterCallback, TestInterfaceImplementationV8Internal::floatAttributeAttrib
uteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnInstance}, |
| 2177 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceAccessors[
] = { | 2155 {"unrestrictedDoubleAttribute", TestInterfaceImplementationV8Internal::unres
trictedDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Inte
rnal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v
8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8
DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2178 {"testInterfaceAttribute", TestInterfaceImplementationV8Internal::testInterf
aceAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::test
InterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro
l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio
n::ExposedToAllScripts}, | 2156 {"unrestrictedFloatAttribute", TestInterfaceImplementationV8Internal::unrest
rictedFloatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern
al::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2179 {"doubleAttribute", TestInterfaceImplementationV8Internal::doubleAttributeAt
tributeGetterCallback, TestInterfaceImplementationV8Internal::doubleAttributeAtt
ributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stat
ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScript
s}, | 2157 {"testEnumAttribute", TestInterfaceImplementationV8Internal::testEnumAttribu
teAttributeGetterCallback, TestInterfaceImplementationV8Internal::testEnumAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnInstance}, |
| 2180 {"floatAttribute", TestInterfaceImplementationV8Internal::floatAttributeAttr
ibuteGetterCallback, TestInterfaceImplementationV8Internal::floatAttributeAttrib
uteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, | 2158 {"stringOrDoubleAttribute", TestInterfaceImplementationV8Internal::stringOrD
oubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::st
ringOrDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon
trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura
tion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2181 {"unrestrictedDoubleAttribute", TestInterfaceImplementationV8Internal::unres
trictedDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Inte
rnal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v
8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8
DOMConfiguration::ExposedToAllScripts}, | 2159 {"legacyInterfaceTypeCheckingAttribute", TestInterfaceImplementationV8Intern
al::legacyInterfaceTypeCheckingAttributeAttributeGetterCallback, TestInterfaceIm
plementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeSetterCallb
ack, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prope
rtyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigura
tion::OnInstance}, |
| 2182 {"unrestrictedFloatAttribute", TestInterfaceImplementationV8Internal::unrest
rictedFloatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern
al::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::ExposedToAllScripts}, | 2160 {"alwaysExposedAttribute", TestInterfaceImplementationV8Internal::alwaysExpo
sedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::alwa
ysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro
l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio
n::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2183 {"testEnumAttribute", TestInterfaceImplementationV8Internal::testEnumAttribu
teAttributeGetterCallback, TestInterfaceImplementationV8Internal::testEnumAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll
Scripts}, | 2161 {"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal:
:implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2184 {"stringOrDoubleAttribute", TestInterfaceImplementationV8Internal::stringOrD
oubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::st
ringOrDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon
trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura
tion::ExposedToAllScripts}, | 2162 {"implementsStringAttribute", TestInterfaceImplementationV8Internal::impleme
ntsStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal
::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acc
essControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMCon
figuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2185 {"legacyInterfaceTypeCheckingAttribute", TestInterfaceImplementationV8Intern
al::legacyInterfaceTypeCheckingAttributeAttributeGetterCallback, TestInterfaceIm
plementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeSetterCallb
ack, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prope
rtyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, | 2163 {"implementsNodeAttribute", TestInterfaceImplementationV8Internal::implement
sNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::im
plementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon
trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura
tion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2186 {"alwaysExposedAttribute", TestInterfaceImplementationV8Internal::alwaysExpo
sedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::alwa
ysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro
l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio
n::ExposedToAllScripts}, | 2164 {"implementsEventHandlerAttribute", TestInterfaceImplementationV8Internal::i
mplementsEventHandlerAttributeAttributeGetterCallback, TestInterfaceImplementati
onV8Internal::implementsEventHandlerAttributeAttributeSetterCallback, 0, 0, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstanc
e}, |
| 2187 {"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal:
:implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts}, | 2165 {"implements3StringAttribute", TestInterfaceImplementationV8Internal::implem
ents3StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern
al::implements3StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 2188 {"implementsStringAttribute", TestInterfaceImplementationV8Internal::impleme
ntsStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal
::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acc
essControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMCon
figuration::ExposedToAllScripts}, | |
| 2189 {"implementsNodeAttribute", TestInterfaceImplementationV8Internal::implement
sNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::im
plementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon
trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura
tion::ExposedToAllScripts}, | |
| 2190 {"implementsEventHandlerAttribute", TestInterfaceImplementationV8Internal::i
mplementsEventHandlerAttributeAttributeGetterCallback, TestInterfaceImplementati
onV8Internal::implementsEventHandlerAttributeAttributeSetterCallback, 0, 0, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), V8DOMConfiguration::ExposedToAllScripts}, | |
| 2191 {"implements3StringAttribute", TestInterfaceImplementationV8Internal::implem
ents3StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern
al::implements3StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::ExposedToAllScripts}, | |
| 2192 }; | 2166 }; |
| 2193 | 2167 |
| 2194 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] =
{ | 2168 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] =
{ |
| 2195 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v
oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT
oAllScripts}, | 2169 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v
oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT
oAllScripts}, |
| 2196 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM
ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri
pts}, | 2170 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM
ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri
pts}, |
| 2197 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme
ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall
back, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | 2171 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme
ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall
back, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, |
| 2198 {"voidMethodTestEnumArg", TestInterfaceImplementationV8Internal::voidMethodT
estEnumArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 2172 {"voidMethodTestEnumArg", TestInterfaceImplementationV8Internal::voidMethodT
estEnumArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
| 2199 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba
ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld,
0, V8DOMConfiguration::ExposedToAllScripts}, | 2173 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba
ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld,
0, V8DOMConfiguration::ExposedToAllScripts}, |
| 2200 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed
MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 2174 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed
MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
| 2201 {"legacyInterfaceTypeCheckingMethod", TestInterfaceImplementationV8Internal:
:legacyInterfaceTypeCheckingMethodMethodCallback, 0, 1, V8DOMConfiguration::Expo
sedToAllScripts}, | 2175 {"legacyInterfaceTypeCheckingMethod", TestInterfaceImplementationV8Internal:
:legacyInterfaceTypeCheckingMethodMethodCallback, 0, 1, V8DOMConfiguration::Expo
sedToAllScripts}, |
| 2202 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo
idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 2176 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo
idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
| 2203 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement
sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | 2177 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement
sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, |
| 2204 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem
entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript
s}, | 2178 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem
entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript
s}, |
| 2205 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3
VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 2179 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3
VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
| 2206 {"voidMethodPartialOverload", TestInterfaceImplementationV8Internal::voidMet
hodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}
, | 2180 {"voidMethodPartialOverload", TestInterfaceImplementationV8Internal::voidMet
hodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}
, |
| 2207 {"promiseMethodPartialOverload", TestInterfaceImplementationV8Internal::prom
iseMethodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllSc
ripts}, | 2181 {"promiseMethodPartialOverload", TestInterfaceImplementationV8Internal::prom
iseMethodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllSc
ripts}, |
| 2208 {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMe
thodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 2182 {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMe
thodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
| 2209 }; | 2183 }; |
| 2210 | 2184 |
| 2211 void V8TestInterface::installV8TestInterfaceTemplate(v8::Local<v8::FunctionTempl
ate> functionTemplate, v8::Isolate* isolate) | 2185 void V8TestInterface::installV8TestInterfaceTemplate(v8::Local<v8::FunctionTempl
ate> functionTemplate, v8::Isolate* isolate) |
| 2212 { | 2186 { |
| 2213 functionTemplate->ReadOnlyPrototype(); | 2187 functionTemplate->ReadOnlyPrototype(); |
| 2214 | 2188 |
| 2215 v8::Local<v8::Signature> defaultSignature; | 2189 v8::Local<v8::Signature> defaultSignature; |
| 2216 if (!RuntimeEnabledFeatures::featureNameEnabled()) | 2190 if (!RuntimeEnabledFeatures::featureNameEnabled()) |
| 2217 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate,
functionTemplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfac
e::internalFieldCount, 0, 0, 0, 0, 0, 0); | 2191 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate,
functionTemplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfac
e::internalFieldCount, 0, 0, 0, 0, 0, 0); |
| 2218 else | 2192 else |
| 2219 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate,
functionTemplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V
8TestInterface::internalFieldCount, | 2193 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate,
functionTemplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V
8TestInterface::internalFieldCount, |
| 2220 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute
s), | 2194 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute
s), |
| 2221 V8TestInterfaceAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceAccessors)
, | 2195 0, 0, |
| 2222 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods)); | 2196 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods)); |
| 2223 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 2197 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 2224 ALLOW_UNUSED_LOCAL(instanceTemplate); | 2198 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 2225 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 2199 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 2226 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 2200 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 2227 if (RuntimeEnabledFeatures::implementsFeatureNameEnabled()) { | 2201 if (RuntimeEnabledFeatures::implementsFeatureNameEnabled()) { |
| 2228 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion =\ | 2202 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 2229 {"implementsRuntimeEnabledNodeAttribute", TestInterfaceImplementationV8I
nternal::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, TestInter
faceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}; | 2203 {"implementsRuntimeEnabledNodeAttribute", TestInterfaceImplementationV8I
nternal::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, TestInter
faceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMCo
nfiguration::OnInstance}; |
| 2230 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS
ignature, accessorConfiguration); | 2204 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp
eTemplate, attributeConfiguration); |
| 2231 } | 2205 } |
| 2232 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { | 2206 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { |
| 2233 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion =\ | 2207 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 2234 {"implements2StringAttribute", TestInterfaceImplementationV8Internal::im
plements2StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8In
ternal::implements2StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V
8DOMConfiguration::ExposedToAllScripts}; | 2208 {"implements2StringAttribute", TestInterfaceImplementationV8Internal::im
plements2StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8In
ternal::implements2StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V
8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
| 2235 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS
ignature, accessorConfiguration); | 2209 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp
eTemplate, attributeConfiguration); |
| 2236 } | 2210 } |
| 2237 #if ENABLE(PARTIAL_CONDITION) | 2211 #if ENABLE(PARTIAL_CONDITION) |
| 2238 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { | 2212 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
| 2239 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion =\ | 2213 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 2240 {"partialLongAttribute", TestInterfaceImplementationV8Internal::partialL
ongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::part
ialLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>
(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration:
:ExposedToAllScripts}; | 2214 {"partialLongAttribute", TestInterfaceImplementationV8Internal::partialL
ongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::part
ialLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>
(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration:
:ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
| 2241 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS
ignature, accessorConfiguration); | 2215 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp
eTemplate, attributeConfiguration); |
| 2242 } | 2216 } |
| 2243 #endif // ENABLE(PARTIAL_CONDITION) | 2217 #endif // ENABLE(PARTIAL_CONDITION) |
| 2244 #if ENABLE(PARTIAL_CONDITION) | 2218 #if ENABLE(PARTIAL_CONDITION) |
| 2245 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { | 2219 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
| 2246 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion =\ | 2220 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 2247 {"partialCallWithExecutionContextLongAttribute", TestInterfaceImplementa
tionV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetterCallb
ack, TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongA
ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed
ToAllScripts}; | 2221 {"partialCallWithExecutionContextLongAttribute", TestInterfaceImplementa
tionV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetterCallb
ack, TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongA
ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed
ToAllScripts, V8DOMConfiguration::OnInstance}; |
| 2248 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS
ignature, accessorConfiguration); | 2222 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp
eTemplate, attributeConfiguration); |
| 2249 } | 2223 } |
| 2250 #endif // ENABLE(PARTIAL_CONDITION) | 2224 #endif // ENABLE(PARTIAL_CONDITION) |
| 2251 #if ENABLE(PARTIAL_CONDITION) | 2225 #if ENABLE(PARTIAL_CONDITION) |
| 2252 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { | 2226 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
| 2253 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion =\ | 2227 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 2254 {"partialPartialEnumTypeAttribute", TestInterfaceImplementationV8Interna
l::partialPartialEnumTypeAttributeAttributeGetterCallback, TestInterfaceImplemen
tationV8Internal::partialPartialEnumTypeAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut
e>(v8::None), V8DOMConfiguration::ExposedToAllScripts}; | 2228 {"partialPartialEnumTypeAttribute", TestInterfaceImplementationV8Interna
l::partialPartialEnumTypeAttributeAttributeGetterCallback, TestInterfaceImplemen
tationV8Internal::partialPartialEnumTypeAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut
e>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIns
tance}; |
| 2255 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS
ignature, accessorConfiguration); | 2229 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp
eTemplate, attributeConfiguration); |
| 2256 } | 2230 } |
| 2257 #endif // ENABLE(PARTIAL_CONDITION) | 2231 #endif // ENABLE(PARTIAL_CONDITION) |
| 2258 #if ENABLE(PARTIAL_CONDITION) | 2232 #if ENABLE(PARTIAL_CONDITION) |
| 2259 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { | 2233 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
| 2260 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion =\ | 2234 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 2261 {"stringAttribute", TestInterfaceImplementationV8Internal::stringAttribu
teAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringAttribut
eAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc
ripts}; | 2235 {"stringAttribute", TestInterfaceImplementationV8Internal::stringAttribu
teAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringAttribut
eAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc
ripts, V8DOMConfiguration::OnInstance}; |
| 2262 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS
ignature, accessorConfiguration); | 2236 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp
eTemplate, attributeConfiguration); |
| 2263 } | 2237 } |
| 2264 #endif // ENABLE(PARTIAL_CONDITION) | 2238 #endif // ENABLE(PARTIAL_CONDITION) |
| 2265 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta
nts[] = { | 2239 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta
nts[] = { |
| 2266 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong}
, | 2240 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong}
, |
| 2267 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, | 2241 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, |
| 2268 {"IMPLEMENTS_CONSTANT_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsig
nedShort}, | 2242 {"IMPLEMENTS_CONSTANT_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsig
nedShort}, |
| 2269 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig
nedShort}, | 2243 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig
nedShort}, |
| 2270 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns
ignedShort}, | 2244 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns
ignedShort}, |
| 2271 }; | 2245 }; |
| 2272 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem
plate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); | 2246 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem
plate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2421 { | 2395 { |
| 2422 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; | 2396 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; |
| 2423 } | 2397 } |
| 2424 | 2398 |
| 2425 void V8TestInterface::installConditionallyEnabledProperties(v8::Local<v8::Object
> instanceObject, v8::Isolate* isolate) | 2399 void V8TestInterface::installConditionallyEnabledProperties(v8::Local<v8::Object
> instanceObject, v8::Isolate* isolate) |
| 2426 { | 2400 { |
| 2427 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance
Object->GetPrototype()); | 2401 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance
Object->GetPrototype()); |
| 2428 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | 2402 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); |
| 2429 | 2403 |
| 2430 if (context && (context->isWorkerGlobalScope())) { | 2404 if (context && (context->isWorkerGlobalScope())) { |
| 2431 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion = {"workerExposedAttribute", TestInterfaceImplementationV8Internal::workerE
xposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::w
orkerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon
trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura
tion::ExposedToAllScripts}; | 2405 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"workerExposedAttribute", TestInterfaceImplementationV8Internal::worke
rExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:
:workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC
ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
| 2432 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo
nfiguration); | 2406 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); |
| 2433 } | 2407 } |
| 2434 if (context && (context->isDocument())) { | 2408 if (context && (context->isDocument())) { |
| 2435 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion = {"windowExposedAttribute", TestInterfaceImplementationV8Internal::windowE
xposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::w
indowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon
trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura
tion::ExposedToAllScripts}; | 2409 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"windowExposedAttribute", TestInterfaceImplementationV8Internal::windo
wExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:
:windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC
ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
| 2436 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo
nfiguration); | 2410 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); |
| 2437 } | 2411 } |
| 2438 if (context && context->isDocument() && ContextFeatures::implementsContextNa
meEnabled(toDocument(context))) { | 2412 if (context && context->isDocument() && ContextFeatures::implementsContextNa
meEnabled(toDocument(context))) { |
| 2439 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion = {"implementsPerContextEnabledNodeAttribute", TestInterfaceImplementationV
8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallback, Test
InterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttri
buteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static
_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}
; | 2413 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"implementsPerContextEnabledNodeAttribute", TestInterfaceImplementatio
nV8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallback, Te
stInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttributeAtt
ributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stat
ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScript
s, V8DOMConfiguration::OnInstance}; |
| 2440 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo
nfiguration); | 2414 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); |
| 2441 } | 2415 } |
| 2442 if (context && context->isDocument() && ContextFeatures::partialContextNameE
nabled(toDocument(context))) { | 2416 if (context && context->isDocument() && ContextFeatures::partialContextNameE
nabled(toDocument(context))) { |
| 2443 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion = {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partial2
LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::par
tial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro
l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio
n::ExposedToAllScripts}; | 2417 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partia
l2LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::p
artial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
| 2444 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo
nfiguration); | 2418 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); |
| 2445 } | 2419 } |
| 2446 if (context && context->isDocument() && ContextFeatures::partialContextNameE
nabled(toDocument(context))) { | 2420 if (context && context->isDocument() && ContextFeatures::partialContextNameE
nabled(toDocument(context))) { |
| 2447 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal::
partial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV
8Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, 0, static_c
ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None
), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; | 2421 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal::
partial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV
8Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, 0, static_c
ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None
), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
| 2448 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); | 2422 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); |
| 2449 } | 2423 } |
| 2450 } | 2424 } |
| 2451 | 2425 |
| 2452 void V8TestInterface::installConditionallyEnabledMethods(v8::Local<v8::Object> p
rototypeObject, v8::Isolate* isolate) | 2426 void V8TestInterface::installConditionallyEnabledMethods(v8::Local<v8::Object> p
rototypeObject, v8::Isolate* isolate) |
| 2453 { | 2427 { |
| 2454 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); | 2428 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2601 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2575 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 2602 { | 2576 { |
| 2603 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; | 2577 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; |
| 2604 } | 2578 } |
| 2605 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2579 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 2606 { | 2580 { |
| 2607 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; | 2581 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; |
| 2608 } | 2582 } |
| 2609 } // namespace blink | 2583 } // namespace blink |
| 2610 #endif // ENABLE(CONDITION) | 2584 #endif // ENABLE(CONDITION) |
| OLD | NEW |