| 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 | 30 |
| 31 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e5Implementation.h. | 31 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e5Implementation.h. |
| 32 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 32 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 33 // bindings/core/v8/ScriptWrappable.h. | 33 // bindings/core/v8/ScriptWrappable.h. |
| 34 const WrapperTypeInfo& TestInterface5Implementation::s_wrapperTypeInfo = V8TestI
nterface5::wrapperTypeInfo; | 34 const WrapperTypeInfo& TestInterface5Implementation::s_wrapperTypeInfo = V8TestI
nterface5::wrapperTypeInfo; |
| 35 | 35 |
| 36 namespace TestInterface5ImplementationV8Internal { | 36 namespace TestInterface5ImplementationV8Internal { |
| 37 | 37 |
| 38 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 38 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 39 { | 39 { |
| 40 v8::Handle<v8::Object> holder = info.Holder(); | 40 v8::Local<v8::Object> holder = info.Holder(); |
| 41 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 41 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 42 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | 42 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); |
| 43 } | 43 } |
| 44 | 44 |
| 45 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 45 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 46 { | 46 { |
| 47 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 47 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 48 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette
r(info); | 48 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette
r(info); |
| 49 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 49 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 50 } | 50 } |
| 51 | 51 |
| 52 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 52 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 53 { | 53 { |
| 54 v8::Handle<v8::Object> holder = info.Holder(); | 54 v8::Local<v8::Object> holder = info.Holder(); |
| 55 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 55 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 56 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 56 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 57 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe
ck(info.GetIsolate(), v8Value); | 57 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe
ck(info.GetIsolate(), v8Value); |
| 58 if (!cppValue) { | 58 if (!cppValue) { |
| 59 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface5'."); | 59 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface5'."); |
| 60 exceptionState.throwIfNeeded(); | 60 exceptionState.throwIfNeeded(); |
| 61 return; | 61 return; |
| 62 } | 62 } |
| 63 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 63 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 64 } | 64 } |
| 65 | 65 |
| 66 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 66 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 67 { | 67 { |
| 68 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 68 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 69 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); | 69 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); |
| 70 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 70 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 71 } | 71 } |
| 72 | 72 |
| 73 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 73 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 74 { | 74 { |
| 75 v8::Handle<v8::Object> holder = info.Holder(); | 75 v8::Local<v8::Object> holder = info.Holder(); |
| 76 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 76 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 77 v8SetReturnValue(info, impl->doubleAttribute()); | 77 v8SetReturnValue(info, impl->doubleAttribute()); |
| 78 } | 78 } |
| 79 | 79 |
| 80 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 80 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 81 { | 81 { |
| 82 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 82 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 83 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info)
; | 83 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info)
; |
| 84 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 84 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 85 } | 85 } |
| 86 | 86 |
| 87 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 87 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 88 { | 88 { |
| 89 v8::Handle<v8::Object> holder = info.Holder(); | 89 v8::Local<v8::Object> holder = info.Holder(); |
| 90 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface5", holder, info.GetIsolate()); | 90 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface5", holder, info.GetIsolate()); |
| 91 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 91 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 92 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt
ate), exceptionState); | 92 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt
ate), exceptionState); |
| 93 if (!std::isfinite(cppValue)) { | 93 if (!std::isfinite(cppValue)) { |
| 94 exceptionState.throwTypeError("The provided double value is non-finite."
); | 94 exceptionState.throwTypeError("The provided double value is non-finite."
); |
| 95 exceptionState.throwIfNeeded(); | 95 exceptionState.throwIfNeeded(); |
| 96 return; | 96 return; |
| 97 } | 97 } |
| 98 impl->setDoubleAttribute(cppValue); | 98 impl->setDoubleAttribute(cppValue); |
| 99 } | 99 } |
| 100 | 100 |
| 101 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 101 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 102 { | 102 { |
| 103 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 104 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val
ue, info); | 104 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val
ue, info); |
| 105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 106 } | 106 } |
| 107 | 107 |
| 108 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 108 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 109 { | 109 { |
| 110 v8::Handle<v8::Object> holder = info.Holder(); | 110 v8::Local<v8::Object> holder = info.Holder(); |
| 111 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 111 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 112 v8SetReturnValue(info, impl->floatAttribute()); | 112 v8SetReturnValue(info, impl->floatAttribute()); |
| 113 } | 113 } |
| 114 | 114 |
| 115 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 115 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 116 { | 116 { |
| 117 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 117 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 118 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); | 118 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); |
| 119 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 119 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 120 } | 120 } |
| 121 | 121 |
| 122 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 122 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 123 { | 123 { |
| 124 v8::Handle<v8::Object> holder = info.Holder(); | 124 v8::Local<v8::Object> holder = info.Holder(); |
| 125 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface5", holder, info.GetIsolate()); | 125 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface5", holder, info.GetIsolate()); |
| 126 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 126 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 127 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat
e), exceptionState); | 127 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat
e), exceptionState); |
| 128 if (!std::isfinite(cppValue)) { | 128 if (!std::isfinite(cppValue)) { |
| 129 exceptionState.throwTypeError("The provided float value is non-finite.")
; | 129 exceptionState.throwTypeError("The provided float value is non-finite.")
; |
| 130 exceptionState.throwIfNeeded(); | 130 exceptionState.throwIfNeeded(); |
| 131 return; | 131 return; |
| 132 } | 132 } |
| 133 impl->setFloatAttribute(cppValue); | 133 impl->setFloatAttribute(cppValue); |
| 134 } | 134 } |
| 135 | 135 |
| 136 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 136 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 137 { | 137 { |
| 138 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 138 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 139 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu
e, info); | 139 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu
e, info); |
| 140 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 140 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 141 } | 141 } |
| 142 | 142 |
| 143 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 143 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 144 { | 144 { |
| 145 v8::Handle<v8::Object> holder = info.Holder(); | 145 v8::Local<v8::Object> holder = info.Holder(); |
| 146 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 146 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 147 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 147 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
| 148 } | 148 } |
| 149 | 149 |
| 150 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 150 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 151 { | 151 { |
| 152 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 152 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 153 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Getter(info); | 153 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Getter(info); |
| 154 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 154 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 155 } | 155 } |
| 156 | 156 |
| 157 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 157 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 158 { | 158 { |
| 159 v8::Handle<v8::Object> holder = info.Holder(); | 159 v8::Local<v8::Object> holder = info.Holder(); |
| 160 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface5", holder, info.GetIsolate()); | 160 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface5", holder, info.GetIsolate()); |
| 161 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 161 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 162 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt
ate), exceptionState); | 162 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt
ate), exceptionState); |
| 163 impl->setUnrestrictedDoubleAttribute(cppValue); | 163 impl->setUnrestrictedDoubleAttribute(cppValue); |
| 164 } | 164 } |
| 165 | 165 |
| 166 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 166 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 167 { | 167 { |
| 168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 169 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Setter(v8Value, info); | 169 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Setter(v8Value, info); |
| 170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 171 } | 171 } |
| 172 | 172 |
| 173 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 173 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 174 { | 174 { |
| 175 v8::Handle<v8::Object> holder = info.Holder(); | 175 v8::Local<v8::Object> holder = info.Holder(); |
| 176 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 176 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 177 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 177 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
| 178 } | 178 } |
| 179 | 179 |
| 180 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 180 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 181 { | 181 { |
| 182 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 182 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 183 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG
etter(info); | 183 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG
etter(info); |
| 184 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 184 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 185 } | 185 } |
| 186 | 186 |
| 187 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 187 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 188 { | 188 { |
| 189 v8::Handle<v8::Object> holder = info.Holder(); | 189 v8::Local<v8::Object> holder = info.Holder(); |
| 190 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface5", holder, info.GetIsolate()); | 190 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface5", holder, info.GetIsolate()); |
| 191 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 191 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 192 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat
e), exceptionState); | 192 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat
e), exceptionState); |
| 193 impl->setUnrestrictedFloatAttribute(cppValue); | 193 impl->setUnrestrictedFloatAttribute(cppValue); |
| 194 } | 194 } |
| 195 | 195 |
| 196 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 196 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 197 { | 197 { |
| 198 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 198 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 199 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS
etter(v8Value, info); | 199 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS
etter(v8Value, info); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 220 | 220 |
| 221 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 221 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 222 { | 222 { |
| 223 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 223 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 224 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter
(v8Value, info); | 224 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter
(v8Value, info); |
| 225 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 225 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 226 } | 226 } |
| 227 | 227 |
| 228 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 228 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 229 { | 229 { |
| 230 v8::Handle<v8::Object> holder = info.Holder(); | 230 v8::Local<v8::Object> holder = info.Holder(); |
| 231 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 231 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 232 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); | 232 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
| 233 } | 233 } |
| 234 | 234 |
| 235 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 235 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 236 { | 236 { |
| 237 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 237 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 238 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette
r(info); | 238 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette
r(info); |
| 239 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 239 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 240 } | 240 } |
| 241 | 241 |
| 242 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 242 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 243 { | 243 { |
| 244 v8::Handle<v8::Object> holder = info.Holder(); | 244 v8::Local<v8::Object> holder = info.Holder(); |
| 245 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 245 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 246 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 246 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 247 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 247 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 248 impl->setAlwaysExposedAttribute(cppValue); | 248 impl->setAlwaysExposedAttribute(cppValue); |
| 249 } | 249 } |
| 250 | 250 |
| 251 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 251 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 252 { | 252 { |
| 253 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 253 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 254 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette
r(v8Value, info); | 254 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette
r(v8Value, info); |
| 255 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 255 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 256 } | 256 } |
| 257 | 257 |
| 258 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 258 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 259 { | 259 { |
| 260 v8::Handle<v8::Object> holder = info.Holder(); | 260 v8::Local<v8::Object> holder = info.Holder(); |
| 261 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 261 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 262 v8SetReturnValueInt(info, impl->workerExposedAttribute()); | 262 v8SetReturnValueInt(info, impl->workerExposedAttribute()); |
| 263 } | 263 } |
| 264 | 264 |
| 265 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 265 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 266 { | 266 { |
| 267 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 267 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 268 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette
r(info); | 268 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette
r(info); |
| 269 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 269 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 270 } | 270 } |
| 271 | 271 |
| 272 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 272 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 273 { | 273 { |
| 274 v8::Handle<v8::Object> holder = info.Holder(); | 274 v8::Local<v8::Object> holder = info.Holder(); |
| 275 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 275 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 276 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 276 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 277 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 277 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 278 impl->setWorkerExposedAttribute(cppValue); | 278 impl->setWorkerExposedAttribute(cppValue); |
| 279 } | 279 } |
| 280 | 280 |
| 281 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 281 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 282 { | 282 { |
| 283 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 283 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 284 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette
r(v8Value, info); | 284 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette
r(v8Value, info); |
| 285 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 285 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 286 } | 286 } |
| 287 | 287 |
| 288 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 288 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 289 { | 289 { |
| 290 v8::Handle<v8::Object> holder = info.Holder(); | 290 v8::Local<v8::Object> holder = info.Holder(); |
| 291 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 291 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 292 v8SetReturnValueInt(info, impl->windowExposedAttribute()); | 292 v8SetReturnValueInt(info, impl->windowExposedAttribute()); |
| 293 } | 293 } |
| 294 | 294 |
| 295 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 295 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 296 { | 296 { |
| 297 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 297 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 298 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette
r(info); | 298 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette
r(info); |
| 299 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 299 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 300 } | 300 } |
| 301 | 301 |
| 302 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 302 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 303 { | 303 { |
| 304 v8::Handle<v8::Object> holder = info.Holder(); | 304 v8::Local<v8::Object> holder = info.Holder(); |
| 305 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 305 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 306 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 306 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 307 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 307 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 308 impl->setWindowExposedAttribute(cppValue); | 308 impl->setWindowExposedAttribute(cppValue); |
| 309 } | 309 } |
| 310 | 310 |
| 311 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 311 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 312 { | 312 { |
| 313 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 313 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 314 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); | 314 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); |
| 315 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 315 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 316 } | 316 } |
| 317 | 317 |
| 318 static void TestInterface5ImplementationConstructorGetter(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 318 static void TestInterface5ImplementationConstructorGetter(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 319 { | 319 { |
| 320 v8::Handle<v8::Value> data = info.Data(); | 320 v8::Local<v8::Value> data = info.Data(); |
| 321 ASSERT(data->IsExternal()); | 321 ASSERT(data->IsExternal()); |
| 322 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 322 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
| 323 if (!perContextData) | 323 if (!perContextData) |
| 324 return; | 324 return; |
| 325 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 325 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
| 326 } | 326 } |
| 327 | 327 |
| 328 static void TestInterface5ImplementationForceSetAttributeOnThis(v8::Local<v8::St
ring> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | 328 static void TestInterface5ImplementationForceSetAttributeOnThis(v8::Local<v8::St
ring> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 329 { | 329 { |
| 330 if (info.This()->IsObject()) | 330 if (info.This()->IsObject()) |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 } | 755 } |
| 756 | 756 |
| 757 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) | 757 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) |
| 758 { | 758 { |
| 759 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 759 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 760 Vector<String> names; | 760 Vector<String> names; |
| 761 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter
face5", info.Holder(), info.GetIsolate()); | 761 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter
face5", info.Holder(), info.GetIsolate()); |
| 762 impl->namedPropertyEnumerator(names, exceptionState); | 762 impl->namedPropertyEnumerator(names, exceptionState); |
| 763 if (exceptionState.throwIfNeeded()) | 763 if (exceptionState.throwIfNeeded()) |
| 764 return; | 764 return; |
| 765 v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size
()); | 765 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size(
)); |
| 766 for (size_t i = 0; i < names.size(); ++i) | 766 for (size_t i = 0; i < names.size(); ++i) |
| 767 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs
olate(), names[i])); | 767 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs
olate(), names[i])); |
| 768 v8SetReturnValue(info, v8names); | 768 v8SetReturnValue(info, v8names); |
| 769 } | 769 } |
| 770 | 770 |
| 771 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) | 771 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) |
| 772 { | 772 { |
| 773 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); | 773 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); |
| 774 TestInterface5ImplementationV8Internal::namedPropertyEnumerator(info); | 774 TestInterface5ImplementationV8Internal::namedPropertyEnumerator(info); |
| 775 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 775 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | 927 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); |
| 928 } | 928 } |
| 929 | 929 |
| 930 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | 930 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) |
| 931 { | 931 { |
| 932 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | 932 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); |
| 933 } | 933 } |
| 934 | 934 |
| 935 } // namespace blink | 935 } // namespace blink |
| 936 #endif // ENABLE(CONDITION) | 936 #endif // ENABLE(CONDITION) |
| OLD | NEW |