| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 namespace TestInterfaceImplementationV8Internal { | 51 namespace TestInterfaceImplementationV8Internal { |
| 52 static void (*voidMethodPartialOverloadMethodForPartialInterface)(const v8::Func
tionCallbackInfo<v8::Value>&) = 0; | 52 static void (*voidMethodPartialOverloadMethodForPartialInterface)(const v8::Func
tionCallbackInfo<v8::Value>&) = 0; |
| 53 static void (*staticVoidMethodPartialOverloadMethodForPartialInterface)(const v8
::FunctionCallbackInfo<v8::Value>&) = 0; | 53 static void (*staticVoidMethodPartialOverloadMethodForPartialInterface)(const v8
::FunctionCallbackInfo<v8::Value>&) = 0; |
| 54 static void (*promiseMethodPartialOverloadMethodForPartialInterface)(const v8::F
unctionCallbackInfo<v8::Value>&) = 0; | 54 static void (*promiseMethodPartialOverloadMethodForPartialInterface)(const v8::F
unctionCallbackInfo<v8::Value>&) = 0; |
| 55 static void (*staticPromiseMethodPartialOverloadMethodForPartialInterface)(const
v8::FunctionCallbackInfo<v8::Value>&) = 0; | 55 static void (*staticPromiseMethodPartialOverloadMethodForPartialInterface)(const
v8::FunctionCallbackInfo<v8::Value>&) = 0; |
| 56 static void (*partial2VoidMethodMethodForPartialInterface)(const v8::FunctionCal
lbackInfo<v8::Value>&) = 0; | 56 static void (*partial2VoidMethodMethodForPartialInterface)(const v8::FunctionCal
lbackInfo<v8::Value>&) = 0; |
| 57 static void (*partial2StaticVoidMethodMethodForPartialInterface)(const v8::Funct
ionCallbackInfo<v8::Value>&) = 0; | 57 static void (*partial2StaticVoidMethodMethodForPartialInterface)(const v8::Funct
ionCallbackInfo<v8::Value>&) = 0; |
| 58 | 58 |
| 59 template<class CallbackInfo> | 59 template<class CallbackInfo> |
| 60 static void TestInterfaceImplementationForceSetAttributeOnThis(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) | 60 static void TestInterfaceImplementationForceSetAttributeOnThis(v8::Local<v8::Nam
e> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) |
| 61 { | 61 { |
| 62 ASSERT(info.This()->IsObject()); | 62 ASSERT(info.This()->IsObject()); |
| 63 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); | 63 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); |
| 64 } | 64 } |
| 65 | 65 |
| 66 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 66 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 67 { | 67 { |
| 68 v8::Local<v8::Object> holder = info.Holder(); | 68 v8::Local<v8::Object> holder = info.Holder(); |
| 69 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 69 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 70 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | 70 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); |
| 71 } | 71 } |
| 72 | 72 |
| 73 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 73 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 74 { | 74 { |
| 75 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 75 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 76 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib
uteGetter); | 76 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib
uteGetter); |
| 77 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter
(info); | 77 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter
(info); |
| 78 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 78 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 79 } | 79 } |
| 80 | 80 |
| 81 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 81 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 82 { | 82 { |
| 83 v8::Local<v8::Object> holder = info.Holder(); | 83 v8::Local<v8::Object> holder = info.Holder(); |
| 84 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface", holder, info.GetIsolate()); | 84 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 85 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 85 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 86 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 86 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 87 if (!cppValue) { | 87 if (!cppValue) { |
| 88 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 88 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 89 exceptionState.throwIfNeeded(); | 89 exceptionState.throwIfNeeded(); |
| 90 return; | 90 return; |
| 91 } | 91 } |
| 92 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 92 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 93 } | 93 } |
| 94 | 94 |
| 95 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 95 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 96 { | 96 { |
| 97 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 97 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 98 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib
uteSetter); | 98 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib
uteSetter); |
| 99 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter
(v8Value, info); | 99 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter
(v8Value, info); |
| 100 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 100 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 101 } | 101 } |
| 102 | 102 |
| 103 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) | 103 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 104 { | 104 { |
| 105 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceConstructorAttribute"); | 105 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceConstructorAttribute"); |
| 106 TestInterfaceImplementationForceSetAttributeOnThis(propertyName, v8Value, in
fo); | 106 TestInterfaceImplementationForceSetAttributeOnThis(propertyName, v8Value, in
fo); |
| 107 } | 107 } |
| 108 | 108 |
| 109 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v
8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | 109 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v
8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 110 { | 110 { |
| 111 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 111 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 112 TestInterfaceImplementationV8Internal::testInterfaceConstructorAttributeAttr
ibuteSetter(v8Value, info); | 112 TestInterfaceImplementationV8Internal::testInterfaceConstructorAttributeAttr
ibuteSetter(v8Value, info); |
| 113 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 113 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 114 } | 114 } |
| 115 | 115 |
| 116 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 116 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 117 { | 117 { |
| 118 v8::Local<v8::Object> holder = info.Holder(); | 118 v8::Local<v8::Object> holder = info.Holder(); |
| 119 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 119 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 120 v8SetReturnValue(info, impl->doubleAttribute()); | 120 v8SetReturnValue(info, impl->doubleAttribute()); |
| 121 } | 121 } |
| 122 | 122 |
| 123 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 123 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 124 { | 124 { |
| 125 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 125 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 126 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info); | 126 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info); |
| 127 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 127 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 128 } | 128 } |
| 129 | 129 |
| 130 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 130 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 131 { | 131 { |
| 132 v8::Local<v8::Object> holder = info.Holder(); | 132 v8::Local<v8::Object> holder = info.Holder(); |
| 133 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface", holder, info.GetIsolate()); | 133 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface", holder, info.GetIsolate()); |
| 134 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 134 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 135 double cppValue = toRestrictedDouble(v8Value, exceptionState); | 135 double cppValue = toRestrictedDouble(v8Value, exceptionState); |
| 136 if (exceptionState.throwIfNeeded()) | 136 if (exceptionState.throwIfNeeded()) |
| 137 return; | 137 return; |
| 138 impl->setDoubleAttribute(cppValue); | 138 impl->setDoubleAttribute(cppValue); |
| 139 } | 139 } |
| 140 | 140 |
| 141 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 141 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 142 { | 142 { |
| 143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 144 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu
e, info); | 144 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu
e, info); |
| 145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 146 } | 146 } |
| 147 | 147 |
| 148 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 148 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 149 { | 149 { |
| 150 v8::Local<v8::Object> holder = info.Holder(); | 150 v8::Local<v8::Object> holder = info.Holder(); |
| 151 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 151 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 152 v8SetReturnValue(info, impl->floatAttribute()); | 152 v8SetReturnValue(info, impl->floatAttribute()); |
| 153 } | 153 } |
| 154 | 154 |
| 155 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 155 static void floatAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 156 { | 156 { |
| 157 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 157 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 158 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); | 158 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); |
| 159 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 159 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 160 } | 160 } |
| 161 | 161 |
| 162 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 162 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 163 { | 163 { |
| 164 v8::Local<v8::Object> holder = info.Holder(); | 164 v8::Local<v8::Object> holder = info.Holder(); |
| 165 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface", holder, info.GetIsolate()); | 165 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface", holder, info.GetIsolate()); |
| 166 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 166 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 167 float cppValue = toRestrictedFloat(v8Value, exceptionState); | 167 float cppValue = toRestrictedFloat(v8Value, exceptionState); |
| 168 if (exceptionState.throwIfNeeded()) | 168 if (exceptionState.throwIfNeeded()) |
| 169 return; | 169 return; |
| 170 impl->setFloatAttribute(cppValue); | 170 impl->setFloatAttribute(cppValue); |
| 171 } | 171 } |
| 172 | 172 |
| 173 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 173 static void floatAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 174 { | 174 { |
| 175 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 175 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 176 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value
, info); | 176 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value
, info); |
| 177 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 177 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 178 } | 178 } |
| 179 | 179 |
| 180 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 180 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 181 { | 181 { |
| 182 v8::Local<v8::Object> holder = info.Holder(); | 182 v8::Local<v8::Object> holder = info.Holder(); |
| 183 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 183 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 184 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 184 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
| 185 } | 185 } |
| 186 | 186 |
| 187 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 187 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 188 { | 188 { |
| 189 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 189 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 190 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG
etter(info); | 190 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG
etter(info); |
| 191 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 191 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 192 } | 192 } |
| 193 | 193 |
| 194 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 194 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 195 { | 195 { |
| 196 v8::Local<v8::Object> holder = info.Holder(); | 196 v8::Local<v8::Object> holder = info.Holder(); |
| 197 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface", holder, info.GetIsolate()); | 197 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface", holder, info.GetIsolate()); |
| 198 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 198 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 199 double cppValue = toDouble(v8Value, exceptionState); | 199 double cppValue = toDouble(v8Value, exceptionState); |
| 200 if (exceptionState.throwIfNeeded()) | 200 if (exceptionState.throwIfNeeded()) |
| 201 return; | 201 return; |
| 202 impl->setUnrestrictedDoubleAttribute(cppValue); | 202 impl->setUnrestrictedDoubleAttribute(cppValue); |
| 203 } | 203 } |
| 204 | 204 |
| 205 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 205 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 206 { | 206 { |
| 207 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 207 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 208 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS
etter(v8Value, info); | 208 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS
etter(v8Value, info); |
| 209 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 209 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 210 } | 210 } |
| 211 | 211 |
| 212 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 212 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 213 { | 213 { |
| 214 v8::Local<v8::Object> holder = info.Holder(); | 214 v8::Local<v8::Object> holder = info.Holder(); |
| 215 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 215 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 216 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 216 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
| 217 } | 217 } |
| 218 | 218 |
| 219 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 219 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 220 { | 220 { |
| 221 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 221 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 222 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe
tter(info); | 222 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe
tter(info); |
| 223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 224 } | 224 } |
| 225 | 225 |
| 226 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 226 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 227 { | 227 { |
| 228 v8::Local<v8::Object> holder = info.Holder(); | 228 v8::Local<v8::Object> holder = info.Holder(); |
| 229 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface", holder, info.GetIsolate()); | 229 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface", holder, info.GetIsolate()); |
| 230 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 230 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 231 float cppValue = toFloat(v8Value, exceptionState); | 231 float cppValue = toFloat(v8Value, exceptionState); |
| 232 if (exceptionState.throwIfNeeded()) | 232 if (exceptionState.throwIfNeeded()) |
| 233 return; | 233 return; |
| 234 impl->setUnrestrictedFloatAttribute(cppValue); | 234 impl->setUnrestrictedFloatAttribute(cppValue); |
| 235 } | 235 } |
| 236 | 236 |
| 237 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 237 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 238 { | 238 { |
| 239 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 239 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 240 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe
tter(v8Value, info); | 240 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe
tter(v8Value, info); |
| 241 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 241 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 242 } | 242 } |
| 243 | 243 |
| 244 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 244 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 245 { | 245 { |
| 246 v8::Local<v8::Object> holder = info.Holder(); | 246 v8::Local<v8::Object> holder = info.Holder(); |
| 247 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 247 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 248 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); | 248 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); |
| 249 } | 249 } |
| 250 | 250 |
| 251 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 251 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::Name>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 252 { | 252 { |
| 253 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 253 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 254 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info
); | 254 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info
); |
| 255 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 255 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 256 } | 256 } |
| 257 | 257 |
| 258 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 258 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 259 { | 259 { |
| 260 v8::Local<v8::Object> holder = info.Holder(); | 260 v8::Local<v8::Object> holder = info.Holder(); |
| 261 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 261 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 262 V8StringResource<> cppValue = v8Value; | 262 V8StringResource<> cppValue = v8Value; |
| 263 if (!cppValue.prepare()) | 263 if (!cppValue.prepare()) |
| 264 return; | 264 return; |
| 265 String string = cppValue; | 265 String string = cppValue; |
| 266 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 266 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
| 267 return; | 267 return; |
| 268 impl->setTestEnumAttribute(cppValue); | 268 impl->setTestEnumAttribute(cppValue); |
| 269 } | 269 } |
| 270 | 270 |
| 271 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 271 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 272 { | 272 { |
| 273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 274 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va
lue, info); | 274 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va
lue, info); |
| 275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 276 } | 276 } |
| 277 | 277 |
| 278 static void stringOrDoubleAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 278 static void stringOrDoubleAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 279 { | 279 { |
| 280 v8::Local<v8::Object> holder = info.Holder(); | 280 v8::Local<v8::Object> holder = info.Holder(); |
| 281 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 281 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 282 StringOrDouble result; | 282 StringOrDouble result; |
| 283 impl->stringOrDoubleAttribute(result); | 283 impl->stringOrDoubleAttribute(result); |
| 284 v8SetReturnValue(info, result); | 284 v8SetReturnValue(info, result); |
| 285 } | 285 } |
| 286 | 286 |
| 287 static void stringOrDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 287 static void stringOrDoubleAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 288 { | 288 { |
| 289 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 289 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 290 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette
r(info); | 290 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette
r(info); |
| 291 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 291 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 292 } | 292 } |
| 293 | 293 |
| 294 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 294 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 295 { | 295 { |
| 296 v8::Local<v8::Object> holder = info.Holder(); | 296 v8::Local<v8::Object> holder = info.Holder(); |
| 297 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble
Attribute", "TestInterface", holder, info.GetIsolate()); | 297 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble
Attribute", "TestInterface", holder, info.GetIsolate()); |
| 298 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 298 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 299 StringOrDouble cppValue; | 299 StringOrDouble cppValue; |
| 300 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, exceptionStat
e); | 300 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, exceptionStat
e); |
| 301 if (exceptionState.throwIfNeeded()) | 301 if (exceptionState.throwIfNeeded()) |
| 302 return; | 302 return; |
| 303 impl->setStringOrDoubleAttribute(cppValue); | 303 impl->setStringOrDoubleAttribute(cppValue); |
| 304 } | 304 } |
| 305 | 305 |
| 306 static void stringOrDoubleAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 306 static void stringOrDoubleAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::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 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette
r(v8Value, info); | 309 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette
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 staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 313 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 314 { | 314 { |
| 315 v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttrib
ute(), info.GetIsolate()); | 315 v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttrib
ute(), info.GetIsolate()); |
| 316 } | 316 } |
| 317 | 317 |
| 318 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 318 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 319 { | 319 { |
| 320 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 320 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 321 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetter(
info); | 321 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetter(
info); |
| 322 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 322 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 323 } | 323 } |
| 324 | 324 |
| 325 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 325 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 326 { | 326 { |
| 327 V8StringResource<> cppValue = v8Value; | 327 V8StringResource<> cppValue = v8Value; |
| 328 if (!cppValue.prepare()) | 328 if (!cppValue.prepare()) |
| 329 return; | 329 return; |
| 330 TestInterfaceImplementation::setStaticStringAttribute(cppValue); | 330 TestInterfaceImplementation::setStaticStringAttribute(cppValue); |
| 331 } | 331 } |
| 332 | 332 |
| 333 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 333 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 334 { | 334 { |
| 335 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 335 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 336 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(
v8Value, info); | 336 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(
v8Value, info); |
| 337 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 337 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 338 } | 338 } |
| 339 | 339 |
| 340 static void legacyInterfaceTypeCheckingAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) | 340 static void legacyInterfaceTypeCheckingAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 341 { | 341 { |
| 342 v8::Local<v8::Object> holder = info.Holder(); | 342 v8::Local<v8::Object> holder = info.Holder(); |
| 343 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 343 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 344 v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingAttr
ibute()), impl); | 344 v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingAttr
ibute()), impl); |
| 345 } | 345 } |
| 346 | 346 |
| 347 static void legacyInterfaceTypeCheckingAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 347 static void legacyInterfaceTypeCheckingAttributeAttributeGetterCallback(v8::Loca
l<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 348 { | 348 { |
| 349 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 349 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 350 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA
ttributeGetter(info); | 350 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA
ttributeGetter(info); |
| 351 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 351 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 352 } | 352 } |
| 353 | 353 |
| 354 static void legacyInterfaceTypeCheckingAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 354 static void legacyInterfaceTypeCheckingAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 355 { | 355 { |
| 356 v8::Local<v8::Object> holder = info.Holder(); | 356 v8::Local<v8::Object> holder = info.Holder(); |
| 357 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 357 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 358 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); | 358 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); |
| 359 impl->setLegacyInterfaceTypeCheckingAttribute(WTF::getPtr(cppValue)); | 359 impl->setLegacyInterfaceTypeCheckingAttribute(WTF::getPtr(cppValue)); |
| 360 } | 360 } |
| 361 | 361 |
| 362 static void legacyInterfaceTypeCheckingAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | 362 static void legacyInterfaceTypeCheckingAttributeAttributeSetterCallback(v8::Loca
l<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 363 { | 363 { |
| 364 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 364 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 365 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA
ttributeSetter(v8Value, info); | 365 TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeA
ttributeSetter(v8Value, info); |
| 366 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 366 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 367 } | 367 } |
| 368 | 368 |
| 369 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 369 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 370 { | 370 { |
| 371 v8::Local<v8::Object> holder = info.Holder(); | 371 v8::Local<v8::Object> holder = info.Holder(); |
| 372 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 372 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 373 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); | 373 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
| 374 } | 374 } |
| 375 | 375 |
| 376 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 376 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 377 { | 377 { |
| 378 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 378 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 379 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter
(info); | 379 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter
(info); |
| 380 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 380 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 381 } | 381 } |
| 382 | 382 |
| 383 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 383 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 384 { | 384 { |
| 385 v8::Local<v8::Object> holder = info.Holder(); | 385 v8::Local<v8::Object> holder = info.Holder(); |
| 386 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 386 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 387 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 387 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 388 int cppValue = toInt32(v8Value, exceptionState); | 388 int cppValue = toInt32(v8Value, exceptionState); |
| 389 if (exceptionState.throwIfNeeded()) | 389 if (exceptionState.throwIfNeeded()) |
| 390 return; | 390 return; |
| 391 impl->setAlwaysExposedAttribute(cppValue); | 391 impl->setAlwaysExposedAttribute(cppValue); |
| 392 } | 392 } |
| 393 | 393 |
| 394 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 394 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 395 { | 395 { |
| 396 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 396 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 397 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter
(v8Value, info); | 397 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter
(v8Value, info); |
| 398 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 398 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 399 } | 399 } |
| 400 | 400 |
| 401 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 401 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 402 { | 402 { |
| 403 v8::Local<v8::Object> holder = info.Holder(); | 403 v8::Local<v8::Object> holder = info.Holder(); |
| 404 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 404 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 405 v8SetReturnValueInt(info, impl->workerExposedAttribute()); | 405 v8SetReturnValueInt(info, impl->workerExposedAttribute()); |
| 406 } | 406 } |
| 407 | 407 |
| 408 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 408 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 409 { | 409 { |
| 410 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 410 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 411 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter
(info); | 411 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter
(info); |
| 412 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 412 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 413 } | 413 } |
| 414 | 414 |
| 415 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 415 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 416 { | 416 { |
| 417 v8::Local<v8::Object> holder = info.Holder(); | 417 v8::Local<v8::Object> holder = info.Holder(); |
| 418 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 418 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 419 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 419 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 420 int cppValue = toInt32(v8Value, exceptionState); | 420 int cppValue = toInt32(v8Value, exceptionState); |
| 421 if (exceptionState.throwIfNeeded()) | 421 if (exceptionState.throwIfNeeded()) |
| 422 return; | 422 return; |
| 423 impl->setWorkerExposedAttribute(cppValue); | 423 impl->setWorkerExposedAttribute(cppValue); |
| 424 } | 424 } |
| 425 | 425 |
| 426 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 426 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 427 { | 427 { |
| 428 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 428 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 429 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter
(v8Value, info); | 429 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter
(v8Value, info); |
| 430 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 430 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 431 } | 431 } |
| 432 | 432 |
| 433 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 433 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 434 { | 434 { |
| 435 v8::Local<v8::Object> holder = info.Holder(); | 435 v8::Local<v8::Object> holder = info.Holder(); |
| 436 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 436 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 437 v8SetReturnValueInt(info, impl->windowExposedAttribute()); | 437 v8SetReturnValueInt(info, impl->windowExposedAttribute()); |
| 438 } | 438 } |
| 439 | 439 |
| 440 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 440 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 441 { | 441 { |
| 442 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 442 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 443 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter
(info); | 443 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter
(info); |
| 444 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 444 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 445 } | 445 } |
| 446 | 446 |
| 447 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 447 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 448 { | 448 { |
| 449 v8::Local<v8::Object> holder = info.Holder(); | 449 v8::Local<v8::Object> holder = info.Holder(); |
| 450 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 450 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 451 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 451 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 452 int cppValue = toInt32(v8Value, exceptionState); | 452 int cppValue = toInt32(v8Value, exceptionState); |
| 453 if (exceptionState.throwIfNeeded()) | 453 if (exceptionState.throwIfNeeded()) |
| 454 return; | 454 return; |
| 455 impl->setWindowExposedAttribute(cppValue); | 455 impl->setWindowExposedAttribute(cppValue); |
| 456 } | 456 } |
| 457 | 457 |
| 458 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 458 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 459 { | 459 { |
| 460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 461 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter
(v8Value, info); | 461 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter
(v8Value, info); |
| 462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 463 } | 463 } |
| 464 | 464 |
| 465 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 465 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 466 { | 466 { |
| 467 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO
nlyLongAttribute()); | 467 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO
nlyLongAttribute()); |
| 468 } | 468 } |
| 469 | 469 |
| 470 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 470 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc
al<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 471 { | 471 { |
| 472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 473 TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttribute
AttributeGetter(info); | 473 TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttribute
AttributeGetter(info); |
| 474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 475 } | 475 } |
| 476 | 476 |
| 477 static void implementsStaticStringAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 477 static void implementsStaticStringAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 478 { | 478 { |
| 479 v8SetReturnValueString(info, TestInterfaceImplementation::implementsStaticSt
ringAttribute(), info.GetIsolate()); | 479 v8SetReturnValueString(info, TestInterfaceImplementation::implementsStaticSt
ringAttribute(), info.GetIsolate()); |
| 480 } | 480 } |
| 481 | 481 |
| 482 static void implementsStaticStringAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 482 static void implementsStaticStringAttributeAttributeGetterCallback(v8::Local<v8:
:Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 483 { | 483 { |
| 484 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 484 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 485 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteGetter(info); | 485 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteGetter(info); |
| 486 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 486 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 487 } | 487 } |
| 488 | 488 |
| 489 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 489 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 490 { | 490 { |
| 491 V8StringResource<> cppValue = v8Value; | 491 V8StringResource<> cppValue = v8Value; |
| 492 if (!cppValue.prepare()) | 492 if (!cppValue.prepare()) |
| 493 return; | 493 return; |
| 494 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue); | 494 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue); |
| 495 } | 495 } |
| 496 | 496 |
| 497 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 497 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 498 { | 498 { |
| 499 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 499 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 500 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteSetter(v8Value, info); | 500 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteSetter(v8Value, info); |
| 501 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 501 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 502 } | 502 } |
| 503 | 503 |
| 504 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) | 504 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) |
| 505 { | 505 { |
| 506 v8::Local<v8::Object> holder = info.Holder(); | 506 v8::Local<v8::Object> holder = info.Holder(); |
| 507 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 507 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 508 v8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info
.GetIsolate()); | 508 v8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info
.GetIsolate()); |
| 509 } | 509 } |
| 510 | 510 |
| 511 static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v
8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 511 static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v
8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 512 { | 512 { |
| 513 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 513 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 514 TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttr
ibuteGetter(info); | 514 TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttr
ibuteGetter(info); |
| 515 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 515 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 516 } | 516 } |
| 517 | 517 |
| 518 static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 518 static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 519 { | 519 { |
| 520 v8::Local<v8::Object> holder = info.Holder(); | 520 v8::Local<v8::Object> holder = info.Holder(); |
| 521 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 521 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 522 v8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsol
ate()); | 522 v8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsol
ate()); |
| 523 } | 523 } |
| 524 | 524 |
| 525 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 525 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Name>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 526 { | 526 { |
| 527 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 527 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 528 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet
ter(info); | 528 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet
ter(info); |
| 529 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 529 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 530 } | 530 } |
| 531 | 531 |
| 532 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 532 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 533 { | 533 { |
| 534 v8::Local<v8::Object> holder = info.Holder(); | 534 v8::Local<v8::Object> holder = info.Holder(); |
| 535 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 535 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 536 V8StringResource<> cppValue = v8Value; | 536 V8StringResource<> cppValue = v8Value; |
| 537 if (!cppValue.prepare()) | 537 if (!cppValue.prepare()) |
| 538 return; | 538 return; |
| 539 impl->setImplementsStringAttribute(cppValue); | 539 impl->setImplementsStringAttribute(cppValue); |
| 540 } | 540 } |
| 541 | 541 |
| 542 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 542 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Name>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 543 { | 543 { |
| 544 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 544 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 545 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet
ter(v8Value, info); | 545 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet
ter(v8Value, info); |
| 546 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 546 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 547 } | 547 } |
| 548 | 548 |
| 549 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 549 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 550 { | 550 { |
| 551 v8::Local<v8::Object> holder = info.Holder(); | 551 v8::Local<v8::Object> holder = info.Holder(); |
| 552 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 552 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 553 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsNodeAttribute()), imp
l); | 553 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsNodeAttribute()), imp
l); |
| 554 } | 554 } |
| 555 | 555 |
| 556 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 556 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 557 { | 557 { |
| 558 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 558 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 559 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGette
r(info); | 559 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGette
r(info); |
| 560 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 560 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 561 } | 561 } |
| 562 | 562 |
| 563 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 563 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 564 { | 564 { |
| 565 v8::Local<v8::Object> holder = info.Holder(); | 565 v8::Local<v8::Object> holder = info.Holder(); |
| 566 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode
Attribute", "TestInterface", holder, info.GetIsolate()); | 566 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode
Attribute", "TestInterface", holder, info.GetIsolate()); |
| 567 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 567 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 568 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 568 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 569 if (!cppValue) { | 569 if (!cppValue) { |
| 570 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 570 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 571 exceptionState.throwIfNeeded(); | 571 exceptionState.throwIfNeeded(); |
| 572 return; | 572 return; |
| 573 } | 573 } |
| 574 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue)); | 574 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue)); |
| 575 } | 575 } |
| 576 | 576 |
| 577 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 577 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 578 { | 578 { |
| 579 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 579 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 580 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette
r(v8Value, info); | 580 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette
r(v8Value, info); |
| 581 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 581 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 582 } | 582 } |
| 583 | 583 |
| 584 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 584 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 585 { | 585 { |
| 586 v8::Local<v8::Object> holder = info.Holder(); | 586 v8::Local<v8::Object> holder = info.Holder(); |
| 587 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 587 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 588 EventListener* cppValue(impl->implementsEventHandlerAttribute()); | 588 EventListener* cppValue(impl->implementsEventHandlerAttribute()); |
| 589 v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListen
er::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Local<v8:
:Value>(v8::Null(info.GetIsolate()))); | 589 v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListen
er::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Local<v8:
:Value>(v8::Null(info.GetIsolate()))); |
| 590 } | 590 } |
| 591 | 591 |
| 592 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 592 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8:
:Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 593 { | 593 { |
| 594 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 594 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 595 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib
uteGetter(info); | 595 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib
uteGetter(info); |
| 596 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 596 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 597 } | 597 } |
| 598 | 598 |
| 599 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 599 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 600 { | 600 { |
| 601 v8::Local<v8::Object> holder = info.Holder(); | 601 v8::Local<v8::Object> holder = info.Holder(); |
| 602 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 602 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 603 moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->implementsEve
ntHandlerAttribute(), v8Value, V8TestInterface::eventListenerCacheIndex); | 603 moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->implementsEve
ntHandlerAttribute(), v8Value, V8TestInterface::eventListenerCacheIndex); |
| 604 impl->setImplementsEventHandlerAttribute(V8EventListenerList::getEventListen
er(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)
); | 604 impl->setImplementsEventHandlerAttribute(V8EventListenerList::getEventListen
er(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)
); |
| 605 } | 605 } |
| 606 | 606 |
| 607 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 607 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8:
:Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 608 { | 608 { |
| 609 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 609 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 610 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib
uteSetter(v8Value, info); | 610 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib
uteSetter(v8Value, info); |
| 611 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 611 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 612 } | 612 } |
| 613 | 613 |
| 614 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 614 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 615 { | 615 { |
| 616 v8::Local<v8::Object> holder = info.Holder(); | 616 v8::Local<v8::Object> holder = info.Holder(); |
| 617 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 617 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 618 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsRuntimeEnabledNodeAtt
ribute()), impl); | 618 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsRuntimeEnabledNodeAtt
ribute()), impl); |
| 619 } | 619 } |
| 620 | 620 |
| 621 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 621 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc
al<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 622 { | 622 { |
| 623 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 623 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 624 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute
AttributeGetter(info); | 624 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute
AttributeGetter(info); |
| 625 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 625 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 626 } | 626 } |
| 627 | 627 |
| 628 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 628 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 629 { | 629 { |
| 630 v8::Local<v8::Object> holder = info.Holder(); | 630 v8::Local<v8::Object> holder = info.Holder(); |
| 631 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt
imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); | 631 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt
imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); |
| 632 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 632 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 633 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 633 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 634 if (!cppValue) { | 634 if (!cppValue) { |
| 635 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 635 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 636 exceptionState.throwIfNeeded(); | 636 exceptionState.throwIfNeeded(); |
| 637 return; | 637 return; |
| 638 } | 638 } |
| 639 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue)); | 639 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue)); |
| 640 } | 640 } |
| 641 | 641 |
| 642 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) | 642 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc
al<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>
& info) |
| 643 { | 643 { |
| 644 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 644 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 645 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute
AttributeSetter(v8Value, info); | 645 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute
AttributeSetter(v8Value, info); |
| 646 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 646 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 647 } | 647 } |
| 648 | 648 |
| 649 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 649 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 650 { | 650 { |
| 651 v8::Local<v8::Object> holder = info.Holder(); | 651 v8::Local<v8::Object> holder = info.Holder(); |
| 652 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 652 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 653 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsPerContextEnabledNode
Attribute()), impl); | 653 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsPerContextEnabledNode
Attribute()), impl); |
| 654 } | 654 } |
| 655 | 655 |
| 656 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 656 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8::
Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 657 { | 657 { |
| 658 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 658 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 659 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib
uteAttributeGetter(info); | 659 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib
uteAttributeGetter(info); |
| 660 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 660 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 661 } | 661 } |
| 662 | 662 |
| 663 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 663 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 664 { | 664 { |
| 665 v8::Local<v8::Object> holder = info.Holder(); | 665 v8::Local<v8::Object> holder = info.Holder(); |
| 666 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC
ontextEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); | 666 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC
ontextEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); |
| 667 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 667 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 668 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 668 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 669 if (!cppValue) { | 669 if (!cppValue) { |
| 670 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); | 670 exceptionState.throwTypeError("The provided value is not of type 'Node'.
"); |
| 671 exceptionState.throwIfNeeded(); | 671 exceptionState.throwIfNeeded(); |
| 672 return; | 672 return; |
| 673 } | 673 } |
| 674 impl->setImplementsPerContextEnabledNodeAttribute(WTF::getPtr(cppValue)); | 674 impl->setImplementsPerContextEnabledNodeAttribute(WTF::getPtr(cppValue)); |
| 675 } | 675 } |
| 676 | 676 |
| 677 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) | 677 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8::
Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
| 678 { | 678 { |
| 679 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 679 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 680 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib
uteAttributeSetter(v8Value, info); | 680 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib
uteAttributeSetter(v8Value, info); |
| 681 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 681 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 682 } | 682 } |
| 683 | 683 |
| 684 static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 684 static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 685 { | 685 { |
| 686 v8SetReturnValueString(info, TestImplements2::implements2StaticStringAttribu
te(), info.GetIsolate()); | 686 v8SetReturnValueString(info, TestImplements2::implements2StaticStringAttribu
te(), info.GetIsolate()); |
| 687 } | 687 } |
| 688 | 688 |
| 689 static void implements2StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 689 static void implements2StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 690 { | 690 { |
| 691 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 691 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 692 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteGetter(info); | 692 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteGetter(info); |
| 693 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 693 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 694 } | 694 } |
| 695 | 695 |
| 696 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 696 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 697 { | 697 { |
| 698 V8StringResource<> cppValue = v8Value; | 698 V8StringResource<> cppValue = v8Value; |
| 699 if (!cppValue.prepare()) | 699 if (!cppValue.prepare()) |
| 700 return; | 700 return; |
| 701 TestImplements2::setImplements2StaticStringAttribute(cppValue); | 701 TestImplements2::setImplements2StaticStringAttribute(cppValue); |
| 702 } | 702 } |
| 703 | 703 |
| 704 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 704 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 705 { | 705 { |
| 706 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 706 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 707 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteSetter(v8Value, info); | 707 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteSetter(v8Value, info); |
| 708 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 708 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 709 } | 709 } |
| 710 | 710 |
| 711 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 711 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 712 { | 712 { |
| 713 v8::Local<v8::Object> holder = info.Holder(); | 713 v8::Local<v8::Object> holder = info.Holder(); |
| 714 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 714 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 715 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im
pl), info.GetIsolate()); | 715 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im
pl), info.GetIsolate()); |
| 716 } | 716 } |
| 717 | 717 |
| 718 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 718 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 719 { | 719 { |
| 720 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 720 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 721 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe
tter(info); | 721 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe
tter(info); |
| 722 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 722 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 723 } | 723 } |
| 724 | 724 |
| 725 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 725 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 726 { | 726 { |
| 727 v8::Local<v8::Object> holder = info.Holder(); | 727 v8::Local<v8::Object> holder = info.Holder(); |
| 728 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 728 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 729 V8StringResource<> cppValue = v8Value; | 729 V8StringResource<> cppValue = v8Value; |
| 730 if (!cppValue.prepare()) | 730 if (!cppValue.prepare()) |
| 731 return; | 731 return; |
| 732 TestImplements2::setImplements2StringAttribute(*impl, cppValue); | 732 TestImplements2::setImplements2StringAttribute(*impl, cppValue); |
| 733 } | 733 } |
| 734 | 734 |
| 735 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 735 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 736 { | 736 { |
| 737 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 737 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 738 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe
tter(v8Value, info); | 738 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe
tter(v8Value, info); |
| 739 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 739 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 740 } | 740 } |
| 741 | 741 |
| 742 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 742 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 743 { | 743 { |
| 744 v8::Local<v8::Object> holder = info.Holder(); | 744 v8::Local<v8::Object> holder = info.Holder(); |
| 745 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 745 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 746 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin
gAttribute(*impl), info.GetIsolate()); | 746 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin
gAttribute(*impl), info.GetIsolate()); |
| 747 } | 747 } |
| 748 | 748 |
| 749 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 749 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 750 { | 750 { |
| 751 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 751 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 752 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe
tter(info); | 752 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe
tter(info); |
| 753 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 753 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 754 } | 754 } |
| 755 | 755 |
| 756 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 756 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 757 { | 757 { |
| 758 v8::Local<v8::Object> holder = info.Holder(); | 758 v8::Local<v8::Object> holder = info.Holder(); |
| 759 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 759 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 760 V8StringResource<> cppValue = v8Value; | 760 V8StringResource<> cppValue = v8Value; |
| 761 if (!cppValue.prepare()) | 761 if (!cppValue.prepare()) |
| 762 return; | 762 return; |
| 763 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue
); | 763 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue
); |
| 764 } | 764 } |
| 765 | 765 |
| 766 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 766 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 767 { | 767 { |
| 768 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 768 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 769 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe
tter(v8Value, info); | 769 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe
tter(v8Value, info); |
| 770 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 770 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 771 } | 771 } |
| 772 | 772 |
| 773 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 773 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 774 { | 774 { |
| 775 v8SetReturnValueString(info, TestImplements3Implementation::implements3Stati
cStringAttribute(), info.GetIsolate()); | 775 v8SetReturnValueString(info, TestImplements3Implementation::implements3Stati
cStringAttribute(), info.GetIsolate()); |
| 776 } | 776 } |
| 777 | 777 |
| 778 static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 778 static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 779 { | 779 { |
| 780 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 780 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 781 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteGetter(info); | 781 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteGetter(info); |
| 782 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 782 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 783 } | 783 } |
| 784 | 784 |
| 785 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 785 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 786 { | 786 { |
| 787 V8StringResource<> cppValue = v8Value; | 787 V8StringResource<> cppValue = v8Value; |
| 788 if (!cppValue.prepare()) | 788 if (!cppValue.prepare()) |
| 789 return; | 789 return; |
| 790 TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue)
; | 790 TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue)
; |
| 791 } | 791 } |
| 792 | 792 |
| 793 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 793 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 794 { | 794 { |
| 795 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 795 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 796 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteSetter(v8Value, info); | 796 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteSetter(v8Value, info); |
| 797 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 797 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 798 } | 798 } |
| 799 | 799 |
| 800 #if ENABLE(PARTIAL_CONDITION) | 800 #if ENABLE(PARTIAL_CONDITION) |
| 801 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 801 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 802 { | 802 { |
| 803 v8::Local<v8::Object> holder = info.Holder(); | 803 v8::Local<v8::Object> holder = info.Holder(); |
| 804 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 804 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 805 v8SetReturnValueInt(info, TestPartialInterface::partialLongAttribute(*impl))
; | 805 v8SetReturnValueInt(info, TestPartialInterface::partialLongAttribute(*impl))
; |
| 806 } | 806 } |
| 807 #endif // ENABLE(PARTIAL_CONDITION) | 807 #endif // ENABLE(PARTIAL_CONDITION) |
| 808 | 808 |
| 809 #if ENABLE(PARTIAL_CONDITION) | 809 #if ENABLE(PARTIAL_CONDITION) |
| 810 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 810 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 811 { | 811 { |
| 812 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 812 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 813 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(i
nfo); | 813 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(i
nfo); |
| 814 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 814 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 815 } | 815 } |
| 816 #endif // ENABLE(PARTIAL_CONDITION) | 816 #endif // ENABLE(PARTIAL_CONDITION) |
| 817 | 817 |
| 818 #if ENABLE(PARTIAL_CONDITION) | 818 #if ENABLE(PARTIAL_CONDITION) |
| 819 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 819 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 820 { | 820 { |
| 821 v8::Local<v8::Object> holder = info.Holder(); | 821 v8::Local<v8::Object> holder = info.Holder(); |
| 822 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt
ribute", "TestInterface", holder, info.GetIsolate()); | 822 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt
ribute", "TestInterface", holder, info.GetIsolate()); |
| 823 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 823 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 824 int cppValue = toInt32(v8Value, exceptionState); | 824 int cppValue = toInt32(v8Value, exceptionState); |
| 825 if (exceptionState.throwIfNeeded()) | 825 if (exceptionState.throwIfNeeded()) |
| 826 return; | 826 return; |
| 827 TestPartialInterface::setPartialLongAttribute(*impl, cppValue); | 827 TestPartialInterface::setPartialLongAttribute(*impl, cppValue); |
| 828 } | 828 } |
| 829 #endif // ENABLE(PARTIAL_CONDITION) | 829 #endif // ENABLE(PARTIAL_CONDITION) |
| 830 | 830 |
| 831 #if ENABLE(PARTIAL_CONDITION) | 831 #if ENABLE(PARTIAL_CONDITION) |
| 832 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 832 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 833 { | 833 { |
| 834 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 834 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 835 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v
8Value, info); | 835 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v
8Value, info); |
| 836 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 836 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 837 } | 837 } |
| 838 #endif // ENABLE(PARTIAL_CONDITION) | 838 #endif // ENABLE(PARTIAL_CONDITION) |
| 839 | 839 |
| 840 #if ENABLE(PARTIAL_CONDITION) | 840 #if ENABLE(PARTIAL_CONDITION) |
| 841 static void partialStaticLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 841 static void partialStaticLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 842 { | 842 { |
| 843 v8SetReturnValueInt(info, TestPartialInterface::partialStaticLongAttribute()
); | 843 v8SetReturnValueInt(info, TestPartialInterface::partialStaticLongAttribute()
); |
| 844 } | 844 } |
| 845 #endif // ENABLE(PARTIAL_CONDITION) | 845 #endif // ENABLE(PARTIAL_CONDITION) |
| 846 | 846 |
| 847 #if ENABLE(PARTIAL_CONDITION) | 847 #if ENABLE(PARTIAL_CONDITION) |
| 848 static void partialStaticLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 848 static void partialStaticLongAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 849 { | 849 { |
| 850 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 850 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 851 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGe
tter(info); | 851 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGe
tter(info); |
| 852 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 852 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 853 } | 853 } |
| 854 #endif // ENABLE(PARTIAL_CONDITION) | 854 #endif // ENABLE(PARTIAL_CONDITION) |
| 855 | 855 |
| 856 #if ENABLE(PARTIAL_CONDITION) | 856 #if ENABLE(PARTIAL_CONDITION) |
| 857 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 857 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 858 { | 858 { |
| 859 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL
ongAttribute", "TestInterface", holder, info.GetIsolate()); | 859 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL
ongAttribute", "TestInterface", holder, info.GetIsolate()); |
| 860 int cppValue = toInt32(v8Value, exceptionState); | 860 int cppValue = toInt32(v8Value, exceptionState); |
| 861 if (exceptionState.throwIfNeeded()) | 861 if (exceptionState.throwIfNeeded()) |
| 862 return; | 862 return; |
| 863 TestPartialInterface::setPartialStaticLongAttribute(cppValue); | 863 TestPartialInterface::setPartialStaticLongAttribute(cppValue); |
| 864 } | 864 } |
| 865 #endif // ENABLE(PARTIAL_CONDITION) | 865 #endif // ENABLE(PARTIAL_CONDITION) |
| 866 | 866 |
| 867 #if ENABLE(PARTIAL_CONDITION) | 867 #if ENABLE(PARTIAL_CONDITION) |
| 868 static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 868 static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 869 { | 869 { |
| 870 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 870 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 871 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe
tter(v8Value, info); | 871 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe
tter(v8Value, info); |
| 872 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 872 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 873 } | 873 } |
| 874 #endif // ENABLE(PARTIAL_CONDITION) | 874 #endif // ENABLE(PARTIAL_CONDITION) |
| 875 | 875 |
| 876 #if ENABLE(PARTIAL_CONDITION) | 876 #if ENABLE(PARTIAL_CONDITION) |
| 877 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 877 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 878 { | 878 { |
| 879 v8::Local<v8::Object> holder = info.Holder(); | 879 v8::Local<v8::Object> holder = info.Holder(); |
| 880 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 880 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 881 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 881 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 882 v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionCont
extLongAttribute(executionContext, *impl)); | 882 v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionCont
extLongAttribute(executionContext, *impl)); |
| 883 } | 883 } |
| 884 #endif // ENABLE(PARTIAL_CONDITION) | 884 #endif // ENABLE(PARTIAL_CONDITION) |
| 885 | 885 |
| 886 #if ENABLE(PARTIAL_CONDITION) | 886 #if ENABLE(PARTIAL_CONDITION) |
| 887 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 887 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback(
v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 888 { | 888 { |
| 889 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 889 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 890 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeGetter(info); | 890 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeGetter(info); |
| 891 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 891 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 892 } | 892 } |
| 893 #endif // ENABLE(PARTIAL_CONDITION) | 893 #endif // ENABLE(PARTIAL_CONDITION) |
| 894 | 894 |
| 895 #if ENABLE(PARTIAL_CONDITION) | 895 #if ENABLE(PARTIAL_CONDITION) |
| 896 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 896 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 897 { | 897 { |
| 898 v8::Local<v8::Object> holder = info.Holder(); | 898 v8::Local<v8::Object> holder = info.Holder(); |
| 899 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit
hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); | 899 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit
hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); |
| 900 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 900 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 901 int cppValue = toInt32(v8Value, exceptionState); | 901 int cppValue = toInt32(v8Value, exceptionState); |
| 902 if (exceptionState.throwIfNeeded()) | 902 if (exceptionState.throwIfNeeded()) |
| 903 return; | 903 return; |
| 904 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 904 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 905 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut
ionContext, *impl, cppValue); | 905 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut
ionContext, *impl, cppValue); |
| 906 } | 906 } |
| 907 #endif // ENABLE(PARTIAL_CONDITION) | 907 #endif // ENABLE(PARTIAL_CONDITION) |
| 908 | 908 |
| 909 #if ENABLE(PARTIAL_CONDITION) | 909 #if ENABLE(PARTIAL_CONDITION) |
| 910 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 910 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(
v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) |
| 911 { | 911 { |
| 912 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 912 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 913 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeSetter(v8Value, info); | 913 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeSetter(v8Value, info); |
| 914 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 914 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 915 } | 915 } |
| 916 #endif // ENABLE(PARTIAL_CONDITION) | 916 #endif // ENABLE(PARTIAL_CONDITION) |
| 917 | 917 |
| 918 #if ENABLE(PARTIAL_CONDITION) | 918 #if ENABLE(PARTIAL_CONDITION) |
| 919 static void partialPartialEnumTypeAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 919 static void partialPartialEnumTypeAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 920 { | 920 { |
| 921 v8::Local<v8::Object> holder = info.Holder(); | 921 v8::Local<v8::Object> holder = info.Holder(); |
| 922 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 922 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 923 v8SetReturnValueString(info, TestPartialInterface::partialPartialEnumTypeAtt
ribute(*impl), info.GetIsolate()); | 923 v8SetReturnValueString(info, TestPartialInterface::partialPartialEnumTypeAtt
ribute(*impl), info.GetIsolate()); |
| 924 } | 924 } |
| 925 #endif // ENABLE(PARTIAL_CONDITION) | 925 #endif // ENABLE(PARTIAL_CONDITION) |
| 926 | 926 |
| 927 #if ENABLE(PARTIAL_CONDITION) | 927 #if ENABLE(PARTIAL_CONDITION) |
| 928 static void partialPartialEnumTypeAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 928 static void partialPartialEnumTypeAttributeAttributeGetterCallback(v8::Local<v8:
:Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 929 { | 929 { |
| 930 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 930 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 931 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteGetter(info); | 931 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteGetter(info); |
| 932 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 932 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 933 } | 933 } |
| 934 #endif // ENABLE(PARTIAL_CONDITION) | 934 #endif // ENABLE(PARTIAL_CONDITION) |
| 935 | 935 |
| 936 #if ENABLE(PARTIAL_CONDITION) | 936 #if ENABLE(PARTIAL_CONDITION) |
| 937 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 937 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 938 { | 938 { |
| 939 v8::Local<v8::Object> holder = info.Holder(); | 939 v8::Local<v8::Object> holder = info.Holder(); |
| 940 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 940 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 941 V8StringResource<> cppValue = v8Value; | 941 V8StringResource<> cppValue = v8Value; |
| 942 if (!cppValue.prepare()) | 942 if (!cppValue.prepare()) |
| 943 return; | 943 return; |
| 944 String string = cppValue; | 944 String string = cppValue; |
| 945 if (!(string == "foo" || string == "bar")) | 945 if (!(string == "foo" || string == "bar")) |
| 946 return; | 946 return; |
| 947 TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue); | 947 TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue); |
| 948 } | 948 } |
| 949 #endif // ENABLE(PARTIAL_CONDITION) | 949 #endif // ENABLE(PARTIAL_CONDITION) |
| 950 | 950 |
| 951 #if ENABLE(PARTIAL_CONDITION) | 951 #if ENABLE(PARTIAL_CONDITION) |
| 952 static void partialPartialEnumTypeAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 952 static void partialPartialEnumTypeAttributeAttributeSetterCallback(v8::Local<v8:
:Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 953 { | 953 { |
| 954 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 954 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 955 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteSetter(v8Value, info); | 955 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteSetter(v8Value, info); |
| 956 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 956 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 957 } | 957 } |
| 958 #endif // ENABLE(PARTIAL_CONDITION) | 958 #endif // ENABLE(PARTIAL_CONDITION) |
| 959 | 959 |
| 960 #if ENABLE(PARTIAL_CONDITION) | 960 #if ENABLE(PARTIAL_CONDITION) |
| 961 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 961 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 962 { | 962 { |
| 963 v8::Local<v8::Object> holder = info.Holder(); | 963 v8::Local<v8::Object> holder = info.Holder(); |
| 964 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 964 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 965 String result; | 965 String result; |
| 966 if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toLocalF
rame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &resul
t)) | 966 if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toLocalF
rame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &resul
t)) |
| 967 return; | 967 return; |
| 968 v8SetReturnValueString(info, result, info.GetIsolate()); | 968 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 969 } | 969 } |
| 970 #endif // ENABLE(PARTIAL_CONDITION) | 970 #endif // ENABLE(PARTIAL_CONDITION) |
| 971 | 971 |
| 972 #if ENABLE(PARTIAL_CONDITION) | 972 #if ENABLE(PARTIAL_CONDITION) |
| 973 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 973 static void stringAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 974 { | 974 { |
| 975 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 975 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 976 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); | 976 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); |
| 977 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 977 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 978 } | 978 } |
| 979 #endif // ENABLE(PARTIAL_CONDITION) | 979 #endif // ENABLE(PARTIAL_CONDITION) |
| 980 | 980 |
| 981 #if ENABLE(PARTIAL_CONDITION) | 981 #if ENABLE(PARTIAL_CONDITION) |
| 982 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 982 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 983 { | 983 { |
| 984 v8::Local<v8::Object> holder = info.Holder(); | 984 v8::Local<v8::Object> holder = info.Holder(); |
| 985 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 985 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 986 V8StringResource<> cppValue = v8Value; | 986 V8StringResource<> cppValue = v8Value; |
| 987 if (!cppValue.prepare()) | 987 if (!cppValue.prepare()) |
| 988 return; | 988 return; |
| 989 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); | 989 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
| 990 } | 990 } |
| 991 #endif // ENABLE(PARTIAL_CONDITION) | 991 #endif // ENABLE(PARTIAL_CONDITION) |
| 992 | 992 |
| 993 #if ENABLE(PARTIAL_CONDITION) | 993 #if ENABLE(PARTIAL_CONDITION) |
| 994 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 994 static void stringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 995 { | 995 { |
| 996 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 996 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 997 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu
e, info); | 997 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu
e, info); |
| 998 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 998 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 999 } | 999 } |
| 1000 #endif // ENABLE(PARTIAL_CONDITION) | 1000 #endif // ENABLE(PARTIAL_CONDITION) |
| 1001 | 1001 |
| 1002 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1002 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1003 { | 1003 { |
| 1004 v8::Local<v8::Object> holder = info.Holder(); | 1004 v8::Local<v8::Object> holder = info.Holder(); |
| 1005 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 1005 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 1006 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2LongAt
tribute(*impl)); | 1006 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2LongAt
tribute(*impl)); |
| 1007 } | 1007 } |
| 1008 | 1008 |
| 1009 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1009 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1010 { | 1010 { |
| 1011 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1011 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1012 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter(
info); | 1012 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter(
info); |
| 1013 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1013 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1014 } | 1014 } |
| 1015 | 1015 |
| 1016 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1016 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1017 { | 1017 { |
| 1018 v8::Local<v8::Object> holder = info.Holder(); | 1018 v8::Local<v8::Object> holder = info.Holder(); |
| 1019 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt
tribute", "TestInterface", holder, info.GetIsolate()); | 1019 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt
tribute", "TestInterface", holder, info.GetIsolate()); |
| 1020 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 1020 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 1021 int cppValue = toInt32(v8Value, exceptionState); | 1021 int cppValue = toInt32(v8Value, exceptionState); |
| 1022 if (exceptionState.throwIfNeeded()) | 1022 if (exceptionState.throwIfNeeded()) |
| 1023 return; | 1023 return; |
| 1024 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue
); | 1024 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue
); |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1027 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1028 { | 1028 { |
| 1029 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1029 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1030 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter(
v8Value, info); | 1030 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter(
v8Value, info); |
| 1031 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1031 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1032 } | 1032 } |
| 1033 | 1033 |
| 1034 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1034 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 1035 { | 1035 { |
| 1036 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2Static
LongAttribute()); | 1036 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2Static
LongAttribute()); |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 static void partial2StaticLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1039 static void partial2StaticLongAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1040 { | 1040 { |
| 1041 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1041 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1042 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeG
etter(info); | 1042 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeG
etter(info); |
| 1043 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1043 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 1046 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 1047 { | 1047 { |
| 1048 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static
LongAttribute", "TestInterface", holder, info.GetIsolate()); | 1048 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static
LongAttribute", "TestInterface", holder, info.GetIsolate()); |
| 1049 int cppValue = toInt32(v8Value, exceptionState); | 1049 int cppValue = toInt32(v8Value, exceptionState); |
| 1050 if (exceptionState.throwIfNeeded()) | 1050 if (exceptionState.throwIfNeeded()) |
| 1051 return; | 1051 return; |
| 1052 TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue)
; | 1052 TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue)
; |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1055 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1056 { | 1056 { |
| 1057 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1057 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1058 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS
etter(v8Value, info); | 1058 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS
etter(v8Value, info); |
| 1059 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1059 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1060 } | 1060 } |
| 1061 | 1061 |
| 1062 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 1062 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 1063 { | 1063 { |
| 1064 if (UNLIKELY(info.Length() < 1)) { | 1064 if (UNLIKELY(info.Length() < 1)) { |
| 1065 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface", 1, info.Len
gth()), info.GetIsolate()); | 1065 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface", 1, info.Len
gth()), info.GetIsolate()); |
| (...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2524 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2524 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 2525 { | 2525 { |
| 2526 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; | 2526 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; |
| 2527 } | 2527 } |
| 2528 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2528 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 2529 { | 2529 { |
| 2530 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; | 2530 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; |
| 2531 } | 2531 } |
| 2532 } // namespace blink | 2532 } // namespace blink |
| 2533 #endif // ENABLE(CONDITION) | 2533 #endif // ENABLE(CONDITION) |
| OLD | NEW |