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