| 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 "V8TestInterface5.h" | 9 #include "V8TestInterface5.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 const WrapperTypeInfo V8TestInterface5::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface5::domTemplate, V8TestInterface5::refObject, V8TestInterface5::d
erefObject, V8TestInterface5::trace, V8TestInterface5::toActiveDOMObject, V8Test
Interface5::visitDOMWrapper, V8TestInterface5::installConditionallyEnabledMethod
s, V8TestInterface5::installConditionallyEnabledProperties, &V8TestInterfaceEmpt
y::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo
::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::De
pendent, WrapperTypeInfo::RefCountedObject }; | 30 const WrapperTypeInfo V8TestInterface5::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface5::domTemplate, V8TestInterface5::refObject, V8TestInterface5::d
erefObject, V8TestInterface5::trace, V8TestInterface5::toActiveDOMObject, V8Test
Interface5::visitDOMWrapper, V8TestInterface5::installConditionallyEnabledMethod
s, V8TestInterface5::installConditionallyEnabledProperties, &V8TestInterfaceEmpt
y::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo
::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::De
pendent, WrapperTypeInfo::RefCountedObject }; |
| 31 | 31 |
| 32 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e5Implementation.h. | 32 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e5Implementation.h. |
| 33 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 33 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 34 // bindings/core/v8/ScriptWrappable.h. | 34 // bindings/core/v8/ScriptWrappable.h. |
| 35 const WrapperTypeInfo& TestInterface5Implementation::s_wrapperTypeInfo = V8TestI
nterface5::wrapperTypeInfo; | 35 const WrapperTypeInfo& TestInterface5Implementation::s_wrapperTypeInfo = V8TestI
nterface5::wrapperTypeInfo; |
| 36 | 36 |
| 37 namespace TestInterface5ImplementationV8Internal { | 37 namespace TestInterface5ImplementationV8Internal { |
| 38 | 38 |
| 39 template<class CallbackInfo> | 39 template<class CallbackInfo> |
| 40 static void TestInterface5ImplementationForceSetAttributeOnThis(v8::Local<v8::St
ring> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) | 40 static void TestInterface5ImplementationForceSetAttributeOnThis(v8::Local<v8::Na
me> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) |
| 41 { | 41 { |
| 42 ASSERT(info.This()->IsObject()); | 42 ASSERT(info.This()->IsObject()); |
| 43 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); | 43 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); |
| 44 } | 44 } |
| 45 | 45 |
| 46 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 46 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 47 { | 47 { |
| 48 v8::Local<v8::Object> holder = info.Holder(); | 48 v8::Local<v8::Object> holder = info.Holder(); |
| 49 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 49 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 50 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | 50 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); |
| 51 } | 51 } |
| 52 | 52 |
| 53 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 53 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 54 { | 54 { |
| 55 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 55 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 56 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette
r(info); | 56 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette
r(info); |
| 57 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 57 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 58 } | 58 } |
| 59 | 59 |
| 60 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 60 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 61 { | 61 { |
| 62 v8::Local<v8::Object> holder = info.Holder(); | 62 v8::Local<v8::Object> holder = info.Holder(); |
| 63 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 63 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 64 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 64 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 65 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe
ck(info.GetIsolate(), v8Value); | 65 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe
ck(info.GetIsolate(), v8Value); |
| 66 if (!cppValue) { | 66 if (!cppValue) { |
| 67 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface5'."); | 67 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface5'."); |
| 68 exceptionState.throwIfNeeded(); | 68 exceptionState.throwIfNeeded(); |
| 69 return; | 69 return; |
| 70 } | 70 } |
| 71 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 71 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 72 } | 72 } |
| 73 | 73 |
| 74 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 74 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 75 { | 75 { |
| 76 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 76 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 77 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); | 77 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); |
| 78 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 78 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 79 } | 79 } |
| 80 | 80 |
| 81 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) | 81 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 82 { | 82 { |
| 83 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceConstructorAttribute"); | 83 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceConstructorAttribute"); |
| 84 TestInterface5ImplementationForceSetAttributeOnThis(propertyName, v8Value, i
nfo); | 84 TestInterface5ImplementationForceSetAttributeOnThis(propertyName, v8Value, i
nfo); |
| 85 } | 85 } |
| 86 | 86 |
| 87 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v
8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | 87 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v
8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 88 { | 88 { |
| 89 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 89 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 90 TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAtt
ributeSetter(v8Value, info); | 90 TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAtt
ributeSetter(v8Value, info); |
| 91 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 91 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 92 } | 92 } |
| 93 | 93 |
| 94 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 94 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 95 { | 95 { |
| 96 v8::Local<v8::Object> holder = info.Holder(); | 96 v8::Local<v8::Object> holder = info.Holder(); |
| 97 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 97 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 98 v8SetReturnValue(info, impl->doubleAttribute()); | 98 v8SetReturnValue(info, impl->doubleAttribute()); |
| 99 } | 99 } |
| 100 | 100 |
| 101 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 101 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 102 { | 102 { |
| 103 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 104 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info)
; | 104 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info)
; |
| 105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 106 } | 106 } |
| 107 | 107 |
| 108 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 108 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 109 { | 109 { |
| 110 v8::Local<v8::Object> holder = info.Holder(); | 110 v8::Local<v8::Object> holder = info.Holder(); |
| 111 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface5", holder, info.GetIsolate()); | 111 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface5", holder, info.GetIsolate()); |
| 112 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 112 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 113 double cppValue = toRestrictedDouble(v8Value, exceptionState); | 113 double cppValue = toRestrictedDouble(v8Value, exceptionState); |
| 114 if (exceptionState.throwIfNeeded()) | 114 if (exceptionState.throwIfNeeded()) |
| 115 return; | 115 return; |
| 116 impl->setDoubleAttribute(cppValue); | 116 impl->setDoubleAttribute(cppValue); |
| 117 } | 117 } |
| 118 | 118 |
| 119 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 119 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 120 { | 120 { |
| 121 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 121 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 122 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val
ue, info); | 122 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val
ue, info); |
| 123 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 123 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 124 } | 124 } |
| 125 | 125 |
| 126 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 126 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 127 { | 127 { |
| 128 v8::Local<v8::Object> holder = info.Holder(); | 128 v8::Local<v8::Object> holder = info.Holder(); |
| 129 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 129 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 130 v8SetReturnValue(info, impl->floatAttribute()); | 130 v8SetReturnValue(info, impl->floatAttribute()); |
| 131 } | 131 } |
| 132 | 132 |
| 133 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 133 static void floatAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 134 { | 134 { |
| 135 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 135 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 136 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); | 136 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); |
| 137 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 137 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 138 } | 138 } |
| 139 | 139 |
| 140 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 140 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 141 { | 141 { |
| 142 v8::Local<v8::Object> holder = info.Holder(); | 142 v8::Local<v8::Object> holder = info.Holder(); |
| 143 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface5", holder, info.GetIsolate()); | 143 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface5", holder, info.GetIsolate()); |
| 144 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 144 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 145 float cppValue = toRestrictedFloat(v8Value, exceptionState); | 145 float cppValue = toRestrictedFloat(v8Value, exceptionState); |
| 146 if (exceptionState.throwIfNeeded()) | 146 if (exceptionState.throwIfNeeded()) |
| 147 return; | 147 return; |
| 148 impl->setFloatAttribute(cppValue); | 148 impl->setFloatAttribute(cppValue); |
| 149 } | 149 } |
| 150 | 150 |
| 151 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 151 static void floatAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 152 { | 152 { |
| 153 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 153 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 154 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu
e, info); | 154 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu
e, info); |
| 155 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 155 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 156 } | 156 } |
| 157 | 157 |
| 158 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 158 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 159 { | 159 { |
| 160 v8::Local<v8::Object> holder = info.Holder(); | 160 v8::Local<v8::Object> holder = info.Holder(); |
| 161 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 161 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 162 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 162 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
| 163 } | 163 } |
| 164 | 164 |
| 165 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 165 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 166 { | 166 { |
| 167 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 167 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 168 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Getter(info); | 168 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Getter(info); |
| 169 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 169 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 170 } | 170 } |
| 171 | 171 |
| 172 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 172 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 173 { | 173 { |
| 174 v8::Local<v8::Object> holder = info.Holder(); | 174 v8::Local<v8::Object> holder = info.Holder(); |
| 175 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface5", holder, info.GetIsolate()); | 175 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface5", holder, info.GetIsolate()); |
| 176 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 176 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 177 double cppValue = toDouble(v8Value, exceptionState); | 177 double cppValue = toDouble(v8Value, exceptionState); |
| 178 if (exceptionState.throwIfNeeded()) | 178 if (exceptionState.throwIfNeeded()) |
| 179 return; | 179 return; |
| 180 impl->setUnrestrictedDoubleAttribute(cppValue); | 180 impl->setUnrestrictedDoubleAttribute(cppValue); |
| 181 } | 181 } |
| 182 | 182 |
| 183 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 183 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 184 { | 184 { |
| 185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 186 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Setter(v8Value, info); | 186 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Setter(v8Value, info); |
| 187 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 187 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 188 } | 188 } |
| 189 | 189 |
| 190 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 190 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 191 { | 191 { |
| 192 v8::Local<v8::Object> holder = info.Holder(); | 192 v8::Local<v8::Object> holder = info.Holder(); |
| 193 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 193 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 194 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 194 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
| 195 } | 195 } |
| 196 | 196 |
| 197 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 197 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 198 { | 198 { |
| 199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 200 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG
etter(info); | 200 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG
etter(info); |
| 201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 202 } | 202 } |
| 203 | 203 |
| 204 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 204 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 205 { | 205 { |
| 206 v8::Local<v8::Object> holder = info.Holder(); | 206 v8::Local<v8::Object> holder = info.Holder(); |
| 207 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface5", holder, info.GetIsolate()); | 207 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface5", holder, info.GetIsolate()); |
| 208 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 208 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 209 float cppValue = toFloat(v8Value, exceptionState); | 209 float cppValue = toFloat(v8Value, exceptionState); |
| 210 if (exceptionState.throwIfNeeded()) | 210 if (exceptionState.throwIfNeeded()) |
| 211 return; | 211 return; |
| 212 impl->setUnrestrictedFloatAttribute(cppValue); | 212 impl->setUnrestrictedFloatAttribute(cppValue); |
| 213 } | 213 } |
| 214 | 214 |
| 215 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 215 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 216 { | 216 { |
| 217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 218 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS
etter(v8Value, info); | 218 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS
etter(v8Value, info); |
| 219 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 219 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 220 } | 220 } |
| 221 | 221 |
| 222 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 222 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 223 { | 223 { |
| 224 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri
bute(), info.GetIsolate()); | 224 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri
bute(), info.GetIsolate()); |
| 225 } | 225 } |
| 226 | 226 |
| 227 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 227 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 228 { | 228 { |
| 229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 230 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter
(info); | 230 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter
(info); |
| 231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 232 } | 232 } |
| 233 | 233 |
| 234 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 234 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 235 { | 235 { |
| 236 V8StringResource<> cppValue = v8Value; | 236 V8StringResource<> cppValue = v8Value; |
| 237 if (!cppValue.prepare()) | 237 if (!cppValue.prepare()) |
| 238 return; | 238 return; |
| 239 TestInterface5Implementation::setStaticStringAttribute(cppValue); | 239 TestInterface5Implementation::setStaticStringAttribute(cppValue); |
| 240 } | 240 } |
| 241 | 241 |
| 242 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 242 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 243 { | 243 { |
| 244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 245 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter
(v8Value, info); | 245 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter
(v8Value, info); |
| 246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 247 } | 247 } |
| 248 | 248 |
| 249 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 249 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 250 { | 250 { |
| 251 v8::Local<v8::Object> holder = info.Holder(); | 251 v8::Local<v8::Object> holder = info.Holder(); |
| 252 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 252 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 253 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); | 253 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
| 254 } | 254 } |
| 255 | 255 |
| 256 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 256 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 257 { | 257 { |
| 258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 259 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette
r(info); | 259 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette
r(info); |
| 260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 261 } | 261 } |
| 262 | 262 |
| 263 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 263 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 264 { | 264 { |
| 265 v8::Local<v8::Object> holder = info.Holder(); | 265 v8::Local<v8::Object> holder = info.Holder(); |
| 266 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 266 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 267 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 267 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 268 int cppValue = toInt32(v8Value, exceptionState); | 268 int cppValue = toInt32(v8Value, exceptionState); |
| 269 if (exceptionState.throwIfNeeded()) | 269 if (exceptionState.throwIfNeeded()) |
| 270 return; | 270 return; |
| 271 impl->setAlwaysExposedAttribute(cppValue); | 271 impl->setAlwaysExposedAttribute(cppValue); |
| 272 } | 272 } |
| 273 | 273 |
| 274 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 274 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 275 { | 275 { |
| 276 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 276 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 277 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette
r(v8Value, info); | 277 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette
r(v8Value, info); |
| 278 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 278 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 279 } | 279 } |
| 280 | 280 |
| 281 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 281 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 282 { | 282 { |
| 283 v8::Local<v8::Object> holder = info.Holder(); | 283 v8::Local<v8::Object> holder = info.Holder(); |
| 284 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 284 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 285 v8SetReturnValueInt(info, impl->workerExposedAttribute()); | 285 v8SetReturnValueInt(info, impl->workerExposedAttribute()); |
| 286 } | 286 } |
| 287 | 287 |
| 288 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 288 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 289 { | 289 { |
| 290 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 290 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 291 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette
r(info); | 291 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette
r(info); |
| 292 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 292 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 293 } | 293 } |
| 294 | 294 |
| 295 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 295 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 296 { | 296 { |
| 297 v8::Local<v8::Object> holder = info.Holder(); | 297 v8::Local<v8::Object> holder = info.Holder(); |
| 298 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 298 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 299 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 299 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 300 int cppValue = toInt32(v8Value, exceptionState); | 300 int cppValue = toInt32(v8Value, exceptionState); |
| 301 if (exceptionState.throwIfNeeded()) | 301 if (exceptionState.throwIfNeeded()) |
| 302 return; | 302 return; |
| 303 impl->setWorkerExposedAttribute(cppValue); | 303 impl->setWorkerExposedAttribute(cppValue); |
| 304 } | 304 } |
| 305 | 305 |
| 306 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 306 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 307 { | 307 { |
| 308 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 308 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 309 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette
r(v8Value, info); | 309 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette
r(v8Value, info); |
| 310 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 310 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 311 } | 311 } |
| 312 | 312 |
| 313 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 313 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 314 { | 314 { |
| 315 v8::Local<v8::Object> holder = info.Holder(); | 315 v8::Local<v8::Object> holder = info.Holder(); |
| 316 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 316 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 317 v8SetReturnValueInt(info, impl->windowExposedAttribute()); | 317 v8SetReturnValueInt(info, impl->windowExposedAttribute()); |
| 318 } | 318 } |
| 319 | 319 |
| 320 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 320 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 321 { | 321 { |
| 322 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 322 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 323 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette
r(info); | 323 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette
r(info); |
| 324 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 324 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 325 } | 325 } |
| 326 | 326 |
| 327 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 327 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 328 { | 328 { |
| 329 v8::Local<v8::Object> holder = info.Holder(); | 329 v8::Local<v8::Object> holder = info.Holder(); |
| 330 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 330 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 331 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 331 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 332 int cppValue = toInt32(v8Value, exceptionState); | 332 int cppValue = toInt32(v8Value, exceptionState); |
| 333 if (exceptionState.throwIfNeeded()) | 333 if (exceptionState.throwIfNeeded()) |
| 334 return; | 334 return; |
| 335 impl->setWindowExposedAttribute(cppValue); | 335 impl->setWindowExposedAttribute(cppValue); |
| 336 } | 336 } |
| 337 | 337 |
| 338 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 338 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 339 { | 339 { |
| 340 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 340 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 341 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); | 341 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); |
| 342 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 342 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 343 } | 343 } |
| 344 | 344 |
| 345 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 345 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 346 { | 346 { |
| 347 if (UNLIKELY(info.Length() < 1)) { | 347 if (UNLIKELY(info.Length() < 1)) { |
| 348 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le
ngth()), info.GetIsolate()); | 348 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le
ngth()), info.GetIsolate()); |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | 1044 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); |
| 1045 } | 1045 } |
| 1046 | 1046 |
| 1047 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | 1047 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) |
| 1048 { | 1048 { |
| 1049 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | 1049 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); |
| 1050 } | 1050 } |
| 1051 | 1051 |
| 1052 } // namespace blink | 1052 } // namespace blink |
| 1053 #endif // ENABLE(CONDITION) | 1053 #endif // ENABLE(CONDITION) |
| OLD | NEW |