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