| 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 #include "V8TestObject.h" | 8 #include "V8TestObject.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::refObject, V8TestObject::derefObject, V8Te
stObject::trace, 0, 0, V8TestObject::installConditionallyEnabledMethods, V8TestO
bject::installConditionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObj
ectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEve
ntTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCountedObject }; | 75 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::refObject, V8TestObject::derefObject, V8Te
stObject::trace, 0, 0, V8TestObject::installConditionallyEnabledMethods, V8TestO
bject::installConditionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObj
ectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEve
ntTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCountedObject }; |
| 76 | 76 |
| 77 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestObject.h
. | 77 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestObject.h
. |
| 78 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 78 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 79 // bindings/core/v8/ScriptWrappable.h. | 79 // bindings/core/v8/ScriptWrappable.h. |
| 80 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType
Info; | 80 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType
Info; |
| 81 | 81 |
| 82 namespace TestObjectV8Internal { | 82 namespace TestObjectV8Internal { |
| 83 | 83 |
| 84 static void DEPRECATED_CONSTANTConstantGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 84 static void DEPRECATED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 85 { | 85 { |
| 86 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 86 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 87 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::Constant); | 87 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::Constant); |
| 88 v8SetReturnValueInt(info, 1); | 88 v8SetReturnValueInt(info, 1); |
| 89 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 89 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 90 } | 90 } |
| 91 | 91 |
| 92 static void MEASURED_CONSTANTConstantGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 92 static void MEASURED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 93 { | 93 { |
| 94 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 94 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 95 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::Constant); | 95 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::Constant); |
| 96 v8SetReturnValueInt(info, 1); | 96 v8SetReturnValueInt(info, 1); |
| 97 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 97 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 98 } | 98 } |
| 99 | 99 |
| 100 template<class CallbackInfo> | 100 template<class CallbackInfo> |
| 101 static void TestObjectForceSetAttributeOnThis(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> v8Value, const CallbackInfo& info) | 101 static void TestObjectForceSetAttributeOnThis(v8::Local<v8::Name> name, v8::Loca
l<v8::Value> v8Value, const CallbackInfo& info) |
| 102 { | 102 { |
| 103 ASSERT(info.This()->IsObject()); | 103 ASSERT(info.This()->IsObject()); |
| 104 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); | 104 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); |
| 105 } | 105 } |
| 106 | 106 |
| 107 static void stringifierAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 107 static void stringifierAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 108 { | 108 { |
| 109 v8::Local<v8::Object> holder = info.Holder(); | 109 v8::Local<v8::Object> holder = info.Holder(); |
| 110 TestObject* impl = V8TestObject::toImpl(holder); | 110 TestObject* impl = V8TestObject::toImpl(holder); |
| 111 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); | 111 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); |
| 112 } | 112 } |
| 113 | 113 |
| 114 static void stringifierAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 114 static void stringifierAttributeAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 115 { | 115 { |
| 116 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 116 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 117 TestObjectV8Internal::stringifierAttributeAttributeGetter(info); | 117 TestObjectV8Internal::stringifierAttributeAttributeGetter(info); |
| 118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 119 } | 119 } |
| 120 | 120 |
| 121 static void stringifierAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 121 static void stringifierAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 122 { | 122 { |
| 123 v8::Local<v8::Object> holder = info.Holder(); | 123 v8::Local<v8::Object> holder = info.Holder(); |
| 124 TestObject* impl = V8TestObject::toImpl(holder); | 124 TestObject* impl = V8TestObject::toImpl(holder); |
| 125 V8StringResource<> cppValue = v8Value; | 125 V8StringResource<> cppValue = v8Value; |
| 126 if (!cppValue.prepare()) | 126 if (!cppValue.prepare()) |
| 127 return; | 127 return; |
| 128 impl->setStringifierAttribute(cppValue); | 128 impl->setStringifierAttribute(cppValue); |
| 129 } | 129 } |
| 130 | 130 |
| 131 static void stringifierAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 131 static void stringifierAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 132 { | 132 { |
| 133 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 133 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 134 TestObjectV8Internal::stringifierAttributeAttributeSetter(v8Value, info); | 134 TestObjectV8Internal::stringifierAttributeAttributeSetter(v8Value, info); |
| 135 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 135 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 136 } | 136 } |
| 137 | 137 |
| 138 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 138 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 139 { | 139 { |
| 140 v8::Local<v8::Object> holder = info.Holder(); | 140 v8::Local<v8::Object> holder = info.Holder(); |
| 141 TestObject* impl = V8TestObject::toImpl(holder); | 141 TestObject* impl = V8TestObject::toImpl(holder); |
| 142 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); | 142 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); |
| 143 } | 143 } |
| 144 | 144 |
| 145 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 145 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 146 { | 146 { |
| 147 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 147 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 148 TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info); | 148 TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info); |
| 149 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 149 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 150 } | 150 } |
| 151 | 151 |
| 152 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 152 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 153 { | 153 { |
| 154 v8::Local<v8::Object> holder = info.Holder(); | 154 v8::Local<v8::Object> holder = info.Holder(); |
| 155 TestObject* impl = V8TestObject::toImpl(holder); | 155 TestObject* impl = V8TestObject::toImpl(holder); |
| 156 RefPtr<TestInterfaceEmpty> cppValue(impl->readonlyTestInterfaceEmptyAttribut
e()); | 156 RefPtr<TestInterfaceEmpty> cppValue(impl->readonlyTestInterfaceEmptyAttribut
e()); |
| 157 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 157 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) |
| 158 return; | 158 return; |
| 159 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); | 159 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); |
| 160 if (!wrapper.IsEmpty()) { | 160 if (!wrapper.IsEmpty()) { |
| 161 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), wrapper); | 161 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), wrapper); |
| 162 v8SetReturnValue(info, wrapper); | 162 v8SetReturnValue(info, wrapper); |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 | 165 |
| 166 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 166 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 167 { | 167 { |
| 168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 169 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(inf
o); | 169 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(inf
o); |
| 170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 171 } | 171 } |
| 172 | 172 |
| 173 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 173 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 174 { | 174 { |
| 175 v8::Local<v8::Object> holder = info.Holder(); | 175 v8::Local<v8::Object> holder = info.Holder(); |
| 176 TestObject* impl = V8TestObject::toImpl(holder); | 176 TestObject* impl = V8TestObject::toImpl(holder); |
| 177 v8SetReturnValueInt(info, impl->readonlyLongAttribute()); | 177 v8SetReturnValueInt(info, impl->readonlyLongAttribute()); |
| 178 } | 178 } |
| 179 | 179 |
| 180 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 180 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 181 { | 181 { |
| 182 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 182 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 183 TestObjectV8Internal::readonlyLongAttributeAttributeGetter(info); | 183 TestObjectV8Internal::readonlyLongAttributeAttributeGetter(info); |
| 184 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 184 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 185 } | 185 } |
| 186 | 186 |
| 187 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 187 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 188 { | 188 { |
| 189 v8::Local<v8::Object> holder = info.Holder(); | 189 v8::Local<v8::Object> holder = info.Holder(); |
| 190 TestObject* impl = V8TestObject::toImpl(holder); | 190 TestObject* impl = V8TestObject::toImpl(holder); |
| 191 v8SetReturnValue(info, v8DateOrNaN(impl->dateAttribute(), info.GetIsolate())
); | 191 v8SetReturnValue(info, v8DateOrNaN(impl->dateAttribute(), info.GetIsolate())
); |
| 192 } | 192 } |
| 193 | 193 |
| 194 static void dateAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 194 static void dateAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 195 { | 195 { |
| 196 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 196 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 197 TestObjectV8Internal::dateAttributeAttributeGetter(info); | 197 TestObjectV8Internal::dateAttributeAttributeGetter(info); |
| 198 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 198 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 199 } | 199 } |
| 200 | 200 |
| 201 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 201 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 202 { | 202 { |
| 203 v8::Local<v8::Object> holder = info.Holder(); | 203 v8::Local<v8::Object> holder = info.Holder(); |
| 204 TestObject* impl = V8TestObject::toImpl(holder); | 204 TestObject* impl = V8TestObject::toImpl(holder); |
| 205 double cppValue = toCoreDate(v8Value); | 205 double cppValue = toCoreDate(v8Value); |
| 206 impl->setDateAttribute(cppValue); | 206 impl->setDateAttribute(cppValue); |
| 207 } | 207 } |
| 208 | 208 |
| 209 static void dateAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 209 static void dateAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 210 { | 210 { |
| 211 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 211 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 212 TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info); | 212 TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info); |
| 213 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 213 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 214 } | 214 } |
| 215 | 215 |
| 216 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 216 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 217 { | 217 { |
| 218 v8::Local<v8::Object> holder = info.Holder(); | 218 v8::Local<v8::Object> holder = info.Holder(); |
| 219 TestObject* impl = V8TestObject::toImpl(holder); | 219 TestObject* impl = V8TestObject::toImpl(holder); |
| 220 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); | 220 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); |
| 221 } | 221 } |
| 222 | 222 |
| 223 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 223 static void stringAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 224 { | 224 { |
| 225 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 225 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 226 TestObjectV8Internal::stringAttributeAttributeGetter(info); | 226 TestObjectV8Internal::stringAttributeAttributeGetter(info); |
| 227 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 227 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 228 } | 228 } |
| 229 | 229 |
| 230 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 230 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 231 { | 231 { |
| 232 v8::Local<v8::Object> holder = info.Holder(); | 232 v8::Local<v8::Object> holder = info.Holder(); |
| 233 TestObject* impl = V8TestObject::toImpl(holder); | 233 TestObject* impl = V8TestObject::toImpl(holder); |
| 234 V8StringResource<> cppValue = v8Value; | 234 V8StringResource<> cppValue = v8Value; |
| 235 if (!cppValue.prepare()) | 235 if (!cppValue.prepare()) |
| 236 return; | 236 return; |
| 237 impl->setStringAttribute(cppValue); | 237 impl->setStringAttribute(cppValue); |
| 238 } | 238 } |
| 239 | 239 |
| 240 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 240 static void stringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 241 { | 241 { |
| 242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 243 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); | 243 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); |
| 244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 245 } | 245 } |
| 246 | 246 |
| 247 static void byteStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 247 static void byteStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 248 { | 248 { |
| 249 v8::Local<v8::Object> holder = info.Holder(); | 249 v8::Local<v8::Object> holder = info.Holder(); |
| 250 TestObject* impl = V8TestObject::toImpl(holder); | 250 TestObject* impl = V8TestObject::toImpl(holder); |
| 251 v8SetReturnValueString(info, impl->byteStringAttribute(), info.GetIsolate())
; | 251 v8SetReturnValueString(info, impl->byteStringAttribute(), info.GetIsolate())
; |
| 252 } | 252 } |
| 253 | 253 |
| 254 static void byteStringAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 254 static void byteStringAttributeAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 255 { | 255 { |
| 256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 257 TestObjectV8Internal::byteStringAttributeAttributeGetter(info); | 257 TestObjectV8Internal::byteStringAttributeAttributeGetter(info); |
| 258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 259 } | 259 } |
| 260 | 260 |
| 261 static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 261 static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 262 { | 262 { |
| 263 v8::Local<v8::Object> holder = info.Holder(); | 263 v8::Local<v8::Object> holder = info.Holder(); |
| 264 ExceptionState exceptionState(ExceptionState::SetterContext, "byteStringAttr
ibute", "TestObject", holder, info.GetIsolate()); | 264 ExceptionState exceptionState(ExceptionState::SetterContext, "byteStringAttr
ibute", "TestObject", holder, info.GetIsolate()); |
| 265 TestObject* impl = V8TestObject::toImpl(holder); | 265 TestObject* impl = V8TestObject::toImpl(holder); |
| 266 V8StringResource<> cppValue = toByteString(v8Value, exceptionState); | 266 V8StringResource<> cppValue = toByteString(v8Value, exceptionState); |
| 267 if (exceptionState.throwIfNeeded()) | 267 if (exceptionState.throwIfNeeded()) |
| 268 return; | 268 return; |
| 269 impl->setByteStringAttribute(cppValue); | 269 impl->setByteStringAttribute(cppValue); |
| 270 } | 270 } |
| 271 | 271 |
| 272 static void byteStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 272 static void byteStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 273 { | 273 { |
| 274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 275 TestObjectV8Internal::byteStringAttributeAttributeSetter(v8Value, info); | 275 TestObjectV8Internal::byteStringAttributeAttributeSetter(v8Value, info); |
| 276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 277 } | 277 } |
| 278 | 278 |
| 279 static void usvStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 279 static void usvStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
| 280 { | 280 { |
| 281 v8::Local<v8::Object> holder = info.Holder(); | 281 v8::Local<v8::Object> holder = info.Holder(); |
| 282 TestObject* impl = V8TestObject::toImpl(holder); | 282 TestObject* impl = V8TestObject::toImpl(holder); |
| 283 v8SetReturnValueString(info, impl->usvStringAttribute(), info.GetIsolate()); | 283 v8SetReturnValueString(info, impl->usvStringAttribute(), info.GetIsolate()); |
| 284 } | 284 } |
| 285 | 285 |
| 286 static void usvStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 286 static void usvStringAttributeAttributeGetterCallback(v8::Local<v8::Name>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 287 { | 287 { |
| 288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 289 TestObjectV8Internal::usvStringAttributeAttributeGetter(info); | 289 TestObjectV8Internal::usvStringAttributeAttributeGetter(info); |
| 290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 291 } | 291 } |
| 292 | 292 |
| 293 static void usvStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 293 static void usvStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
| 294 { | 294 { |
| 295 v8::Local<v8::Object> holder = info.Holder(); | 295 v8::Local<v8::Object> holder = info.Holder(); |
| 296 ExceptionState exceptionState(ExceptionState::SetterContext, "usvStringAttri
bute", "TestObject", holder, info.GetIsolate()); | 296 ExceptionState exceptionState(ExceptionState::SetterContext, "usvStringAttri
bute", "TestObject", holder, info.GetIsolate()); |
| 297 TestObject* impl = V8TestObject::toImpl(holder); | 297 TestObject* impl = V8TestObject::toImpl(holder); |
| 298 V8StringResource<> cppValue = toUSVString(v8Value, exceptionState); | 298 V8StringResource<> cppValue = toUSVString(v8Value, exceptionState); |
| 299 if (exceptionState.throwIfNeeded()) | 299 if (exceptionState.throwIfNeeded()) |
| 300 return; | 300 return; |
| 301 impl->setUsvStringAttribute(cppValue); | 301 impl->setUsvStringAttribute(cppValue); |
| 302 } | 302 } |
| 303 | 303 |
| 304 static void usvStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 304 static void usvStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 305 { | 305 { |
| 306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 307 TestObjectV8Internal::usvStringAttributeAttributeSetter(v8Value, info); | 307 TestObjectV8Internal::usvStringAttributeAttributeSetter(v8Value, info); |
| 308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 309 } | 309 } |
| 310 | 310 |
| 311 static void domTimeStampAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 311 static void domTimeStampAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 312 { | 312 { |
| 313 v8::Local<v8::Object> holder = info.Holder(); | 313 v8::Local<v8::Object> holder = info.Holder(); |
| 314 TestObject* impl = V8TestObject::toImpl(holder); | 314 TestObject* impl = V8TestObject::toImpl(holder); |
| 315 v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute())); | 315 v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute())); |
| 316 } | 316 } |
| 317 | 317 |
| 318 static void domTimeStampAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 318 static void domTimeStampAttributeAttributeGetterCallback(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 TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info); | 321 TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info); |
| 322 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 322 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 323 } | 323 } |
| 324 | 324 |
| 325 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 325 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 326 { | 326 { |
| 327 v8::Local<v8::Object> holder = info.Holder(); | 327 v8::Local<v8::Object> holder = info.Holder(); |
| 328 ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAt
tribute", "TestObject", holder, info.GetIsolate()); | 328 ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAt
tribute", "TestObject", holder, info.GetIsolate()); |
| 329 TestObject* impl = V8TestObject::toImpl(holder); | 329 TestObject* impl = V8TestObject::toImpl(holder); |
| 330 unsigned long long cppValue = toUInt64(v8Value, exceptionState); | 330 unsigned long long cppValue = toUInt64(v8Value, exceptionState); |
| 331 if (exceptionState.throwIfNeeded()) | 331 if (exceptionState.throwIfNeeded()) |
| 332 return; | 332 return; |
| 333 impl->setDomTimeStampAttribute(cppValue); | 333 impl->setDomTimeStampAttribute(cppValue); |
| 334 } | 334 } |
| 335 | 335 |
| 336 static void domTimeStampAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 336 static void domTimeStampAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 337 { | 337 { |
| 338 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 338 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 339 TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info); | 339 TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info); |
| 340 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 340 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 341 } | 341 } |
| 342 | 342 |
| 343 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 343 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 344 { | 344 { |
| 345 v8::Local<v8::Object> holder = info.Holder(); | 345 v8::Local<v8::Object> holder = info.Holder(); |
| 346 TestObject* impl = V8TestObject::toImpl(holder); | 346 TestObject* impl = V8TestObject::toImpl(holder); |
| 347 v8SetReturnValueBool(info, impl->booleanAttribute()); | 347 v8SetReturnValueBool(info, impl->booleanAttribute()); |
| 348 } | 348 } |
| 349 | 349 |
| 350 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 350 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 351 { | 351 { |
| 352 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 352 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 353 TestObjectV8Internal::booleanAttributeAttributeGetter(info); | 353 TestObjectV8Internal::booleanAttributeAttributeGetter(info); |
| 354 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 354 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 355 } | 355 } |
| 356 | 356 |
| 357 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 357 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 358 { | 358 { |
| 359 v8::Local<v8::Object> holder = info.Holder(); | 359 v8::Local<v8::Object> holder = info.Holder(); |
| 360 TestObject* impl = V8TestObject::toImpl(holder); | 360 TestObject* impl = V8TestObject::toImpl(holder); |
| 361 bool cppValue = v8Value->BooleanValue(); | 361 bool cppValue = v8Value->BooleanValue(); |
| 362 impl->setBooleanAttribute(cppValue); | 362 impl->setBooleanAttribute(cppValue); |
| 363 } | 363 } |
| 364 | 364 |
| 365 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 365 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 366 { | 366 { |
| 367 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 367 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 368 TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info); | 368 TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info); |
| 369 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 369 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 370 } | 370 } |
| 371 | 371 |
| 372 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 372 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 373 { | 373 { |
| 374 v8::Local<v8::Object> holder = info.Holder(); | 374 v8::Local<v8::Object> holder = info.Holder(); |
| 375 TestObject* impl = V8TestObject::toImpl(holder); | 375 TestObject* impl = V8TestObject::toImpl(holder); |
| 376 v8SetReturnValueInt(info, impl->byteAttribute()); | 376 v8SetReturnValueInt(info, impl->byteAttribute()); |
| 377 } | 377 } |
| 378 | 378 |
| 379 static void byteAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 379 static void byteAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 380 { | 380 { |
| 381 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 381 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 382 TestObjectV8Internal::byteAttributeAttributeGetter(info); | 382 TestObjectV8Internal::byteAttributeAttributeGetter(info); |
| 383 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 383 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 384 } | 384 } |
| 385 | 385 |
| 386 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 386 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 387 { | 387 { |
| 388 v8::Local<v8::Object> holder = info.Holder(); | 388 v8::Local<v8::Object> holder = info.Holder(); |
| 389 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute"
, "TestObject", holder, info.GetIsolate()); | 389 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute"
, "TestObject", holder, info.GetIsolate()); |
| 390 TestObject* impl = V8TestObject::toImpl(holder); | 390 TestObject* impl = V8TestObject::toImpl(holder); |
| 391 int cppValue = toInt8(v8Value, exceptionState); | 391 int cppValue = toInt8(v8Value, exceptionState); |
| 392 if (exceptionState.throwIfNeeded()) | 392 if (exceptionState.throwIfNeeded()) |
| 393 return; | 393 return; |
| 394 impl->setByteAttribute(cppValue); | 394 impl->setByteAttribute(cppValue); |
| 395 } | 395 } |
| 396 | 396 |
| 397 static void byteAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 397 static void byteAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 398 { | 398 { |
| 399 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 399 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 400 TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info); | 400 TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info); |
| 401 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 401 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 402 } | 402 } |
| 403 | 403 |
| 404 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 404 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 405 { | 405 { |
| 406 v8::Local<v8::Object> holder = info.Holder(); | 406 v8::Local<v8::Object> holder = info.Holder(); |
| 407 TestObject* impl = V8TestObject::toImpl(holder); | 407 TestObject* impl = V8TestObject::toImpl(holder); |
| 408 v8SetReturnValue(info, impl->doubleAttribute()); | 408 v8SetReturnValue(info, impl->doubleAttribute()); |
| 409 } | 409 } |
| 410 | 410 |
| 411 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 411 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 412 { | 412 { |
| 413 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 413 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 414 TestObjectV8Internal::doubleAttributeAttributeGetter(info); | 414 TestObjectV8Internal::doubleAttributeAttributeGetter(info); |
| 415 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 415 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 416 } | 416 } |
| 417 | 417 |
| 418 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 418 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 419 { | 419 { |
| 420 v8::Local<v8::Object> holder = info.Holder(); | 420 v8::Local<v8::Object> holder = info.Holder(); |
| 421 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestObject", holder, info.GetIsolate()); | 421 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestObject", holder, info.GetIsolate()); |
| 422 TestObject* impl = V8TestObject::toImpl(holder); | 422 TestObject* impl = V8TestObject::toImpl(holder); |
| 423 double cppValue = toRestrictedDouble(v8Value, exceptionState); | 423 double cppValue = toRestrictedDouble(v8Value, exceptionState); |
| 424 if (exceptionState.throwIfNeeded()) | 424 if (exceptionState.throwIfNeeded()) |
| 425 return; | 425 return; |
| 426 impl->setDoubleAttribute(cppValue); | 426 impl->setDoubleAttribute(cppValue); |
| 427 } | 427 } |
| 428 | 428 |
| 429 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 429 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 430 { | 430 { |
| 431 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 431 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 432 TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info); | 432 TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info); |
| 433 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 433 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 434 } | 434 } |
| 435 | 435 |
| 436 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 436 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 437 { | 437 { |
| 438 v8::Local<v8::Object> holder = info.Holder(); | 438 v8::Local<v8::Object> holder = info.Holder(); |
| 439 TestObject* impl = V8TestObject::toImpl(holder); | 439 TestObject* impl = V8TestObject::toImpl(holder); |
| 440 v8SetReturnValue(info, impl->floatAttribute()); | 440 v8SetReturnValue(info, impl->floatAttribute()); |
| 441 } | 441 } |
| 442 | 442 |
| 443 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 443 static void floatAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 444 { | 444 { |
| 445 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 445 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 446 TestObjectV8Internal::floatAttributeAttributeGetter(info); | 446 TestObjectV8Internal::floatAttributeAttributeGetter(info); |
| 447 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 447 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 448 } | 448 } |
| 449 | 449 |
| 450 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 450 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 451 { | 451 { |
| 452 v8::Local<v8::Object> holder = info.Holder(); | 452 v8::Local<v8::Object> holder = info.Holder(); |
| 453 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestObject", holder, info.GetIsolate()); | 453 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestObject", holder, info.GetIsolate()); |
| 454 TestObject* impl = V8TestObject::toImpl(holder); | 454 TestObject* impl = V8TestObject::toImpl(holder); |
| 455 float cppValue = toRestrictedFloat(v8Value, exceptionState); | 455 float cppValue = toRestrictedFloat(v8Value, exceptionState); |
| 456 if (exceptionState.throwIfNeeded()) | 456 if (exceptionState.throwIfNeeded()) |
| 457 return; | 457 return; |
| 458 impl->setFloatAttribute(cppValue); | 458 impl->setFloatAttribute(cppValue); |
| 459 } | 459 } |
| 460 | 460 |
| 461 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 461 static void floatAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 462 { | 462 { |
| 463 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 463 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 464 TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info); | 464 TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info); |
| 465 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 465 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 466 } | 466 } |
| 467 | 467 |
| 468 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 468 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 469 { | 469 { |
| 470 v8::Local<v8::Object> holder = info.Holder(); | 470 v8::Local<v8::Object> holder = info.Holder(); |
| 471 TestObject* impl = V8TestObject::toImpl(holder); | 471 TestObject* impl = V8TestObject::toImpl(holder); |
| 472 v8SetReturnValueInt(info, impl->longAttribute()); | 472 v8SetReturnValueInt(info, impl->longAttribute()); |
| 473 } | 473 } |
| 474 | 474 |
| 475 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 475 static void longAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 476 { | 476 { |
| 477 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 477 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 478 TestObjectV8Internal::longAttributeAttributeGetter(info); | 478 TestObjectV8Internal::longAttributeAttributeGetter(info); |
| 479 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 479 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 480 } | 480 } |
| 481 | 481 |
| 482 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 482 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 483 { | 483 { |
| 484 v8::Local<v8::Object> holder = info.Holder(); | 484 v8::Local<v8::Object> holder = info.Holder(); |
| 485 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute"
, "TestObject", holder, info.GetIsolate()); | 485 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute"
, "TestObject", holder, info.GetIsolate()); |
| 486 TestObject* impl = V8TestObject::toImpl(holder); | 486 TestObject* impl = V8TestObject::toImpl(holder); |
| 487 int cppValue = toInt32(v8Value, exceptionState); | 487 int cppValue = toInt32(v8Value, exceptionState); |
| 488 if (exceptionState.throwIfNeeded()) | 488 if (exceptionState.throwIfNeeded()) |
| 489 return; | 489 return; |
| 490 impl->setLongAttribute(cppValue); | 490 impl->setLongAttribute(cppValue); |
| 491 } | 491 } |
| 492 | 492 |
| 493 static void longAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 493 static void longAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 494 { | 494 { |
| 495 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 495 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 496 TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info); | 496 TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info); |
| 497 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 497 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 498 } | 498 } |
| 499 | 499 |
| 500 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 500 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 501 { | 501 { |
| 502 v8::Local<v8::Object> holder = info.Holder(); | 502 v8::Local<v8::Object> holder = info.Holder(); |
| 503 TestObject* impl = V8TestObject::toImpl(holder); | 503 TestObject* impl = V8TestObject::toImpl(holder); |
| 504 v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute())); | 504 v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute())); |
| 505 } | 505 } |
| 506 | 506 |
| 507 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 507 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 508 { | 508 { |
| 509 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 509 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 510 TestObjectV8Internal::longLongAttributeAttributeGetter(info); | 510 TestObjectV8Internal::longLongAttributeAttributeGetter(info); |
| 511 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 511 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 512 } | 512 } |
| 513 | 513 |
| 514 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 514 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 515 { | 515 { |
| 516 v8::Local<v8::Object> holder = info.Holder(); | 516 v8::Local<v8::Object> holder = info.Holder(); |
| 517 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttrib
ute", "TestObject", holder, info.GetIsolate()); | 517 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttrib
ute", "TestObject", holder, info.GetIsolate()); |
| 518 TestObject* impl = V8TestObject::toImpl(holder); | 518 TestObject* impl = V8TestObject::toImpl(holder); |
| 519 long long cppValue = toInt64(v8Value, exceptionState); | 519 long long cppValue = toInt64(v8Value, exceptionState); |
| 520 if (exceptionState.throwIfNeeded()) | 520 if (exceptionState.throwIfNeeded()) |
| 521 return; | 521 return; |
| 522 impl->setLongLongAttribute(cppValue); | 522 impl->setLongLongAttribute(cppValue); |
| 523 } | 523 } |
| 524 | 524 |
| 525 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 525 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 526 { | 526 { |
| 527 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 527 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 528 TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info); | 528 TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info); |
| 529 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 529 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 530 } | 530 } |
| 531 | 531 |
| 532 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 532 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 533 { | 533 { |
| 534 v8::Local<v8::Object> holder = info.Holder(); | 534 v8::Local<v8::Object> holder = info.Holder(); |
| 535 TestObject* impl = V8TestObject::toImpl(holder); | 535 TestObject* impl = V8TestObject::toImpl(holder); |
| 536 v8SetReturnValueUnsigned(info, impl->octetAttribute()); | 536 v8SetReturnValueUnsigned(info, impl->octetAttribute()); |
| 537 } | 537 } |
| 538 | 538 |
| 539 static void octetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 539 static void octetAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 540 { | 540 { |
| 541 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 541 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 542 TestObjectV8Internal::octetAttributeAttributeGetter(info); | 542 TestObjectV8Internal::octetAttributeAttributeGetter(info); |
| 543 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 543 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 544 } | 544 } |
| 545 | 545 |
| 546 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 546 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 547 { | 547 { |
| 548 v8::Local<v8::Object> holder = info.Holder(); | 548 v8::Local<v8::Object> holder = info.Holder(); |
| 549 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute
", "TestObject", holder, info.GetIsolate()); | 549 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute
", "TestObject", holder, info.GetIsolate()); |
| 550 TestObject* impl = V8TestObject::toImpl(holder); | 550 TestObject* impl = V8TestObject::toImpl(holder); |
| 551 unsigned cppValue = toUInt8(v8Value, exceptionState); | 551 unsigned cppValue = toUInt8(v8Value, exceptionState); |
| 552 if (exceptionState.throwIfNeeded()) | 552 if (exceptionState.throwIfNeeded()) |
| 553 return; | 553 return; |
| 554 impl->setOctetAttribute(cppValue); | 554 impl->setOctetAttribute(cppValue); |
| 555 } | 555 } |
| 556 | 556 |
| 557 static void octetAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 557 static void octetAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 558 { | 558 { |
| 559 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 559 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 560 TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info); | 560 TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info); |
| 561 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 561 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 562 } | 562 } |
| 563 | 563 |
| 564 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 564 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 565 { | 565 { |
| 566 v8::Local<v8::Object> holder = info.Holder(); | 566 v8::Local<v8::Object> holder = info.Holder(); |
| 567 TestObject* impl = V8TestObject::toImpl(holder); | 567 TestObject* impl = V8TestObject::toImpl(holder); |
| 568 v8SetReturnValueInt(info, impl->shortAttribute()); | 568 v8SetReturnValueInt(info, impl->shortAttribute()); |
| 569 } | 569 } |
| 570 | 570 |
| 571 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 571 static void shortAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 572 { | 572 { |
| 573 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 573 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 574 TestObjectV8Internal::shortAttributeAttributeGetter(info); | 574 TestObjectV8Internal::shortAttributeAttributeGetter(info); |
| 575 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 575 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 576 } | 576 } |
| 577 | 577 |
| 578 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 578 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 579 { | 579 { |
| 580 v8::Local<v8::Object> holder = info.Holder(); | 580 v8::Local<v8::Object> holder = info.Holder(); |
| 581 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); | 581 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); |
| 582 TestObject* impl = V8TestObject::toImpl(holder); | 582 TestObject* impl = V8TestObject::toImpl(holder); |
| 583 int cppValue = toInt16(v8Value, exceptionState); | 583 int cppValue = toInt16(v8Value, exceptionState); |
| 584 if (exceptionState.throwIfNeeded()) | 584 if (exceptionState.throwIfNeeded()) |
| 585 return; | 585 return; |
| 586 impl->setShortAttribute(cppValue); | 586 impl->setShortAttribute(cppValue); |
| 587 } | 587 } |
| 588 | 588 |
| 589 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 589 static void shortAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 590 { | 590 { |
| 591 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 591 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 592 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); | 592 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); |
| 593 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 593 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 594 } | 594 } |
| 595 | 595 |
| 596 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 596 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 597 { | 597 { |
| 598 v8::Local<v8::Object> holder = info.Holder(); | 598 v8::Local<v8::Object> holder = info.Holder(); |
| 599 TestObject* impl = V8TestObject::toImpl(holder); | 599 TestObject* impl = V8TestObject::toImpl(holder); |
| 600 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 600 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
| 601 } | 601 } |
| 602 | 602 |
| 603 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 603 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 604 { | 604 { |
| 605 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 605 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 606 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetter(info); | 606 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetter(info); |
| 607 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 607 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 608 } | 608 } |
| 609 | 609 |
| 610 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 610 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 611 { | 611 { |
| 612 v8::Local<v8::Object> holder = info.Holder(); | 612 v8::Local<v8::Object> holder = info.Holder(); |
| 613 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestObject", holder, info.GetIsolate()); | 613 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestObject", holder, info.GetIsolate()); |
| 614 TestObject* impl = V8TestObject::toImpl(holder); | 614 TestObject* impl = V8TestObject::toImpl(holder); |
| 615 double cppValue = toDouble(v8Value, exceptionState); | 615 double cppValue = toDouble(v8Value, exceptionState); |
| 616 if (exceptionState.throwIfNeeded()) | 616 if (exceptionState.throwIfNeeded()) |
| 617 return; | 617 return; |
| 618 impl->setUnrestrictedDoubleAttribute(cppValue); | 618 impl->setUnrestrictedDoubleAttribute(cppValue); |
| 619 } | 619 } |
| 620 | 620 |
| 621 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 621 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 622 { | 622 { |
| 623 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 623 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 624 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, in
fo); | 624 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, in
fo); |
| 625 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 625 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 626 } | 626 } |
| 627 | 627 |
| 628 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 628 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 629 { | 629 { |
| 630 v8::Local<v8::Object> holder = info.Holder(); | 630 v8::Local<v8::Object> holder = info.Holder(); |
| 631 TestObject* impl = V8TestObject::toImpl(holder); | 631 TestObject* impl = V8TestObject::toImpl(holder); |
| 632 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 632 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
| 633 } | 633 } |
| 634 | 634 |
| 635 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 635 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 636 { | 636 { |
| 637 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 637 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 638 TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetter(info); | 638 TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetter(info); |
| 639 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 639 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 640 } | 640 } |
| 641 | 641 |
| 642 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 642 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 643 { | 643 { |
| 644 v8::Local<v8::Object> holder = info.Holder(); | 644 v8::Local<v8::Object> holder = info.Holder(); |
| 645 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestObject", holder, info.GetIsolate()); | 645 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestObject", holder, info.GetIsolate()); |
| 646 TestObject* impl = V8TestObject::toImpl(holder); | 646 TestObject* impl = V8TestObject::toImpl(holder); |
| 647 float cppValue = toFloat(v8Value, exceptionState); | 647 float cppValue = toFloat(v8Value, exceptionState); |
| 648 if (exceptionState.throwIfNeeded()) | 648 if (exceptionState.throwIfNeeded()) |
| 649 return; | 649 return; |
| 650 impl->setUnrestrictedFloatAttribute(cppValue); | 650 impl->setUnrestrictedFloatAttribute(cppValue); |
| 651 } | 651 } |
| 652 | 652 |
| 653 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 653 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 654 { | 654 { |
| 655 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 655 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 656 TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, inf
o); | 656 TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, inf
o); |
| 657 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 657 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 658 } | 658 } |
| 659 | 659 |
| 660 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 660 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 661 { | 661 { |
| 662 v8::Local<v8::Object> holder = info.Holder(); | 662 v8::Local<v8::Object> holder = info.Holder(); |
| 663 TestObject* impl = V8TestObject::toImpl(holder); | 663 TestObject* impl = V8TestObject::toImpl(holder); |
| 664 v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute()); | 664 v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute()); |
| 665 } | 665 } |
| 666 | 666 |
| 667 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 667 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 668 { | 668 { |
| 669 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 669 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 670 TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info); | 670 TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info); |
| 671 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 671 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 672 } | 672 } |
| 673 | 673 |
| 674 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 674 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 675 { | 675 { |
| 676 v8::Local<v8::Object> holder = info.Holder(); | 676 v8::Local<v8::Object> holder = info.Holder(); |
| 677 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAt
tribute", "TestObject", holder, info.GetIsolate()); | 677 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAt
tribute", "TestObject", holder, info.GetIsolate()); |
| 678 TestObject* impl = V8TestObject::toImpl(holder); | 678 TestObject* impl = V8TestObject::toImpl(holder); |
| 679 unsigned cppValue = toUInt32(v8Value, exceptionState); | 679 unsigned cppValue = toUInt32(v8Value, exceptionState); |
| 680 if (exceptionState.throwIfNeeded()) | 680 if (exceptionState.throwIfNeeded()) |
| 681 return; | 681 return; |
| 682 impl->setUnsignedLongAttribute(cppValue); | 682 impl->setUnsignedLongAttribute(cppValue); |
| 683 } | 683 } |
| 684 | 684 |
| 685 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 685 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 686 { | 686 { |
| 687 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 687 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 688 TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info); | 688 TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info); |
| 689 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 689 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 690 } | 690 } |
| 691 | 691 |
| 692 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 692 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 693 { | 693 { |
| 694 v8::Local<v8::Object> holder = info.Holder(); | 694 v8::Local<v8::Object> holder = info.Holder(); |
| 695 TestObject* impl = V8TestObject::toImpl(holder); | 695 TestObject* impl = V8TestObject::toImpl(holder); |
| 696 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()
)); | 696 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()
)); |
| 697 } | 697 } |
| 698 | 698 |
| 699 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 699 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::Name>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 700 { | 700 { |
| 701 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 701 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 702 TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info); | 702 TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info); |
| 703 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 703 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 704 } | 704 } |
| 705 | 705 |
| 706 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 706 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 707 { | 707 { |
| 708 v8::Local<v8::Object> holder = info.Holder(); | 708 v8::Local<v8::Object> holder = info.Holder(); |
| 709 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | 709 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttribute", "TestObject", holder, info.GetIsolate()); |
| 710 TestObject* impl = V8TestObject::toImpl(holder); | 710 TestObject* impl = V8TestObject::toImpl(holder); |
| 711 unsigned long long cppValue = toUInt64(v8Value, exceptionState); | 711 unsigned long long cppValue = toUInt64(v8Value, exceptionState); |
| 712 if (exceptionState.throwIfNeeded()) | 712 if (exceptionState.throwIfNeeded()) |
| 713 return; | 713 return; |
| 714 impl->setUnsignedLongLongAttribute(cppValue); | 714 impl->setUnsignedLongLongAttribute(cppValue); |
| 715 } | 715 } |
| 716 | 716 |
| 717 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 717 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::Name>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 718 { | 718 { |
| 719 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 719 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 720 TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info
); | 720 TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info
); |
| 721 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 721 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 722 } | 722 } |
| 723 | 723 |
| 724 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 724 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 725 { | 725 { |
| 726 v8::Local<v8::Object> holder = info.Holder(); | 726 v8::Local<v8::Object> holder = info.Holder(); |
| 727 TestObject* impl = V8TestObject::toImpl(holder); | 727 TestObject* impl = V8TestObject::toImpl(holder); |
| 728 v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute()); | 728 v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute()); |
| 729 } | 729 } |
| 730 | 730 |
| 731 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 731 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 732 { | 732 { |
| 733 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 733 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 734 TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info); | 734 TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info); |
| 735 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 735 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 736 } | 736 } |
| 737 | 737 |
| 738 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 738 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 739 { | 739 { |
| 740 v8::Local<v8::Object> holder = info.Holder(); | 740 v8::Local<v8::Object> holder = info.Holder(); |
| 741 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttribute", "TestObject", holder, info.GetIsolate()); | 741 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttribute", "TestObject", holder, info.GetIsolate()); |
| 742 TestObject* impl = V8TestObject::toImpl(holder); | 742 TestObject* impl = V8TestObject::toImpl(holder); |
| 743 unsigned cppValue = toUInt16(v8Value, exceptionState); | 743 unsigned cppValue = toUInt16(v8Value, exceptionState); |
| 744 if (exceptionState.throwIfNeeded()) | 744 if (exceptionState.throwIfNeeded()) |
| 745 return; | 745 return; |
| 746 impl->setUnsignedShortAttribute(cppValue); | 746 impl->setUnsignedShortAttribute(cppValue); |
| 747 } | 747 } |
| 748 | 748 |
| 749 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 749 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 750 { | 750 { |
| 751 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 751 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 752 TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info); | 752 TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info); |
| 753 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 753 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 754 } | 754 } |
| 755 | 755 |
| 756 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 756 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 757 { | 757 { |
| 758 v8::Local<v8::Object> holder = info.Holder(); | 758 v8::Local<v8::Object> holder = info.Holder(); |
| 759 TestObject* impl = V8TestObject::toImpl(holder); | 759 TestObject* impl = V8TestObject::toImpl(holder); |
| 760 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyAttribute()),
impl); | 760 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyAttribute()),
impl); |
| 761 } | 761 } |
| 762 | 762 |
| 763 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 763 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 764 { | 764 { |
| 765 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 765 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 766 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetter(info); | 766 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetter(info); |
| 767 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 767 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 768 } | 768 } |
| 769 | 769 |
| 770 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 770 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 771 { | 771 { |
| 772 v8::Local<v8::Object> holder = info.Holder(); | 772 v8::Local<v8::Object> holder = info.Holder(); |
| 773 TestObject* impl = V8TestObject::toImpl(holder); | 773 TestObject* impl = V8TestObject::toImpl(holder); |
| 774 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); | 774 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); |
| 775 impl->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue)); | 775 impl->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue)); |
| 776 } | 776 } |
| 777 | 777 |
| 778 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 778 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 779 { | 779 { |
| 780 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 780 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 781 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, in
fo); | 781 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, in
fo); |
| 782 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 782 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 783 } | 783 } |
| 784 | 784 |
| 785 static void testObjectAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 785 static void testObjectAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 786 { | 786 { |
| 787 v8::Local<v8::Object> holder = info.Holder(); | 787 v8::Local<v8::Object> holder = info.Holder(); |
| 788 TestObject* impl = V8TestObject::toImpl(holder); | 788 TestObject* impl = V8TestObject::toImpl(holder); |
| 789 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjectAttribute()), impl); | 789 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjectAttribute()), impl); |
| 790 } | 790 } |
| 791 | 791 |
| 792 static void testObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 792 static void testObjectAttributeAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 793 { | 793 { |
| 794 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 794 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 795 TestObjectV8Internal::testObjectAttributeAttributeGetter(info); | 795 TestObjectV8Internal::testObjectAttributeAttributeGetter(info); |
| 796 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 796 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 797 } | 797 } |
| 798 | 798 |
| 799 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 799 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 800 { | 800 { |
| 801 v8::Local<v8::Object> holder = info.Holder(); | 801 v8::Local<v8::Object> holder = info.Holder(); |
| 802 TestObject* impl = V8TestObject::toImpl(holder); | 802 TestObject* impl = V8TestObject::toImpl(holder); |
| 803 TestObject* cppValue = V8TestObject::toImplWithTypeCheck(info.GetIsolate(),
v8Value); | 803 TestObject* cppValue = V8TestObject::toImplWithTypeCheck(info.GetIsolate(),
v8Value); |
| 804 impl->setTestObjectAttribute(WTF::getPtr(cppValue)); | 804 impl->setTestObjectAttribute(WTF::getPtr(cppValue)); |
| 805 } | 805 } |
| 806 | 806 |
| 807 static void testObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 807 static void testObjectAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 808 { | 808 { |
| 809 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 809 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 810 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info); | 810 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info); |
| 811 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 811 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 812 } | 812 } |
| 813 | 813 |
| 814 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 814 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 815 { | 815 { |
| 816 v8::Local<v8::Object> holder = info.Holder(); | 816 v8::Local<v8::Object> holder = info.Holder(); |
| 817 TestObject* impl = V8TestObject::toImpl(holder); | 817 TestObject* impl = V8TestObject::toImpl(holder); |
| 818 v8SetReturnValue(info, impl->voidCallbackFunctionAttribute().v8Value()); | 818 v8SetReturnValue(info, impl->voidCallbackFunctionAttribute().v8Value()); |
| 819 } | 819 } |
| 820 | 820 |
| 821 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 821 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::N
ame>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 822 { | 822 { |
| 823 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 823 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 824 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetter(info); | 824 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetter(info); |
| 825 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 825 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 826 } | 826 } |
| 827 | 827 |
| 828 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | 828 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 829 { | 829 { |
| 830 v8::Local<v8::Object> holder = info.Holder(); | 830 v8::Local<v8::Object> holder = info.Holder(); |
| 831 TestObject* impl = V8TestObject::toImpl(holder); | 831 TestObject* impl = V8TestObject::toImpl(holder); |
| 832 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); | 832 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); |
| 833 impl->setVoidCallbackFunctionAttribute(cppValue); | 833 impl->setVoidCallbackFunctionAttribute(cppValue); |
| 834 } | 834 } |
| 835 | 835 |
| 836 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 836 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::N
ame>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 837 { | 837 { |
| 838 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 838 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 839 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetter(v8Value,
info); | 839 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetter(v8Value,
info); |
| 840 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 840 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 841 } | 841 } |
| 842 | 842 |
| 843 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | 843 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 844 { | 844 { |
| 845 v8::Local<v8::Object> holder = info.Holder(); | 845 v8::Local<v8::Object> holder = info.Holder(); |
| 846 TestObject* impl = V8TestObject::toImpl(holder); | 846 TestObject* impl = V8TestObject::toImpl(holder); |
| 847 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgAttribute().v8
Value()); | 847 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgAttribute().v8
Value()); |
| 848 } | 848 } |
| 849 | 849 |
| 850 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 850 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8
::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 851 { | 851 { |
| 852 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 852 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 853 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGet
ter(info); | 853 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGet
ter(info); |
| 854 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 854 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 855 } | 855 } |
| 856 | 856 |
| 857 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 857 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 858 { | 858 { |
| 859 v8::Local<v8::Object> holder = info.Holder(); | 859 v8::Local<v8::Object> holder = info.Holder(); |
| 860 TestObject* impl = V8TestObject::toImpl(holder); | 860 TestObject* impl = V8TestObject::toImpl(holder); |
| 861 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); | 861 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); |
| 862 impl->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue); | 862 impl->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue); |
| 863 } | 863 } |
| 864 | 864 |
| 865 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | 865 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8
::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
| 866 { | 866 { |
| 867 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 867 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 868 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSet
ter(v8Value, info); | 868 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSet
ter(v8Value, info); |
| 869 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 869 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 870 } | 870 } |
| 871 | 871 |
| 872 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 872 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 873 { | 873 { |
| 874 v8::Local<v8::Object> holder = info.Holder(); | 874 v8::Local<v8::Object> holder = info.Holder(); |
| 875 TestObject* impl = V8TestObject::toImpl(holder); | 875 TestObject* impl = V8TestObject::toImpl(holder); |
| 876 v8SetReturnValueInt(info, impl->cssAttribute()); | 876 v8SetReturnValueInt(info, impl->cssAttribute()); |
| 877 } | 877 } |
| 878 | 878 |
| 879 static void cssAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 879 static void cssAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 880 { | 880 { |
| 881 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 881 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 882 TestObjectV8Internal::cssAttributeAttributeGetter(info); | 882 TestObjectV8Internal::cssAttributeAttributeGetter(info); |
| 883 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 883 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 884 } | 884 } |
| 885 | 885 |
| 886 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 886 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 887 { | 887 { |
| 888 v8::Local<v8::Object> holder = info.Holder(); | 888 v8::Local<v8::Object> holder = info.Holder(); |
| 889 ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute",
"TestObject", holder, info.GetIsolate()); | 889 ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute",
"TestObject", holder, info.GetIsolate()); |
| 890 TestObject* impl = V8TestObject::toImpl(holder); | 890 TestObject* impl = V8TestObject::toImpl(holder); |
| 891 int cppValue = toInt32(v8Value, exceptionState); | 891 int cppValue = toInt32(v8Value, exceptionState); |
| 892 if (exceptionState.throwIfNeeded()) | 892 if (exceptionState.throwIfNeeded()) |
| 893 return; | 893 return; |
| 894 impl->setCSSAttribute(cppValue); | 894 impl->setCSSAttribute(cppValue); |
| 895 } | 895 } |
| 896 | 896 |
| 897 static void cssAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 897 static void cssAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 898 { | 898 { |
| 899 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 899 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 900 TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info); | 900 TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info); |
| 901 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 901 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 902 } | 902 } |
| 903 | 903 |
| 904 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 904 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 905 { | 905 { |
| 906 v8::Local<v8::Object> holder = info.Holder(); | 906 v8::Local<v8::Object> holder = info.Holder(); |
| 907 TestObject* impl = V8TestObject::toImpl(holder); | 907 TestObject* impl = V8TestObject::toImpl(holder); |
| 908 v8SetReturnValueInt(info, impl->imeAttribute()); | 908 v8SetReturnValueInt(info, impl->imeAttribute()); |
| 909 } | 909 } |
| 910 | 910 |
| 911 static void imeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 911 static void imeAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 912 { | 912 { |
| 913 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 913 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 914 TestObjectV8Internal::imeAttributeAttributeGetter(info); | 914 TestObjectV8Internal::imeAttributeAttributeGetter(info); |
| 915 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 915 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 916 } | 916 } |
| 917 | 917 |
| 918 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 918 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 919 { | 919 { |
| 920 v8::Local<v8::Object> holder = info.Holder(); | 920 v8::Local<v8::Object> holder = info.Holder(); |
| 921 ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute",
"TestObject", holder, info.GetIsolate()); | 921 ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute",
"TestObject", holder, info.GetIsolate()); |
| 922 TestObject* impl = V8TestObject::toImpl(holder); | 922 TestObject* impl = V8TestObject::toImpl(holder); |
| 923 int cppValue = toInt32(v8Value, exceptionState); | 923 int cppValue = toInt32(v8Value, exceptionState); |
| 924 if (exceptionState.throwIfNeeded()) | 924 if (exceptionState.throwIfNeeded()) |
| 925 return; | 925 return; |
| 926 impl->setIMEAttribute(cppValue); | 926 impl->setIMEAttribute(cppValue); |
| 927 } | 927 } |
| 928 | 928 |
| 929 static void imeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 929 static void imeAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 930 { | 930 { |
| 931 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 931 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 932 TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info); | 932 TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info); |
| 933 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 933 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 934 } | 934 } |
| 935 | 935 |
| 936 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 936 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 937 { | 937 { |
| 938 v8::Local<v8::Object> holder = info.Holder(); | 938 v8::Local<v8::Object> holder = info.Holder(); |
| 939 TestObject* impl = V8TestObject::toImpl(holder); | 939 TestObject* impl = V8TestObject::toImpl(holder); |
| 940 v8SetReturnValueInt(info, impl->svgAttribute()); | 940 v8SetReturnValueInt(info, impl->svgAttribute()); |
| 941 } | 941 } |
| 942 | 942 |
| 943 static void svgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 943 static void svgAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 944 { | 944 { |
| 945 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 945 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 946 TestObjectV8Internal::svgAttributeAttributeGetter(info); | 946 TestObjectV8Internal::svgAttributeAttributeGetter(info); |
| 947 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 947 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 948 } | 948 } |
| 949 | 949 |
| 950 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 950 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 951 { | 951 { |
| 952 v8::Local<v8::Object> holder = info.Holder(); | 952 v8::Local<v8::Object> holder = info.Holder(); |
| 953 ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute",
"TestObject", holder, info.GetIsolate()); | 953 ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute",
"TestObject", holder, info.GetIsolate()); |
| 954 TestObject* impl = V8TestObject::toImpl(holder); | 954 TestObject* impl = V8TestObject::toImpl(holder); |
| 955 int cppValue = toInt32(v8Value, exceptionState); | 955 int cppValue = toInt32(v8Value, exceptionState); |
| 956 if (exceptionState.throwIfNeeded()) | 956 if (exceptionState.throwIfNeeded()) |
| 957 return; | 957 return; |
| 958 impl->setSVGAttribute(cppValue); | 958 impl->setSVGAttribute(cppValue); |
| 959 } | 959 } |
| 960 | 960 |
| 961 static void svgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 961 static void svgAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 962 { | 962 { |
| 963 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 963 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 964 TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info); | 964 TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info); |
| 965 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 965 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 966 } | 966 } |
| 967 | 967 |
| 968 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 968 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 969 { | 969 { |
| 970 v8::Local<v8::Object> holder = info.Holder(); | 970 v8::Local<v8::Object> holder = info.Holder(); |
| 971 TestObject* impl = V8TestObject::toImpl(holder); | 971 TestObject* impl = V8TestObject::toImpl(holder); |
| 972 v8SetReturnValueInt(info, impl->xmlAttribute()); | 972 v8SetReturnValueInt(info, impl->xmlAttribute()); |
| 973 } | 973 } |
| 974 | 974 |
| 975 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 975 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 976 { | 976 { |
| 977 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 977 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 978 TestObjectV8Internal::xmlAttributeAttributeGetter(info); | 978 TestObjectV8Internal::xmlAttributeAttributeGetter(info); |
| 979 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 979 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 980 } | 980 } |
| 981 | 981 |
| 982 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 982 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 983 { | 983 { |
| 984 v8::Local<v8::Object> holder = info.Holder(); | 984 v8::Local<v8::Object> holder = info.Holder(); |
| 985 ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute",
"TestObject", holder, info.GetIsolate()); | 985 ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute",
"TestObject", holder, info.GetIsolate()); |
| 986 TestObject* impl = V8TestObject::toImpl(holder); | 986 TestObject* impl = V8TestObject::toImpl(holder); |
| 987 int cppValue = toInt32(v8Value, exceptionState); | 987 int cppValue = toInt32(v8Value, exceptionState); |
| 988 if (exceptionState.throwIfNeeded()) | 988 if (exceptionState.throwIfNeeded()) |
| 989 return; | 989 return; |
| 990 impl->setXMLAttribute(cppValue); | 990 impl->setXMLAttribute(cppValue); |
| 991 } | 991 } |
| 992 | 992 |
| 993 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 993 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 994 { | 994 { |
| 995 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 995 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 996 TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info); | 996 TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info); |
| 997 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 997 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 998 } | 998 } |
| 999 | 999 |
| 1000 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1000 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1001 { | 1001 { |
| 1002 v8::Local<v8::Object> holder = info.Holder(); | 1002 v8::Local<v8::Object> holder = info.Holder(); |
| 1003 TestObject* impl = V8TestObject::toImpl(holder); | 1003 TestObject* impl = V8TestObject::toImpl(holder); |
| 1004 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeFilterAttribute()), impl); | 1004 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeFilterAttribute()), impl); |
| 1005 } | 1005 } |
| 1006 | 1006 |
| 1007 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1007 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1008 { | 1008 { |
| 1009 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1009 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1010 TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info); | 1010 TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info); |
| 1011 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1011 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1012 } | 1012 } |
| 1013 | 1013 |
| 1014 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1014 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 1015 { | 1015 { |
| 1016 v8::Local<v8::Object> holder = info.Holder(); | 1016 v8::Local<v8::Object> holder = info.Holder(); |
| 1017 TestObject* impl = V8TestObject::toImpl(holder); | 1017 TestObject* impl = V8TestObject::toImpl(holder); |
| 1018 RefPtrWillBeRawPtr<NodeFilter> cppValue = toNodeFilter(v8Value, info.Holder(
), ScriptState::current(info.GetIsolate())); | 1018 RefPtrWillBeRawPtr<NodeFilter> cppValue = toNodeFilter(v8Value, info.Holder(
), ScriptState::current(info.GetIsolate())); |
| 1019 impl->setNodeFilterAttribute(WTF::getPtr(cppValue)); | 1019 impl->setNodeFilterAttribute(WTF::getPtr(cppValue)); |
| 1020 } | 1020 } |
| 1021 | 1021 |
| 1022 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1022 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1023 { | 1023 { |
| 1024 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1024 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1025 TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info); | 1025 TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info); |
| 1026 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1026 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1027 } | 1027 } |
| 1028 | 1028 |
| 1029 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 1029 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 1030 { | 1030 { |
| 1031 v8::Local<v8::Object> holder = info.Holder(); | 1031 v8::Local<v8::Object> holder = info.Holder(); |
| 1032 TestObject* impl = V8TestObject::toImpl(holder); | 1032 TestObject* impl = V8TestObject::toImpl(holder); |
| 1033 v8SetReturnValue(info, impl->serializedScriptValueAttribute() ? impl->serial
izedScriptValueAttribute()->deserialize() : v8::Local<v8::Value>(v8::Null(info.G
etIsolate()))); | 1033 v8SetReturnValue(info, impl->serializedScriptValueAttribute() ? impl->serial
izedScriptValueAttribute()->deserialize() : v8::Local<v8::Value>(v8::Null(info.G
etIsolate()))); |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1036 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8::
Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1037 { | 1037 { |
| 1038 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1038 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1039 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); | 1039 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); |
| 1040 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1040 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1041 } | 1041 } |
| 1042 | 1042 |
| 1043 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 1043 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1044 { | 1044 { |
| 1045 v8::Local<v8::Object> holder = info.Holder(); | 1045 v8::Local<v8::Object> holder = info.Holder(); |
| 1046 ExceptionState exceptionState(ExceptionState::SetterContext, "serializedScri
ptValueAttribute", "TestObject", holder, info.GetIsolate()); | 1046 ExceptionState exceptionState(ExceptionState::SetterContext, "serializedScri
ptValueAttribute", "TestObject", holder, info.GetIsolate()); |
| 1047 TestObject* impl = V8TestObject::toImpl(holder); | 1047 TestObject* impl = V8TestObject::toImpl(holder); |
| 1048 RefPtr<SerializedScriptValue> cppValue = SerializedScriptValueFactory::insta
nce().create(v8Value, 0, 0, exceptionState, info.GetIsolate()); | 1048 RefPtr<SerializedScriptValue> cppValue = SerializedScriptValueFactory::insta
nce().create(v8Value, 0, 0, exceptionState, info.GetIsolate()); |
| 1049 if (exceptionState.throwIfNeeded()) | 1049 if (exceptionState.throwIfNeeded()) |
| 1050 return; | 1050 return; |
| 1051 impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue)); | 1051 impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue)); |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | 1054 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8::
Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1055 { | 1055 { |
| 1056 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1056 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1057 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value,
info); | 1057 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value,
info); |
| 1058 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1058 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1059 } | 1059 } |
| 1060 | 1060 |
| 1061 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 1061 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 1062 { | 1062 { |
| 1063 v8::Local<v8::Object> holder = info.Holder(); | 1063 v8::Local<v8::Object> holder = info.Holder(); |
| 1064 TestObject* impl = V8TestObject::toImpl(holder); | 1064 TestObject* impl = V8TestObject::toImpl(holder); |
| 1065 v8SetReturnValue(info, impl->anyAttribute().v8Value()); | 1065 v8SetReturnValue(info, impl->anyAttribute().v8Value()); |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 1068 static void anyAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 1069 { | 1069 { |
| 1070 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1070 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1071 TestObjectV8Internal::anyAttributeAttributeGetter(info); | 1071 TestObjectV8Internal::anyAttributeAttributeGetter(info); |
| 1072 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1072 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 1075 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 1076 { | 1076 { |
| 1077 v8::Local<v8::Object> holder = info.Holder(); | 1077 v8::Local<v8::Object> holder = info.Holder(); |
| 1078 TestObject* impl = V8TestObject::toImpl(holder); | 1078 TestObject* impl = V8TestObject::toImpl(holder); |
| 1079 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); | 1079 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); |
| 1080 impl->setAnyAttribute(cppValue); | 1080 impl->setAnyAttribute(cppValue); |
| 1081 } | 1081 } |
| 1082 | 1082 |
| 1083 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1083 static void anyAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1084 { | 1084 { |
| 1085 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1085 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1086 TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info); | 1086 TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info); |
| 1087 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1087 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1088 } | 1088 } |
| 1089 | 1089 |
| 1090 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1090 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 1091 { | 1091 { |
| 1092 v8::Local<v8::Object> holder = info.Holder(); | 1092 v8::Local<v8::Object> holder = info.Holder(); |
| 1093 TestObject* impl = V8TestObject::toImpl(holder); | 1093 TestObject* impl = V8TestObject::toImpl(holder); |
| 1094 v8SetReturnValue(info, impl->promiseAttribute().v8Value()); | 1094 v8SetReturnValue(info, impl->promiseAttribute().v8Value()); |
| 1095 } | 1095 } |
| 1096 | 1096 |
| 1097 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1097 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 1098 { | 1098 { |
| 1099 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1099 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1100 TestObjectV8Internal::promiseAttributeAttributeGetter(info); | 1100 TestObjectV8Internal::promiseAttributeAttributeGetter(info); |
| 1101 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1101 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1102 } | 1102 } |
| 1103 | 1103 |
| 1104 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 1104 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 1105 { | 1105 { |
| 1106 v8::Local<v8::Object> holder = info.Holder(); | 1106 v8::Local<v8::Object> holder = info.Holder(); |
| 1107 TestObject* impl = V8TestObject::toImpl(holder); | 1107 TestObject* impl = V8TestObject::toImpl(holder); |
| 1108 ScriptPromise cppValue = ScriptPromise::cast(ScriptState::current(info.GetIs
olate()), v8Value); | 1108 ScriptPromise cppValue = ScriptPromise::cast(ScriptState::current(info.GetIs
olate()), v8Value); |
| 1109 impl->setPromiseAttribute(cppValue); | 1109 impl->setPromiseAttribute(cppValue); |
| 1110 } | 1110 } |
| 1111 | 1111 |
| 1112 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1112 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1113 { | 1113 { |
| 1114 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1114 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1115 TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info); | 1115 TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info); |
| 1116 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1116 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 1119 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 1120 { | 1120 { |
| 1121 v8::Local<v8::Object> holder = info.Holder(); | 1121 v8::Local<v8::Object> holder = info.Holder(); |
| 1122 TestObject* impl = V8TestObject::toImpl(holder); | 1122 TestObject* impl = V8TestObject::toImpl(holder); |
| 1123 v8SetReturnValueFast(info, WTF::getPtr(impl->windowAttribute()), impl); | 1123 v8SetReturnValueFast(info, WTF::getPtr(impl->windowAttribute()), impl); |
| 1124 } | 1124 } |
| 1125 | 1125 |
| 1126 static void windowAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1126 static void windowAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 1127 { | 1127 { |
| 1128 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1128 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1129 TestObjectV8Internal::windowAttributeAttributeGetter(info); | 1129 TestObjectV8Internal::windowAttributeAttributeGetter(info); |
| 1130 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1130 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 1133 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 1134 { | 1134 { |
| 1135 v8::Local<v8::Object> holder = info.Holder(); | 1135 v8::Local<v8::Object> holder = info.Holder(); |
| 1136 TestObject* impl = V8TestObject::toImpl(holder); | 1136 TestObject* impl = V8TestObject::toImpl(holder); |
| 1137 DOMWindow* cppValue = toDOMWindow(info.GetIsolate(), v8Value); | 1137 DOMWindow* cppValue = toDOMWindow(info.GetIsolate(), v8Value); |
| 1138 impl->setWindowAttribute(WTF::getPtr(cppValue)); | 1138 impl->setWindowAttribute(WTF::getPtr(cppValue)); |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 static void windowAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1141 static void windowAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1142 { | 1142 { |
| 1143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1144 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info); | 1144 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info); |
| 1145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 1148 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 1149 { | 1149 { |
| 1150 v8::Local<v8::Object> holder = info.Holder(); | 1150 v8::Local<v8::Object> holder = info.Holder(); |
| 1151 TestObject* impl = V8TestObject::toImpl(holder); | 1151 TestObject* impl = V8TestObject::toImpl(holder); |
| 1152 v8SetReturnValueFast(info, WTF::getPtr(impl->documentAttribute()), impl); | 1152 v8SetReturnValueFast(info, WTF::getPtr(impl->documentAttribute()), impl); |
| 1153 } | 1153 } |
| 1154 | 1154 |
| 1155 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 1155 static void documentAttributeAttributeGetterCallback(v8::Local<v8::Name>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1156 { | 1156 { |
| 1157 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1157 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1158 TestObjectV8Internal::documentAttributeAttributeGetter(info); | 1158 TestObjectV8Internal::documentAttributeAttributeGetter(info); |
| 1159 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1159 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1160 } | 1160 } |
| 1161 | 1161 |
| 1162 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 1162 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 1163 { | 1163 { |
| 1164 v8::Local<v8::Object> holder = info.Holder(); | 1164 v8::Local<v8::Object> holder = info.Holder(); |
| 1165 TestObject* impl = V8TestObject::toImpl(holder); | 1165 TestObject* impl = V8TestObject::toImpl(holder); |
| 1166 Document* cppValue = V8Document::toImplWithTypeCheck(info.GetIsolate(), v8Va
lue); | 1166 Document* cppValue = V8Document::toImplWithTypeCheck(info.GetIsolate(), v8Va
lue); |
| 1167 impl->setDocumentAttribute(WTF::getPtr(cppValue)); | 1167 impl->setDocumentAttribute(WTF::getPtr(cppValue)); |
| 1168 } | 1168 } |
| 1169 | 1169 |
| 1170 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1170 static void documentAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1171 { | 1171 { |
| 1172 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1172 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1173 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info); | 1173 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info); |
| 1174 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1174 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1175 } | 1175 } |
| 1176 | 1176 |
| 1177 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 1177 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 1178 { | 1178 { |
| 1179 v8::Local<v8::Object> holder = info.Holder(); | 1179 v8::Local<v8::Object> holder = info.Holder(); |
| 1180 TestObject* impl = V8TestObject::toImpl(holder); | 1180 TestObject* impl = V8TestObject::toImpl(holder); |
| 1181 v8SetReturnValueFast(info, WTF::getPtr(impl->documentFragmentAttribute()), i
mpl); | 1181 v8SetReturnValueFast(info, WTF::getPtr(impl->documentFragmentAttribute()), i
mpl); |
| 1182 } | 1182 } |
| 1183 | 1183 |
| 1184 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1184 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::Name>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1185 { | 1185 { |
| 1186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1187 TestObjectV8Internal::documentFragmentAttributeAttributeGetter(info); | 1187 TestObjectV8Internal::documentFragmentAttributeAttributeGetter(info); |
| 1188 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1188 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 1191 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 1192 { | 1192 { |
| 1193 v8::Local<v8::Object> holder = info.Holder(); | 1193 v8::Local<v8::Object> holder = info.Holder(); |
| 1194 TestObject* impl = V8TestObject::toImpl(holder); | 1194 TestObject* impl = V8TestObject::toImpl(holder); |
| 1195 DocumentFragment* cppValue = V8DocumentFragment::toImplWithTypeCheck(info.Ge
tIsolate(), v8Value); | 1195 DocumentFragment* cppValue = V8DocumentFragment::toImplWithTypeCheck(info.Ge
tIsolate(), v8Value); |
| 1196 impl->setDocumentFragmentAttribute(WTF::getPtr(cppValue)); | 1196 impl->setDocumentFragmentAttribute(WTF::getPtr(cppValue)); |
| 1197 } | 1197 } |
| 1198 | 1198 |
| 1199 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1199 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::Name>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1200 { | 1200 { |
| 1201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1202 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info
); | 1202 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info
); |
| 1203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1204 } | 1204 } |
| 1205 | 1205 |
| 1206 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1206 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1207 { | 1207 { |
| 1208 v8::Local<v8::Object> holder = info.Holder(); | 1208 v8::Local<v8::Object> holder = info.Holder(); |
| 1209 TestObject* impl = V8TestObject::toImpl(holder); | 1209 TestObject* impl = V8TestObject::toImpl(holder); |
| 1210 v8SetReturnValueFast(info, WTF::getPtr(impl->documentTypeAttribute()), impl)
; | 1210 v8SetReturnValueFast(info, WTF::getPtr(impl->documentTypeAttribute()), impl)
; |
| 1211 } | 1211 } |
| 1212 | 1212 |
| 1213 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1213 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1214 { | 1214 { |
| 1215 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1215 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1216 TestObjectV8Internal::documentTypeAttributeAttributeGetter(info); | 1216 TestObjectV8Internal::documentTypeAttributeAttributeGetter(info); |
| 1217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1220 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1221 { | 1221 { |
| 1222 v8::Local<v8::Object> holder = info.Holder(); | 1222 v8::Local<v8::Object> holder = info.Holder(); |
| 1223 TestObject* impl = V8TestObject::toImpl(holder); | 1223 TestObject* impl = V8TestObject::toImpl(holder); |
| 1224 DocumentType* cppValue = V8DocumentType::toImplWithTypeCheck(info.GetIsolate
(), v8Value); | 1224 DocumentType* cppValue = V8DocumentType::toImplWithTypeCheck(info.GetIsolate
(), v8Value); |
| 1225 impl->setDocumentTypeAttribute(WTF::getPtr(cppValue)); | 1225 impl->setDocumentTypeAttribute(WTF::getPtr(cppValue)); |
| 1226 } | 1226 } |
| 1227 | 1227 |
| 1228 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1228 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1229 { | 1229 { |
| 1230 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1230 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1231 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info); | 1231 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info); |
| 1232 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1232 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1233 } | 1233 } |
| 1234 | 1234 |
| 1235 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1235 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 1236 { | 1236 { |
| 1237 v8::Local<v8::Object> holder = info.Holder(); | 1237 v8::Local<v8::Object> holder = info.Holder(); |
| 1238 TestObject* impl = V8TestObject::toImpl(holder); | 1238 TestObject* impl = V8TestObject::toImpl(holder); |
| 1239 v8SetReturnValueFast(info, WTF::getPtr(impl->elementAttribute()), impl); | 1239 v8SetReturnValueFast(info, WTF::getPtr(impl->elementAttribute()), impl); |
| 1240 } | 1240 } |
| 1241 | 1241 |
| 1242 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1242 static void elementAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 1243 { | 1243 { |
| 1244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1245 TestObjectV8Internal::elementAttributeAttributeGetter(info); | 1245 TestObjectV8Internal::elementAttributeAttributeGetter(info); |
| 1246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1247 } | 1247 } |
| 1248 | 1248 |
| 1249 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 1249 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 1250 { | 1250 { |
| 1251 v8::Local<v8::Object> holder = info.Holder(); | 1251 v8::Local<v8::Object> holder = info.Holder(); |
| 1252 TestObject* impl = V8TestObject::toImpl(holder); | 1252 TestObject* impl = V8TestObject::toImpl(holder); |
| 1253 Element* cppValue = V8Element::toImplWithTypeCheck(info.GetIsolate(), v8Valu
e); | 1253 Element* cppValue = V8Element::toImplWithTypeCheck(info.GetIsolate(), v8Valu
e); |
| 1254 impl->setElementAttribute(WTF::getPtr(cppValue)); | 1254 impl->setElementAttribute(WTF::getPtr(cppValue)); |
| 1255 } | 1255 } |
| 1256 | 1256 |
| 1257 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1257 static void elementAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1258 { | 1258 { |
| 1259 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1259 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1260 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info); | 1260 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info); |
| 1261 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1261 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1262 } | 1262 } |
| 1263 | 1263 |
| 1264 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 1264 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 1265 { | 1265 { |
| 1266 v8::Local<v8::Object> holder = info.Holder(); | 1266 v8::Local<v8::Object> holder = info.Holder(); |
| 1267 TestObject* impl = V8TestObject::toImpl(holder); | 1267 TestObject* impl = V8TestObject::toImpl(holder); |
| 1268 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeAttribute()), impl); | 1268 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeAttribute()), impl); |
| 1269 } | 1269 } |
| 1270 | 1270 |
| 1271 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 1271 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 1272 { | 1272 { |
| 1273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1274 TestObjectV8Internal::nodeAttributeAttributeGetter(info); | 1274 TestObjectV8Internal::nodeAttributeAttributeGetter(info); |
| 1275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1276 } | 1276 } |
| 1277 | 1277 |
| 1278 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 1278 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 1279 { | 1279 { |
| 1280 v8::Local<v8::Object> holder = info.Holder(); | 1280 v8::Local<v8::Object> holder = info.Holder(); |
| 1281 TestObject* impl = V8TestObject::toImpl(holder); | 1281 TestObject* impl = V8TestObject::toImpl(holder); |
| 1282 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 1282 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 1283 impl->setNodeAttribute(WTF::getPtr(cppValue)); | 1283 impl->setNodeAttribute(WTF::getPtr(cppValue)); |
| 1284 } | 1284 } |
| 1285 | 1285 |
| 1286 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1286 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1287 { | 1287 { |
| 1288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1289 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | 1289 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); |
| 1290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1291 } | 1291 } |
| 1292 | 1292 |
| 1293 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1293 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1294 { | 1294 { |
| 1295 v8::Local<v8::Object> holder = info.Holder(); | 1295 v8::Local<v8::Object> holder = info.Holder(); |
| 1296 TestObject* impl = V8TestObject::toImpl(holder); | 1296 TestObject* impl = V8TestObject::toImpl(holder); |
| 1297 v8SetReturnValueFast(info, WTF::getPtr(impl->shadowRootAttribute()), impl); | 1297 v8SetReturnValueFast(info, WTF::getPtr(impl->shadowRootAttribute()), impl); |
| 1298 } | 1298 } |
| 1299 | 1299 |
| 1300 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1300 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1301 { | 1301 { |
| 1302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1303 TestObjectV8Internal::shadowRootAttributeAttributeGetter(info); | 1303 TestObjectV8Internal::shadowRootAttributeAttributeGetter(info); |
| 1304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1305 } | 1305 } |
| 1306 | 1306 |
| 1307 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1307 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 1308 { | 1308 { |
| 1309 v8::Local<v8::Object> holder = info.Holder(); | 1309 v8::Local<v8::Object> holder = info.Holder(); |
| 1310 TestObject* impl = V8TestObject::toImpl(holder); | 1310 TestObject* impl = V8TestObject::toImpl(holder); |
| 1311 ShadowRoot* cppValue = V8ShadowRoot::toImplWithTypeCheck(info.GetIsolate(),
v8Value); | 1311 ShadowRoot* cppValue = V8ShadowRoot::toImplWithTypeCheck(info.GetIsolate(),
v8Value); |
| 1312 impl->setShadowRootAttribute(WTF::getPtr(cppValue)); | 1312 impl->setShadowRootAttribute(WTF::getPtr(cppValue)); |
| 1313 } | 1313 } |
| 1314 | 1314 |
| 1315 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1315 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1316 { | 1316 { |
| 1317 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1317 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1318 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info); | 1318 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info); |
| 1319 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1319 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1322 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 1323 { | 1323 { |
| 1324 v8::Local<v8::Object> holder = info.Holder(); | 1324 v8::Local<v8::Object> holder = info.Holder(); |
| 1325 TestObject* impl = V8TestObject::toImpl(holder); | 1325 TestObject* impl = V8TestObject::toImpl(holder); |
| 1326 v8SetReturnValueFast(info, WTF::getPtr(impl->arrayBufferAttribute()), impl); | 1326 v8SetReturnValueFast(info, WTF::getPtr(impl->arrayBufferAttribute()), impl); |
| 1327 } | 1327 } |
| 1328 | 1328 |
| 1329 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1329 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 1330 { | 1330 { |
| 1331 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1331 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1332 TestObjectV8Internal::arrayBufferAttributeAttributeGetter(info); | 1332 TestObjectV8Internal::arrayBufferAttributeAttributeGetter(info); |
| 1333 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1333 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1334 } | 1334 } |
| 1335 | 1335 |
| 1336 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 1336 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 1337 { | 1337 { |
| 1338 v8::Local<v8::Object> holder = info.Holder(); | 1338 v8::Local<v8::Object> holder = info.Holder(); |
| 1339 TestObject* impl = V8TestObject::toImpl(holder); | 1339 TestObject* impl = V8TestObject::toImpl(holder); |
| 1340 TestArrayBuffer* cppValue = v8Value->IsArrayBuffer() ? V8ArrayBuffer::toImpl
(v8::Local<v8::ArrayBuffer>::Cast(v8Value)) : 0; | 1340 TestArrayBuffer* cppValue = v8Value->IsArrayBuffer() ? V8ArrayBuffer::toImpl
(v8::Local<v8::ArrayBuffer>::Cast(v8Value)) : 0; |
| 1341 impl->setArrayBufferAttribute(WTF::getPtr(cppValue)); | 1341 impl->setArrayBufferAttribute(WTF::getPtr(cppValue)); |
| 1342 } | 1342 } |
| 1343 | 1343 |
| 1344 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1344 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1345 { | 1345 { |
| 1346 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1346 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1347 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info); | 1347 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info); |
| 1348 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1348 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1349 } | 1349 } |
| 1350 | 1350 |
| 1351 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1351 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1352 { | 1352 { |
| 1353 v8::Local<v8::Object> holder = info.Holder(); | 1353 v8::Local<v8::Object> holder = info.Holder(); |
| 1354 TestObject* impl = V8TestObject::toImpl(holder); | 1354 TestObject* impl = V8TestObject::toImpl(holder); |
| 1355 v8SetReturnValueFast(info, WTF::getPtr(impl->float32ArrayAttribute()), impl)
; | 1355 v8SetReturnValueFast(info, WTF::getPtr(impl->float32ArrayAttribute()), impl)
; |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1358 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1359 { | 1359 { |
| 1360 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1360 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1361 TestObjectV8Internal::float32ArrayAttributeAttributeGetter(info); | 1361 TestObjectV8Internal::float32ArrayAttributeAttributeGetter(info); |
| 1362 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1362 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1363 } | 1363 } |
| 1364 | 1364 |
| 1365 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1365 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1366 { | 1366 { |
| 1367 v8::Local<v8::Object> holder = info.Holder(); | 1367 v8::Local<v8::Object> holder = info.Holder(); |
| 1368 TestObject* impl = V8TestObject::toImpl(holder); | 1368 TestObject* impl = V8TestObject::toImpl(holder); |
| 1369 DOMFloat32Array* cppValue = v8Value->IsFloat32Array() ? V8Float32Array::toIm
pl(v8::Local<v8::Float32Array>::Cast(v8Value)) : 0; | 1369 DOMFloat32Array* cppValue = v8Value->IsFloat32Array() ? V8Float32Array::toIm
pl(v8::Local<v8::Float32Array>::Cast(v8Value)) : 0; |
| 1370 impl->setFloat32ArrayAttribute(WTF::getPtr(cppValue)); | 1370 impl->setFloat32ArrayAttribute(WTF::getPtr(cppValue)); |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1373 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1374 { | 1374 { |
| 1375 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1375 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1376 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info); | 1376 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info); |
| 1377 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1377 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1378 } | 1378 } |
| 1379 | 1379 |
| 1380 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1380 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1381 { | 1381 { |
| 1382 v8::Local<v8::Object> holder = info.Holder(); | 1382 v8::Local<v8::Object> holder = info.Holder(); |
| 1383 TestObject* impl = V8TestObject::toImpl(holder); | 1383 TestObject* impl = V8TestObject::toImpl(holder); |
| 1384 v8SetReturnValueFast(info, WTF::getPtr(impl->uint8ArrayAttribute()), impl); | 1384 v8SetReturnValueFast(info, WTF::getPtr(impl->uint8ArrayAttribute()), impl); |
| 1385 } | 1385 } |
| 1386 | 1386 |
| 1387 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1387 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1388 { | 1388 { |
| 1389 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1389 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1390 TestObjectV8Internal::uint8ArrayAttributeAttributeGetter(info); | 1390 TestObjectV8Internal::uint8ArrayAttributeAttributeGetter(info); |
| 1391 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1391 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1392 } | 1392 } |
| 1393 | 1393 |
| 1394 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1394 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 1395 { | 1395 { |
| 1396 v8::Local<v8::Object> holder = info.Holder(); | 1396 v8::Local<v8::Object> holder = info.Holder(); |
| 1397 TestObject* impl = V8TestObject::toImpl(holder); | 1397 TestObject* impl = V8TestObject::toImpl(holder); |
| 1398 DOMUint8Array* cppValue = v8Value->IsUint8Array() ? V8Uint8Array::toImpl(v8:
:Local<v8::Uint8Array>::Cast(v8Value)) : 0; | 1398 DOMUint8Array* cppValue = v8Value->IsUint8Array() ? V8Uint8Array::toImpl(v8:
:Local<v8::Uint8Array>::Cast(v8Value)) : 0; |
| 1399 impl->setUint8ArrayAttribute(WTF::getPtr(cppValue)); | 1399 impl->setUint8ArrayAttribute(WTF::getPtr(cppValue)); |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1402 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1403 { | 1403 { |
| 1404 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1404 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1405 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info); | 1405 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info); |
| 1406 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1406 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1407 } | 1407 } |
| 1408 | 1408 |
| 1409 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 1409 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1410 { | 1410 { |
| 1411 v8::Local<v8::Object> holder = info.Holder(); | 1411 v8::Local<v8::Object> holder = info.Holder(); |
| 1412 TestObject* impl = V8TestObject::toImpl(holder); | 1412 TestObject* impl = V8TestObject::toImpl(holder); |
| 1413 v8SetReturnValueFast(info, WTF::getPtr(impl->self()), impl); | 1413 v8SetReturnValueFast(info, WTF::getPtr(impl->self()), impl); |
| 1414 } | 1414 } |
| 1415 | 1415 |
| 1416 static void selfAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 1416 static void selfAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyC
allbackInfo<v8::Value>& info) |
| 1417 { | 1417 { |
| 1418 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1418 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1419 TestObjectV8Internal::selfAttributeGetter(info); | 1419 TestObjectV8Internal::selfAttributeGetter(info); |
| 1420 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1420 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1421 } | 1421 } |
| 1422 | 1422 |
| 1423 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 1423 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 1424 { | 1424 { |
| 1425 v8::Local<v8::Object> holder = info.Holder(); | 1425 v8::Local<v8::Object> holder = info.Holder(); |
| 1426 TestObject* impl = V8TestObject::toImpl(holder); | 1426 TestObject* impl = V8TestObject::toImpl(holder); |
| 1427 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetAttribute())
, impl); | 1427 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetAttribute())
, impl); |
| 1428 } | 1428 } |
| 1429 | 1429 |
| 1430 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1430 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::Na
me>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1431 { | 1431 { |
| 1432 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1432 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1433 TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetter(info); | 1433 TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetter(info); |
| 1434 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1434 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1435 } | 1435 } |
| 1436 | 1436 |
| 1437 static void readonlyEventTargetOrNullAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 1437 static void readonlyEventTargetOrNullAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
| 1438 { | 1438 { |
| 1439 v8::Local<v8::Object> holder = info.Holder(); | 1439 v8::Local<v8::Object> holder = info.Holder(); |
| 1440 TestObject* impl = V8TestObject::toImpl(holder); | 1440 TestObject* impl = V8TestObject::toImpl(holder); |
| 1441 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetOrNullAttrib
ute()), impl); | 1441 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetOrNullAttrib
ute()), impl); |
| 1442 } | 1442 } |
| 1443 | 1443 |
| 1444 static void readonlyEventTargetOrNullAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1444 static void readonlyEventTargetOrNullAttributeAttributeGetterCallback(v8::Local<
v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1445 { | 1445 { |
| 1446 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1446 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1447 TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetter(info
); | 1447 TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetter(info
); |
| 1448 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1448 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1449 } | 1449 } |
| 1450 | 1450 |
| 1451 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1451 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 1452 { | 1452 { |
| 1453 v8::Local<v8::Object> holder = info.Holder(); | 1453 v8::Local<v8::Object> holder = info.Holder(); |
| 1454 TestObject* impl = V8TestObject::toImpl(holder); | 1454 TestObject* impl = V8TestObject::toImpl(holder); |
| 1455 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyWindowAttribute()), imp
l); | 1455 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyWindowAttribute()), imp
l); |
| 1456 } | 1456 } |
| 1457 | 1457 |
| 1458 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1458 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1459 { | 1459 { |
| 1460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1461 TestObjectV8Internal::readonlyWindowAttributeAttributeGetter(info); | 1461 TestObjectV8Internal::readonlyWindowAttributeAttributeGetter(info); |
| 1462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1463 } | 1463 } |
| 1464 | 1464 |
| 1465 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1465 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 1466 { | 1466 { |
| 1467 v8::Local<v8::Object> holder = info.Holder(); | 1467 v8::Local<v8::Object> holder = info.Holder(); |
| 1468 TestObject* impl = V8TestObject::toImpl(holder); | 1468 TestObject* impl = V8TestObject::toImpl(holder); |
| 1469 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlCollectionAttribute()), imp
l); | 1469 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlCollectionAttribute()), imp
l); |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1472 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1473 { | 1473 { |
| 1474 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1474 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1475 TestObjectV8Internal::htmlCollectionAttributeAttributeGetter(info); | 1475 TestObjectV8Internal::htmlCollectionAttributeAttributeGetter(info); |
| 1476 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1476 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1477 } | 1477 } |
| 1478 | 1478 |
| 1479 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1479 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 1480 { | 1480 { |
| 1481 v8::Local<v8::Object> holder = info.Holder(); | 1481 v8::Local<v8::Object> holder = info.Holder(); |
| 1482 TestObject* impl = V8TestObject::toImpl(holder); | 1482 TestObject* impl = V8TestObject::toImpl(holder); |
| 1483 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlElementAttribute()), impl); | 1483 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlElementAttribute()), impl); |
| 1484 } | 1484 } |
| 1485 | 1485 |
| 1486 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1486 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 1487 { | 1487 { |
| 1488 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1488 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1489 TestObjectV8Internal::htmlElementAttributeAttributeGetter(info); | 1489 TestObjectV8Internal::htmlElementAttributeAttributeGetter(info); |
| 1490 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1490 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1491 } | 1491 } |
| 1492 | 1492 |
| 1493 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1493 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 1494 { | 1494 { |
| 1495 v8::Local<v8::Object> holder = info.Holder(); | 1495 v8::Local<v8::Object> holder = info.Holder(); |
| 1496 TestObject* impl = V8TestObject::toImpl(holder); | 1496 TestObject* impl = V8TestObject::toImpl(holder); |
| 1497 v8SetReturnValue(info, toV8(impl->stringArrayAttribute(), info.Holder(), inf
o.GetIsolate())); | 1497 v8SetReturnValue(info, toV8(impl->stringArrayAttribute(), info.Holder(), inf
o.GetIsolate())); |
| 1498 } | 1498 } |
| 1499 | 1499 |
| 1500 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1500 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 1501 { | 1501 { |
| 1502 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1502 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1503 TestObjectV8Internal::stringArrayAttributeAttributeGetter(info); | 1503 TestObjectV8Internal::stringArrayAttributeAttributeGetter(info); |
| 1504 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1504 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1505 } | 1505 } |
| 1506 | 1506 |
| 1507 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 1507 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 1508 { | 1508 { |
| 1509 v8::Local<v8::Object> holder = info.Holder(); | 1509 v8::Local<v8::Object> holder = info.Holder(); |
| 1510 ExceptionState exceptionState(ExceptionState::SetterContext, "stringArrayAtt
ribute", "TestObject", holder, info.GetIsolate()); | 1510 ExceptionState exceptionState(ExceptionState::SetterContext, "stringArrayAtt
ribute", "TestObject", holder, info.GetIsolate()); |
| 1511 TestObject* impl = V8TestObject::toImpl(holder); | 1511 TestObject* impl = V8TestObject::toImpl(holder); |
| 1512 Vector<String> cppValue = toImplArray<String>(v8Value, 0, info.GetIsolate(),
exceptionState); | 1512 Vector<String> cppValue = toImplArray<String>(v8Value, 0, info.GetIsolate(),
exceptionState); |
| 1513 if (exceptionState.throwIfNeeded()) | 1513 if (exceptionState.throwIfNeeded()) |
| 1514 return; | 1514 return; |
| 1515 impl->setStringArrayAttribute(cppValue); | 1515 impl->setStringArrayAttribute(cppValue); |
| 1516 } | 1516 } |
| 1517 | 1517 |
| 1518 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1518 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1519 { | 1519 { |
| 1520 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1520 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1521 TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info); | 1521 TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info); |
| 1522 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1522 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1523 } | 1523 } |
| 1524 | 1524 |
| 1525 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 1525 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 1526 { | 1526 { |
| 1527 v8::Local<v8::Object> holder = info.Holder(); | 1527 v8::Local<v8::Object> holder = info.Holder(); |
| 1528 TestObject* impl = V8TestObject::toImpl(holder); | 1528 TestObject* impl = V8TestObject::toImpl(holder); |
| 1529 v8SetReturnValue(info, toV8(impl->testInterfaceEmptyArrayAttribute(), info.H
older(), info.GetIsolate())); | 1529 v8SetReturnValue(info, toV8(impl->testInterfaceEmptyArrayAttribute(), info.H
older(), info.GetIsolate())); |
| 1530 } | 1530 } |
| 1531 | 1531 |
| 1532 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1532 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8
::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1533 { | 1533 { |
| 1534 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1534 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1535 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info); | 1535 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info); |
| 1536 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1536 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1537 } | 1537 } |
| 1538 | 1538 |
| 1539 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 1539 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1540 { | 1540 { |
| 1541 v8::Local<v8::Object> holder = info.Holder(); | 1541 v8::Local<v8::Object> holder = info.Holder(); |
| 1542 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyArrayAttribute", "TestObject", holder, info.GetIsolate()); | 1542 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceE
mptyArrayAttribute", "TestObject", holder, info.GetIsolate()); |
| 1543 TestObject* impl = V8TestObject::toImpl(holder); | 1543 TestObject* impl = V8TestObject::toImpl(holder); |
| 1544 Vector<RefPtr<TestInterfaceEmpty>> cppValue = (toRefPtrNativeArray<TestInter
faceEmpty, V8TestInterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState))
; | 1544 Vector<RefPtr<TestInterfaceEmpty>> cppValue = (toRefPtrNativeArray<TestInter
faceEmpty, V8TestInterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState))
; |
| 1545 if (exceptionState.throwIfNeeded()) | 1545 if (exceptionState.throwIfNeeded()) |
| 1546 return; | 1546 return; |
| 1547 impl->setTestInterfaceEmptyArrayAttribute(cppValue); | 1547 impl->setTestInterfaceEmptyArrayAttribute(cppValue); |
| 1548 } | 1548 } |
| 1549 | 1549 |
| 1550 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 1550 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8
::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 1551 { | 1551 { |
| 1552 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1552 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1553 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Valu
e, info); | 1553 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Valu
e, info); |
| 1554 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1554 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1555 } | 1555 } |
| 1556 | 1556 |
| 1557 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1557 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1558 { | 1558 { |
| 1559 v8::Local<v8::Object> holder = info.Holder(); | 1559 v8::Local<v8::Object> holder = info.Holder(); |
| 1560 TestObject* impl = V8TestObject::toImpl(holder); | 1560 TestObject* impl = V8TestObject::toImpl(holder); |
| 1561 v8SetReturnValue(info, toV8(impl->floatArrayAttribute(), info.Holder(), info
.GetIsolate())); | 1561 v8SetReturnValue(info, toV8(impl->floatArrayAttribute(), info.Holder(), info
.GetIsolate())); |
| 1562 } | 1562 } |
| 1563 | 1563 |
| 1564 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1564 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1565 { | 1565 { |
| 1566 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1566 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1567 TestObjectV8Internal::floatArrayAttributeAttributeGetter(info); | 1567 TestObjectV8Internal::floatArrayAttributeAttributeGetter(info); |
| 1568 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1568 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1569 } | 1569 } |
| 1570 | 1570 |
| 1571 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1571 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 1572 { | 1572 { |
| 1573 v8::Local<v8::Object> holder = info.Holder(); | 1573 v8::Local<v8::Object> holder = info.Holder(); |
| 1574 ExceptionState exceptionState(ExceptionState::SetterContext, "floatArrayAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1574 ExceptionState exceptionState(ExceptionState::SetterContext, "floatArrayAttr
ibute", "TestObject", holder, info.GetIsolate()); |
| 1575 TestObject* impl = V8TestObject::toImpl(holder); | 1575 TestObject* impl = V8TestObject::toImpl(holder); |
| 1576 Vector<float> cppValue = toImplArray<float>(v8Value, 0, info.GetIsolate(), e
xceptionState); | 1576 Vector<float> cppValue = toImplArray<float>(v8Value, 0, info.GetIsolate(), e
xceptionState); |
| 1577 if (exceptionState.throwIfNeeded()) | 1577 if (exceptionState.throwIfNeeded()) |
| 1578 return; | 1578 return; |
| 1579 impl->setFloatArrayAttribute(cppValue); | 1579 impl->setFloatArrayAttribute(cppValue); |
| 1580 } | 1580 } |
| 1581 | 1581 |
| 1582 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1582 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1583 { | 1583 { |
| 1584 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1584 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1585 TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info); | 1585 TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info); |
| 1586 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1586 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1587 } | 1587 } |
| 1588 | 1588 |
| 1589 static void stringOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1589 static void stringOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1590 { | 1590 { |
| 1591 v8::Local<v8::Object> holder = info.Holder(); | 1591 v8::Local<v8::Object> holder = info.Holder(); |
| 1592 TestObject* impl = V8TestObject::toImpl(holder); | 1592 TestObject* impl = V8TestObject::toImpl(holder); |
| 1593 v8SetReturnValueStringOrNull(info, impl->stringOrNullAttribute(), info.GetIs
olate()); | 1593 v8SetReturnValueStringOrNull(info, impl->stringOrNullAttribute(), info.GetIs
olate()); |
| 1594 } | 1594 } |
| 1595 | 1595 |
| 1596 static void stringOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1596 static void stringOrNullAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1597 { | 1597 { |
| 1598 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1598 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1599 TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info); | 1599 TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info); |
| 1600 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1600 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1601 } | 1601 } |
| 1602 | 1602 |
| 1603 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1603 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1604 { | 1604 { |
| 1605 v8::Local<v8::Object> holder = info.Holder(); | 1605 v8::Local<v8::Object> holder = info.Holder(); |
| 1606 TestObject* impl = V8TestObject::toImpl(holder); | 1606 TestObject* impl = V8TestObject::toImpl(holder); |
| 1607 V8StringResource<TreatNullAsNullString> cppValue = v8Value; | 1607 V8StringResource<TreatNullAsNullString> cppValue = v8Value; |
| 1608 if (!cppValue.prepare()) | 1608 if (!cppValue.prepare()) |
| 1609 return; | 1609 return; |
| 1610 impl->setStringOrNullAttribute(cppValue); | 1610 impl->setStringOrNullAttribute(cppValue); |
| 1611 } | 1611 } |
| 1612 | 1612 |
| 1613 static void stringOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1613 static void stringOrNullAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1614 { | 1614 { |
| 1615 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1615 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1616 TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info); | 1616 TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info); |
| 1617 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1617 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1618 } | 1618 } |
| 1619 | 1619 |
| 1620 static void longOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1620 static void longOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1621 { | 1621 { |
| 1622 v8::Local<v8::Object> holder = info.Holder(); | 1622 v8::Local<v8::Object> holder = info.Holder(); |
| 1623 TestObject* impl = V8TestObject::toImpl(holder); | 1623 TestObject* impl = V8TestObject::toImpl(holder); |
| 1624 bool isNull = false; | 1624 bool isNull = false; |
| 1625 int cppValue(impl->longOrNullAttribute(isNull)); | 1625 int cppValue(impl->longOrNullAttribute(isNull)); |
| 1626 if (isNull) { | 1626 if (isNull) { |
| 1627 v8SetReturnValueNull(info); | 1627 v8SetReturnValueNull(info); |
| 1628 return; | 1628 return; |
| 1629 } | 1629 } |
| 1630 v8SetReturnValueInt(info, cppValue); | 1630 v8SetReturnValueInt(info, cppValue); |
| 1631 } | 1631 } |
| 1632 | 1632 |
| 1633 static void longOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1633 static void longOrNullAttributeAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1634 { | 1634 { |
| 1635 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1635 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1636 TestObjectV8Internal::longOrNullAttributeAttributeGetter(info); | 1636 TestObjectV8Internal::longOrNullAttributeAttributeGetter(info); |
| 1637 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1637 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1638 } | 1638 } |
| 1639 | 1639 |
| 1640 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1640 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 1641 { | 1641 { |
| 1642 v8::Local<v8::Object> holder = info.Holder(); | 1642 v8::Local<v8::Object> holder = info.Holder(); |
| 1643 ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1643 ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttr
ibute", "TestObject", holder, info.GetIsolate()); |
| 1644 TestObject* impl = V8TestObject::toImpl(holder); | 1644 TestObject* impl = V8TestObject::toImpl(holder); |
| 1645 int cppValue = toInt32(v8Value, exceptionState); | 1645 int cppValue = toInt32(v8Value, exceptionState); |
| 1646 if (exceptionState.throwIfNeeded()) | 1646 if (exceptionState.throwIfNeeded()) |
| 1647 return; | 1647 return; |
| 1648 impl->setLongOrNullAttribute(cppValue); | 1648 impl->setLongOrNullAttribute(cppValue); |
| 1649 } | 1649 } |
| 1650 | 1650 |
| 1651 static void longOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1651 static void longOrNullAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1652 { | 1652 { |
| 1653 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1653 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1654 TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info); | 1654 TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info); |
| 1655 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1655 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1656 } | 1656 } |
| 1657 | 1657 |
| 1658 static void testInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 1658 static void testInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 1659 { | 1659 { |
| 1660 v8::Local<v8::Object> holder = info.Holder(); | 1660 v8::Local<v8::Object> holder = info.Holder(); |
| 1661 TestObject* impl = V8TestObject::toImpl(holder); | 1661 TestObject* impl = V8TestObject::toImpl(holder); |
| 1662 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceOrNullAttribute())
, impl); | 1662 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceOrNullAttribute())
, impl); |
| 1663 } | 1663 } |
| 1664 | 1664 |
| 1665 static void testInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1665 static void testInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::Na
me>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1666 { | 1666 { |
| 1667 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1667 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1668 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetter(info); | 1668 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetter(info); |
| 1669 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1669 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1670 } | 1670 } |
| 1671 | 1671 |
| 1672 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | 1672 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 1673 { | 1673 { |
| 1674 v8::Local<v8::Object> holder = info.Holder(); | 1674 v8::Local<v8::Object> holder = info.Holder(); |
| 1675 TestObject* impl = V8TestObject::toImpl(holder); | 1675 TestObject* impl = V8TestObject::toImpl(holder); |
| 1676 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 1676 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 1677 impl->setTestInterfaceOrNullAttribute(WTF::getPtr(cppValue)); | 1677 impl->setTestInterfaceOrNullAttribute(WTF::getPtr(cppValue)); |
| 1678 } | 1678 } |
| 1679 | 1679 |
| 1680 static void testInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1680 static void testInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::Na
me>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1681 { | 1681 { |
| 1682 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1682 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1683 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, i
nfo); | 1683 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, i
nfo); |
| 1684 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1684 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1685 } | 1685 } |
| 1686 | 1686 |
| 1687 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 1687 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 1688 { | 1688 { |
| 1689 v8::Local<v8::Object> holder = info.Holder(); | 1689 v8::Local<v8::Object> holder = info.Holder(); |
| 1690 TestObject* impl = V8TestObject::toImpl(holder); | 1690 TestObject* impl = V8TestObject::toImpl(holder); |
| 1691 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); | 1691 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); |
| 1692 } | 1692 } |
| 1693 | 1693 |
| 1694 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 1694 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::Name>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1695 { | 1695 { |
| 1696 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1696 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1697 TestObjectV8Internal::testEnumAttributeAttributeGetter(info); | 1697 TestObjectV8Internal::testEnumAttributeAttributeGetter(info); |
| 1698 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1698 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1699 } | 1699 } |
| 1700 | 1700 |
| 1701 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 1701 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 1702 { | 1702 { |
| 1703 v8::Local<v8::Object> holder = info.Holder(); | 1703 v8::Local<v8::Object> holder = info.Holder(); |
| 1704 TestObject* impl = V8TestObject::toImpl(holder); | 1704 TestObject* impl = V8TestObject::toImpl(holder); |
| 1705 V8StringResource<> cppValue = v8Value; | 1705 V8StringResource<> cppValue = v8Value; |
| 1706 if (!cppValue.prepare()) | 1706 if (!cppValue.prepare()) |
| 1707 return; | 1707 return; |
| 1708 String string = cppValue; | 1708 String string = cppValue; |
| 1709 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 1709 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
| 1710 return; | 1710 return; |
| 1711 impl->setTestEnumAttribute(cppValue); | 1711 impl->setTestEnumAttribute(cppValue); |
| 1712 } | 1712 } |
| 1713 | 1713 |
| 1714 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1714 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1715 { | 1715 { |
| 1716 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1716 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1717 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info); | 1717 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info); |
| 1718 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1718 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1719 } | 1719 } |
| 1720 | 1720 |
| 1721 static void testEnumOrNullAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1721 static void testEnumOrNullAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 1722 { | 1722 { |
| 1723 v8::Local<v8::Object> holder = info.Holder(); | 1723 v8::Local<v8::Object> holder = info.Holder(); |
| 1724 TestObject* impl = V8TestObject::toImpl(holder); | 1724 TestObject* impl = V8TestObject::toImpl(holder); |
| 1725 v8SetReturnValueStringOrNull(info, impl->testEnumOrNullAttribute(), info.Get
Isolate()); | 1725 v8SetReturnValueStringOrNull(info, impl->testEnumOrNullAttribute(), info.Get
Isolate()); |
| 1726 } | 1726 } |
| 1727 | 1727 |
| 1728 static void testEnumOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1728 static void testEnumOrNullAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1729 { | 1729 { |
| 1730 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1730 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1731 TestObjectV8Internal::testEnumOrNullAttributeAttributeGetter(info); | 1731 TestObjectV8Internal::testEnumOrNullAttributeAttributeGetter(info); |
| 1732 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1732 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1733 } | 1733 } |
| 1734 | 1734 |
| 1735 static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 1735 static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 1736 { | 1736 { |
| 1737 v8::Local<v8::Object> holder = info.Holder(); | 1737 v8::Local<v8::Object> holder = info.Holder(); |
| 1738 TestObject* impl = V8TestObject::toImpl(holder); | 1738 TestObject* impl = V8TestObject::toImpl(holder); |
| 1739 V8StringResource<TreatNullAsNullString> cppValue = v8Value; | 1739 V8StringResource<TreatNullAsNullString> cppValue = v8Value; |
| 1740 if (!cppValue.prepare()) | 1740 if (!cppValue.prepare()) |
| 1741 return; | 1741 return; |
| 1742 String string = cppValue; | 1742 String string = cppValue; |
| 1743 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 1743 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
| 1744 return; | 1744 return; |
| 1745 impl->setTestEnumOrNullAttribute(cppValue); | 1745 impl->setTestEnumOrNullAttribute(cppValue); |
| 1746 } | 1746 } |
| 1747 | 1747 |
| 1748 static void testEnumOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1748 static void testEnumOrNullAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1749 { | 1749 { |
| 1750 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1750 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1751 TestObjectV8Internal::testEnumOrNullAttributeAttributeSetter(v8Value, info); | 1751 TestObjectV8Internal::testEnumOrNullAttributeAttributeSetter(v8Value, info); |
| 1752 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1752 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1755 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1756 { | 1756 { |
| 1757 v8SetReturnValueString(info, TestObject::staticStringAttribute(), info.GetIs
olate()); | 1757 v8SetReturnValueString(info, TestObject::staticStringAttribute(), info.GetIs
olate()); |
| 1758 } | 1758 } |
| 1759 | 1759 |
| 1760 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1760 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1761 { | 1761 { |
| 1762 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1762 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1763 TestObjectV8Internal::staticStringAttributeAttributeGetter(info); | 1763 TestObjectV8Internal::staticStringAttributeAttributeGetter(info); |
| 1764 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1764 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1765 } | 1765 } |
| 1766 | 1766 |
| 1767 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1767 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1768 { | 1768 { |
| 1769 V8StringResource<> cppValue = v8Value; | 1769 V8StringResource<> cppValue = v8Value; |
| 1770 if (!cppValue.prepare()) | 1770 if (!cppValue.prepare()) |
| 1771 return; | 1771 return; |
| 1772 TestObject::setStaticStringAttribute(cppValue); | 1772 TestObject::setStaticStringAttribute(cppValue); |
| 1773 } | 1773 } |
| 1774 | 1774 |
| 1775 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1775 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1776 { | 1776 { |
| 1777 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1777 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1778 TestObjectV8Internal::staticStringAttributeAttributeSetter(v8Value, info); | 1778 TestObjectV8Internal::staticStringAttributeAttributeSetter(v8Value, info); |
| 1779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1780 } | 1780 } |
| 1781 | 1781 |
| 1782 static void staticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1782 static void staticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1783 { | 1783 { |
| 1784 v8SetReturnValueInt(info, TestObject::staticLongAttribute()); | 1784 v8SetReturnValueInt(info, TestObject::staticLongAttribute()); |
| 1785 } | 1785 } |
| 1786 | 1786 |
| 1787 static void staticLongAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1787 static void staticLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1788 { | 1788 { |
| 1789 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1789 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1790 TestObjectV8Internal::staticLongAttributeAttributeGetter(info); | 1790 TestObjectV8Internal::staticLongAttributeAttributeGetter(info); |
| 1791 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1791 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1792 } | 1792 } |
| 1793 | 1793 |
| 1794 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1794 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 1795 { | 1795 { |
| 1796 ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1796 ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttr
ibute", "TestObject", holder, info.GetIsolate()); |
| 1797 int cppValue = toInt32(v8Value, exceptionState); | 1797 int cppValue = toInt32(v8Value, exceptionState); |
| 1798 if (exceptionState.throwIfNeeded()) | 1798 if (exceptionState.throwIfNeeded()) |
| 1799 return; | 1799 return; |
| 1800 TestObject::setStaticLongAttribute(cppValue); | 1800 TestObject::setStaticLongAttribute(cppValue); |
| 1801 } | 1801 } |
| 1802 | 1802 |
| 1803 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1803 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1804 { | 1804 { |
| 1805 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1805 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1806 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info); | 1806 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info); |
| 1807 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1807 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1808 } | 1808 } |
| 1809 | 1809 |
| 1810 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1810 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1811 { | 1811 { |
| 1812 v8::Local<v8::Object> holder = info.Holder(); | 1812 v8::Local<v8::Object> holder = info.Holder(); |
| 1813 TestObject* impl = V8TestObject::toImpl(holder); | 1813 TestObject* impl = V8TestObject::toImpl(holder); |
| 1814 EventListener* cppValue(impl->eventHandlerAttribute()); | 1814 EventListener* cppValue(impl->eventHandlerAttribute()); |
| 1815 v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListen
er::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Local<v8:
:Value>(v8::Null(info.GetIsolate()))); | 1815 v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListen
er::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Local<v8:
:Value>(v8::Null(info.GetIsolate()))); |
| 1816 } | 1816 } |
| 1817 | 1817 |
| 1818 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1818 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1819 { | 1819 { |
| 1820 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1820 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1821 TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info); | 1821 TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info); |
| 1822 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1822 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1823 } | 1823 } |
| 1824 | 1824 |
| 1825 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1825 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1826 { | 1826 { |
| 1827 v8::Local<v8::Object> holder = info.Holder(); | 1827 v8::Local<v8::Object> holder = info.Holder(); |
| 1828 TestObject* impl = V8TestObject::toImpl(holder); | 1828 TestObject* impl = V8TestObject::toImpl(holder); |
| 1829 moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->eventHandlerA
ttribute(), v8Value, V8TestObject::eventListenerCacheIndex); | 1829 moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->eventHandlerA
ttribute(), v8Value, V8TestObject::eventListenerCacheIndex); |
| 1830 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS
tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)); | 1830 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS
tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)); |
| 1831 } | 1831 } |
| 1832 | 1832 |
| 1833 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1833 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1834 { | 1834 { |
| 1835 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1835 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1836 TestObjectV8Internal::eventHandlerAttributeAttributeSetter(v8Value, info); | 1836 TestObjectV8Internal::eventHandlerAttributeAttributeSetter(v8Value, info); |
| 1837 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1837 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1838 } | 1838 } |
| 1839 | 1839 |
| 1840 static void doubleOrStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1840 static void doubleOrStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 1841 { | 1841 { |
| 1842 v8::Local<v8::Object> holder = info.Holder(); | 1842 v8::Local<v8::Object> holder = info.Holder(); |
| 1843 TestObject* impl = V8TestObject::toImpl(holder); | 1843 TestObject* impl = V8TestObject::toImpl(holder); |
| 1844 DoubleOrString result; | 1844 DoubleOrString result; |
| 1845 impl->doubleOrStringAttribute(result); | 1845 impl->doubleOrStringAttribute(result); |
| 1846 v8SetReturnValue(info, result); | 1846 v8SetReturnValue(info, result); |
| 1847 } | 1847 } |
| 1848 | 1848 |
| 1849 static void doubleOrStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1849 static void doubleOrStringAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1850 { | 1850 { |
| 1851 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1851 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1852 TestObjectV8Internal::doubleOrStringAttributeAttributeGetter(info); | 1852 TestObjectV8Internal::doubleOrStringAttributeAttributeGetter(info); |
| 1853 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1853 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1854 } | 1854 } |
| 1855 | 1855 |
| 1856 static void doubleOrStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 1856 static void doubleOrStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 1857 { | 1857 { |
| 1858 v8::Local<v8::Object> holder = info.Holder(); | 1858 v8::Local<v8::Object> holder = info.Holder(); |
| 1859 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrString
Attribute", "TestObject", holder, info.GetIsolate()); | 1859 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrString
Attribute", "TestObject", holder, info.GetIsolate()); |
| 1860 TestObject* impl = V8TestObject::toImpl(holder); | 1860 TestObject* impl = V8TestObject::toImpl(holder); |
| 1861 DoubleOrString cppValue; | 1861 DoubleOrString cppValue; |
| 1862 V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, exceptionStat
e); | 1862 V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, exceptionStat
e); |
| 1863 if (exceptionState.throwIfNeeded()) | 1863 if (exceptionState.throwIfNeeded()) |
| 1864 return; | 1864 return; |
| 1865 impl->setDoubleOrStringAttribute(cppValue); | 1865 impl->setDoubleOrStringAttribute(cppValue); |
| 1866 } | 1866 } |
| 1867 | 1867 |
| 1868 static void doubleOrStringAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1868 static void doubleOrStringAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1869 { | 1869 { |
| 1870 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1870 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1871 TestObjectV8Internal::doubleOrStringAttributeAttributeSetter(v8Value, info); | 1871 TestObjectV8Internal::doubleOrStringAttributeAttributeSetter(v8Value, info); |
| 1872 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1872 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1873 } | 1873 } |
| 1874 | 1874 |
| 1875 static void doubleOrStringOrNullAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1875 static void doubleOrStringOrNullAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 1876 { | 1876 { |
| 1877 v8::Local<v8::Object> holder = info.Holder(); | 1877 v8::Local<v8::Object> holder = info.Holder(); |
| 1878 TestObject* impl = V8TestObject::toImpl(holder); | 1878 TestObject* impl = V8TestObject::toImpl(holder); |
| 1879 DoubleOrString result; | 1879 DoubleOrString result; |
| 1880 impl->doubleOrStringOrNullAttribute(result); | 1880 impl->doubleOrStringOrNullAttribute(result); |
| 1881 v8SetReturnValue(info, result); | 1881 v8SetReturnValue(info, result); |
| 1882 } | 1882 } |
| 1883 | 1883 |
| 1884 static void doubleOrStringOrNullAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1884 static void doubleOrStringOrNullAttributeAttributeGetterCallback(v8::Local<v8::N
ame>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1885 { | 1885 { |
| 1886 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1886 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1887 TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeGetter(info); | 1887 TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeGetter(info); |
| 1888 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1888 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1889 } | 1889 } |
| 1890 | 1890 |
| 1891 static void doubleOrStringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | 1891 static void doubleOrStringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 1892 { | 1892 { |
| 1893 v8::Local<v8::Object> holder = info.Holder(); | 1893 v8::Local<v8::Object> holder = info.Holder(); |
| 1894 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrString
OrNullAttribute", "TestObject", holder, info.GetIsolate()); | 1894 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrString
OrNullAttribute", "TestObject", holder, info.GetIsolate()); |
| 1895 TestObject* impl = V8TestObject::toImpl(holder); | 1895 TestObject* impl = V8TestObject::toImpl(holder); |
| 1896 DoubleOrString cppValue; | 1896 DoubleOrString cppValue; |
| 1897 V8DoubleOrStringOrNull::toImpl(info.GetIsolate(), v8Value, cppValue, excepti
onState); | 1897 V8DoubleOrStringOrNull::toImpl(info.GetIsolate(), v8Value, cppValue, excepti
onState); |
| 1898 if (exceptionState.throwIfNeeded()) | 1898 if (exceptionState.throwIfNeeded()) |
| 1899 return; | 1899 return; |
| 1900 impl->setDoubleOrStringOrNullAttribute(cppValue); | 1900 impl->setDoubleOrStringOrNullAttribute(cppValue); |
| 1901 } | 1901 } |
| 1902 | 1902 |
| 1903 static void doubleOrStringOrNullAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 1903 static void doubleOrStringOrNullAttributeAttributeSetterCallback(v8::Local<v8::N
ame>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1904 { | 1904 { |
| 1905 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1905 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1906 TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeSetter(v8Value,
info); | 1906 TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeSetter(v8Value,
info); |
| 1907 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1907 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1908 } | 1908 } |
| 1909 | 1909 |
| 1910 static void doubleOrNullStringAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1910 static void doubleOrNullStringAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 1911 { | 1911 { |
| 1912 v8::Local<v8::Object> holder = info.Holder(); | 1912 v8::Local<v8::Object> holder = info.Holder(); |
| 1913 TestObject* impl = V8TestObject::toImpl(holder); | 1913 TestObject* impl = V8TestObject::toImpl(holder); |
| 1914 DoubleOrString result; | 1914 DoubleOrString result; |
| 1915 impl->doubleOrNullStringAttribute(result); | 1915 impl->doubleOrNullStringAttribute(result); |
| 1916 v8SetReturnValue(info, result); | 1916 v8SetReturnValue(info, result); |
| 1917 } | 1917 } |
| 1918 | 1918 |
| 1919 static void doubleOrNullStringAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1919 static void doubleOrNullStringAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1920 { | 1920 { |
| 1921 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1921 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1922 TestObjectV8Internal::doubleOrNullStringAttributeAttributeGetter(info); | 1922 TestObjectV8Internal::doubleOrNullStringAttributeAttributeGetter(info); |
| 1923 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1923 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1924 } | 1924 } |
| 1925 | 1925 |
| 1926 static void doubleOrNullStringAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 1926 static void doubleOrNullStringAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 1927 { | 1927 { |
| 1928 v8::Local<v8::Object> holder = info.Holder(); | 1928 v8::Local<v8::Object> holder = info.Holder(); |
| 1929 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrNullSt
ringAttribute", "TestObject", holder, info.GetIsolate()); | 1929 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrNullSt
ringAttribute", "TestObject", holder, info.GetIsolate()); |
| 1930 TestObject* impl = V8TestObject::toImpl(holder); | 1930 TestObject* impl = V8TestObject::toImpl(holder); |
| 1931 DoubleOrString cppValue; | 1931 DoubleOrString cppValue; |
| 1932 V8DoubleOrStringOrNull::toImpl(info.GetIsolate(), v8Value, cppValue, excepti
onState); | 1932 V8DoubleOrStringOrNull::toImpl(info.GetIsolate(), v8Value, cppValue, excepti
onState); |
| 1933 if (exceptionState.throwIfNeeded()) | 1933 if (exceptionState.throwIfNeeded()) |
| 1934 return; | 1934 return; |
| 1935 impl->setDoubleOrNullStringAttribute(cppValue); | 1935 impl->setDoubleOrNullStringAttribute(cppValue); |
| 1936 } | 1936 } |
| 1937 | 1937 |
| 1938 static void doubleOrNullStringAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1938 static void doubleOrNullStringAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1939 { | 1939 { |
| 1940 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1940 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1941 TestObjectV8Internal::doubleOrNullStringAttributeAttributeSetter(v8Value, in
fo); | 1941 TestObjectV8Internal::doubleOrNullStringAttributeAttributeSetter(v8Value, in
fo); |
| 1942 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1942 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1943 } | 1943 } |
| 1944 | 1944 |
| 1945 static void stringOrStringSequenceAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 1945 static void stringOrStringSequenceAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 1946 { | 1946 { |
| 1947 v8::Local<v8::Object> holder = info.Holder(); | 1947 v8::Local<v8::Object> holder = info.Holder(); |
| 1948 TestObject* impl = V8TestObject::toImpl(holder); | 1948 TestObject* impl = V8TestObject::toImpl(holder); |
| 1949 StringOrStringSequence result; | 1949 StringOrStringSequence result; |
| 1950 impl->stringOrStringSequenceAttribute(result); | 1950 impl->stringOrStringSequenceAttribute(result); |
| 1951 v8SetReturnValue(info, result); | 1951 v8SetReturnValue(info, result); |
| 1952 } | 1952 } |
| 1953 | 1953 |
| 1954 static void stringOrStringSequenceAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1954 static void stringOrStringSequenceAttributeAttributeGetterCallback(v8::Local<v8:
:Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1955 { | 1955 { |
| 1956 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1956 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1957 TestObjectV8Internal::stringOrStringSequenceAttributeAttributeGetter(info); | 1957 TestObjectV8Internal::stringOrStringSequenceAttributeAttributeGetter(info); |
| 1958 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1958 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1959 } | 1959 } |
| 1960 | 1960 |
| 1961 static void stringOrStringSequenceAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 1961 static void stringOrStringSequenceAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1962 { | 1962 { |
| 1963 v8::Local<v8::Object> holder = info.Holder(); | 1963 v8::Local<v8::Object> holder = info.Holder(); |
| 1964 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrString
SequenceAttribute", "TestObject", holder, info.GetIsolate()); | 1964 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrString
SequenceAttribute", "TestObject", holder, info.GetIsolate()); |
| 1965 TestObject* impl = V8TestObject::toImpl(holder); | 1965 TestObject* impl = V8TestObject::toImpl(holder); |
| 1966 StringOrStringSequence cppValue; | 1966 StringOrStringSequence cppValue; |
| 1967 V8StringOrStringSequence::toImpl(info.GetIsolate(), v8Value, cppValue, excep
tionState); | 1967 V8StringOrStringSequence::toImpl(info.GetIsolate(), v8Value, cppValue, excep
tionState); |
| 1968 if (exceptionState.throwIfNeeded()) | 1968 if (exceptionState.throwIfNeeded()) |
| 1969 return; | 1969 return; |
| 1970 impl->setStringOrStringSequenceAttribute(cppValue); | 1970 impl->setStringOrStringSequenceAttribute(cppValue); |
| 1971 } | 1971 } |
| 1972 | 1972 |
| 1973 static void stringOrStringSequenceAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 1973 static void stringOrStringSequenceAttributeAttributeSetterCallback(v8::Local<v8:
:Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 1974 { | 1974 { |
| 1975 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1975 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1976 TestObjectV8Internal::stringOrStringSequenceAttributeAttributeSetter(v8Value
, info); | 1976 TestObjectV8Internal::stringOrStringSequenceAttributeAttributeSetter(v8Value
, info); |
| 1977 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1977 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1978 } | 1978 } |
| 1979 | 1979 |
| 1980 static void testEnumOrDoubleAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 1980 static void testEnumOrDoubleAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 1981 { | 1981 { |
| 1982 v8::Local<v8::Object> holder = info.Holder(); | 1982 v8::Local<v8::Object> holder = info.Holder(); |
| 1983 TestObject* impl = V8TestObject::toImpl(holder); | 1983 TestObject* impl = V8TestObject::toImpl(holder); |
| 1984 TestEnumOrDouble result; | 1984 TestEnumOrDouble result; |
| 1985 impl->testEnumOrDoubleAttribute(result); | 1985 impl->testEnumOrDoubleAttribute(result); |
| 1986 v8SetReturnValue(info, result); | 1986 v8SetReturnValue(info, result); |
| 1987 } | 1987 } |
| 1988 | 1988 |
| 1989 static void testEnumOrDoubleAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1989 static void testEnumOrDoubleAttributeAttributeGetterCallback(v8::Local<v8::Name>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1990 { | 1990 { |
| 1991 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1991 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1992 TestObjectV8Internal::testEnumOrDoubleAttributeAttributeGetter(info); | 1992 TestObjectV8Internal::testEnumOrDoubleAttributeAttributeGetter(info); |
| 1993 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1993 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1994 } | 1994 } |
| 1995 | 1995 |
| 1996 static void testEnumOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 1996 static void testEnumOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 1997 { | 1997 { |
| 1998 v8::Local<v8::Object> holder = info.Holder(); | 1998 v8::Local<v8::Object> holder = info.Holder(); |
| 1999 ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumOrDoub
leAttribute", "TestObject", holder, info.GetIsolate()); | 1999 ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumOrDoub
leAttribute", "TestObject", holder, info.GetIsolate()); |
| 2000 TestObject* impl = V8TestObject::toImpl(holder); | 2000 TestObject* impl = V8TestObject::toImpl(holder); |
| 2001 TestEnumOrDouble cppValue; | 2001 TestEnumOrDouble cppValue; |
| 2002 V8TestEnumOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, exceptionSt
ate); | 2002 V8TestEnumOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, exceptionSt
ate); |
| 2003 if (exceptionState.throwIfNeeded()) | 2003 if (exceptionState.throwIfNeeded()) |
| 2004 return; | 2004 return; |
| 2005 impl->setTestEnumOrDoubleAttribute(cppValue); | 2005 impl->setTestEnumOrDoubleAttribute(cppValue); |
| 2006 } | 2006 } |
| 2007 | 2007 |
| 2008 static void testEnumOrDoubleAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2008 static void testEnumOrDoubleAttributeAttributeSetterCallback(v8::Local<v8::Name>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2009 { | 2009 { |
| 2010 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2010 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2011 TestObjectV8Internal::testEnumOrDoubleAttributeAttributeSetter(v8Value, info
); | 2011 TestObjectV8Internal::testEnumOrDoubleAttributeAttributeSetter(v8Value, info
); |
| 2012 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2012 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2013 } | 2013 } |
| 2014 | 2014 |
| 2015 static void unrestrictedDoubleOrStringAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 2015 static void unrestrictedDoubleOrStringAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 2016 { | 2016 { |
| 2017 v8::Local<v8::Object> holder = info.Holder(); | 2017 v8::Local<v8::Object> holder = info.Holder(); |
| 2018 TestObject* impl = V8TestObject::toImpl(holder); | 2018 TestObject* impl = V8TestObject::toImpl(holder); |
| 2019 UnrestrictedDoubleOrString result; | 2019 UnrestrictedDoubleOrString result; |
| 2020 impl->unrestrictedDoubleOrStringAttribute(result); | 2020 impl->unrestrictedDoubleOrStringAttribute(result); |
| 2021 v8SetReturnValue(info, result); | 2021 v8SetReturnValue(info, result); |
| 2022 } | 2022 } |
| 2023 | 2023 |
| 2024 static void unrestrictedDoubleOrStringAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2024 static void unrestrictedDoubleOrStringAttributeAttributeGetterCallback(v8::Local
<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2025 { | 2025 { |
| 2026 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2026 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2027 TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeGetter(inf
o); | 2027 TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeGetter(inf
o); |
| 2028 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2028 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2029 } | 2029 } |
| 2030 | 2030 |
| 2031 static void unrestrictedDoubleOrStringAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2031 static void unrestrictedDoubleOrStringAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2032 { | 2032 { |
| 2033 v8::Local<v8::Object> holder = info.Holder(); | 2033 v8::Local<v8::Object> holder = info.Holder(); |
| 2034 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleOrStringAttribute", "TestObject", holder, info.GetIsolate()); | 2034 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleOrStringAttribute", "TestObject", holder, info.GetIsolate()); |
| 2035 TestObject* impl = V8TestObject::toImpl(holder); | 2035 TestObject* impl = V8TestObject::toImpl(holder); |
| 2036 UnrestrictedDoubleOrString cppValue; | 2036 UnrestrictedDoubleOrString cppValue; |
| 2037 V8UnrestrictedDoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, e
xceptionState); | 2037 V8UnrestrictedDoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, e
xceptionState); |
| 2038 if (exceptionState.throwIfNeeded()) | 2038 if (exceptionState.throwIfNeeded()) |
| 2039 return; | 2039 return; |
| 2040 impl->setUnrestrictedDoubleOrStringAttribute(cppValue); | 2040 impl->setUnrestrictedDoubleOrStringAttribute(cppValue); |
| 2041 } | 2041 } |
| 2042 | 2042 |
| 2043 static void unrestrictedDoubleOrStringAttributeAttributeSetterCallback(v8::Local
<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>
& info) | 2043 static void unrestrictedDoubleOrStringAttributeAttributeSetterCallback(v8::Local
<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 2044 { | 2044 { |
| 2045 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2045 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2046 TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeSetter(v8V
alue, info); | 2046 TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeSetter(v8V
alue, info); |
| 2047 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2047 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2048 } | 2048 } |
| 2049 | 2049 |
| 2050 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 2050 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2051 { | 2051 { |
| 2052 v8::Local<v8::Object> holder = info.Holder(); | 2052 v8::Local<v8::Object> holder = info.Holder(); |
| 2053 TestObject* impl = V8TestObject::toImpl(holder); | 2053 TestObject* impl = V8TestObject::toImpl(holder); |
| 2054 v8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribu
te()); | 2054 v8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribu
te()); |
| 2055 } | 2055 } |
| 2056 | 2056 |
| 2057 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2057 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2058 { | 2058 { |
| 2059 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2059 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2060 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2060 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2061 V8PerContextData* contextData = scriptState->perContextData(); | 2061 V8PerContextData* contextData = scriptState->perContextData(); |
| 2062 if (contextData && contextData->activityLogger()) | 2062 if (contextData && contextData->activityLogger()) |
| 2063 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute"); | 2063 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute"); |
| 2064 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eGetter(info); | 2064 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eGetter(info); |
| 2065 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2065 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2066 } | 2066 } |
| 2067 | 2067 |
| 2068 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2068 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2069 { | 2069 { |
| 2070 v8::Local<v8::Object> holder = info.Holder(); | 2070 v8::Local<v8::Object> holder = info.Holder(); |
| 2071 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2071 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2072 TestObject* impl = V8TestObject::toImpl(holder); | 2072 TestObject* impl = V8TestObject::toImpl(holder); |
| 2073 int cppValue = toInt32(v8Value, exceptionState); | 2073 int cppValue = toInt32(v8Value, exceptionState); |
| 2074 if (exceptionState.throwIfNeeded()) | 2074 if (exceptionState.throwIfNeeded()) |
| 2075 return; | 2075 return; |
| 2076 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); | 2076 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); |
| 2077 } | 2077 } |
| 2078 | 2078 |
| 2079 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | 2079 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
| 2080 { | 2080 { |
| 2081 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2081 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2082 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2082 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2083 V8PerContextData* contextData = scriptState->perContextData(); | 2083 V8PerContextData* contextData = scriptState->perContextData(); |
| 2084 if (contextData && contextData->activityLogger()) { | 2084 if (contextData && contextData->activityLogger()) { |
| 2085 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute", v8Value); | 2085 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute", v8Value); |
| 2086 } | 2086 } |
| 2087 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | 2087 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); |
| 2088 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2088 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2089 } | 2089 } |
| 2090 | 2090 |
| 2091 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 2091 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2092 { | 2092 { |
| 2093 v8::Local<v8::Object> holder = info.Holder(); | 2093 v8::Local<v8::Object> holder = info.Holder(); |
| 2094 TestObject* impl = V8TestObject::toImpl(holder); | 2094 TestObject* impl = V8TestObject::toImpl(holder); |
| 2095 v8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribu
te()); | 2095 v8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribu
te()); |
| 2096 } | 2096 } |
| 2097 | 2097 |
| 2098 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2098 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2099 { | 2099 { |
| 2100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2101 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2101 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2102 V8PerContextData* contextData = scriptState->perContextData(); | 2102 V8PerContextData* contextData = scriptState->perContextData(); |
| 2103 if (contextData && contextData->activityLogger()) | 2103 if (contextData && contextData->activityLogger()) |
| 2104 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForAllWorldsLongAttribute"); | 2104 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForAllWorldsLongAttribute"); |
| 2105 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eGetter(info); | 2105 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eGetter(info); |
| 2106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2107 } | 2107 } |
| 2108 | 2108 |
| 2109 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2109 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2110 { | 2110 { |
| 2111 v8::Local<v8::Object> holder = info.Holder(); | 2111 v8::Local<v8::Object> holder = info.Holder(); |
| 2112 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2112 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2113 TestObject* impl = V8TestObject::toImpl(holder); | 2113 TestObject* impl = V8TestObject::toImpl(holder); |
| 2114 int cppValue = toInt32(v8Value, exceptionState); | 2114 int cppValue = toInt32(v8Value, exceptionState); |
| 2115 if (exceptionState.throwIfNeeded()) | 2115 if (exceptionState.throwIfNeeded()) |
| 2116 return; | 2116 return; |
| 2117 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); | 2117 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); |
| 2118 } | 2118 } |
| 2119 | 2119 |
| 2120 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | 2120 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
| 2121 { | 2121 { |
| 2122 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2122 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2123 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | 2123 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); |
| 2124 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2124 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2125 } | 2125 } |
| 2126 | 2126 |
| 2127 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 2127 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2128 { | 2128 { |
| 2129 v8::Local<v8::Object> holder = info.Holder(); | 2129 v8::Local<v8::Object> holder = info.Holder(); |
| 2130 TestObject* impl = V8TestObject::toImpl(holder); | 2130 TestObject* impl = V8TestObject::toImpl(holder); |
| 2131 v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribu
te()); | 2131 v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribu
te()); |
| 2132 } | 2132 } |
| 2133 | 2133 |
| 2134 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2134 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2135 { | 2135 { |
| 2136 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2136 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2137 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eGetter(info); | 2137 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eGetter(info); |
| 2138 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2138 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2139 } | 2139 } |
| 2140 | 2140 |
| 2141 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2141 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2142 { | 2142 { |
| 2143 v8::Local<v8::Object> holder = info.Holder(); | 2143 v8::Local<v8::Object> holder = info.Holder(); |
| 2144 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2144 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2145 TestObject* impl = V8TestObject::toImpl(holder); | 2145 TestObject* impl = V8TestObject::toImpl(holder); |
| 2146 int cppValue = toInt32(v8Value, exceptionState); | 2146 int cppValue = toInt32(v8Value, exceptionState); |
| 2147 if (exceptionState.throwIfNeeded()) | 2147 if (exceptionState.throwIfNeeded()) |
| 2148 return; | 2148 return; |
| 2149 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); | 2149 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); |
| 2150 } | 2150 } |
| 2151 | 2151 |
| 2152 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | 2152 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
| 2153 { | 2153 { |
| 2154 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2154 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2155 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2155 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2156 V8PerContextData* contextData = scriptState->perContextData(); | 2156 V8PerContextData* contextData = scriptState->perContextData(); |
| 2157 if (contextData && contextData->activityLogger()) { | 2157 if (contextData && contextData->activityLogger()) { |
| 2158 contextData->activityLogger()->logSetter("TestObject.activityLoggingSett
erForAllWorldsLongAttribute", v8Value); | 2158 contextData->activityLogger()->logSetter("TestObject.activityLoggingSett
erForAllWorldsLongAttribute", v8Value); |
| 2159 } | 2159 } |
| 2160 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | 2160 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); |
| 2161 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2161 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2162 } | 2162 } |
| 2163 | 2163 |
| 2164 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 2164 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 2165 { | 2165 { |
| 2166 v8::Local<v8::Object> holder = info.Holder(); | 2166 v8::Local<v8::Object> holder = info.Holder(); |
| 2167 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edAttributeAnyAttribute"); | 2167 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edAttributeAnyAttribute"); |
| 2168 TestObject* impl = V8TestObject::toImpl(holder); | 2168 TestObject* impl = V8TestObject::toImpl(holder); |
| 2169 if (!impl->isValueDirty()) { | 2169 if (!impl->isValueDirty()) { |
| 2170 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); | 2170 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); |
| 2171 if (!v8Value.IsEmpty()) { | 2171 if (!v8Value.IsEmpty()) { |
| 2172 v8SetReturnValue(info, v8Value); | 2172 v8SetReturnValue(info, v8Value); |
| 2173 return; | 2173 return; |
| 2174 } | 2174 } |
| 2175 } | 2175 } |
| 2176 ScriptValue cppValue(impl->cachedAttributeAnyAttribute()); | 2176 ScriptValue cppValue(impl->cachedAttributeAnyAttribute()); |
| 2177 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); | 2177 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); |
| 2178 v8SetReturnValue(info, cppValue.v8Value()); | 2178 v8SetReturnValue(info, cppValue.v8Value()); |
| 2179 } | 2179 } |
| 2180 | 2180 |
| 2181 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2181 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2182 { | 2182 { |
| 2183 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2183 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2184 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info); | 2184 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info); |
| 2185 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2185 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2186 } | 2186 } |
| 2187 | 2187 |
| 2188 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 2188 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 2189 { | 2189 { |
| 2190 v8::Local<v8::Object> holder = info.Holder(); | 2190 v8::Local<v8::Object> holder = info.Holder(); |
| 2191 TestObject* impl = V8TestObject::toImpl(holder); | 2191 TestObject* impl = V8TestObject::toImpl(holder); |
| 2192 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); | 2192 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); |
| 2193 impl->setCachedAttributeAnyAttribute(cppValue); | 2193 impl->setCachedAttributeAnyAttribute(cppValue); |
| 2194 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeAnyAttribute")); // Invalidate the cached valu
e. | 2194 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeAnyAttribute")); // Invalidate the cached valu
e. |
| 2195 } | 2195 } |
| 2196 | 2196 |
| 2197 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2197 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2198 { | 2198 { |
| 2199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2200 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetter(v8Value, in
fo); | 2200 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetter(v8Value, in
fo); |
| 2201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2202 } | 2202 } |
| 2203 | 2203 |
| 2204 static void cachedArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 2204 static void cachedArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 2205 { | 2205 { |
| 2206 v8::Local<v8::Object> holder = info.Holder(); | 2206 v8::Local<v8::Object> holder = info.Holder(); |
| 2207 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edArrayAttribute"); | 2207 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edArrayAttribute"); |
| 2208 TestObject* impl = V8TestObject::toImpl(holder); | 2208 TestObject* impl = V8TestObject::toImpl(holder); |
| 2209 if (!impl->isArrayDirty()) { | 2209 if (!impl->isArrayDirty()) { |
| 2210 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); | 2210 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); |
| 2211 if (!v8Value.IsEmpty()) { | 2211 if (!v8Value.IsEmpty()) { |
| 2212 v8SetReturnValue(info, v8Value); | 2212 v8SetReturnValue(info, v8Value); |
| 2213 return; | 2213 return; |
| 2214 } | 2214 } |
| 2215 } | 2215 } |
| 2216 Vector<String> cppValue(impl->cachedArrayAttribute()); | 2216 Vector<String> cppValue(impl->cachedArrayAttribute()); |
| 2217 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, toV8(
cppValue, info.Holder(), info.GetIsolate())); | 2217 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, toV8(
cppValue, info.Holder(), info.GetIsolate())); |
| 2218 v8SetReturnValue(info, toV8(cppValue, info.Holder(), info.GetIsolate())); | 2218 v8SetReturnValue(info, toV8(cppValue, info.Holder(), info.GetIsolate())); |
| 2219 } | 2219 } |
| 2220 | 2220 |
| 2221 static void cachedArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2221 static void cachedArrayAttributeAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 2222 { | 2222 { |
| 2223 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2223 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2224 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info); | 2224 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info); |
| 2225 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2225 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2226 } | 2226 } |
| 2227 | 2227 |
| 2228 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 2228 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 2229 { | 2229 { |
| 2230 v8::Local<v8::Object> holder = info.Holder(); | 2230 v8::Local<v8::Object> holder = info.Holder(); |
| 2231 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedArrayAtt
ribute", "TestObject", holder, info.GetIsolate()); | 2231 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedArrayAtt
ribute", "TestObject", holder, info.GetIsolate()); |
| 2232 TestObject* impl = V8TestObject::toImpl(holder); | 2232 TestObject* impl = V8TestObject::toImpl(holder); |
| 2233 Vector<String> cppValue = toImplArray<String>(v8Value, 0, info.GetIsolate(),
exceptionState); | 2233 Vector<String> cppValue = toImplArray<String>(v8Value, 0, info.GetIsolate(),
exceptionState); |
| 2234 if (exceptionState.throwIfNeeded()) | 2234 if (exceptionState.throwIfNeeded()) |
| 2235 return; | 2235 return; |
| 2236 impl->setCachedArrayAttribute(cppValue); | 2236 impl->setCachedArrayAttribute(cppValue); |
| 2237 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedArrayAttribute")); // Invalidate the cached value. | 2237 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedArrayAttribute")); // Invalidate the cached value. |
| 2238 } | 2238 } |
| 2239 | 2239 |
| 2240 static void cachedArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2240 static void cachedArrayAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2241 { | 2241 { |
| 2242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2243 TestObjectV8Internal::cachedArrayAttributeAttributeSetter(v8Value, info); | 2243 TestObjectV8Internal::cachedArrayAttributeAttributeSetter(v8Value, info); |
| 2244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2245 } | 2245 } |
| 2246 | 2246 |
| 2247 static void cachedStringOrNoneAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 2247 static void cachedStringOrNoneAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 2248 { | 2248 { |
| 2249 v8::Local<v8::Object> holder = info.Holder(); | 2249 v8::Local<v8::Object> holder = info.Holder(); |
| 2250 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edStringOrNoneAttribute"); | 2250 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edStringOrNoneAttribute"); |
| 2251 TestObject* impl = V8TestObject::toImpl(holder); | 2251 TestObject* impl = V8TestObject::toImpl(holder); |
| 2252 if (!impl->isStringDirty()) { | 2252 if (!impl->isStringDirty()) { |
| 2253 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); | 2253 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); |
| 2254 if (!v8Value.IsEmpty()) { | 2254 if (!v8Value.IsEmpty()) { |
| 2255 v8SetReturnValue(info, v8Value); | 2255 v8SetReturnValue(info, v8Value); |
| 2256 return; | 2256 return; |
| 2257 } | 2257 } |
| 2258 } | 2258 } |
| 2259 String cppValue(impl->cachedStringOrNoneAttribute()); | 2259 String cppValue(impl->cachedStringOrNoneAttribute()); |
| 2260 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8::Local<v8::Value>(v8::Null(info.GetIsolate())) : v8String(info
.GetIsolate(), cppValue)); | 2260 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8::Local<v8::Value>(v8::Null(info.GetIsolate())) : v8String(info
.GetIsolate(), cppValue)); |
| 2261 v8SetReturnValueStringOrNull(info, cppValue, info.GetIsolate()); | 2261 v8SetReturnValueStringOrNull(info, cppValue, info.GetIsolate()); |
| 2262 } | 2262 } |
| 2263 | 2263 |
| 2264 static void cachedStringOrNoneAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2264 static void cachedStringOrNoneAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2265 { | 2265 { |
| 2266 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2266 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2267 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info); | 2267 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info); |
| 2268 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2268 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2269 } | 2269 } |
| 2270 | 2270 |
| 2271 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 2271 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 2272 { | 2272 { |
| 2273 v8::Local<v8::Object> holder = info.Holder(); | 2273 v8::Local<v8::Object> holder = info.Holder(); |
| 2274 TestObject* impl = V8TestObject::toImpl(holder); | 2274 TestObject* impl = V8TestObject::toImpl(holder); |
| 2275 V8StringResource<TreatNullAsNullString> cppValue = v8Value; | 2275 V8StringResource<TreatNullAsNullString> cppValue = v8Value; |
| 2276 if (!cppValue.prepare()) | 2276 if (!cppValue.prepare()) |
| 2277 return; | 2277 return; |
| 2278 impl->setCachedStringOrNoneAttribute(cppValue); | 2278 impl->setCachedStringOrNoneAttribute(cppValue); |
| 2279 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedStringOrNoneAttribute")); // Invalidate the cached valu
e. | 2279 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedStringOrNoneAttribute")); // Invalidate the cached valu
e. |
| 2280 } | 2280 } |
| 2281 | 2281 |
| 2282 static void cachedStringOrNoneAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2282 static void cachedStringOrNoneAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2283 { | 2283 { |
| 2284 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2284 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2285 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetter(v8Value, in
fo); | 2285 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetter(v8Value, in
fo); |
| 2286 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2286 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2287 } | 2287 } |
| 2288 | 2288 |
| 2289 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) | 2289 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 2290 { | 2290 { |
| 2291 v8::Local<v8::Object> holder = info.Holder(); | 2291 v8::Local<v8::Object> holder = info.Holder(); |
| 2292 TestObject* impl = V8TestObject::toImpl(holder); | 2292 TestObject* impl = V8TestObject::toImpl(holder); |
| 2293 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 2293 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 2294 v8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(executionC
ontext).v8Value()); | 2294 v8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(executionC
ontext).v8Value()); |
| 2295 } | 2295 } |
| 2296 | 2296 |
| 2297 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2297 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Loca
l<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2298 { | 2298 { |
| 2299 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2299 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2300 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(in
fo); | 2300 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(in
fo); |
| 2301 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2301 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2302 } | 2302 } |
| 2303 | 2303 |
| 2304 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2304 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2305 { | 2305 { |
| 2306 v8::Local<v8::Object> holder = info.Holder(); | 2306 v8::Local<v8::Object> holder = info.Holder(); |
| 2307 TestObject* impl = V8TestObject::toImpl(holder); | 2307 TestObject* impl = V8TestObject::toImpl(holder); |
| 2308 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); | 2308 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); |
| 2309 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 2309 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 2310 impl->setCallWithExecutionContextAnyAttribute(executionContext, cppValue); | 2310 impl->setCallWithExecutionContextAnyAttribute(executionContext, cppValue); |
| 2311 } | 2311 } |
| 2312 | 2312 |
| 2313 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | 2313 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Loca
l<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 2314 { | 2314 { |
| 2315 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2315 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2316 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(v8
Value, info); | 2316 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(v8
Value, info); |
| 2317 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2317 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2318 } | 2318 } |
| 2319 | 2319 |
| 2320 static void callWithScriptStateAnyAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 2320 static void callWithScriptStateAnyAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 2321 { | 2321 { |
| 2322 v8::Local<v8::Object> holder = info.Holder(); | 2322 v8::Local<v8::Object> holder = info.Holder(); |
| 2323 TestObject* impl = V8TestObject::toImpl(holder); | 2323 TestObject* impl = V8TestObject::toImpl(holder); |
| 2324 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 2324 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 2325 v8SetReturnValue(info, impl->callWithScriptStateAnyAttribute(scriptState).v8
Value()); | 2325 v8SetReturnValue(info, impl->callWithScriptStateAnyAttribute(scriptState).v8
Value()); |
| 2326 } | 2326 } |
| 2327 | 2327 |
| 2328 static void callWithScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2328 static void callWithScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8:
:Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2329 { | 2329 { |
| 2330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2331 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetter(info); | 2331 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetter(info); |
| 2332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2333 } | 2333 } |
| 2334 | 2334 |
| 2335 static void callWithScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 2335 static void callWithScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2336 { | 2336 { |
| 2337 v8::Local<v8::Object> holder = info.Holder(); | 2337 v8::Local<v8::Object> holder = info.Holder(); |
| 2338 TestObject* impl = V8TestObject::toImpl(holder); | 2338 TestObject* impl = V8TestObject::toImpl(holder); |
| 2339 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); | 2339 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); |
| 2340 impl->setCallWithScriptStateAnyAttribute(scriptState, cppValue); | 2340 impl->setCallWithScriptStateAnyAttribute(scriptState, cppValue); |
| 2341 } | 2341 } |
| 2342 | 2342 |
| 2343 static void callWithScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 2343 static void callWithScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8:
:Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 2344 { | 2344 { |
| 2345 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2345 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2346 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetter(v8Value
, info); | 2346 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetter(v8Value
, info); |
| 2347 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2347 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2348 } | 2348 } |
| 2349 | 2349 |
| 2350 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2350 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2351 { | 2351 { |
| 2352 v8::Local<v8::Object> holder = info.Holder(); | 2352 v8::Local<v8::Object> holder = info.Holder(); |
| 2353 TestObject* impl = V8TestObject::toImpl(holder); | 2353 TestObject* impl = V8TestObject::toImpl(holder); |
| 2354 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 2354 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 2355 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 2355 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 2356 v8SetReturnValue(info, impl->callWithExecutionContextAndScriptStateAnyAttrib
ute(scriptState, executionContext).v8Value()); | 2356 v8SetReturnValue(info, impl->callWithExecutionContextAndScriptStateAnyAttrib
ute(scriptState, executionContext).v8Value()); |
| 2357 } | 2357 } |
| 2358 | 2358 |
| 2359 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2359 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCal
lback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2360 { | 2360 { |
| 2361 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2361 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2362 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteGetter(info); | 2362 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteGetter(info); |
| 2363 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2363 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2364 } | 2364 } |
| 2365 | 2365 |
| 2366 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2366 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2367 { | 2367 { |
| 2368 v8::Local<v8::Object> holder = info.Holder(); | 2368 v8::Local<v8::Object> holder = info.Holder(); |
| 2369 TestObject* impl = V8TestObject::toImpl(holder); | 2369 TestObject* impl = V8TestObject::toImpl(holder); |
| 2370 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); | 2370 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); |
| 2371 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 2371 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 2372 impl->setCallWithExecutionContextAndScriptStateAnyAttribute(scriptState, exe
cutionContext, cppValue); | 2372 impl->setCallWithExecutionContextAndScriptStateAnyAttribute(scriptState, exe
cutionContext, cppValue); |
| 2373 } | 2373 } |
| 2374 | 2374 |
| 2375 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | 2375 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCal
lback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
| 2376 { | 2376 { |
| 2377 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2377 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2378 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteSetter(v8Value, info); | 2378 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteSetter(v8Value, info); |
| 2379 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2379 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2380 } | 2380 } |
| 2381 | 2381 |
| 2382 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | 2382 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 2383 { | 2383 { |
| 2384 v8::Local<v8::Object> holder = info.Holder(); | 2384 v8::Local<v8::Object> holder = info.Holder(); |
| 2385 TestObject* impl = V8TestObject::toImpl(holder); | 2385 TestObject* impl = V8TestObject::toImpl(holder); |
| 2386 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF
orNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); | 2386 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF
orNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); |
| 2387 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check
SecurityForNodeReadonlyDocumentAttribute(), exceptionState)) { | 2387 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check
SecurityForNodeReadonlyDocumentAttribute(), exceptionState)) { |
| 2388 v8SetReturnValueNull(info); | 2388 v8SetReturnValueNull(info); |
| 2389 exceptionState.throwIfNeeded(); | 2389 exceptionState.throwIfNeeded(); |
| 2390 return; | 2390 return; |
| 2391 } | 2391 } |
| 2392 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc
umentAttribute()), impl); | 2392 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc
umentAttribute()), impl); |
| 2393 } | 2393 } |
| 2394 | 2394 |
| 2395 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2395 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback
(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2396 { | 2396 { |
| 2397 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2397 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2398 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttribute
Getter(info); | 2398 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttribute
Getter(info); |
| 2399 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2399 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2400 } | 2400 } |
| 2401 | 2401 |
| 2402 #if ENABLE(CONDITION) | 2402 #if ENABLE(CONDITION) |
| 2403 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 2403 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
| 2404 { | 2404 { |
| 2405 v8::Local<v8::Object> holder = info.Holder(); | 2405 v8::Local<v8::Object> holder = info.Holder(); |
| 2406 TestObject* impl = V8TestObject::toImpl(holder); | 2406 TestObject* impl = V8TestObject::toImpl(holder); |
| 2407 v8SetReturnValueInt(info, impl->conditionalLongAttribute()); | 2407 v8SetReturnValueInt(info, impl->conditionalLongAttribute()); |
| 2408 } | 2408 } |
| 2409 #endif // ENABLE(CONDITION) | 2409 #endif // ENABLE(CONDITION) |
| 2410 | 2410 |
| 2411 #if ENABLE(CONDITION) | 2411 #if ENABLE(CONDITION) |
| 2412 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2412 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2413 { | 2413 { |
| 2414 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2414 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2415 TestObjectV8Internal::conditionalLongAttributeAttributeGetter(info); | 2415 TestObjectV8Internal::conditionalLongAttributeAttributeGetter(info); |
| 2416 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2416 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2417 } | 2417 } |
| 2418 #endif // ENABLE(CONDITION) | 2418 #endif // ENABLE(CONDITION) |
| 2419 | 2419 |
| 2420 #if ENABLE(CONDITION) | 2420 #if ENABLE(CONDITION) |
| 2421 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | 2421 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) |
| 2422 { | 2422 { |
| 2423 v8::Local<v8::Object> holder = info.Holder(); | 2423 v8::Local<v8::Object> holder = info.Holder(); |
| 2424 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon
gAttribute", "TestObject", holder, info.GetIsolate()); | 2424 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon
gAttribute", "TestObject", holder, info.GetIsolate()); |
| 2425 TestObject* impl = V8TestObject::toImpl(holder); | 2425 TestObject* impl = V8TestObject::toImpl(holder); |
| 2426 int cppValue = toInt32(v8Value, exceptionState); | 2426 int cppValue = toInt32(v8Value, exceptionState); |
| 2427 if (exceptionState.throwIfNeeded()) | 2427 if (exceptionState.throwIfNeeded()) |
| 2428 return; | 2428 return; |
| 2429 impl->setConditionalLongAttribute(cppValue); | 2429 impl->setConditionalLongAttribute(cppValue); |
| 2430 } | 2430 } |
| 2431 #endif // ENABLE(CONDITION) | 2431 #endif // ENABLE(CONDITION) |
| 2432 | 2432 |
| 2433 #if ENABLE(CONDITION) | 2433 #if ENABLE(CONDITION) |
| 2434 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2434 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2435 { | 2435 { |
| 2436 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2436 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2437 TestObjectV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info)
; | 2437 TestObjectV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info)
; |
| 2438 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2438 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2439 } | 2439 } |
| 2440 #endif // ENABLE(CONDITION) | 2440 #endif // ENABLE(CONDITION) |
| 2441 | 2441 |
| 2442 static void testInterfaceEmptyConstructorAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2442 static void testInterfaceEmptyConstructorAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2443 { | 2443 { |
| 2444 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceEmptyConstructorAttribute"); | 2444 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceEmptyConstructorAttribute"); |
| 2445 TestObjectForceSetAttributeOnThis(propertyName, v8Value, info); | 2445 TestObjectForceSetAttributeOnThis(propertyName, v8Value, info); |
| 2446 } | 2446 } |
| 2447 | 2447 |
| 2448 static void testInterfaceEmptyConstructorAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 2448 static void testInterfaceEmptyConstructorAttributeAttributeSetterCallback(v8::Lo
cal<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 2449 { | 2449 { |
| 2450 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2450 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2451 TestObjectV8Internal::testInterfaceEmptyConstructorAttributeAttributeSetter(
v8Value, info); | 2451 TestObjectV8Internal::testInterfaceEmptyConstructorAttributeAttributeSetter(
v8Value, info); |
| 2452 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2452 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2453 } | 2453 } |
| 2454 | 2454 |
| 2455 static void testInterfaceEmptyConstructorAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2455 static void testInterfaceEmptyConstructorAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2456 { | 2456 { |
| 2457 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceEmptyConstructorAttribute"); | 2457 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceEmptyConstructorAttribute"); |
| 2458 TestObjectForceSetAttributeOnThis(propertyName, v8Value, info); | 2458 TestObjectForceSetAttributeOnThis(propertyName, v8Value, info); |
| 2459 } | 2459 } |
| 2460 | 2460 |
| 2461 static void testInterfaceEmptyConstructorAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 2461 static void testInterfaceEmptyConstructorAttributeAttributeSetterCallback(v8::Lo
cal<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 2462 { | 2462 { |
| 2463 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2463 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2464 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::deprecatedTestInterfaceEmptyConstr
uctorAttribute); | 2464 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::deprecatedTestInterfaceEmptyConstr
uctorAttribute); |
| 2465 TestObjectV8Internal::testInterfaceEmptyConstructorAttributeAttributeSetter(
v8Value, info); | 2465 TestObjectV8Internal::testInterfaceEmptyConstructorAttributeAttributeSetter(
v8Value, info); |
| 2466 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2466 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2467 } | 2467 } |
| 2468 | 2468 |
| 2469 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeAttributeS
etter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2469 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeAttributeS
etter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2470 { | 2470 { |
| 2471 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "meas
ureAsFeatureNameTestInterfaceEmptyConstructorAttribute"); | 2471 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "meas
ureAsFeatureNameTestInterfaceEmptyConstructorAttribute"); |
| 2472 TestObjectForceSetAttributeOnThis(propertyName, v8Value, info); | 2472 TestObjectForceSetAttributeOnThis(propertyName, v8Value, info); |
| 2473 } | 2473 } |
| 2474 | 2474 |
| 2475 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeAttributeS
etterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Pro
pertyCallbackInfo<void>& info) | 2475 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeAttributeS
etterCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::Prope
rtyCallbackInfo<void>& info) |
| 2476 { | 2476 { |
| 2477 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2477 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2478 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::FeatureName); | 2478 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::FeatureName); |
| 2479 TestObjectV8Internal::measureAsFeatureNameTestInterfaceEmptyConstructorAttri
buteAttributeSetter(v8Value, info); | 2479 TestObjectV8Internal::measureAsFeatureNameTestInterfaceEmptyConstructorAttri
buteAttributeSetter(v8Value, info); |
| 2480 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2480 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2481 } | 2481 } |
| 2482 | 2482 |
| 2483 static void customObjectAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2483 static void customObjectAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2484 { | 2484 { |
| 2485 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2485 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2486 V8TestObject::customObjectAttributeAttributeGetterCustom(info); | 2486 V8TestObject::customObjectAttributeAttributeGetterCustom(info); |
| 2487 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2487 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2488 } | 2488 } |
| 2489 | 2489 |
| 2490 static void customObjectAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2490 static void customObjectAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2491 { | 2491 { |
| 2492 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2492 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2493 V8TestObject::customObjectAttributeAttributeSetterCustom(v8Value, info); | 2493 V8TestObject::customObjectAttributeAttributeSetterCustom(v8Value, info); |
| 2494 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2494 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2495 } | 2495 } |
| 2496 | 2496 |
| 2497 static void customGetterLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2497 static void customGetterLongAttributeAttributeGetterCallback(v8::Local<v8::Name>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2498 { | 2498 { |
| 2499 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2499 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2500 V8TestObject::customGetterLongAttributeAttributeGetterCustom(info); | 2500 V8TestObject::customGetterLongAttributeAttributeGetterCustom(info); |
| 2501 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2501 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2502 } | 2502 } |
| 2503 | 2503 |
| 2504 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 2504 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 2505 { | 2505 { |
| 2506 v8::Local<v8::Object> holder = info.Holder(); | 2506 v8::Local<v8::Object> holder = info.Holder(); |
| 2507 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | 2507 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLo
ngAttribute", "TestObject", holder, info.GetIsolate()); |
| 2508 TestObject* impl = V8TestObject::toImpl(holder); | 2508 TestObject* impl = V8TestObject::toImpl(holder); |
| 2509 int cppValue = toInt32(v8Value, exceptionState); | 2509 int cppValue = toInt32(v8Value, exceptionState); |
| 2510 if (exceptionState.throwIfNeeded()) | 2510 if (exceptionState.throwIfNeeded()) |
| 2511 return; | 2511 return; |
| 2512 impl->setCustomGetterLongAttribute(cppValue); | 2512 impl->setCustomGetterLongAttribute(cppValue); |
| 2513 } | 2513 } |
| 2514 | 2514 |
| 2515 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2515 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::Name>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2516 { | 2516 { |
| 2517 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2517 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2518 TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info
); | 2518 TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info
); |
| 2519 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2519 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2520 } | 2520 } |
| 2521 | 2521 |
| 2522 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2522 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local
<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2523 { | 2523 { |
| 2524 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2524 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2525 V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCustom(info)
; | 2525 V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCustom(info)
; |
| 2526 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2526 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2527 } | 2527 } |
| 2528 | 2528 |
| 2529 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2529 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 2530 { | 2530 { |
| 2531 v8::Local<v8::Object> holder = info.Holder(); | 2531 v8::Local<v8::Object> holder = info.Holder(); |
| 2532 TestObject* impl = V8TestObject::toImpl(holder); | 2532 TestObject* impl = V8TestObject::toImpl(holder); |
| 2533 v8SetReturnValueInt(info, impl->customSetterLongAttribute()); | 2533 v8SetReturnValueInt(info, impl->customSetterLongAttribute()); |
| 2534 } | 2534 } |
| 2535 | 2535 |
| 2536 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2536 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::Name>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2537 { | 2537 { |
| 2538 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2538 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2539 TestObjectV8Internal::customSetterLongAttributeAttributeGetter(info); | 2539 TestObjectV8Internal::customSetterLongAttributeAttributeGetter(info); |
| 2540 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2540 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2541 } | 2541 } |
| 2542 | 2542 |
| 2543 static void customSetterLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2543 static void customSetterLongAttributeAttributeSetterCallback(v8::Local<v8::Name>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2544 { | 2544 { |
| 2545 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2545 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2546 V8TestObject::customSetterLongAttributeAttributeSetterCustom(v8Value, info); | 2546 V8TestObject::customSetterLongAttributeAttributeSetterCustom(v8Value, info); |
| 2547 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2547 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2548 } | 2548 } |
| 2549 | 2549 |
| 2550 #if ENABLE(CONDITION) | 2550 #if ENABLE(CONDITION) |
| 2551 static void customLongAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2551 static void customLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 2552 { | 2552 { |
| 2553 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2553 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2554 V8TestObject::customLongAttributeAttributeGetterCustom(info); | 2554 V8TestObject::customLongAttributeAttributeGetterCustom(info); |
| 2555 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2555 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2556 } | 2556 } |
| 2557 #endif // ENABLE(CONDITION) | 2557 #endif // ENABLE(CONDITION) |
| 2558 | 2558 |
| 2559 #if ENABLE(CONDITION) | 2559 #if ENABLE(CONDITION) |
| 2560 static void customLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2560 static void customLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2561 { | 2561 { |
| 2562 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2562 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2563 V8TestObject::customLongAttributeAttributeSetterCustom(v8Value, info); | 2563 V8TestObject::customLongAttributeAttributeSetterCustom(v8Value, info); |
| 2564 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2564 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2565 } | 2565 } |
| 2566 #endif // ENABLE(CONDITION) | 2566 #endif // ENABLE(CONDITION) |
| 2567 | 2567 |
| 2568 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 2568 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 2569 { | 2569 { |
| 2570 v8::Local<v8::Object> holder = info.Holder(); | 2570 v8::Local<v8::Object> holder = info.Holder(); |
| 2571 TestObject* impl = V8TestObject::toImpl(holder); | 2571 TestObject* impl = V8TestObject::toImpl(holder); |
| 2572 v8SetReturnValueInt(info, impl->customElementsCallbacksReadonlyLongAttribute
()); | 2572 v8SetReturnValueInt(info, impl->customElementsCallbacksReadonlyLongAttribute
()); |
| 2573 } | 2573 } |
| 2574 | 2574 |
| 2575 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2575 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(
v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2576 { | 2576 { |
| 2577 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2577 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2578 TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeG
etter(info); | 2578 TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeG
etter(info); |
| 2579 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2579 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2580 } | 2580 } |
| 2581 | 2581 |
| 2582 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 2582 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 2583 { | 2583 { |
| 2584 v8::Local<v8::Object> holder = info.Holder(); | 2584 v8::Local<v8::Object> holder = info.Holder(); |
| 2585 TestObject* impl = V8TestObject::toImpl(holder); | 2585 TestObject* impl = V8TestObject::toImpl(holder); |
| 2586 v8SetReturnValueInt(info, impl->deprecatedLongAttribute()); | 2586 v8SetReturnValueInt(info, impl->deprecatedLongAttribute()); |
| 2587 } | 2587 } |
| 2588 | 2588 |
| 2589 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 2589 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2590 { | 2590 { |
| 2591 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2591 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2592 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::LongAttribute); | 2592 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::LongAttribute); |
| 2593 TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info); | 2593 TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info); |
| 2594 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2594 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2595 } | 2595 } |
| 2596 | 2596 |
| 2597 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 2597 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 2598 { | 2598 { |
| 2599 v8::Local<v8::Object> holder = info.Holder(); | 2599 v8::Local<v8::Object> holder = info.Holder(); |
| 2600 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLong
Attribute", "TestObject", holder, info.GetIsolate()); | 2600 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLong
Attribute", "TestObject", holder, info.GetIsolate()); |
| 2601 TestObject* impl = V8TestObject::toImpl(holder); | 2601 TestObject* impl = V8TestObject::toImpl(holder); |
| 2602 int cppValue = toInt32(v8Value, exceptionState); | 2602 int cppValue = toInt32(v8Value, exceptionState); |
| 2603 if (exceptionState.throwIfNeeded()) | 2603 if (exceptionState.throwIfNeeded()) |
| 2604 return; | 2604 return; |
| 2605 impl->setDeprecatedLongAttribute(cppValue); | 2605 impl->setDeprecatedLongAttribute(cppValue); |
| 2606 } | 2606 } |
| 2607 | 2607 |
| 2608 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2608 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2609 { | 2609 { |
| 2610 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2610 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2611 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::LongAttribute); | 2611 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::LongAttribute); |
| 2612 TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info); | 2612 TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info); |
| 2613 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2613 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2614 } | 2614 } |
| 2615 | 2615 |
| 2616 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2616 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 2617 { | 2617 { |
| 2618 v8::Local<v8::Object> holder = info.Holder(); | 2618 v8::Local<v8::Object> holder = info.Holder(); |
| 2619 TestObject* impl = V8TestObject::toImpl(holder); | 2619 TestObject* impl = V8TestObject::toImpl(holder); |
| 2620 v8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); | 2620 v8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); |
| 2621 } | 2621 } |
| 2622 | 2622 |
| 2623 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2623 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::Name>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2624 { | 2624 { |
| 2625 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2625 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2626 TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info); | 2626 TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info); |
| 2627 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2627 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2628 } | 2628 } |
| 2629 | 2629 |
| 2630 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 2630 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 2631 { | 2631 { |
| 2632 v8::Local<v8::Object> holder = info.Holder(); | 2632 v8::Local<v8::Object> holder = info.Holder(); |
| 2633 ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | 2633 ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLo
ngAttribute", "TestObject", holder, info.GetIsolate()); |
| 2634 TestObject* impl = V8TestObject::toImpl(holder); | 2634 TestObject* impl = V8TestObject::toImpl(holder); |
| 2635 int cppValue = toInt32(v8Value, EnforceRange, exceptionState); | 2635 int cppValue = toInt32(v8Value, EnforceRange, exceptionState); |
| 2636 if (exceptionState.throwIfNeeded()) | 2636 if (exceptionState.throwIfNeeded()) |
| 2637 return; | 2637 return; |
| 2638 impl->setEnforceRangeLongAttribute(cppValue); | 2638 impl->setEnforceRangeLongAttribute(cppValue); |
| 2639 } | 2639 } |
| 2640 | 2640 |
| 2641 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2641 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::Name>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2642 { | 2642 { |
| 2643 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2643 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2644 TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info
); | 2644 TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info
); |
| 2645 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2645 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2646 } | 2646 } |
| 2647 | 2647 |
| 2648 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 2648 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 2649 { | 2649 { |
| 2650 v8::Local<v8::Object> holder = info.Holder(); | 2650 v8::Local<v8::Object> holder = info.Holder(); |
| 2651 TestObject* impl = V8TestObject::toImpl(holder); | 2651 TestObject* impl = V8TestObject::toImpl(holder); |
| 2652 v8SetReturnValueInt(info, impl->exposeJSAccessorsLongAttribute()); | 2652 v8SetReturnValueInt(info, impl->exposeJSAccessorsLongAttribute()); |
| 2653 } | 2653 } |
| 2654 | 2654 |
| 2655 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2655 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(v8::Local<v8::
Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2656 { | 2656 { |
| 2657 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2657 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2658 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(info); | 2658 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(info); |
| 2659 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2659 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2660 } | 2660 } |
| 2661 | 2661 |
| 2662 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 2662 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2663 { | 2663 { |
| 2664 v8::Local<v8::Object> holder = info.Holder(); | 2664 v8::Local<v8::Object> holder = info.Holder(); |
| 2665 ExceptionState exceptionState(ExceptionState::SetterContext, "exposeJSAccess
orsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2665 ExceptionState exceptionState(ExceptionState::SetterContext, "exposeJSAccess
orsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2666 TestObject* impl = V8TestObject::toImpl(holder); | 2666 TestObject* impl = V8TestObject::toImpl(holder); |
| 2667 int cppValue = toInt32(v8Value, exceptionState); | 2667 int cppValue = toInt32(v8Value, exceptionState); |
| 2668 if (exceptionState.throwIfNeeded()) | 2668 if (exceptionState.throwIfNeeded()) |
| 2669 return; | 2669 return; |
| 2670 impl->setExposeJSAccessorsLongAttribute(cppValue); | 2670 impl->setExposeJSAccessorsLongAttribute(cppValue); |
| 2671 } | 2671 } |
| 2672 | 2672 |
| 2673 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | 2673 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(v8::Local<v8::
Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2674 { | 2674 { |
| 2675 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2675 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2676 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeSetter(v8Value,
info); | 2676 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeSetter(v8Value,
info); |
| 2677 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2677 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2678 } | 2678 } |
| 2679 | 2679 |
| 2680 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 2680 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 2681 { | 2681 { |
| 2682 v8::Local<v8::Object> holder = info.Holder(); | 2682 v8::Local<v8::Object> holder = info.Holder(); |
| 2683 TestObject* impl = V8TestObject::toImpl(holder); | 2683 TestObject* impl = V8TestObject::toImpl(holder); |
| 2684 v8SetReturnValueInt(info, impl->implementedAsName()); | 2684 v8SetReturnValueInt(info, impl->implementedAsName()); |
| 2685 } | 2685 } |
| 2686 | 2686 |
| 2687 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2687 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2688 { | 2688 { |
| 2689 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2689 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2690 TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info); | 2690 TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info); |
| 2691 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2691 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2692 } | 2692 } |
| 2693 | 2693 |
| 2694 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 2694 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 2695 { | 2695 { |
| 2696 v8::Local<v8::Object> holder = info.Holder(); | 2696 v8::Local<v8::Object> holder = info.Holder(); |
| 2697 ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsL
ongAttribute", "TestObject", holder, info.GetIsolate()); | 2697 ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsL
ongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2698 TestObject* impl = V8TestObject::toImpl(holder); | 2698 TestObject* impl = V8TestObject::toImpl(holder); |
| 2699 int cppValue = toInt32(v8Value, exceptionState); | 2699 int cppValue = toInt32(v8Value, exceptionState); |
| 2700 if (exceptionState.throwIfNeeded()) | 2700 if (exceptionState.throwIfNeeded()) |
| 2701 return; | 2701 return; |
| 2702 impl->setImplementedAsName(cppValue); | 2702 impl->setImplementedAsName(cppValue); |
| 2703 } | 2703 } |
| 2704 | 2704 |
| 2705 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2705 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2706 { | 2706 { |
| 2707 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2707 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2708 TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, inf
o); | 2708 TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, inf
o); |
| 2709 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2709 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2710 } | 2710 } |
| 2711 | 2711 |
| 2712 static void customImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2712 static void customImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8
::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2713 { | 2713 { |
| 2714 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2714 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2715 V8TestObject::customImplementedAsLongAttributeAttributeGetterCustom(info); | 2715 V8TestObject::customImplementedAsLongAttributeAttributeGetterCustom(info); |
| 2716 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2716 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2717 } | 2717 } |
| 2718 | 2718 |
| 2719 static void customImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 2719 static void customImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8
::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 2720 { | 2720 { |
| 2721 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2721 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2722 V8TestObject::customImplementedAsLongAttributeAttributeSetterCustom(v8Value,
info); | 2722 V8TestObject::customImplementedAsLongAttributeAttributeSetterCustom(v8Value,
info); |
| 2723 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2723 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2724 } | 2724 } |
| 2725 | 2725 |
| 2726 static void customGetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2726 static void customGetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2727 { | 2727 { |
| 2728 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2728 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2729 V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(in
fo); | 2729 V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(in
fo); |
| 2730 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2730 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2731 } | 2731 } |
| 2732 | 2732 |
| 2733 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2733 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2734 { | 2734 { |
| 2735 v8::Local<v8::Object> holder = info.Holder(); | 2735 v8::Local<v8::Object> holder = info.Holder(); |
| 2736 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterIm
plementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2736 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterIm
plementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2737 TestObject* impl = V8TestObject::toImpl(holder); | 2737 TestObject* impl = V8TestObject::toImpl(holder); |
| 2738 int cppValue = toInt32(v8Value, exceptionState); | 2738 int cppValue = toInt32(v8Value, exceptionState); |
| 2739 if (exceptionState.throwIfNeeded()) | 2739 if (exceptionState.throwIfNeeded()) |
| 2740 return; | 2740 return; |
| 2741 impl->setImplementedAsNameWithCustomGetter(cppValue); | 2741 impl->setImplementedAsNameWithCustomGetter(cppValue); |
| 2742 } | 2742 } |
| 2743 | 2743 |
| 2744 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 2744 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 2745 { | 2745 { |
| 2746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2747 TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(
v8Value, info); | 2747 TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(
v8Value, info); |
| 2748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2749 } | 2749 } |
| 2750 | 2750 |
| 2751 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 2751 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 2752 { | 2752 { |
| 2753 v8::Local<v8::Object> holder = info.Holder(); | 2753 v8::Local<v8::Object> holder = info.Holder(); |
| 2754 TestObject* impl = V8TestObject::toImpl(holder); | 2754 TestObject* impl = V8TestObject::toImpl(holder); |
| 2755 v8SetReturnValueInt(info, impl->implementedAsNameWithCustomGetter()); | 2755 v8SetReturnValueInt(info, impl->implementedAsNameWithCustomGetter()); |
| 2756 } | 2756 } |
| 2757 | 2757 |
| 2758 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2758 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2759 { | 2759 { |
| 2760 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2760 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2761 TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(
info); | 2761 TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(
info); |
| 2762 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2762 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2763 } | 2763 } |
| 2764 | 2764 |
| 2765 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 2765 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 2766 { | 2766 { |
| 2767 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2767 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2768 V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCustom(v8
Value, info); | 2768 V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCustom(v8
Value, info); |
| 2769 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2769 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2770 } | 2770 } |
| 2771 | 2771 |
| 2772 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 2772 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 2773 { | 2773 { |
| 2774 v8::Local<v8::Object> holder = info.Holder(); | 2774 v8::Local<v8::Object> holder = info.Holder(); |
| 2775 TestObject* impl = V8TestObject::toImpl(holder); | 2775 TestObject* impl = V8TestObject::toImpl(holder); |
| 2776 v8SetReturnValueInt(info, impl->measureAsLongAttribute()); | 2776 v8SetReturnValueInt(info, impl->measureAsLongAttribute()); |
| 2777 } | 2777 } |
| 2778 | 2778 |
| 2779 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2779 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2780 { | 2780 { |
| 2781 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2781 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2782 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::TestFeature); | 2782 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::TestFeature); |
| 2783 TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info); | 2783 TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info); |
| 2784 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2784 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2785 } | 2785 } |
| 2786 | 2786 |
| 2787 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 2787 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 2788 { | 2788 { |
| 2789 v8::Local<v8::Object> holder = info.Holder(); | 2789 v8::Local<v8::Object> holder = info.Holder(); |
| 2790 ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongA
ttribute", "TestObject", holder, info.GetIsolate()); | 2790 ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongA
ttribute", "TestObject", holder, info.GetIsolate()); |
| 2791 TestObject* impl = V8TestObject::toImpl(holder); | 2791 TestObject* impl = V8TestObject::toImpl(holder); |
| 2792 int cppValue = toInt32(v8Value, exceptionState); | 2792 int cppValue = toInt32(v8Value, exceptionState); |
| 2793 if (exceptionState.throwIfNeeded()) | 2793 if (exceptionState.throwIfNeeded()) |
| 2794 return; | 2794 return; |
| 2795 impl->setMeasureAsLongAttribute(cppValue); | 2795 impl->setMeasureAsLongAttribute(cppValue); |
| 2796 } | 2796 } |
| 2797 | 2797 |
| 2798 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2798 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2799 { | 2799 { |
| 2800 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2800 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2801 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::TestFeature); | 2801 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::TestFeature); |
| 2802 TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info); | 2802 TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info); |
| 2803 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2803 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2804 } | 2804 } |
| 2805 | 2805 |
| 2806 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 2806 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 2807 { | 2807 { |
| 2808 v8::Local<v8::Object> holder = info.Holder(); | 2808 v8::Local<v8::Object> holder = info.Holder(); |
| 2809 TestObject* impl = V8TestObject::toImpl(holder); | 2809 TestObject* impl = V8TestObject::toImpl(holder); |
| 2810 v8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); | 2810 v8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); |
| 2811 } | 2811 } |
| 2812 | 2812 |
| 2813 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2813 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::Name
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2814 { | 2814 { |
| 2815 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2815 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2816 TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info); | 2816 TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info); |
| 2817 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2817 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2818 } | 2818 } |
| 2819 | 2819 |
| 2820 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 2820 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 2821 { | 2821 { |
| 2822 v8::Local<v8::Object> holder = info.Holder(); | 2822 v8::Local<v8::Object> holder = info.Holder(); |
| 2823 ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableL
ongAttribute", "TestObject", holder, info.GetIsolate()); | 2823 ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableL
ongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2824 TestObject* impl = V8TestObject::toImpl(holder); | 2824 TestObject* impl = V8TestObject::toImpl(holder); |
| 2825 int cppValue = toInt32(v8Value, exceptionState); | 2825 int cppValue = toInt32(v8Value, exceptionState); |
| 2826 if (exceptionState.throwIfNeeded()) | 2826 if (exceptionState.throwIfNeeded()) |
| 2827 return; | 2827 return; |
| 2828 impl->setNotEnumerableLongAttribute(cppValue); | 2828 impl->setNotEnumerableLongAttribute(cppValue); |
| 2829 } | 2829 } |
| 2830 | 2830 |
| 2831 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2831 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::Name
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2832 { | 2832 { |
| 2833 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2833 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2834 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, inf
o); | 2834 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, inf
o); |
| 2835 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2835 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2836 } | 2836 } |
| 2837 | 2837 |
| 2838 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 2838 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 2839 { | 2839 { |
| 2840 v8::Local<v8::Object> holder = info.Holder(); | 2840 v8::Local<v8::Object> holder = info.Holder(); |
| 2841 TestObject* impl = V8TestObject::toImpl(holder); | 2841 TestObject* impl = V8TestObject::toImpl(holder); |
| 2842 v8SetReturnValueInt(info, impl->perContextEnabledLongAttribute()); | 2842 v8SetReturnValueInt(info, impl->perContextEnabledLongAttribute()); |
| 2843 } | 2843 } |
| 2844 | 2844 |
| 2845 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2845 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::
Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2846 { | 2846 { |
| 2847 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2847 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2848 TestObjectV8Internal::perContextEnabledLongAttributeAttributeGetter(info); | 2848 TestObjectV8Internal::perContextEnabledLongAttributeAttributeGetter(info); |
| 2849 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2849 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2850 } | 2850 } |
| 2851 | 2851 |
| 2852 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 2852 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2853 { | 2853 { |
| 2854 v8::Local<v8::Object> holder = info.Holder(); | 2854 v8::Local<v8::Object> holder = info.Holder(); |
| 2855 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledLongAttribute", "TestObject", holder, info.GetIsolate()); | 2855 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2856 TestObject* impl = V8TestObject::toImpl(holder); | 2856 TestObject* impl = V8TestObject::toImpl(holder); |
| 2857 int cppValue = toInt32(v8Value, exceptionState); | 2857 int cppValue = toInt32(v8Value, exceptionState); |
| 2858 if (exceptionState.throwIfNeeded()) | 2858 if (exceptionState.throwIfNeeded()) |
| 2859 return; | 2859 return; |
| 2860 impl->setPerContextEnabledLongAttribute(cppValue); | 2860 impl->setPerContextEnabledLongAttribute(cppValue); |
| 2861 } | 2861 } |
| 2862 | 2862 |
| 2863 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | 2863 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::
Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2864 { | 2864 { |
| 2865 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2865 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2866 TestObjectV8Internal::perContextEnabledLongAttributeAttributeSetter(v8Value,
info); | 2866 TestObjectV8Internal::perContextEnabledLongAttributeAttributeSetter(v8Value,
info); |
| 2867 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2867 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2868 } | 2868 } |
| 2869 | 2869 |
| 2870 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2870 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2871 { | 2871 { |
| 2872 v8::Local<v8::Object> holder = info.Holder(); | 2872 v8::Local<v8::Object> holder = info.Holder(); |
| 2873 TestObject* impl = V8TestObject::toImpl(holder); | 2873 TestObject* impl = V8TestObject::toImpl(holder); |
| 2874 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | 2874 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); |
| 2875 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 2875 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) |
| 2876 return; | 2876 return; |
| 2877 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); | 2877 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); |
| 2878 if (!wrapper.IsEmpty()) { | 2878 if (!wrapper.IsEmpty()) { |
| 2879 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); | 2879 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); |
| 2880 v8SetReturnValue(info, wrapper); | 2880 v8SetReturnValue(info, wrapper); |
| 2881 } | 2881 } |
| 2882 } | 2882 } |
| 2883 | 2883 |
| 2884 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2884 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2885 { | 2885 { |
| 2886 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2886 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2887 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetter(info); | 2887 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetter(info); |
| 2888 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2888 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2889 } | 2889 } |
| 2890 | 2890 |
| 2891 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 2891 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2892 { | 2892 { |
| 2893 v8::Local<v8::Object> holder = info.Holder(); | 2893 v8::Local<v8::Object> holder = info.Holder(); |
| 2894 TestObject* impl = V8TestObject::toImpl(holder); | 2894 TestObject* impl = V8TestObject::toImpl(holder); |
| 2895 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | 2895 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); |
| 2896 if (cppValue && DOMDataStore::setReturnValueForMainWorld(info.GetReturnValue
(), cppValue.get())) | 2896 if (cppValue && DOMDataStore::setReturnValueForMainWorld(info.GetReturnValue
(), cppValue.get())) |
| 2897 return; | 2897 return; |
| 2898 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); | 2898 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); |
| 2899 if (!wrapper.IsEmpty()) { | 2899 if (!wrapper.IsEmpty()) { |
| 2900 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); | 2900 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); |
| 2901 v8SetReturnValue(info, wrapper); | 2901 v8SetReturnValue(info, wrapper); |
| 2902 } | 2902 } |
| 2903 } | 2903 } |
| 2904 | 2904 |
| 2905 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 2905 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 2906 { | 2906 { |
| 2907 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2907 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2908 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetterForMainWorld(info); | 2908 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetterForMainWorld(info); |
| 2909 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2909 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2910 } | 2910 } |
| 2911 | 2911 |
| 2912 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2912 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2913 { | 2913 { |
| 2914 v8::Local<v8::Object> holder = info.Holder(); | 2914 v8::Local<v8::Object> holder = info.Holder(); |
| 2915 TestObject* impl = V8TestObject::toImpl(holder); | 2915 TestObject* impl = V8TestObject::toImpl(holder); |
| 2916 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); | 2916 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); |
| 2917 } | 2917 } |
| 2918 | 2918 |
| 2919 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2919 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2920 { | 2920 { |
| 2921 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2921 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2922 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2922 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2923 V8PerContextData* contextData = scriptState->perContextData(); | 2923 V8PerContextData* contextData = scriptState->perContextData(); |
| 2924 if (contextData && contextData->activityLogger()) | 2924 if (contextData && contextData->activityLogger()) |
| 2925 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); | 2925 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); |
| 2926 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetter(info); | 2926 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetter(info); |
| 2927 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2927 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2928 } | 2928 } |
| 2929 | 2929 |
| 2930 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2930 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2931 { | 2931 { |
| 2932 v8::Local<v8::Object> holder = info.Holder(); | 2932 v8::Local<v8::Object> holder = info.Holder(); |
| 2933 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2933 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2934 TestObject* impl = V8TestObject::toImpl(holder); | 2934 TestObject* impl = V8TestObject::toImpl(holder); |
| 2935 int cppValue = toInt32(v8Value, exceptionState); | 2935 int cppValue = toInt32(v8Value, exceptionState); |
| 2936 if (exceptionState.throwIfNeeded()) | 2936 if (exceptionState.throwIfNeeded()) |
| 2937 return; | 2937 return; |
| 2938 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | 2938 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
| 2939 } | 2939 } |
| 2940 | 2940 |
| 2941 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | 2941 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
| 2942 { | 2942 { |
| 2943 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2943 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2944 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2944 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2945 V8PerContextData* contextData = scriptState->perContextData(); | 2945 V8PerContextData* contextData = scriptState->perContextData(); |
| 2946 if (contextData && contextData->activityLogger()) { | 2946 if (contextData && contextData->activityLogger()) { |
| 2947 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute", v8Value); | 2947 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute", v8Value); |
| 2948 } | 2948 } |
| 2949 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); | 2949 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); |
| 2950 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2950 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2951 } | 2951 } |
| 2952 | 2952 |
| 2953 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 2953 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2954 { | 2954 { |
| 2955 v8::Local<v8::Object> holder = info.Holder(); | 2955 v8::Local<v8::Object> holder = info.Holder(); |
| 2956 TestObject* impl = V8TestObject::toImpl(holder); | 2956 TestObject* impl = V8TestObject::toImpl(holder); |
| 2957 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); | 2957 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); |
| 2958 } | 2958 } |
| 2959 | 2959 |
| 2960 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 2960 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>
& info) |
| 2961 { | 2961 { |
| 2962 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2962 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2963 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2963 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2964 V8PerContextData* contextData = scriptState->perContextData(); | 2964 V8PerContextData* contextData = scriptState->perContextData(); |
| 2965 if (contextData && contextData->activityLogger()) | 2965 if (contextData && contextData->activityLogger()) |
| 2966 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); | 2966 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); |
| 2967 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); | 2967 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); |
| 2968 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2968 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2969 } | 2969 } |
| 2970 | 2970 |
| 2971 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 2971 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 2972 { | 2972 { |
| 2973 v8::Local<v8::Object> holder = info.Holder(); | 2973 v8::Local<v8::Object> holder = info.Holder(); |
| 2974 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2974 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2975 TestObject* impl = V8TestObject::toImpl(holder); | 2975 TestObject* impl = V8TestObject::toImpl(holder); |
| 2976 int cppValue = toInt32(v8Value, exceptionState); | 2976 int cppValue = toInt32(v8Value, exceptionState); |
| 2977 if (exceptionState.throwIfNeeded()) | 2977 if (exceptionState.throwIfNeeded()) |
| 2978 return; | 2978 return; |
| 2979 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | 2979 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
| 2980 } | 2980 } |
| 2981 | 2981 |
| 2982 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 2982 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
| 2983 { | 2983 { |
| 2984 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2984 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2985 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2985 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2986 V8PerContextData* contextData = scriptState->perContextData(); | 2986 V8PerContextData* contextData = scriptState->perContextData(); |
| 2987 if (contextData && contextData->activityLogger()) { | 2987 if (contextData && contextData->activityLogger()) { |
| 2988 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute", v8Value); | 2988 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute", v8Value); |
| 2989 } | 2989 } |
| 2990 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); | 2990 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); |
| 2991 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2991 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2992 } | 2992 } |
| 2993 | 2993 |
| 2994 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 2994 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2995 { | 2995 { |
| 2996 v8::Local<v8::Object> holder = info.Holder(); | 2996 v8::Local<v8::Object> holder = info.Holder(); |
| 2997 TestObject* impl = V8TestObject::toImpl(holder); | 2997 TestObject* impl = V8TestObject::toImpl(holder); |
| 2998 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | 2998 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); |
| 2999 } | 2999 } |
| 3000 | 3000 |
| 3001 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8:
:Value>& info) | 3001 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 3002 { | 3002 { |
| 3003 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3003 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3004 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 3004 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 3005 V8PerContextData* contextData = scriptState->perContextData(); | 3005 V8PerContextData* contextData = scriptState->perContextData(); |
| 3006 if (contextData && contextData->activityLogger()) | 3006 if (contextData && contextData->activityLogger()) |
| 3007 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute"); | 3007 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute"); |
| 3008 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); | 3008 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); |
| 3009 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3009 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3010 } | 3010 } |
| 3011 | 3011 |
| 3012 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | 3012 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 3013 { | 3013 { |
| 3014 v8::Local<v8::Object> holder = info.Holder(); | 3014 v8::Local<v8::Object> holder = info.Holder(); |
| 3015 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 3015 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
| 3016 TestObject* impl = V8TestObject::toImpl(holder); | 3016 TestObject* impl = V8TestObject::toImpl(holder); |
| 3017 int cppValue = toInt32(v8Value, exceptionState); | 3017 int cppValue = toInt32(v8Value, exceptionState); |
| 3018 if (exceptionState.throwIfNeeded()) | 3018 if (exceptionState.throwIfNeeded()) |
| 3019 return; | 3019 return; |
| 3020 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 3020 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
| 3021 } | 3021 } |
| 3022 | 3022 |
| 3023 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 3023 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 3024 { | 3024 { |
| 3025 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3025 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3026 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 3026 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 3027 V8PerContextData* contextData = scriptState->perContextData(); | 3027 V8PerContextData* contextData = scriptState->perContextData(); |
| 3028 if (contextData && contextData->activityLogger()) { | 3028 if (contextData && contextData->activityLogger()) { |
| 3029 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute", v8Value); | 3029 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute", v8Value); |
| 3030 } | 3030 } |
| 3031 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); | 3031 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); |
| 3032 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3032 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3033 } | 3033 } |
| 3034 | 3034 |
| 3035 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 3035 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3036 { | 3036 { |
| 3037 v8::Local<v8::Object> holder = info.Holder(); | 3037 v8::Local<v8::Object> holder = info.Holder(); |
| 3038 TestObject* impl = V8TestObject::toImpl(holder); | 3038 TestObject* impl = V8TestObject::toImpl(holder); |
| 3039 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | 3039 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); |
| 3040 } | 3040 } |
| 3041 | 3041 |
| 3042 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall
backInfo<v8::Value>& info) | 3042 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::Name>, const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 3043 { | 3043 { |
| 3044 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3044 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3045 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); | 3045 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); |
| 3046 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3046 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3047 } | 3047 } |
| 3048 | 3048 |
| 3049 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | 3049 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
| 3050 { | 3050 { |
| 3051 v8::Local<v8::Object> holder = info.Holder(); | 3051 v8::Local<v8::Object> holder = info.Holder(); |
| 3052 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 3052 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
| 3053 TestObject* impl = V8TestObject::toImpl(holder); | 3053 TestObject* impl = V8TestObject::toImpl(holder); |
| 3054 int cppValue = toInt32(v8Value, exceptionState); | 3054 int cppValue = toInt32(v8Value, exceptionState); |
| 3055 if (exceptionState.throwIfNeeded()) | 3055 if (exceptionState.throwIfNeeded()) |
| 3056 return; | 3056 return; |
| 3057 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 3057 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
| 3058 } | 3058 } |
| 3059 | 3059 |
| 3060 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 3060 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::Name>, v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 3061 { | 3061 { |
| 3062 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3062 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3063 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); | 3063 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); |
| 3064 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3064 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3065 } | 3065 } |
| 3066 | 3066 |
| 3067 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 3067 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 3068 { | 3068 { |
| 3069 v8::Local<v8::Object> holder = info.Holder(); | 3069 v8::Local<v8::Object> holder = info.Holder(); |
| 3070 TestObject* impl = V8TestObject::toImpl(holder); | 3070 TestObject* impl = V8TestObject::toImpl(holder); |
| 3071 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); | 3071 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); |
| 3072 } | 3072 } |
| 3073 | 3073 |
| 3074 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3074 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3075 { | 3075 { |
| 3076 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3076 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3077 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 3077 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 3078 V8PerContextData* contextData = scriptState->perContextData(); | 3078 V8PerContextData* contextData = scriptState->perContextData(); |
| 3079 if (contextData && contextData->activityLogger()) | 3079 if (contextData && contextData->activityLogger()) |
| 3080 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); | 3080 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); |
| 3081 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetter(info); | 3081 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetter(info); |
| 3082 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3082 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3083 } | 3083 } |
| 3084 | 3084 |
| 3085 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3085 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3086 { | 3086 { |
| 3087 v8::Local<v8::Object> holder = info.Holder(); | 3087 v8::Local<v8::Object> holder = info.Holder(); |
| 3088 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 3088 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3089 TestObject* impl = V8TestObject::toImpl(holder); | 3089 TestObject* impl = V8TestObject::toImpl(holder); |
| 3090 int cppValue = toInt32(v8Value, exceptionState); | 3090 int cppValue = toInt32(v8Value, exceptionState); |
| 3091 if (exceptionState.throwIfNeeded()) | 3091 if (exceptionState.throwIfNeeded()) |
| 3092 return; | 3092 return; |
| 3093 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | 3093 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
| 3094 } | 3094 } |
| 3095 | 3095 |
| 3096 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | 3096 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
| 3097 { | 3097 { |
| 3098 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3098 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3099 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); | 3099 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); |
| 3100 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3100 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3101 } | 3101 } |
| 3102 | 3102 |
| 3103 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 3103 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3104 { | 3104 { |
| 3105 v8::Local<v8::Object> holder = info.Holder(); | 3105 v8::Local<v8::Object> holder = info.Holder(); |
| 3106 TestObject* impl = V8TestObject::toImpl(holder); | 3106 TestObject* impl = V8TestObject::toImpl(holder); |
| 3107 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); | 3107 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); |
| 3108 } | 3108 } |
| 3109 | 3109 |
| 3110 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 3110 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>
& info) |
| 3111 { | 3111 { |
| 3112 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3112 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3113 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 3113 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 3114 V8PerContextData* contextData = scriptState->perContextData(); | 3114 V8PerContextData* contextData = scriptState->perContextData(); |
| 3115 if (contextData && contextData->activityLogger()) | 3115 if (contextData && contextData->activityLogger()) |
| 3116 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); | 3116 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); |
| 3117 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); | 3117 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); |
| 3118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3119 } | 3119 } |
| 3120 | 3120 |
| 3121 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 3121 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 3122 { | 3122 { |
| 3123 v8::Local<v8::Object> holder = info.Holder(); | 3123 v8::Local<v8::Object> holder = info.Holder(); |
| 3124 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 3124 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3125 TestObject* impl = V8TestObject::toImpl(holder); | 3125 TestObject* impl = V8TestObject::toImpl(holder); |
| 3126 int cppValue = toInt32(v8Value, exceptionState); | 3126 int cppValue = toInt32(v8Value, exceptionState); |
| 3127 if (exceptionState.throwIfNeeded()) | 3127 if (exceptionState.throwIfNeeded()) |
| 3128 return; | 3128 return; |
| 3129 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | 3129 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
| 3130 } | 3130 } |
| 3131 | 3131 |
| 3132 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 3132 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
| 3133 { | 3133 { |
| 3134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3135 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); | 3135 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); |
| 3136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3137 } | 3137 } |
| 3138 | 3138 |
| 3139 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 3139 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3140 { | 3140 { |
| 3141 v8::Local<v8::Object> holder = info.Holder(); | 3141 v8::Local<v8::Object> holder = info.Holder(); |
| 3142 TestObject* impl = V8TestObject::toImpl(holder); | 3142 TestObject* impl = V8TestObject::toImpl(holder); |
| 3143 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | 3143 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); |
| 3144 } | 3144 } |
| 3145 | 3145 |
| 3146 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8:
:Value>& info) | 3146 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 3147 { | 3147 { |
| 3148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3149 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 3149 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 3150 V8PerContextData* contextData = scriptState->perContextData(); | 3150 V8PerContextData* contextData = scriptState->perContextData(); |
| 3151 if (contextData && contextData->activityLogger()) | 3151 if (contextData && contextData->activityLogger()) |
| 3152 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForIsolatedWorldsPerWorldBindingsLongAttribute"); | 3152 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForIsolatedWorldsPerWorldBindingsLongAttribute"); |
| 3153 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); | 3153 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); |
| 3154 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3154 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3155 } | 3155 } |
| 3156 | 3156 |
| 3157 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | 3157 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 3158 { | 3158 { |
| 3159 v8::Local<v8::Object> holder = info.Holder(); | 3159 v8::Local<v8::Object> holder = info.Holder(); |
| 3160 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 3160 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
| 3161 TestObject* impl = V8TestObject::toImpl(holder); | 3161 TestObject* impl = V8TestObject::toImpl(holder); |
| 3162 int cppValue = toInt32(v8Value, exceptionState); | 3162 int cppValue = toInt32(v8Value, exceptionState); |
| 3163 if (exceptionState.throwIfNeeded()) | 3163 if (exceptionState.throwIfNeeded()) |
| 3164 return; | 3164 return; |
| 3165 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 3165 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
| 3166 } | 3166 } |
| 3167 | 3167 |
| 3168 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 3168 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 3169 { | 3169 { |
| 3170 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3170 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3171 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); | 3171 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); |
| 3172 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3172 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3173 } | 3173 } |
| 3174 | 3174 |
| 3175 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 3175 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3176 { | 3176 { |
| 3177 v8::Local<v8::Object> holder = info.Holder(); | 3177 v8::Local<v8::Object> holder = info.Holder(); |
| 3178 TestObject* impl = V8TestObject::toImpl(holder); | 3178 TestObject* impl = V8TestObject::toImpl(holder); |
| 3179 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | 3179 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); |
| 3180 } | 3180 } |
| 3181 | 3181 |
| 3182 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall
backInfo<v8::Value>& info) | 3182 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::Name>, const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 3183 { | 3183 { |
| 3184 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3184 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3185 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); | 3185 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); |
| 3186 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3186 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3187 } | 3187 } |
| 3188 | 3188 |
| 3189 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | 3189 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
| 3190 { | 3190 { |
| 3191 v8::Local<v8::Object> holder = info.Holder(); | 3191 v8::Local<v8::Object> holder = info.Holder(); |
| 3192 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 3192 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
| 3193 TestObject* impl = V8TestObject::toImpl(holder); | 3193 TestObject* impl = V8TestObject::toImpl(holder); |
| 3194 int cppValue = toInt32(v8Value, exceptionState); | 3194 int cppValue = toInt32(v8Value, exceptionState); |
| 3195 if (exceptionState.throwIfNeeded()) | 3195 if (exceptionState.throwIfNeeded()) |
| 3196 return; | 3196 return; |
| 3197 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 3197 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
| 3198 } | 3198 } |
| 3199 | 3199 |
| 3200 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 3200 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::Name>, v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 3201 { | 3201 { |
| 3202 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3202 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3203 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); | 3203 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); |
| 3204 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3204 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3205 } | 3205 } |
| 3206 | 3206 |
| 3207 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 3207 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
| 3208 { | 3208 { |
| 3209 v8::Local<v8::Object> holder = info.Holder(); | 3209 v8::Local<v8::Object> holder = info.Holder(); |
| 3210 TestObject* impl = V8TestObject::toImpl(holder); | 3210 TestObject* impl = V8TestObject::toImpl(holder); |
| 3211 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); | 3211 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); |
| 3212 } | 3212 } |
| 3213 | 3213 |
| 3214 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 3214 static void locationAttributeGetterCallback(v8::Local<v8::Name>, const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 3215 { | 3215 { |
| 3216 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3216 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3217 TestObjectV8Internal::locationAttributeGetter(info); | 3217 TestObjectV8Internal::locationAttributeGetter(info); |
| 3218 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3218 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3219 } | 3219 } |
| 3220 | 3220 |
| 3221 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) | 3221 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
| 3222 { | 3222 { |
| 3223 v8::Local<v8::Object> holder = info.Holder(); | 3223 v8::Local<v8::Object> holder = info.Holder(); |
| 3224 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3224 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3225 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); | 3225 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); |
| 3226 if (!impl) | 3226 if (!impl) |
| 3227 return; | 3227 return; |
| 3228 V8StringResource<> cppValue = v8Value; | 3228 V8StringResource<> cppValue = v8Value; |
| 3229 if (!cppValue.prepare()) | 3229 if (!cppValue.prepare()) |
| 3230 return; | 3230 return; |
| 3231 impl->setHref(cppValue); | 3231 impl->setHref(cppValue); |
| 3232 } | 3232 } |
| 3233 | 3233 |
| 3234 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3234 static void locationAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3235 { | 3235 { |
| 3236 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3236 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3237 TestObjectV8Internal::locationAttributeSetter(v8Value, info); | 3237 TestObjectV8Internal::locationAttributeSetter(v8Value, info); |
| 3238 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3238 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3239 } | 3239 } |
| 3240 | 3240 |
| 3241 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 3241 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 3242 { | 3242 { |
| 3243 v8::Local<v8::Object> holder = info.Holder(); | 3243 v8::Local<v8::Object> holder = info.Holder(); |
| 3244 TestObject* impl = V8TestObject::toImpl(holder); | 3244 TestObject* impl = V8TestObject::toImpl(holder); |
| 3245 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; | 3245 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; |
| 3246 } | 3246 } |
| 3247 | 3247 |
| 3248 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 3248 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 3249 { | 3249 { |
| 3250 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3250 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3251 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); | 3251 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); |
| 3252 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3252 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3253 } | 3253 } |
| 3254 | 3254 |
| 3255 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 3255 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 3256 { | 3256 { |
| 3257 v8::Local<v8::Object> holder = info.Holder(); | 3257 v8::Local<v8::Object> holder = info.Holder(); |
| 3258 ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithEx
ception", "TestObject", holder, info.GetIsolate()); | 3258 ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithEx
ception", "TestObject", holder, info.GetIsolate()); |
| 3259 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3259 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3260 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithExcep
tion()); | 3260 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithExcep
tion()); |
| 3261 if (!impl) | 3261 if (!impl) |
| 3262 return; | 3262 return; |
| 3263 V8StringResource<> cppValue = v8Value; | 3263 V8StringResource<> cppValue = v8Value; |
| 3264 if (!cppValue.prepare()) | 3264 if (!cppValue.prepare()) |
| 3265 return; | 3265 return; |
| 3266 impl->setHrefThrows(cppValue, exceptionState); | 3266 impl->setHrefThrows(cppValue, exceptionState); |
| 3267 exceptionState.throwIfNeeded(); | 3267 exceptionState.throwIfNeeded(); |
| 3268 } | 3268 } |
| 3269 | 3269 |
| 3270 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3270 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3271 { | 3271 { |
| 3272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3273 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); | 3273 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); |
| 3274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3275 } | 3275 } |
| 3276 | 3276 |
| 3277 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 3277 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 3278 { | 3278 { |
| 3279 v8::Local<v8::Object> holder = info.Holder(); | 3279 v8::Local<v8::Object> holder = info.Holder(); |
| 3280 TestObject* impl = V8TestObject::toImpl(holder); | 3280 TestObject* impl = V8TestObject::toImpl(holder); |
| 3281 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithCallWith()), impl); | 3281 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithCallWith()), impl); |
| 3282 } | 3282 } |
| 3283 | 3283 |
| 3284 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 3284 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 3285 { | 3285 { |
| 3286 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3286 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3287 TestObjectV8Internal::locationWithCallWithAttributeGetter(info); | 3287 TestObjectV8Internal::locationWithCallWithAttributeGetter(info); |
| 3288 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3288 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3289 } | 3289 } |
| 3290 | 3290 |
| 3291 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 3291 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 3292 { | 3292 { |
| 3293 v8::Local<v8::Object> holder = info.Holder(); | 3293 v8::Local<v8::Object> holder = info.Holder(); |
| 3294 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3294 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3295 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithCallW
ith()); | 3295 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithCallW
ith()); |
| 3296 if (!impl) | 3296 if (!impl) |
| 3297 return; | 3297 return; |
| 3298 V8StringResource<> cppValue = v8Value; | 3298 V8StringResource<> cppValue = v8Value; |
| 3299 if (!cppValue.prepare()) | 3299 if (!cppValue.prepare()) |
| 3300 return; | 3300 return; |
| 3301 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 3301 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 3302 impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate()), cppValue); | 3302 impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate()), cppValue); |
| 3303 } | 3303 } |
| 3304 | 3304 |
| 3305 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3305 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3306 { | 3306 { |
| 3307 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3307 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3308 TestObjectV8Internal::locationWithCallWithAttributeSetter(v8Value, info); | 3308 TestObjectV8Internal::locationWithCallWithAttributeSetter(v8Value, info); |
| 3309 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3309 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3310 } | 3310 } |
| 3311 | 3311 |
| 3312 static void locationByteStringAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 3312 static void locationByteStringAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
| 3313 { | 3313 { |
| 3314 v8::Local<v8::Object> holder = info.Holder(); | 3314 v8::Local<v8::Object> holder = info.Holder(); |
| 3315 TestObject* impl = V8TestObject::toImpl(holder); | 3315 TestObject* impl = V8TestObject::toImpl(holder); |
| 3316 v8SetReturnValueFast(info, WTF::getPtr(impl->locationByteString()), impl); | 3316 v8SetReturnValueFast(info, WTF::getPtr(impl->locationByteString()), impl); |
| 3317 } | 3317 } |
| 3318 | 3318 |
| 3319 static void locationByteStringAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 3319 static void locationByteStringAttributeGetterCallback(v8::Local<v8::Name>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 3320 { | 3320 { |
| 3321 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3321 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3322 TestObjectV8Internal::locationByteStringAttributeGetter(info); | 3322 TestObjectV8Internal::locationByteStringAttributeGetter(info); |
| 3323 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3323 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3324 } | 3324 } |
| 3325 | 3325 |
| 3326 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 3326 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
| 3327 { | 3327 { |
| 3328 v8::Local<v8::Object> holder = info.Holder(); | 3328 v8::Local<v8::Object> holder = info.Holder(); |
| 3329 ExceptionState exceptionState(ExceptionState::SetterContext, "locationByteSt
ring", "TestObject", holder, info.GetIsolate()); | 3329 ExceptionState exceptionState(ExceptionState::SetterContext, "locationByteSt
ring", "TestObject", holder, info.GetIsolate()); |
| 3330 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3330 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3331 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationByteStrin
g()); | 3331 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationByteStrin
g()); |
| 3332 if (!impl) | 3332 if (!impl) |
| 3333 return; | 3333 return; |
| 3334 V8StringResource<> cppValue = toByteString(v8Value, exceptionState); | 3334 V8StringResource<> cppValue = toByteString(v8Value, exceptionState); |
| 3335 if (exceptionState.throwIfNeeded()) | 3335 if (exceptionState.throwIfNeeded()) |
| 3336 return; | 3336 return; |
| 3337 impl->setHrefByteString(cppValue); | 3337 impl->setHrefByteString(cppValue); |
| 3338 } | 3338 } |
| 3339 | 3339 |
| 3340 static void locationByteStringAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3340 static void locationByteStringAttributeSetterCallback(v8::Local<v8::Name>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3341 { | 3341 { |
| 3342 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3342 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3343 TestObjectV8Internal::locationByteStringAttributeSetter(v8Value, info); | 3343 TestObjectV8Internal::locationByteStringAttributeSetter(v8Value, info); |
| 3344 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3344 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3345 } | 3345 } |
| 3346 | 3346 |
| 3347 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 3347 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 3348 { | 3348 { |
| 3349 v8::Local<v8::Object> holder = info.Holder(); | 3349 v8::Local<v8::Object> holder = info.Holder(); |
| 3350 TestObject* impl = V8TestObject::toImpl(holder); | 3350 TestObject* impl = V8TestObject::toImpl(holder); |
| 3351 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithPerWorldBindings())
, impl); | 3351 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithPerWorldBindings())
, impl); |
| 3352 } | 3352 } |
| 3353 | 3353 |
| 3354 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3354 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::Na
me>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3355 { | 3355 { |
| 3356 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3356 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3357 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info); | 3357 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info); |
| 3358 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3358 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3359 } | 3359 } |
| 3360 | 3360 |
| 3361 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | 3361 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 3362 { | 3362 { |
| 3363 v8::Local<v8::Object> holder = info.Holder(); | 3363 v8::Local<v8::Object> holder = info.Holder(); |
| 3364 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3364 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3365 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWo
rldBindings()); | 3365 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWo
rldBindings()); |
| 3366 if (!impl) | 3366 if (!impl) |
| 3367 return; | 3367 return; |
| 3368 V8StringResource<> cppValue = v8Value; | 3368 V8StringResource<> cppValue = v8Value; |
| 3369 if (!cppValue.prepare()) | 3369 if (!cppValue.prepare()) |
| 3370 return; | 3370 return; |
| 3371 impl->setHref(cppValue); | 3371 impl->setHref(cppValue); |
| 3372 } | 3372 } |
| 3373 | 3373 |
| 3374 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3374 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::Na
me>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3375 { | 3375 { |
| 3376 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3376 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3377 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetter(v8Value, i
nfo); | 3377 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetter(v8Value, i
nfo); |
| 3378 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3378 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3379 } | 3379 } |
| 3380 | 3380 |
| 3381 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 3381 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 3382 { | 3382 { |
| 3383 v8::Local<v8::Object> holder = info.Holder(); | 3383 v8::Local<v8::Object> holder = info.Holder(); |
| 3384 TestObject* impl = V8TestObject::toImpl(holder); | 3384 TestObject* impl = V8TestObject::toImpl(holder); |
| 3385 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->locationWithPerWorldBin
dings())); | 3385 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->locationWithPerWorldBin
dings())); |
| 3386 } | 3386 } |
| 3387 | 3387 |
| 3388 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3388 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::
Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3389 { | 3389 { |
| 3390 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3390 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3391 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorl
d(info); | 3391 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorl
d(info); |
| 3392 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3392 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3393 } | 3393 } |
| 3394 | 3394 |
| 3395 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3395 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3396 { | 3396 { |
| 3397 v8::Local<v8::Object> holder = info.Holder(); | 3397 v8::Local<v8::Object> holder = info.Holder(); |
| 3398 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3398 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3399 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWo
rldBindings()); | 3399 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWo
rldBindings()); |
| 3400 if (!impl) | 3400 if (!impl) |
| 3401 return; | 3401 return; |
| 3402 V8StringResource<> cppValue = v8Value; | 3402 V8StringResource<> cppValue = v8Value; |
| 3403 if (!cppValue.prepare()) | 3403 if (!cppValue.prepare()) |
| 3404 return; | 3404 return; |
| 3405 impl->setHref(cppValue); | 3405 impl->setHref(cppValue); |
| 3406 } | 3406 } |
| 3407 | 3407 |
| 3408 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) | 3408 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::
Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
| 3409 { | 3409 { |
| 3410 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3410 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3411 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorl
d(v8Value, info); | 3411 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorl
d(v8Value, info); |
| 3412 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3412 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3413 } | 3413 } |
| 3414 | 3414 |
| 3415 static void locationTypeCheckingInterfaceAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 3415 static void locationTypeCheckingInterfaceAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 3416 { | 3416 { |
| 3417 v8::Local<v8::Object> holder = info.Holder(); | 3417 v8::Local<v8::Object> holder = info.Holder(); |
| 3418 TestObject* impl = V8TestObject::toImpl(holder); | 3418 TestObject* impl = V8TestObject::toImpl(holder); |
| 3419 v8SetReturnValueFast(info, WTF::getPtr(impl->locationTypeCheckingInterface()
), impl); | 3419 v8SetReturnValueFast(info, WTF::getPtr(impl->locationTypeCheckingInterface()
), impl); |
| 3420 } | 3420 } |
| 3421 | 3421 |
| 3422 static void locationTypeCheckingInterfaceAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3422 static void locationTypeCheckingInterfaceAttributeGetterCallback(v8::Local<v8::N
ame>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3423 { | 3423 { |
| 3424 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3424 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3425 TestObjectV8Internal::locationTypeCheckingInterfaceAttributeGetter(info); | 3425 TestObjectV8Internal::locationTypeCheckingInterfaceAttributeGetter(info); |
| 3426 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3426 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3427 } | 3427 } |
| 3428 | 3428 |
| 3429 static void locationTypeCheckingInterfaceAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | 3429 static void locationTypeCheckingInterfaceAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 3430 { | 3430 { |
| 3431 v8::Local<v8::Object> holder = info.Holder(); | 3431 v8::Local<v8::Object> holder = info.Holder(); |
| 3432 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3432 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3433 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationTypeCheck
ingInterface()); | 3433 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationTypeCheck
ingInterface()); |
| 3434 if (!impl) | 3434 if (!impl) |
| 3435 return; | 3435 return; |
| 3436 V8StringResource<> cppValue = v8Value; | 3436 V8StringResource<> cppValue = v8Value; |
| 3437 if (!cppValue.prepare()) | 3437 if (!cppValue.prepare()) |
| 3438 return; | 3438 return; |
| 3439 impl->setHref(cppValue); | 3439 impl->setHref(cppValue); |
| 3440 } | 3440 } |
| 3441 | 3441 |
| 3442 static void locationTypeCheckingInterfaceAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 3442 static void locationTypeCheckingInterfaceAttributeSetterCallback(v8::Local<v8::N
ame>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3443 { | 3443 { |
| 3444 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3444 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3445 TestObjectV8Internal::locationTypeCheckingInterfaceAttributeSetter(v8Value,
info); | 3445 TestObjectV8Internal::locationTypeCheckingInterfaceAttributeSetter(v8Value,
info); |
| 3446 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3446 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3447 } | 3447 } |
| 3448 | 3448 |
| 3449 static void locationGarbageCollectedAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 3449 static void locationGarbageCollectedAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
| 3450 { | 3450 { |
| 3451 v8::Local<v8::Object> holder = info.Holder(); | 3451 v8::Local<v8::Object> holder = info.Holder(); |
| 3452 TestObject* impl = V8TestObject::toImpl(holder); | 3452 TestObject* impl = V8TestObject::toImpl(holder); |
| 3453 RawPtr<TestInterfaceGarbageCollected> cppValue(impl->locationGarbageCollecte
d()); | 3453 RawPtr<TestInterfaceGarbageCollected> cppValue(impl->locationGarbageCollecte
d()); |
| 3454 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 3454 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) |
| 3455 return; | 3455 return; |
| 3456 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); | 3456 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); |
| 3457 if (!wrapper.IsEmpty()) { | 3457 if (!wrapper.IsEmpty()) { |
| 3458 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationGarbageCollected"), wrapper); | 3458 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationGarbageCollected"), wrapper); |
| 3459 v8SetReturnValue(info, wrapper); | 3459 v8SetReturnValue(info, wrapper); |
| 3460 } | 3460 } |
| 3461 } | 3461 } |
| 3462 | 3462 |
| 3463 static void locationGarbageCollectedAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3463 static void locationGarbageCollectedAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3464 { | 3464 { |
| 3465 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3465 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3466 TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info); | 3466 TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info); |
| 3467 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3467 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3468 } | 3468 } |
| 3469 | 3469 |
| 3470 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | 3470 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) |
| 3471 { | 3471 { |
| 3472 v8::Local<v8::Object> holder = info.Holder(); | 3472 v8::Local<v8::Object> holder = info.Holder(); |
| 3473 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3473 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3474 RawPtr<TestInterfaceGarbageCollected> impl = WTF::getPtr(proxyImpl->location
GarbageCollected()); | 3474 RawPtr<TestInterfaceGarbageCollected> impl = WTF::getPtr(proxyImpl->location
GarbageCollected()); |
| 3475 if (!impl) | 3475 if (!impl) |
| 3476 return; | 3476 return; |
| 3477 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 3477 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 3478 impl->setAttr1(WTF::getPtr(cppValue)); | 3478 impl->setAttr1(WTF::getPtr(cppValue)); |
| 3479 } | 3479 } |
| 3480 | 3480 |
| 3481 static void locationGarbageCollectedAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3481 static void locationGarbageCollectedAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3482 { | 3482 { |
| 3483 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3483 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3484 TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info)
; | 3484 TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info)
; |
| 3485 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3485 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3486 } | 3486 } |
| 3487 | 3487 |
| 3488 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 3488 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 3489 { | 3489 { |
| 3490 v8::Local<v8::Object> holder = info.Holder(); | 3490 v8::Local<v8::Object> holder = info.Holder(); |
| 3491 TestObject* impl = V8TestObject::toImpl(holder); | 3491 TestObject* impl = V8TestObject::toImpl(holder); |
| 3492 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> cppValue(impl->locat
ionWillBeGarbageCollected()); | 3492 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> cppValue(impl->locat
ionWillBeGarbageCollected()); |
| 3493 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) | 3493 if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue
.get())) |
| 3494 return; | 3494 return; |
| 3495 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); | 3495 v8::Local<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate(
)); |
| 3496 if (!wrapper.IsEmpty()) { | 3496 if (!wrapper.IsEmpty()) { |
| 3497 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationWillBeGarbageCollected"), wrapper); | 3497 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationWillBeGarbageCollected"), wrapper); |
| 3498 v8SetReturnValue(info, wrapper); | 3498 v8SetReturnValue(info, wrapper); |
| 3499 } | 3499 } |
| 3500 } | 3500 } |
| 3501 | 3501 |
| 3502 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3502 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::
Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3503 { | 3503 { |
| 3504 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3504 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3505 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetter(info); | 3505 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetter(info); |
| 3506 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3506 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3507 } | 3507 } |
| 3508 | 3508 |
| 3509 static void locationWillBeGarbageCollectedAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 3509 static void locationWillBeGarbageCollectedAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3510 { | 3510 { |
| 3511 v8::Local<v8::Object> holder = info.Holder(); | 3511 v8::Local<v8::Object> holder = info.Holder(); |
| 3512 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 3512 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3513 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = WTF::getPtr(p
roxyImpl->locationWillBeGarbageCollected()); | 3513 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = WTF::getPtr(p
roxyImpl->locationWillBeGarbageCollected()); |
| 3514 if (!impl) | 3514 if (!impl) |
| 3515 return; | 3515 return; |
| 3516 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 3516 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 3517 impl->setAttr1(WTF::getPtr(cppValue)); | 3517 impl->setAttr1(WTF::getPtr(cppValue)); |
| 3518 } | 3518 } |
| 3519 | 3519 |
| 3520 static void locationWillBeGarbageCollectedAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | 3520 static void locationWillBeGarbageCollectedAttributeSetterCallback(v8::Local<v8::
Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3521 { | 3521 { |
| 3522 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3522 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3523 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeSetter(v8Value,
info); | 3523 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeSetter(v8Value,
info); |
| 3524 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3524 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3525 } | 3525 } |
| 3526 | 3526 |
| 3527 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 3527 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 3528 { | 3528 { |
| 3529 v8::Local<v8::Object> holder = info.Holder(); | 3529 v8::Local<v8::Object> holder = info.Holder(); |
| 3530 TestObject* impl = V8TestObject::toImpl(holder); | 3530 TestObject* impl = V8TestObject::toImpl(holder); |
| 3531 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); | 3531 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3532 int cppValue(impl->raisesExceptionLongAttribute(exceptionState)); | 3532 int cppValue(impl->raisesExceptionLongAttribute(exceptionState)); |
| 3533 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3533 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 3534 return; | 3534 return; |
| 3535 v8SetReturnValueInt(info, cppValue); | 3535 v8SetReturnValueInt(info, cppValue); |
| 3536 } | 3536 } |
| 3537 | 3537 |
| 3538 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3538 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::Na
me>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3539 { | 3539 { |
| 3540 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3540 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3541 TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info); | 3541 TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info); |
| 3542 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3542 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3543 } | 3543 } |
| 3544 | 3544 |
| 3545 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | 3545 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 3546 { | 3546 { |
| 3547 v8::Local<v8::Object> holder = info.Holder(); | 3547 v8::Local<v8::Object> holder = info.Holder(); |
| 3548 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); | 3548 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3549 TestObject* impl = V8TestObject::toImpl(holder); | 3549 TestObject* impl = V8TestObject::toImpl(holder); |
| 3550 int cppValue = toInt32(v8Value, exceptionState); | 3550 int cppValue = toInt32(v8Value, exceptionState); |
| 3551 if (exceptionState.throwIfNeeded()) | 3551 if (exceptionState.throwIfNeeded()) |
| 3552 return; | 3552 return; |
| 3553 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); | 3553 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); |
| 3554 exceptionState.throwIfNeeded(); | 3554 exceptionState.throwIfNeeded(); |
| 3555 } | 3555 } |
| 3556 | 3556 |
| 3557 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3557 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::Na
me>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3558 { | 3558 { |
| 3559 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3559 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3560 TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, i
nfo); | 3560 TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, i
nfo); |
| 3561 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3561 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3562 } | 3562 } |
| 3563 | 3563 |
| 3564 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 3564 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
| 3565 { | 3565 { |
| 3566 v8::Local<v8::Object> holder = info.Holder(); | 3566 v8::Local<v8::Object> holder = info.Holder(); |
| 3567 TestObject* impl = V8TestObject::toImpl(holder); | 3567 TestObject* impl = V8TestObject::toImpl(holder); |
| 3568 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); | 3568 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3569 int cppValue(impl->raisesExceptionGetterLongAttribute(exceptionState)); | 3569 int cppValue(impl->raisesExceptionGetterLongAttribute(exceptionState)); |
| 3570 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3570 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 3571 return; | 3571 return; |
| 3572 v8SetReturnValueInt(info, cppValue); | 3572 v8SetReturnValueInt(info, cppValue); |
| 3573 } | 3573 } |
| 3574 | 3574 |
| 3575 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3575 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<
v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3576 { | 3576 { |
| 3577 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3577 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3578 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info
); | 3578 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info
); |
| 3579 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3579 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3580 } | 3580 } |
| 3581 | 3581 |
| 3582 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3582 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3583 { | 3583 { |
| 3584 v8::Local<v8::Object> holder = info.Holder(); | 3584 v8::Local<v8::Object> holder = info.Holder(); |
| 3585 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); | 3585 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3586 TestObject* impl = V8TestObject::toImpl(holder); | 3586 TestObject* impl = V8TestObject::toImpl(holder); |
| 3587 int cppValue = toInt32(v8Value, exceptionState); | 3587 int cppValue = toInt32(v8Value, exceptionState); |
| 3588 if (exceptionState.throwIfNeeded()) | 3588 if (exceptionState.throwIfNeeded()) |
| 3589 return; | 3589 return; |
| 3590 impl->setRaisesExceptionGetterLongAttribute(cppValue); | 3590 impl->setRaisesExceptionGetterLongAttribute(cppValue); |
| 3591 } | 3591 } |
| 3592 | 3592 |
| 3593 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | 3593 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<
v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 3594 { | 3594 { |
| 3595 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3595 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3596 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Va
lue, info); | 3596 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Va
lue, info); |
| 3597 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3597 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3598 } | 3598 } |
| 3599 | 3599 |
| 3600 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 3600 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
| 3601 { | 3601 { |
| 3602 v8::Local<v8::Object> holder = info.Holder(); | 3602 v8::Local<v8::Object> holder = info.Holder(); |
| 3603 TestObject* impl = V8TestObject::toImpl(holder); | 3603 TestObject* impl = V8TestObject::toImpl(holder); |
| 3604 v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); | 3604 v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); |
| 3605 } | 3605 } |
| 3606 | 3606 |
| 3607 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3607 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<
v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3608 { | 3608 { |
| 3609 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3609 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3610 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info
); | 3610 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info
); |
| 3611 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3611 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3612 } | 3612 } |
| 3613 | 3613 |
| 3614 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3614 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3615 { | 3615 { |
| 3616 v8::Local<v8::Object> holder = info.Holder(); | 3616 v8::Local<v8::Object> holder = info.Holder(); |
| 3617 ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesEx
ceptionLongAttribute", "TestObject", holder, info.GetIsolate()); | 3617 ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesEx
ceptionLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3618 TestObject* impl = V8TestObject::toImpl(holder); | 3618 TestObject* impl = V8TestObject::toImpl(holder); |
| 3619 int cppValue = toInt32(v8Value, exceptionState); | 3619 int cppValue = toInt32(v8Value, exceptionState); |
| 3620 if (exceptionState.throwIfNeeded()) | 3620 if (exceptionState.throwIfNeeded()) |
| 3621 return; | 3621 return; |
| 3622 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); | 3622 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); |
| 3623 exceptionState.throwIfNeeded(); | 3623 exceptionState.throwIfNeeded(); |
| 3624 } | 3624 } |
| 3625 | 3625 |
| 3626 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | 3626 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<
v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 3627 { | 3627 { |
| 3628 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3628 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3629 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Va
lue, info); | 3629 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Va
lue, info); |
| 3630 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3630 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3631 } | 3631 } |
| 3632 | 3632 |
| 3633 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | 3633 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 3634 { | 3634 { |
| 3635 v8::Local<v8::Object> holder = info.Holder(); | 3635 v8::Local<v8::Object> holder = info.Holder(); |
| 3636 TestObject* impl = V8TestObject::toImpl(holder); | 3636 TestObject* impl = V8TestObject::toImpl(holder); |
| 3637 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | 3637 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3638 RefPtr<TestInterfaceEmpty> cppValue(impl->raisesExceptionTestInterfaceEmptyA
ttribute(exceptionState)); | 3638 RefPtr<TestInterfaceEmpty> cppValue(impl->raisesExceptionTestInterfaceEmptyA
ttribute(exceptionState)); |
| 3639 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3639 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 3640 return; | 3640 return; |
| 3641 v8SetReturnValueFast(info, WTF::getPtr(cppValue.release()), impl); | 3641 v8SetReturnValueFast(info, WTF::getPtr(cppValue.release()), impl); |
| 3642 } | 3642 } |
| 3643 | 3643 |
| 3644 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3644 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8
::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3645 { | 3645 { |
| 3646 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3646 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3647 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGet
ter(info); | 3647 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGet
ter(info); |
| 3648 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3648 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3649 } | 3649 } |
| 3650 | 3650 |
| 3651 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3651 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3652 { | 3652 { |
| 3653 v8::Local<v8::Object> holder = info.Holder(); | 3653 v8::Local<v8::Object> holder = info.Holder(); |
| 3654 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | 3654 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3655 TestObject* impl = V8TestObject::toImpl(holder); | 3655 TestObject* impl = V8TestObject::toImpl(holder); |
| 3656 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); | 3656 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(inf
o.GetIsolate(), v8Value); |
| 3657 impl->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), e
xceptionState); | 3657 impl->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), e
xceptionState); |
| 3658 exceptionState.throwIfNeeded(); | 3658 exceptionState.throwIfNeeded(); |
| 3659 } | 3659 } |
| 3660 | 3660 |
| 3661 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | 3661 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8
::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
| 3662 { | 3662 { |
| 3663 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3663 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3664 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSet
ter(v8Value, info); | 3664 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSet
ter(v8Value, info); |
| 3665 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3665 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3666 } | 3666 } |
| 3667 | 3667 |
| 3668 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 3668 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 3669 { | 3669 { |
| 3670 v8::Local<v8::Object> holder = info.Holder(); | 3670 v8::Local<v8::Object> holder = info.Holder(); |
| 3671 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edAttributeRaisesExceptionGetterAnyAttribute"); | 3671 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edAttributeRaisesExceptionGetterAnyAttribute"); |
| 3672 TestObject* impl = V8TestObject::toImpl(holder); | 3672 TestObject* impl = V8TestObject::toImpl(holder); |
| 3673 if (!impl->isValueDirty()) { | 3673 if (!impl->isValueDirty()) { |
| 3674 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); | 3674 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); |
| 3675 if (!v8Value.IsEmpty()) { | 3675 if (!v8Value.IsEmpty()) { |
| 3676 v8SetReturnValue(info, v8Value); | 3676 v8SetReturnValue(info, v8Value); |
| 3677 return; | 3677 return; |
| 3678 } | 3678 } |
| 3679 } | 3679 } |
| 3680 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | 3680 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3681 ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(
exceptionState)); | 3681 ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(
exceptionState)); |
| 3682 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3682 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 3683 return; | 3683 return; |
| 3684 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); | 3684 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); |
| 3685 v8SetReturnValue(info, cppValue.v8Value()); | 3685 v8SetReturnValue(info, cppValue.v8Value()); |
| 3686 } | 3686 } |
| 3687 | 3687 |
| 3688 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3688 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb
ack(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3689 { | 3689 { |
| 3690 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3690 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3691 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteGetter(info); | 3691 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteGetter(info); |
| 3692 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3692 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3693 } | 3693 } |
| 3694 | 3694 |
| 3695 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3695 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3696 { | 3696 { |
| 3697 v8::Local<v8::Object> holder = info.Holder(); | 3697 v8::Local<v8::Object> holder = info.Holder(); |
| 3698 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | 3698 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3699 TestObject* impl = V8TestObject::toImpl(holder); | 3699 TestObject* impl = V8TestObject::toImpl(holder); |
| 3700 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); | 3700 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()),
v8Value); |
| 3701 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptio
nState); | 3701 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptio
nState); |
| 3702 exceptionState.throwIfNeeded(); | 3702 exceptionState.throwIfNeeded(); |
| 3703 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute")); // Inval
idate the cached value. | 3703 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute")); // Inval
idate the cached value. |
| 3704 } | 3704 } |
| 3705 | 3705 |
| 3706 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb
ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | 3706 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb
ack(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) |
| 3707 { | 3707 { |
| 3708 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3708 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3709 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteSetter(v8Value, info); | 3709 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteSetter(v8Value, info); |
| 3710 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3710 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3711 } | 3711 } |
| 3712 | 3712 |
| 3713 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 3713 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 3714 { | 3714 { |
| 3715 v8::Local<v8::Object> holder = info.Holder(); | 3715 v8::Local<v8::Object> holder = info.Holder(); |
| 3716 TestObject* impl = V8TestObject::toImpl(holder); | 3716 TestObject* impl = V8TestObject::toImpl(holder); |
| 3717 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lecttestinterfaceattributeAttr)), impl); | 3717 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lecttestinterfaceattributeAttr)), impl); |
| 3718 } | 3718 } |
| 3719 | 3719 |
| 3720 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3720 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::N
ame>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3721 { | 3721 { |
| 3722 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3722 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3723 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); | 3723 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); |
| 3724 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3724 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3725 } | 3725 } |
| 3726 | 3726 |
| 3727 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | 3727 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 3728 { | 3728 { |
| 3729 v8::Local<v8::Object> holder = info.Holder(); | 3729 v8::Local<v8::Object> holder = info.Holder(); |
| 3730 TestObject* impl = V8TestObject::toImpl(holder); | 3730 TestObject* impl = V8TestObject::toImpl(holder); |
| 3731 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 3731 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 3732 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3732 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3733 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr
(cppValue)); | 3733 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr
(cppValue)); |
| 3734 } | 3734 } |
| 3735 | 3735 |
| 3736 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 3736 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::N
ame>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3737 { | 3737 { |
| 3738 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3738 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3739 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3739 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3740 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8Value,
info); | 3740 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8Value,
info); |
| 3741 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3741 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3742 } | 3742 } |
| 3743 | 3743 |
| 3744 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | 3744 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 3745 { | 3745 { |
| 3746 v8::Local<v8::Object> holder = info.Holder(); | 3746 v8::Local<v8::Object> holder = info.Holder(); |
| 3747 TestObject* impl = V8TestObject::toImpl(holder); | 3747 TestObject* impl = V8TestObject::toImpl(holder); |
| 3748 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lectedNameAttributeAttr)), impl); | 3748 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lectedNameAttributeAttr)), impl); |
| 3749 } | 3749 } |
| 3750 | 3750 |
| 3751 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3751 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8
::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3752 { | 3752 { |
| 3753 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3753 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3754 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGet
ter(info); | 3754 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGet
ter(info); |
| 3755 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3755 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3756 } | 3756 } |
| 3757 | 3757 |
| 3758 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3758 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3759 { | 3759 { |
| 3760 v8::Local<v8::Object> holder = info.Holder(); | 3760 v8::Local<v8::Object> holder = info.Holder(); |
| 3761 TestObject* impl = V8TestObject::toImpl(holder); | 3761 TestObject* impl = V8TestObject::toImpl(holder); |
| 3762 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 3762 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 3763 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3763 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3764 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppVal
ue)); | 3764 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppVal
ue)); |
| 3765 } | 3765 } |
| 3766 | 3766 |
| 3767 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | 3767 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8
::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
| 3768 { | 3768 { |
| 3769 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3769 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3770 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3770 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3771 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSet
ter(v8Value, info); | 3771 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSet
ter(v8Value, info); |
| 3772 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3772 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3773 } | 3773 } |
| 3774 | 3774 |
| 3775 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 3775 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 3776 { | 3776 { |
| 3777 v8::Local<v8::Object> holder = info.Holder(); | 3777 v8::Local<v8::Object> holder = info.Holder(); |
| 3778 TestObject* impl = V8TestObject::toImpl(holder); | 3778 TestObject* impl = V8TestObject::toImpl(holder); |
| 3779 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectbooleana
ttributeAttr)); | 3779 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectbooleana
ttributeAttr)); |
| 3780 } | 3780 } |
| 3781 | 3781 |
| 3782 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 3782 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3783 { | 3783 { |
| 3784 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3784 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3785 TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info); | 3785 TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info); |
| 3786 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3786 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3787 } | 3787 } |
| 3788 | 3788 |
| 3789 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 3789 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 3790 { | 3790 { |
| 3791 v8::Local<v8::Object> holder = info.Holder(); | 3791 v8::Local<v8::Object> holder = info.Holder(); |
| 3792 TestObject* impl = V8TestObject::toImpl(holder); | 3792 TestObject* impl = V8TestObject::toImpl(holder); |
| 3793 bool cppValue = v8Value->BooleanValue(); | 3793 bool cppValue = v8Value->BooleanValue(); |
| 3794 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3794 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3795 impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); | 3795 impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); |
| 3796 } | 3796 } |
| 3797 | 3797 |
| 3798 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3798 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3799 { | 3799 { |
| 3800 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3800 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3801 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3801 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3802 TestObjectV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info); | 3802 TestObjectV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info); |
| 3803 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3803 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3804 } | 3804 } |
| 3805 | 3805 |
| 3806 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 3806 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 3807 { | 3807 { |
| 3808 v8::Local<v8::Object> holder = info.Holder(); | 3808 v8::Local<v8::Object> holder = info.Holder(); |
| 3809 TestObject* impl = V8TestObject::toImpl(holder); | 3809 TestObject* impl = V8TestObject::toImpl(holder); |
| 3810 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectlonga
ttributeAttr)); | 3810 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectlonga
ttributeAttr)); |
| 3811 } | 3811 } |
| 3812 | 3812 |
| 3813 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 3813 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 3814 { | 3814 { |
| 3815 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3815 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3816 TestObjectV8Internal::reflectLongAttributeAttributeGetter(info); | 3816 TestObjectV8Internal::reflectLongAttributeAttributeGetter(info); |
| 3817 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3817 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3818 } | 3818 } |
| 3819 | 3819 |
| 3820 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 3820 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 3821 { | 3821 { |
| 3822 v8::Local<v8::Object> holder = info.Holder(); | 3822 v8::Local<v8::Object> holder = info.Holder(); |
| 3823 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAtt
ribute", "TestObject", holder, info.GetIsolate()); | 3823 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAtt
ribute", "TestObject", holder, info.GetIsolate()); |
| 3824 TestObject* impl = V8TestObject::toImpl(holder); | 3824 TestObject* impl = V8TestObject::toImpl(holder); |
| 3825 int cppValue = toInt32(v8Value, exceptionState); | 3825 int cppValue = toInt32(v8Value, exceptionState); |
| 3826 if (exceptionState.throwIfNeeded()) | 3826 if (exceptionState.throwIfNeeded()) |
| 3827 return; | 3827 return; |
| 3828 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3828 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3829 impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); | 3829 impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); |
| 3830 } | 3830 } |
| 3831 | 3831 |
| 3832 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3832 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3833 { | 3833 { |
| 3834 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3834 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3835 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3835 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3836 TestObjectV8Internal::reflectLongAttributeAttributeSetter(v8Value, info); | 3836 TestObjectV8Internal::reflectLongAttributeAttributeSetter(v8Value, info); |
| 3837 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3837 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3838 } | 3838 } |
| 3839 | 3839 |
| 3840 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 3840 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 3841 { | 3841 { |
| 3842 v8::Local<v8::Object> holder = info.Holder(); | 3842 v8::Local<v8::Object> holder = info.Holder(); |
| 3843 TestObject* impl = V8TestObject::toImpl(holder); | 3843 TestObject* impl = V8TestObject::toImpl(holder); |
| 3844 v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->fastGetAtt
ribute(HTMLNames::reflectunsignedshortattributeAttr)))); | 3844 v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->fastGetAtt
ribute(HTMLNames::reflectunsignedshortattributeAttr)))); |
| 3845 } | 3845 } |
| 3846 | 3846 |
| 3847 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3847 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::N
ame>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3848 { | 3848 { |
| 3849 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3849 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3850 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info); | 3850 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info); |
| 3851 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3851 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3852 } | 3852 } |
| 3853 | 3853 |
| 3854 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | 3854 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 3855 { | 3855 { |
| 3856 v8::Local<v8::Object> holder = info.Holder(); | 3856 v8::Local<v8::Object> holder = info.Holder(); |
| 3857 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dShortAttribute", "TestObject", holder, info.GetIsolate()); | 3857 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dShortAttribute", "TestObject", holder, info.GetIsolate()); |
| 3858 TestObject* impl = V8TestObject::toImpl(holder); | 3858 TestObject* impl = V8TestObject::toImpl(holder); |
| 3859 unsigned cppValue = toUInt16(v8Value, exceptionState); | 3859 unsigned cppValue = toUInt16(v8Value, exceptionState); |
| 3860 if (exceptionState.throwIfNeeded()) | 3860 if (exceptionState.throwIfNeeded()) |
| 3861 return; | 3861 return; |
| 3862 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3862 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3863 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); | 3863 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); |
| 3864 } | 3864 } |
| 3865 | 3865 |
| 3866 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 3866 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::N
ame>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3867 { | 3867 { |
| 3868 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3868 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3869 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3869 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3870 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8Value,
info); | 3870 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8Value,
info); |
| 3871 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3871 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3872 } | 3872 } |
| 3873 | 3873 |
| 3874 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 3874 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 3875 { | 3875 { |
| 3876 v8::Local<v8::Object> holder = info.Holder(); | 3876 v8::Local<v8::Object> holder = info.Holder(); |
| 3877 TestObject* impl = V8TestObject::toImpl(holder); | 3877 TestObject* impl = V8TestObject::toImpl(holder); |
| 3878 v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->getIntegra
lAttribute(HTMLNames::reflectunsignedlongattributeAttr)))); | 3878 v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->getIntegra
lAttribute(HTMLNames::reflectunsignedlongattributeAttr)))); |
| 3879 } | 3879 } |
| 3880 | 3880 |
| 3881 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3881 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::Na
me>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3882 { | 3882 { |
| 3883 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3883 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3884 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info); | 3884 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info); |
| 3885 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3885 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3886 } | 3886 } |
| 3887 | 3887 |
| 3888 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | 3888 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 3889 { | 3889 { |
| 3890 v8::Local<v8::Object> holder = info.Holder(); | 3890 v8::Local<v8::Object> holder = info.Holder(); |
| 3891 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dLongAttribute", "TestObject", holder, info.GetIsolate()); | 3891 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3892 TestObject* impl = V8TestObject::toImpl(holder); | 3892 TestObject* impl = V8TestObject::toImpl(holder); |
| 3893 unsigned cppValue = toUInt32(v8Value, exceptionState); | 3893 unsigned cppValue = toUInt32(v8Value, exceptionState); |
| 3894 if (exceptionState.throwIfNeeded()) | 3894 if (exceptionState.throwIfNeeded()) |
| 3895 return; | 3895 return; |
| 3896 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3896 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3897 impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAt
tr, cppValue); | 3897 impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAt
tr, cppValue); |
| 3898 } | 3898 } |
| 3899 | 3899 |
| 3900 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3900 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::Na
me>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3901 { | 3901 { |
| 3902 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3902 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3903 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3903 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3904 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Value, i
nfo); | 3904 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Value, i
nfo); |
| 3905 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3905 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3906 } | 3906 } |
| 3907 | 3907 |
| 3908 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 3908 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3909 { | 3909 { |
| 3910 v8::Local<v8::Object> holder = info.Holder(); | 3910 v8::Local<v8::Object> holder = info.Holder(); |
| 3911 TestObject* impl = V8TestObject::toImpl(holder); | 3911 TestObject* impl = V8TestObject::toImpl(holder); |
| 3912 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); | 3912 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); |
| 3913 } | 3913 } |
| 3914 | 3914 |
| 3915 static void idAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyC
allbackInfo<v8::Value>& info) | 3915 static void idAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 3916 { | 3916 { |
| 3917 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3917 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3918 TestObjectV8Internal::idAttributeGetter(info); | 3918 TestObjectV8Internal::idAttributeGetter(info); |
| 3919 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3919 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3920 } | 3920 } |
| 3921 | 3921 |
| 3922 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCa
llbackInfo<void>& info) | 3922 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCa
llbackInfo<void>& info) |
| 3923 { | 3923 { |
| 3924 v8::Local<v8::Object> holder = info.Holder(); | 3924 v8::Local<v8::Object> holder = info.Holder(); |
| 3925 TestObject* impl = V8TestObject::toImpl(holder); | 3925 TestObject* impl = V8TestObject::toImpl(holder); |
| 3926 V8StringResource<> cppValue = v8Value; | 3926 V8StringResource<> cppValue = v8Value; |
| 3927 if (!cppValue.prepare()) | 3927 if (!cppValue.prepare()) |
| 3928 return; | 3928 return; |
| 3929 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3929 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3930 impl->setAttribute(HTMLNames::idAttr, cppValue); | 3930 impl->setAttribute(HTMLNames::idAttr, cppValue); |
| 3931 } | 3931 } |
| 3932 | 3932 |
| 3933 static void idAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3933 static void idAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3934 { | 3934 { |
| 3935 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3935 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3936 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3936 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3937 TestObjectV8Internal::idAttributeSetter(v8Value, info); | 3937 TestObjectV8Internal::idAttributeSetter(v8Value, info); |
| 3938 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3938 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3939 } | 3939 } |
| 3940 | 3940 |
| 3941 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 3941 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3942 { | 3942 { |
| 3943 v8::Local<v8::Object> holder = info.Holder(); | 3943 v8::Local<v8::Object> holder = info.Holder(); |
| 3944 TestObject* impl = V8TestObject::toImpl(holder); | 3944 TestObject* impl = V8TestObject::toImpl(holder); |
| 3945 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); | 3945 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); |
| 3946 } | 3946 } |
| 3947 | 3947 |
| 3948 static void nameAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 3948 static void nameAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyC
allbackInfo<v8::Value>& info) |
| 3949 { | 3949 { |
| 3950 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3950 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3951 TestObjectV8Internal::nameAttributeGetter(info); | 3951 TestObjectV8Internal::nameAttributeGetter(info); |
| 3952 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3952 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3953 } | 3953 } |
| 3954 | 3954 |
| 3955 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) | 3955 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) |
| 3956 { | 3956 { |
| 3957 v8::Local<v8::Object> holder = info.Holder(); | 3957 v8::Local<v8::Object> holder = info.Holder(); |
| 3958 TestObject* impl = V8TestObject::toImpl(holder); | 3958 TestObject* impl = V8TestObject::toImpl(holder); |
| 3959 V8StringResource<> cppValue = v8Value; | 3959 V8StringResource<> cppValue = v8Value; |
| 3960 if (!cppValue.prepare()) | 3960 if (!cppValue.prepare()) |
| 3961 return; | 3961 return; |
| 3962 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3962 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3963 impl->setAttribute(HTMLNames::nameAttr, cppValue); | 3963 impl->setAttribute(HTMLNames::nameAttr, cppValue); |
| 3964 } | 3964 } |
| 3965 | 3965 |
| 3966 static void nameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3966 static void nameAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3967 { | 3967 { |
| 3968 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3968 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3969 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3969 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3970 TestObjectV8Internal::nameAttributeSetter(v8Value, info); | 3970 TestObjectV8Internal::nameAttributeSetter(v8Value, info); |
| 3971 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3971 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3972 } | 3972 } |
| 3973 | 3973 |
| 3974 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) | 3974 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) |
| 3975 { | 3975 { |
| 3976 v8::Local<v8::Object> holder = info.Holder(); | 3976 v8::Local<v8::Object> holder = info.Holder(); |
| 3977 TestObject* impl = V8TestObject::toImpl(holder); | 3977 TestObject* impl = V8TestObject::toImpl(holder); |
| 3978 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); | 3978 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); |
| 3979 } | 3979 } |
| 3980 | 3980 |
| 3981 static void classAttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 3981 static void classAttributeGetterCallback(v8::Local<v8::Name>, const v8::Property
CallbackInfo<v8::Value>& info) |
| 3982 { | 3982 { |
| 3983 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3983 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3984 TestObjectV8Internal::classAttributeGetter(info); | 3984 TestObjectV8Internal::classAttributeGetter(info); |
| 3985 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3985 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3986 } | 3986 } |
| 3987 | 3987 |
| 3988 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) | 3988 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) |
| 3989 { | 3989 { |
| 3990 v8::Local<v8::Object> holder = info.Holder(); | 3990 v8::Local<v8::Object> holder = info.Holder(); |
| 3991 TestObject* impl = V8TestObject::toImpl(holder); | 3991 TestObject* impl = V8TestObject::toImpl(holder); |
| 3992 V8StringResource<> cppValue = v8Value; | 3992 V8StringResource<> cppValue = v8Value; |
| 3993 if (!cppValue.prepare()) | 3993 if (!cppValue.prepare()) |
| 3994 return; | 3994 return; |
| 3995 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3995 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3996 impl->setAttribute(HTMLNames::classAttr, cppValue); | 3996 impl->setAttribute(HTMLNames::classAttr, cppValue); |
| 3997 } | 3997 } |
| 3998 | 3998 |
| 3999 static void classAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3999 static void classAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4000 { | 4000 { |
| 4001 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4001 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4002 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4002 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4003 TestObjectV8Internal::classAttributeSetter(v8Value, info); | 4003 TestObjectV8Internal::classAttributeSetter(v8Value, info); |
| 4004 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4004 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4005 } | 4005 } |
| 4006 | 4006 |
| 4007 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 4007 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
| 4008 { | 4008 { |
| 4009 v8::Local<v8::Object> holder = info.Holder(); | 4009 v8::Local<v8::Object> holder = info.Holder(); |
| 4010 TestObject* impl = V8TestObject::toImpl(holder); | 4010 TestObject* impl = V8TestObject::toImpl(holder); |
| 4011 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); | 4011 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); |
| 4012 } | 4012 } |
| 4013 | 4013 |
| 4014 static void reflectedIdAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 4014 static void reflectedIdAttributeGetterCallback(v8::Local<v8::Name>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 4015 { | 4015 { |
| 4016 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4016 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4017 TestObjectV8Internal::reflectedIdAttributeGetter(info); | 4017 TestObjectV8Internal::reflectedIdAttributeGetter(info); |
| 4018 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4018 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4019 } | 4019 } |
| 4020 | 4020 |
| 4021 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) | 4021 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
| 4022 { | 4022 { |
| 4023 v8::Local<v8::Object> holder = info.Holder(); | 4023 v8::Local<v8::Object> holder = info.Holder(); |
| 4024 TestObject* impl = V8TestObject::toImpl(holder); | 4024 TestObject* impl = V8TestObject::toImpl(holder); |
| 4025 V8StringResource<> cppValue = v8Value; | 4025 V8StringResource<> cppValue = v8Value; |
| 4026 if (!cppValue.prepare()) | 4026 if (!cppValue.prepare()) |
| 4027 return; | 4027 return; |
| 4028 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4028 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4029 impl->setAttribute(HTMLNames::idAttr, cppValue); | 4029 impl->setAttribute(HTMLNames::idAttr, cppValue); |
| 4030 } | 4030 } |
| 4031 | 4031 |
| 4032 static void reflectedIdAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4032 static void reflectedIdAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4033 { | 4033 { |
| 4034 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4034 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4035 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4035 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4036 TestObjectV8Internal::reflectedIdAttributeSetter(v8Value, info); | 4036 TestObjectV8Internal::reflectedIdAttributeSetter(v8Value, info); |
| 4037 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4037 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4038 } | 4038 } |
| 4039 | 4039 |
| 4040 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 4040 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 4041 { | 4041 { |
| 4042 v8::Local<v8::Object> holder = info.Holder(); | 4042 v8::Local<v8::Object> holder = info.Holder(); |
| 4043 TestObject* impl = V8TestObject::toImpl(holder); | 4043 TestObject* impl = V8TestObject::toImpl(holder); |
| 4044 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); | 4044 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); |
| 4045 } | 4045 } |
| 4046 | 4046 |
| 4047 static void reflectedNameAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 4047 static void reflectedNameAttributeGetterCallback(v8::Local<v8::Name>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 4048 { | 4048 { |
| 4049 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4049 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4050 TestObjectV8Internal::reflectedNameAttributeGetter(info); | 4050 TestObjectV8Internal::reflectedNameAttributeGetter(info); |
| 4051 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4051 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4052 } | 4052 } |
| 4053 | 4053 |
| 4054 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 4054 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 4055 { | 4055 { |
| 4056 v8::Local<v8::Object> holder = info.Holder(); | 4056 v8::Local<v8::Object> holder = info.Holder(); |
| 4057 TestObject* impl = V8TestObject::toImpl(holder); | 4057 TestObject* impl = V8TestObject::toImpl(holder); |
| 4058 V8StringResource<> cppValue = v8Value; | 4058 V8StringResource<> cppValue = v8Value; |
| 4059 if (!cppValue.prepare()) | 4059 if (!cppValue.prepare()) |
| 4060 return; | 4060 return; |
| 4061 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4061 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4062 impl->setAttribute(HTMLNames::nameAttr, cppValue); | 4062 impl->setAttribute(HTMLNames::nameAttr, cppValue); |
| 4063 } | 4063 } |
| 4064 | 4064 |
| 4065 static void reflectedNameAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4065 static void reflectedNameAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4066 { | 4066 { |
| 4067 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4067 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4068 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4068 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4069 TestObjectV8Internal::reflectedNameAttributeSetter(v8Value, info); | 4069 TestObjectV8Internal::reflectedNameAttributeSetter(v8Value, info); |
| 4070 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4070 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4071 } | 4071 } |
| 4072 | 4072 |
| 4073 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 4073 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 4074 { | 4074 { |
| 4075 v8::Local<v8::Object> holder = info.Holder(); | 4075 v8::Local<v8::Object> holder = info.Holder(); |
| 4076 TestObject* impl = V8TestObject::toImpl(holder); | 4076 TestObject* impl = V8TestObject::toImpl(holder); |
| 4077 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); | 4077 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); |
| 4078 } | 4078 } |
| 4079 | 4079 |
| 4080 static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 4080 static void reflectedClassAttributeGetterCallback(v8::Local<v8::Name>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 4081 { | 4081 { |
| 4082 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4082 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4083 TestObjectV8Internal::reflectedClassAttributeGetter(info); | 4083 TestObjectV8Internal::reflectedClassAttributeGetter(info); |
| 4084 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4084 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4085 } | 4085 } |
| 4086 | 4086 |
| 4087 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 4087 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 4088 { | 4088 { |
| 4089 v8::Local<v8::Object> holder = info.Holder(); | 4089 v8::Local<v8::Object> holder = info.Holder(); |
| 4090 TestObject* impl = V8TestObject::toImpl(holder); | 4090 TestObject* impl = V8TestObject::toImpl(holder); |
| 4091 V8StringResource<> cppValue = v8Value; | 4091 V8StringResource<> cppValue = v8Value; |
| 4092 if (!cppValue.prepare()) | 4092 if (!cppValue.prepare()) |
| 4093 return; | 4093 return; |
| 4094 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4094 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4095 impl->setAttribute(HTMLNames::classAttr, cppValue); | 4095 impl->setAttribute(HTMLNames::classAttr, cppValue); |
| 4096 } | 4096 } |
| 4097 | 4097 |
| 4098 static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4098 static void reflectedClassAttributeSetterCallback(v8::Local<v8::Name>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4099 { | 4099 { |
| 4100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4101 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4101 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4102 TestObjectV8Internal::reflectedClassAttributeSetter(v8Value, info); | 4102 TestObjectV8Internal::reflectedClassAttributeSetter(v8Value, info); |
| 4103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4104 } | 4104 } |
| 4105 | 4105 |
| 4106 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 4106 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 4107 { | 4107 { |
| 4108 v8::Local<v8::Object> holder = info.Holder(); | 4108 v8::Local<v8::Object> holder = info.Holder(); |
| 4109 TestObject* impl = V8TestObject::toImpl(holder); | 4109 TestObject* impl = V8TestObject::toImpl(holder); |
| 4110 String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeA
ttr)); | 4110 String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeA
ttr)); |
| 4111 if (cppValue.isEmpty()) { | 4111 if (cppValue.isEmpty()) { |
| 4112 ; | 4112 ; |
| 4113 } else if (equalIgnoringCase(cppValue, "unique")) { | 4113 } else if (equalIgnoringCase(cppValue, "unique")) { |
| 4114 cppValue = "unique"; | 4114 cppValue = "unique"; |
| 4115 } else { | 4115 } else { |
| 4116 cppValue = ""; | 4116 cppValue = ""; |
| 4117 } | 4117 } |
| 4118 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 4118 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 4119 } | 4119 } |
| 4120 | 4120 |
| 4121 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4121 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Name>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4122 { | 4122 { |
| 4123 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4123 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4124 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); | 4124 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); |
| 4125 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4125 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4126 } | 4126 } |
| 4127 | 4127 |
| 4128 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 4128 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 4129 { | 4129 { |
| 4130 v8::Local<v8::Object> holder = info.Holder(); | 4130 v8::Local<v8::Object> holder = info.Holder(); |
| 4131 TestObject* impl = V8TestObject::toImpl(holder); | 4131 TestObject* impl = V8TestObject::toImpl(holder); |
| 4132 V8StringResource<> cppValue = v8Value; | 4132 V8StringResource<> cppValue = v8Value; |
| 4133 if (!cppValue.prepare()) | 4133 if (!cppValue.prepare()) |
| 4134 return; | 4134 return; |
| 4135 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4135 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4136 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); | 4136 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); |
| 4137 } | 4137 } |
| 4138 | 4138 |
| 4139 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4139 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Name>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4140 { | 4140 { |
| 4141 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4141 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4142 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4142 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4143 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(v8Value, info
); | 4143 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(v8Value, info
); |
| 4144 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4144 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4145 } | 4145 } |
| 4146 | 4146 |
| 4147 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 4147 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 4148 { | 4148 { |
| 4149 v8::Local<v8::Object> holder = info.Holder(); | 4149 v8::Local<v8::Object> holder = info.Holder(); |
| 4150 TestObject* impl = V8TestObject::toImpl(holder); | 4150 TestObject* impl = V8TestObject::toImpl(holder); |
| 4151 String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr
)); | 4151 String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr
)); |
| 4152 if (cppValue.isEmpty()) { | 4152 if (cppValue.isEmpty()) { |
| 4153 ; | 4153 ; |
| 4154 } else if (equalIgnoringCase(cppValue, "Per")) { | 4154 } else if (equalIgnoringCase(cppValue, "Per")) { |
| 4155 cppValue = "Per"; | 4155 cppValue = "Per"; |
| 4156 } else if (equalIgnoringCase(cppValue, "Paal")) { | 4156 } else if (equalIgnoringCase(cppValue, "Paal")) { |
| 4157 cppValue = "Paal"; | 4157 cppValue = "Paal"; |
| 4158 } else if (equalIgnoringCase(cppValue, "Espen")) { | 4158 } else if (equalIgnoringCase(cppValue, "Espen")) { |
| 4159 cppValue = "Espen"; | 4159 cppValue = "Espen"; |
| 4160 } else { | 4160 } else { |
| 4161 cppValue = ""; | 4161 cppValue = ""; |
| 4162 } | 4162 } |
| 4163 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 4163 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 4164 } | 4164 } |
| 4165 | 4165 |
| 4166 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 4166 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 4167 { | 4167 { |
| 4168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4169 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); | 4169 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); |
| 4170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4171 } | 4171 } |
| 4172 | 4172 |
| 4173 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 4173 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 4174 { | 4174 { |
| 4175 v8::Local<v8::Object> holder = info.Holder(); | 4175 v8::Local<v8::Object> holder = info.Holder(); |
| 4176 TestObject* impl = V8TestObject::toImpl(holder); | 4176 TestObject* impl = V8TestObject::toImpl(holder); |
| 4177 V8StringResource<> cppValue = v8Value; | 4177 V8StringResource<> cppValue = v8Value; |
| 4178 if (!cppValue.prepare()) | 4178 if (!cppValue.prepare()) |
| 4179 return; | 4179 return; |
| 4180 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4180 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4181 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); | 4181 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); |
| 4182 } | 4182 } |
| 4183 | 4183 |
| 4184 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4184 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4185 { | 4185 { |
| 4186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4187 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4187 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4188 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, info); | 4188 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, info); |
| 4189 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4189 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4190 } | 4190 } |
| 4191 | 4191 |
| 4192 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 4192 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 4193 { | 4193 { |
| 4194 v8::Local<v8::Object> holder = info.Holder(); | 4194 v8::Local<v8::Object> holder = info.Holder(); |
| 4195 TestObject* impl = V8TestObject::toImpl(holder); | 4195 TestObject* impl = V8TestObject::toImpl(holder); |
| 4196 String cppValue(impl->fastGetAttribute(HTMLNames::otherAttr)); | 4196 String cppValue(impl->fastGetAttribute(HTMLNames::otherAttr)); |
| 4197 if (cppValue.isEmpty()) { | 4197 if (cppValue.isEmpty()) { |
| 4198 ; | 4198 ; |
| 4199 } else if (equalIgnoringCase(cppValue, "Value1")) { | 4199 } else if (equalIgnoringCase(cppValue, "Value1")) { |
| 4200 cppValue = "Value1"; | 4200 cppValue = "Value1"; |
| 4201 } else if (equalIgnoringCase(cppValue, "Value2")) { | 4201 } else if (equalIgnoringCase(cppValue, "Value2")) { |
| 4202 cppValue = "Value2"; | 4202 cppValue = "Value2"; |
| 4203 } else { | 4203 } else { |
| 4204 cppValue = ""; | 4204 cppValue = ""; |
| 4205 } | 4205 } |
| 4206 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 4206 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 4207 } | 4207 } |
| 4208 | 4208 |
| 4209 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4209 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4210 { | 4210 { |
| 4211 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4211 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4212 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); | 4212 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); |
| 4213 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4213 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4214 } | 4214 } |
| 4215 | 4215 |
| 4216 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 4216 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 4217 { | 4217 { |
| 4218 v8::Local<v8::Object> holder = info.Holder(); | 4218 v8::Local<v8::Object> holder = info.Holder(); |
| 4219 TestObject* impl = V8TestObject::toImpl(holder); | 4219 TestObject* impl = V8TestObject::toImpl(holder); |
| 4220 V8StringResource<> cppValue = v8Value; | 4220 V8StringResource<> cppValue = v8Value; |
| 4221 if (!cppValue.prepare()) | 4221 if (!cppValue.prepare()) |
| 4222 return; | 4222 return; |
| 4223 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4223 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4224 impl->setAttribute(HTMLNames::otherAttr, cppValue); | 4224 impl->setAttribute(HTMLNames::otherAttr, cppValue); |
| 4225 } | 4225 } |
| 4226 | 4226 |
| 4227 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4227 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4228 { | 4228 { |
| 4229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4230 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4230 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4231 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Value, in
fo); | 4231 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Value, in
fo); |
| 4232 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4232 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4233 } | 4233 } |
| 4234 | 4234 |
| 4235 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 4235 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
| 4236 { | 4236 { |
| 4237 v8::Local<v8::Object> holder = info.Holder(); | 4237 v8::Local<v8::Object> holder = info.Holder(); |
| 4238 TestObject* impl = V8TestObject::toImpl(holder); | 4238 TestObject* impl = V8TestObject::toImpl(holder); |
| 4239 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithmissingdefaulta
ttributeAttr)); | 4239 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithmissingdefaulta
ttributeAttr)); |
| 4240 if (cppValue.isEmpty()) { | 4240 if (cppValue.isEmpty()) { |
| 4241 cppValue = "rsa"; | 4241 cppValue = "rsa"; |
| 4242 } else if (equalIgnoringCase(cppValue, "rsa")) { | 4242 } else if (equalIgnoringCase(cppValue, "rsa")) { |
| 4243 cppValue = "rsa"; | 4243 cppValue = "rsa"; |
| 4244 } else if (equalIgnoringCase(cppValue, "dsa")) { | 4244 } else if (equalIgnoringCase(cppValue, "dsa")) { |
| 4245 cppValue = "dsa"; | 4245 cppValue = "dsa"; |
| 4246 } else { | 4246 } else { |
| 4247 cppValue = ""; | 4247 cppValue = ""; |
| 4248 } | 4248 } |
| 4249 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 4249 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 4250 } | 4250 } |
| 4251 | 4251 |
| 4252 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4252 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4253 { | 4253 { |
| 4254 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4254 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4255 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); | 4255 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); |
| 4256 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4256 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4257 } | 4257 } |
| 4258 | 4258 |
| 4259 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4259 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4260 { | 4260 { |
| 4261 v8::Local<v8::Object> holder = info.Holder(); | 4261 v8::Local<v8::Object> holder = info.Holder(); |
| 4262 TestObject* impl = V8TestObject::toImpl(holder); | 4262 TestObject* impl = V8TestObject::toImpl(holder); |
| 4263 V8StringResource<> cppValue = v8Value; | 4263 V8StringResource<> cppValue = v8Value; |
| 4264 if (!cppValue.prepare()) | 4264 if (!cppValue.prepare()) |
| 4265 return; | 4265 return; |
| 4266 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4266 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4267 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal
ue); | 4267 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal
ue); |
| 4268 } | 4268 } |
| 4269 | 4269 |
| 4270 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | 4270 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 4271 { | 4271 { |
| 4272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4273 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4273 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4274 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(v8Va
lue, info); | 4274 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(v8Va
lue, info); |
| 4275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4276 } | 4276 } |
| 4277 | 4277 |
| 4278 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) | 4278 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 4279 { | 4279 { |
| 4280 v8::Local<v8::Object> holder = info.Holder(); | 4280 v8::Local<v8::Object> holder = info.Holder(); |
| 4281 TestObject* impl = V8TestObject::toImpl(holder); | 4281 TestObject* impl = V8TestObject::toImpl(holder); |
| 4282 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissingd
efaultattributeAttr)); | 4282 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissingd
efaultattributeAttr)); |
| 4283 if (cppValue.isEmpty()) { | 4283 if (cppValue.isEmpty()) { |
| 4284 cppValue = "auto"; | 4284 cppValue = "auto"; |
| 4285 } else if (equalIgnoringCase(cppValue, "ltr")) { | 4285 } else if (equalIgnoringCase(cppValue, "ltr")) { |
| 4286 cppValue = "ltr"; | 4286 cppValue = "ltr"; |
| 4287 } else if (equalIgnoringCase(cppValue, "rtl")) { | 4287 } else if (equalIgnoringCase(cppValue, "rtl")) { |
| 4288 cppValue = "rtl"; | 4288 cppValue = "rtl"; |
| 4289 } else if (equalIgnoringCase(cppValue, "auto")) { | 4289 } else if (equalIgnoringCase(cppValue, "auto")) { |
| 4290 cppValue = "auto"; | 4290 cppValue = "auto"; |
| 4291 } else { | 4291 } else { |
| 4292 cppValue = "ltr"; | 4292 cppValue = "ltr"; |
| 4293 } | 4293 } |
| 4294 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 4294 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 4295 } | 4295 } |
| 4296 | 4296 |
| 4297 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4297 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4298 { | 4298 { |
| 4299 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4299 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4300 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); | 4300 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); |
| 4301 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4301 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4302 } | 4302 } |
| 4303 | 4303 |
| 4304 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4304 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4305 { | 4305 { |
| 4306 v8::Local<v8::Object> holder = info.Holder(); | 4306 v8::Local<v8::Object> holder = info.Holder(); |
| 4307 TestObject* impl = V8TestObject::toImpl(holder); | 4307 TestObject* impl = V8TestObject::toImpl(holder); |
| 4308 V8StringResource<> cppValue = v8Value; | 4308 V8StringResource<> cppValue = v8Value; |
| 4309 if (!cppValue.prepare()) | 4309 if (!cppValue.prepare()) |
| 4310 return; | 4310 return; |
| 4311 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4311 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4312 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); | 4312 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); |
| 4313 } | 4313 } |
| 4314 | 4314 |
| 4315 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) | 4315 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v
oid>& info) |
| 4316 { | 4316 { |
| 4317 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4317 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4318 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4318 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4319 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(v8Value, info); | 4319 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(v8Value, info); |
| 4320 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4320 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4321 } | 4321 } |
| 4322 | 4322 |
| 4323 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 4323 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 4324 { | 4324 { |
| 4325 v8::Local<v8::Object> holder = info.Holder(); | 4325 v8::Local<v8::Object> holder = info.Holder(); |
| 4326 TestObject* impl = V8TestObject::toImpl(holder); | 4326 TestObject* impl = V8TestObject::toImpl(holder); |
| 4327 String cppValue(impl->fastGetAttribute(HTMLNames::corssettingattributeAttr))
; | 4327 String cppValue(impl->fastGetAttribute(HTMLNames::corssettingattributeAttr))
; |
| 4328 if (cppValue.isNull()) { | 4328 if (cppValue.isNull()) { |
| 4329 ; | 4329 ; |
| 4330 } else if (cppValue.isEmpty()) { | 4330 } else if (cppValue.isEmpty()) { |
| 4331 cppValue = "anonymous"; | 4331 cppValue = "anonymous"; |
| 4332 } else if (equalIgnoringCase(cppValue, "anonymous")) { | 4332 } else if (equalIgnoringCase(cppValue, "anonymous")) { |
| 4333 cppValue = "anonymous"; | 4333 cppValue = "anonymous"; |
| 4334 } else if (equalIgnoringCase(cppValue, "use-credentials")) { | 4334 } else if (equalIgnoringCase(cppValue, "use-credentials")) { |
| 4335 cppValue = "use-credentials"; | 4335 cppValue = "use-credentials"; |
| 4336 } else { | 4336 } else { |
| 4337 cppValue = "anonymous"; | 4337 cppValue = "anonymous"; |
| 4338 } | 4338 } |
| 4339 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 4339 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 4340 } | 4340 } |
| 4341 | 4341 |
| 4342 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 4342 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4343 { | 4343 { |
| 4344 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4344 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4345 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); | 4345 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); |
| 4346 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4346 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4347 } | 4347 } |
| 4348 | 4348 |
| 4349 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 4349 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 4350 { | 4350 { |
| 4351 v8::Local<v8::Object> holder = info.Holder(); | 4351 v8::Local<v8::Object> holder = info.Holder(); |
| 4352 TestObject* impl = V8TestObject::toImpl(holder); | 4352 TestObject* impl = V8TestObject::toImpl(holder); |
| 4353 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithemptymissinginv
alidattributeAttr)); | 4353 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithemptymissinginv
alidattributeAttr)); |
| 4354 if (cppValue.isNull()) { | 4354 if (cppValue.isNull()) { |
| 4355 cppValue = "missing"; | 4355 cppValue = "missing"; |
| 4356 } else if (cppValue.isEmpty()) { | 4356 } else if (cppValue.isEmpty()) { |
| 4357 cppValue = "empty"; | 4357 cppValue = "empty"; |
| 4358 } else if (equalIgnoringCase(cppValue, "empty")) { | 4358 } else if (equalIgnoringCase(cppValue, "empty")) { |
| 4359 cppValue = "empty"; | 4359 cppValue = "empty"; |
| 4360 } else if (equalIgnoringCase(cppValue, "missing")) { | 4360 } else if (equalIgnoringCase(cppValue, "missing")) { |
| 4361 cppValue = "missing"; | 4361 cppValue = "missing"; |
| 4362 } else if (equalIgnoringCase(cppValue, "invalid")) { | 4362 } else if (equalIgnoringCase(cppValue, "invalid")) { |
| 4363 cppValue = "invalid"; | 4363 cppValue = "invalid"; |
| 4364 } else if (equalIgnoringCase(cppValue, "a-normal")) { | 4364 } else if (equalIgnoringCase(cppValue, "a-normal")) { |
| 4365 cppValue = "a-normal"; | 4365 cppValue = "a-normal"; |
| 4366 } else { | 4366 } else { |
| 4367 cppValue = "invalid"; | 4367 cppValue = "invalid"; |
| 4368 } | 4368 } |
| 4369 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 4369 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 4370 } | 4370 } |
| 4371 | 4371 |
| 4372 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4372 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4373 { | 4373 { |
| 4374 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4374 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4375 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); | 4375 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); |
| 4376 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4376 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4377 } | 4377 } |
| 4378 | 4378 |
| 4379 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 4379 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 4380 { | 4380 { |
| 4381 v8::Local<v8::Object> holder = info.Holder(); | 4381 v8::Local<v8::Object> holder = info.Holder(); |
| 4382 TestObject* impl = V8TestObject::toImpl(holder); | 4382 TestObject* impl = V8TestObject::toImpl(holder); |
| 4383 v8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute()); | 4383 v8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute()); |
| 4384 } | 4384 } |
| 4385 | 4385 |
| 4386 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4386 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8
::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4387 { | 4387 { |
| 4388 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4388 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4389 TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info); | 4389 TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info); |
| 4390 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4390 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4391 } | 4391 } |
| 4392 | 4392 |
| 4393 static void replaceableReadonlyLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 4393 static void replaceableReadonlyLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4394 { | 4394 { |
| 4395 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "repl
aceableReadonlyLongAttribute"); | 4395 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "repl
aceableReadonlyLongAttribute"); |
| 4396 TestObjectForceSetAttributeOnThis(propertyName, v8Value, info); | 4396 TestObjectForceSetAttributeOnThis(propertyName, v8Value, info); |
| 4397 } | 4397 } |
| 4398 | 4398 |
| 4399 static void replaceableReadonlyLongAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 4399 static void replaceableReadonlyLongAttributeAttributeSetterCallback(v8::Local<v8
::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 4400 { | 4400 { |
| 4401 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4401 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4402 TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeSetter(v8Valu
e, info); | 4402 TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeSetter(v8Valu
e, info); |
| 4403 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4403 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4404 } | 4404 } |
| 4405 | 4405 |
| 4406 static void replaceableReadonlyLongAccessorAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 4406 static void replaceableReadonlyLongAccessorAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 4407 { | 4407 { |
| 4408 v8::Local<v8::Object> holder = info.Holder(); | 4408 v8::Local<v8::Object> holder = info.Holder(); |
| 4409 TestObject* impl = V8TestObject::toImpl(holder); | 4409 TestObject* impl = V8TestObject::toImpl(holder); |
| 4410 v8SetReturnValueInt(info, impl->replaceableReadonlyLongAccessor()); | 4410 v8SetReturnValueInt(info, impl->replaceableReadonlyLongAccessor()); |
| 4411 } | 4411 } |
| 4412 | 4412 |
| 4413 static void replaceableReadonlyLongAccessorAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4413 static void replaceableReadonlyLongAccessorAttributeGetterCallback(v8::Local<v8:
:Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4414 { | 4414 { |
| 4415 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4415 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4416 TestObjectV8Internal::replaceableReadonlyLongAccessorAttributeGetter(info); | 4416 TestObjectV8Internal::replaceableReadonlyLongAccessorAttributeGetter(info); |
| 4417 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4417 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4418 } | 4418 } |
| 4419 | 4419 |
| 4420 static void replaceableReadonlyLongAccessorAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 4420 static void replaceableReadonlyLongAccessorAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4421 { | 4421 { |
| 4422 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "repl
aceableReadonlyLongAccessor"); | 4422 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "repl
aceableReadonlyLongAccessor"); |
| 4423 TestObjectForceSetAttributeOnThis(propertyName, v8Value, info); | 4423 TestObjectForceSetAttributeOnThis(propertyName, v8Value, info); |
| 4424 } | 4424 } |
| 4425 | 4425 |
| 4426 static void replaceableReadonlyLongAccessorAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 4426 static void replaceableReadonlyLongAccessorAttributeSetterCallback(v8::Local<v8:
:Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 4427 { | 4427 { |
| 4428 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4428 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4429 TestObjectV8Internal::replaceableReadonlyLongAccessorAttributeSetter(v8Value
, info); | 4429 TestObjectV8Internal::replaceableReadonlyLongAccessorAttributeSetter(v8Value
, info); |
| 4430 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4430 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4431 } | 4431 } |
| 4432 | 4432 |
| 4433 static void locationPutForwardsAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 4433 static void locationPutForwardsAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 4434 { | 4434 { |
| 4435 v8::Local<v8::Object> holder = info.Holder(); | 4435 v8::Local<v8::Object> holder = info.Holder(); |
| 4436 TestObject* impl = V8TestObject::toImpl(holder); | 4436 TestObject* impl = V8TestObject::toImpl(holder); |
| 4437 v8SetReturnValueFast(info, WTF::getPtr(impl->locationPutForwards()), impl); | 4437 v8SetReturnValueFast(info, WTF::getPtr(impl->locationPutForwards()), impl); |
| 4438 } | 4438 } |
| 4439 | 4439 |
| 4440 static void locationPutForwardsAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 4440 static void locationPutForwardsAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 4441 { | 4441 { |
| 4442 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4442 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4443 TestObjectV8Internal::locationPutForwardsAttributeGetter(info); | 4443 TestObjectV8Internal::locationPutForwardsAttributeGetter(info); |
| 4444 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4444 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4445 } | 4445 } |
| 4446 | 4446 |
| 4447 static void locationPutForwardsAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 4447 static void locationPutForwardsAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 4448 { | 4448 { |
| 4449 v8::Local<v8::Object> holder = info.Holder(); | 4449 v8::Local<v8::Object> holder = info.Holder(); |
| 4450 TestObject* proxyImpl = V8TestObject::toImpl(holder); | 4450 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 4451 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationPutForwar
ds()); | 4451 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationPutForwar
ds()); |
| 4452 if (!impl) | 4452 if (!impl) |
| 4453 return; | 4453 return; |
| 4454 V8StringResource<> cppValue = v8Value; | 4454 V8StringResource<> cppValue = v8Value; |
| 4455 if (!cppValue.prepare()) | 4455 if (!cppValue.prepare()) |
| 4456 return; | 4456 return; |
| 4457 impl->setHref(cppValue); | 4457 impl->setHref(cppValue); |
| 4458 } | 4458 } |
| 4459 | 4459 |
| 4460 static void locationPutForwardsAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4460 static void locationPutForwardsAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4461 { | 4461 { |
| 4462 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4462 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4463 TestObjectV8Internal::locationPutForwardsAttributeSetter(v8Value, info); | 4463 TestObjectV8Internal::locationPutForwardsAttributeSetter(v8Value, info); |
| 4464 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4464 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4465 } | 4465 } |
| 4466 | 4466 |
| 4467 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 4467 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 4468 { | 4468 { |
| 4469 v8::Local<v8::Object> holder = info.Holder(); | 4469 v8::Local<v8::Object> holder = info.Holder(); |
| 4470 TestObject* impl = V8TestObject::toImpl(holder); | 4470 TestObject* impl = V8TestObject::toImpl(holder); |
| 4471 v8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); | 4471 v8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); |
| 4472 } | 4472 } |
| 4473 | 4473 |
| 4474 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4474 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::Nam
e>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4475 { | 4475 { |
| 4476 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4476 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4477 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info); | 4477 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info); |
| 4478 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4478 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4479 } | 4479 } |
| 4480 | 4480 |
| 4481 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 4481 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 4482 { | 4482 { |
| 4483 v8::Local<v8::Object> holder = info.Holder(); | 4483 v8::Local<v8::Object> holder = info.Holder(); |
| 4484 ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabled
LongAttribute", "TestObject", holder, info.GetIsolate()); | 4484 ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabled
LongAttribute", "TestObject", holder, info.GetIsolate()); |
| 4485 TestObject* impl = V8TestObject::toImpl(holder); | 4485 TestObject* impl = V8TestObject::toImpl(holder); |
| 4486 int cppValue = toInt32(v8Value, exceptionState); | 4486 int cppValue = toInt32(v8Value, exceptionState); |
| 4487 if (exceptionState.throwIfNeeded()) | 4487 if (exceptionState.throwIfNeeded()) |
| 4488 return; | 4488 return; |
| 4489 impl->setRuntimeEnabledLongAttribute(cppValue); | 4489 impl->setRuntimeEnabledLongAttribute(cppValue); |
| 4490 } | 4490 } |
| 4491 | 4491 |
| 4492 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4492 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::Nam
e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4493 { | 4493 { |
| 4494 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4494 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4495 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, in
fo); | 4495 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, in
fo); |
| 4496 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4496 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4497 } | 4497 } |
| 4498 | 4498 |
| 4499 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 4499 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 4500 { | 4500 { |
| 4501 v8::Local<v8::Object> holder = info.Holder(); | 4501 v8::Local<v8::Object> holder = info.Holder(); |
| 4502 TestObject* impl = V8TestObject::toImpl(holder); | 4502 TestObject* impl = V8TestObject::toImpl(holder); |
| 4503 v8SetReturnValueInt(info, impl->perContextEnabledRuntimeEnabledLongAttribute
()); | 4503 v8SetReturnValueInt(info, impl->perContextEnabledRuntimeEnabledLongAttribute
()); |
| 4504 } | 4504 } |
| 4505 | 4505 |
| 4506 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4506 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(
v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4507 { | 4507 { |
| 4508 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4508 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4509 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeG
etter(info); | 4509 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeG
etter(info); |
| 4510 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4510 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4511 } | 4511 } |
| 4512 | 4512 |
| 4513 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4513 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4514 { | 4514 { |
| 4515 v8::Local<v8::Object> holder = info.Holder(); | 4515 v8::Local<v8::Object> holder = info.Holder(); |
| 4516 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | 4516 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 4517 TestObject* impl = V8TestObject::toImpl(holder); | 4517 TestObject* impl = V8TestObject::toImpl(holder); |
| 4518 int cppValue = toInt32(v8Value, exceptionState); | 4518 int cppValue = toInt32(v8Value, exceptionState); |
| 4519 if (exceptionState.throwIfNeeded()) | 4519 if (exceptionState.throwIfNeeded()) |
| 4520 return; | 4520 return; |
| 4521 impl->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue); | 4521 impl->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue); |
| 4522 } | 4522 } |
| 4523 | 4523 |
| 4524 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 4524 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(
v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) |
| 4525 { | 4525 { |
| 4526 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4526 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4527 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeS
etter(v8Value, info); | 4527 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeS
etter(v8Value, info); |
| 4528 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4528 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4529 } | 4529 } |
| 4530 | 4530 |
| 4531 #if ENABLE(CONDITION) | 4531 #if ENABLE(CONDITION) |
| 4532 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 4532 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 4533 { | 4533 { |
| 4534 v8::Local<v8::Object> holder = info.Holder(); | 4534 v8::Local<v8::Object> holder = info.Holder(); |
| 4535 TestObject* impl = V8TestObject::toImpl(holder); | 4535 TestObject* impl = V8TestObject::toImpl(holder); |
| 4536 v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute()); | 4536 v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute()); |
| 4537 } | 4537 } |
| 4538 #endif // ENABLE(CONDITION) | 4538 #endif // ENABLE(CONDITION) |
| 4539 | 4539 |
| 4540 #if ENABLE(CONDITION) | 4540 #if ENABLE(CONDITION) |
| 4541 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4541 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4542 { | 4542 { |
| 4543 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4543 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4544 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetter(
info); | 4544 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetter(
info); |
| 4545 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4545 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4546 } | 4546 } |
| 4547 #endif // ENABLE(CONDITION) | 4547 #endif // ENABLE(CONDITION) |
| 4548 | 4548 |
| 4549 #if ENABLE(CONDITION) | 4549 #if ENABLE(CONDITION) |
| 4550 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4550 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4551 { | 4551 { |
| 4552 v8::Local<v8::Object> holder = info.Holder(); | 4552 v8::Local<v8::Object> holder = info.Holder(); |
| 4553 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalRun
timeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | 4553 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalRun
timeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 4554 TestObject* impl = V8TestObject::toImpl(holder); | 4554 TestObject* impl = V8TestObject::toImpl(holder); |
| 4555 int cppValue = toInt32(v8Value, exceptionState); | 4555 int cppValue = toInt32(v8Value, exceptionState); |
| 4556 if (exceptionState.throwIfNeeded()) | 4556 if (exceptionState.throwIfNeeded()) |
| 4557 return; | 4557 return; |
| 4558 impl->setConditionalRuntimeEnabledLongAttribute(cppValue); | 4558 impl->setConditionalRuntimeEnabledLongAttribute(cppValue); |
| 4559 } | 4559 } |
| 4560 #endif // ENABLE(CONDITION) | 4560 #endif // ENABLE(CONDITION) |
| 4561 | 4561 |
| 4562 #if ENABLE(CONDITION) | 4562 #if ENABLE(CONDITION) |
| 4563 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 4563 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 4564 { | 4564 { |
| 4565 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4565 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4566 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetter(
v8Value, info); | 4566 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetter(
v8Value, info); |
| 4567 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4567 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4568 } | 4568 } |
| 4569 #endif // ENABLE(CONDITION) | 4569 #endif // ENABLE(CONDITION) |
| 4570 | 4570 |
| 4571 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) | 4571 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4572 { | 4572 { |
| 4573 v8::Local<v8::Object> holder = info.Holder(); | 4573 v8::Local<v8::Object> holder = info.Holder(); |
| 4574 TestObject* impl = V8TestObject::toImpl(holder); | 4574 TestObject* impl = V8TestObject::toImpl(holder); |
| 4575 v8SetReturnValueString(info, impl->setterCallWithActiveWindowAndFirstWindowS
tringAttribute(), info.GetIsolate()); | 4575 v8SetReturnValueString(info, impl->setterCallWithActiveWindowAndFirstWindowS
tringAttribute(), info.GetIsolate()); |
| 4576 } | 4576 } |
| 4577 | 4577 |
| 4578 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | 4578 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
erCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4579 { | 4579 { |
| 4580 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4580 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4581 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeGetter(info); | 4581 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeGetter(info); |
| 4582 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4582 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4583 } | 4583 } |
| 4584 | 4584 |
| 4585 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4585 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4586 { | 4586 { |
| 4587 v8::Local<v8::Object> holder = info.Holder(); | 4587 v8::Local<v8::Object> holder = info.Holder(); |
| 4588 TestObject* impl = V8TestObject::toImpl(holder); | 4588 TestObject* impl = V8TestObject::toImpl(holder); |
| 4589 V8StringResource<> cppValue = v8Value; | 4589 V8StringResource<> cppValue = v8Value; |
| 4590 if (!cppValue.prepare()) | 4590 if (!cppValue.prepare()) |
| 4591 return; | 4591 return; |
| 4592 impl->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(callingDOMW
indow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue); | 4592 impl->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(callingDOMW
indow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue); |
| 4593 } | 4593 } |
| 4594 | 4594 |
| 4595 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) | 4595 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
erCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) |
| 4596 { | 4596 { |
| 4597 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4597 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4598 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeSetter(v8Value, info); | 4598 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeSetter(v8Value, info); |
| 4599 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4599 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4600 } | 4600 } |
| 4601 | 4601 |
| 4602 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | 4602 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 4603 { | 4603 { |
| 4604 v8::Local<v8::Object> holder = info.Holder(); | 4604 v8::Local<v8::Object> holder = info.Holder(); |
| 4605 TestObject* impl = V8TestObject::toImpl(holder); | 4605 TestObject* impl = V8TestObject::toImpl(holder); |
| 4606 v8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttri
bute(), info.GetIsolate()); | 4606 v8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttri
bute(), info.GetIsolate()); |
| 4607 } | 4607 } |
| 4608 | 4608 |
| 4609 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4609 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback
(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4610 { | 4610 { |
| 4611 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4611 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4612 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Getter(info); | 4612 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Getter(info); |
| 4613 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4613 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4614 } | 4614 } |
| 4615 | 4615 |
| 4616 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4616 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4617 { | 4617 { |
| 4618 v8::Local<v8::Object> holder = info.Holder(); | 4618 v8::Local<v8::Object> holder = info.Holder(); |
| 4619 TestObject* impl = V8TestObject::toImpl(holder); | 4619 TestObject* impl = V8TestObject::toImpl(holder); |
| 4620 V8StringResource<> cppValue = v8Value; | 4620 V8StringResource<> cppValue = v8Value; |
| 4621 if (!cppValue.prepare()) | 4621 if (!cppValue.prepare()) |
| 4622 return; | 4622 return; |
| 4623 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 4623 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 4624 impl->setSetterCallWithExecutionContextStringAttribute(executionContext, cpp
Value); | 4624 impl->setSetterCallWithExecutionContextStringAttribute(executionContext, cpp
Value); |
| 4625 } | 4625 } |
| 4626 | 4626 |
| 4627 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) | 4627 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback
(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn
fo<void>& info) |
| 4628 { | 4628 { |
| 4629 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4629 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4630 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Setter(v8Value, info); | 4630 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Setter(v8Value, info); |
| 4631 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4631 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4632 } | 4632 } |
| 4633 | 4633 |
| 4634 static void treatNullAsEmptyStringStringAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 4634 static void treatNullAsEmptyStringStringAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 4635 { | 4635 { |
| 4636 v8::Local<v8::Object> holder = info.Holder(); | 4636 v8::Local<v8::Object> holder = info.Holder(); |
| 4637 TestObject* impl = V8TestObject::toImpl(holder); | 4637 TestObject* impl = V8TestObject::toImpl(holder); |
| 4638 v8SetReturnValueString(info, impl->treatNullAsEmptyStringStringAttribute(),
info.GetIsolate()); | 4638 v8SetReturnValueString(info, impl->treatNullAsEmptyStringStringAttribute(),
info.GetIsolate()); |
| 4639 } | 4639 } |
| 4640 | 4640 |
| 4641 static void treatNullAsEmptyStringStringAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4641 static void treatNullAsEmptyStringStringAttributeAttributeGetterCallback(v8::Loc
al<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4642 { | 4642 { |
| 4643 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4643 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4644 TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeGetter(i
nfo); | 4644 TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeGetter(i
nfo); |
| 4645 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4645 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4646 } | 4646 } |
| 4647 | 4647 |
| 4648 static void treatNullAsEmptyStringStringAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4648 static void treatNullAsEmptyStringStringAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4649 { | 4649 { |
| 4650 v8::Local<v8::Object> holder = info.Holder(); | 4650 v8::Local<v8::Object> holder = info.Holder(); |
| 4651 TestObject* impl = V8TestObject::toImpl(holder); | 4651 TestObject* impl = V8TestObject::toImpl(holder); |
| 4652 V8StringResource<TreatNullAsEmptyString> cppValue = v8Value; | 4652 V8StringResource<TreatNullAsEmptyString> cppValue = v8Value; |
| 4653 if (!cppValue.prepare()) | 4653 if (!cppValue.prepare()) |
| 4654 return; | 4654 return; |
| 4655 impl->setTreatNullAsEmptyStringStringAttribute(cppValue); | 4655 impl->setTreatNullAsEmptyStringStringAttribute(cppValue); |
| 4656 } | 4656 } |
| 4657 | 4657 |
| 4658 static void treatNullAsEmptyStringStringAttributeAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) | 4658 static void treatNullAsEmptyStringStringAttributeAttributeSetterCallback(v8::Loc
al<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>
& info) |
| 4659 { | 4659 { |
| 4660 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4660 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4661 TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeSetter(v
8Value, info); | 4661 TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeSetter(v
8Value, info); |
| 4662 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4662 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4663 } | 4663 } |
| 4664 | 4664 |
| 4665 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) | 4665 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 4666 { | 4666 { |
| 4667 v8::Local<v8::Object> holder = info.Holder(); | 4667 v8::Local<v8::Object> holder = info.Holder(); |
| 4668 TestObject* impl = V8TestObject::toImpl(holder); | 4668 TestObject* impl = V8TestObject::toImpl(holder); |
| 4669 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), i
nfo.GetIsolate()); | 4669 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), i
nfo.GetIsolate()); |
| 4670 } | 4670 } |
| 4671 | 4671 |
| 4672 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4672 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Loca
l<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4673 { | 4673 { |
| 4674 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4674 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4675 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(in
fo); | 4675 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(in
fo); |
| 4676 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4676 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4677 } | 4677 } |
| 4678 | 4678 |
| 4679 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4679 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4680 { | 4680 { |
| 4681 v8::Local<v8::Object> holder = info.Holder(); | 4681 v8::Local<v8::Object> holder = info.Holder(); |
| 4682 TestObject* impl = V8TestObject::toImpl(holder); | 4682 TestObject* impl = V8TestObject::toImpl(holder); |
| 4683 V8StringResource<TreatNullAsNullString> cppValue = v8Value; | 4683 V8StringResource<TreatNullAsNullString> cppValue = v8Value; |
| 4684 if (!cppValue.prepare()) | 4684 if (!cppValue.prepare()) |
| 4685 return; | 4685 return; |
| 4686 impl->setTreatNullAsNullStringStringAttribute(cppValue); | 4686 impl->setTreatNullAsNullStringStringAttribute(cppValue); |
| 4687 } | 4687 } |
| 4688 | 4688 |
| 4689 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | 4689 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Loca
l<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 4690 { | 4690 { |
| 4691 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4691 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4692 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8
Value, info); | 4692 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8
Value, info); |
| 4693 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4693 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4694 } | 4694 } |
| 4695 | 4695 |
| 4696 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 4696 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 4697 { | 4697 { |
| 4698 v8::Local<v8::Object> holder = info.Holder(); | 4698 v8::Local<v8::Object> holder = info.Holder(); |
| 4699 TestObject* impl = V8TestObject::toImpl(holder); | 4699 TestObject* impl = V8TestObject::toImpl(holder); |
| 4700 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Attribute(), info.GetIsolate()); | 4700 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Attribute(), info.GetIsolate()); |
| 4701 } | 4701 } |
| 4702 | 4702 |
| 4703 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4703 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(
v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4704 { | 4704 { |
| 4705 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4705 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4706 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeG
etter(info); | 4706 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeG
etter(info); |
| 4707 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4707 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4708 } | 4708 } |
| 4709 | 4709 |
| 4710 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4710 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4711 { | 4711 { |
| 4712 v8::Local<v8::Object> holder = info.Holder(); | 4712 v8::Local<v8::Object> holder = info.Holder(); |
| 4713 TestObject* impl = V8TestObject::toImpl(holder); | 4713 TestObject* impl = V8TestObject::toImpl(holder); |
| 4714 V8StringResource<> cppValue = v8Value; | 4714 V8StringResource<> cppValue = v8Value; |
| 4715 if (!cppValue.prepare()) | 4715 if (!cppValue.prepare()) |
| 4716 return; | 4716 return; |
| 4717 impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue); | 4717 impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue); |
| 4718 } | 4718 } |
| 4719 | 4719 |
| 4720 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 4720 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(
v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) |
| 4721 { | 4721 { |
| 4722 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4722 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4723 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeS
etter(v8Value, info); | 4723 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeS
etter(v8Value, info); |
| 4724 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4724 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4725 } | 4725 } |
| 4726 | 4726 |
| 4727 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) | 4727 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4728 { | 4728 { |
| 4729 v8::Local<v8::Object> holder = info.Holder(); | 4729 v8::Local<v8::Object> holder = info.Holder(); |
| 4730 TestObject* impl = V8TestObject::toImpl(holder); | 4730 TestObject* impl = V8TestObject::toImpl(holder); |
| 4731 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringAttribute(), info.GetIsolate()); | 4731 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringAttribute(), info.GetIsolate()); |
| 4732 } | 4732 } |
| 4733 | 4733 |
| 4734 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4734 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCall
back(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4735 { | 4735 { |
| 4736 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4736 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4737 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteGetter(info); | 4737 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteGetter(info); |
| 4738 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4738 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4739 } | 4739 } |
| 4740 | 4740 |
| 4741 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4741 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4742 { | 4742 { |
| 4743 v8::Local<v8::Object> holder = info.Holder(); | 4743 v8::Local<v8::Object> holder = info.Holder(); |
| 4744 TestObject* impl = V8TestObject::toImpl(holder); | 4744 TestObject* impl = V8TestObject::toImpl(holder); |
| 4745 V8StringResource<> cppValue = v8Value; | 4745 V8StringResource<> cppValue = v8Value; |
| 4746 if (!cppValue.prepare()) | 4746 if (!cppValue.prepare()) |
| 4747 return; | 4747 return; |
| 4748 impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); | 4748 impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); |
| 4749 } | 4749 } |
| 4750 | 4750 |
| 4751 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) | 4751 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCall
back(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallba
ckInfo<void>& info) |
| 4752 { | 4752 { |
| 4753 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4753 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4754 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteSetter(v8Value, info); | 4754 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteSetter(v8Value, info); |
| 4755 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4755 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4756 } | 4756 } |
| 4757 | 4757 |
| 4758 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) | 4758 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4759 { | 4759 { |
| 4760 v8::Local<v8::Object> holder = info.Holder(); | 4760 v8::Local<v8::Object> holder = info.Holder(); |
| 4761 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edTreatReturnedNullStringAsUndefinedStringAttribute"); | 4761 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cach
edTreatReturnedNullStringAsUndefinedStringAttribute"); |
| 4762 TestObject* impl = V8TestObject::toImpl(holder); | 4762 TestObject* impl = V8TestObject::toImpl(holder); |
| 4763 if (!impl->isStringDirty()) { | 4763 if (!impl->isStringDirty()) { |
| 4764 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); | 4764 v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIso
late(), holder, propertyName); |
| 4765 if (!v8Value.IsEmpty()) { | 4765 if (!v8Value.IsEmpty()) { |
| 4766 v8SetReturnValue(info, v8Value); | 4766 v8SetReturnValue(info, v8Value); |
| 4767 return; | 4767 return; |
| 4768 } | 4768 } |
| 4769 } | 4769 } |
| 4770 String cppValue(impl->cachedTreatReturnedNullStringAsUndefinedStringAttribut
e()); | 4770 String cppValue(impl->cachedTreatReturnedNullStringAsUndefinedStringAttribut
e()); |
| 4771 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8Undefined() : v8String(info.GetIsolate(), cppValue)); | 4771 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8Undefined() : v8String(info.GetIsolate(), cppValue)); |
| 4772 v8SetReturnValueStringOrUndefined(info, cppValue, info.GetIsolate()); | 4772 v8SetReturnValueStringOrUndefined(info, cppValue, info.GetIsolate()); |
| 4773 } | 4773 } |
| 4774 | 4774 |
| 4775 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | 4775 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
erCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4776 { | 4776 { |
| 4777 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4777 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4778 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeGetter(info); | 4778 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeGetter(info); |
| 4779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4780 } | 4780 } |
| 4781 | 4781 |
| 4782 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4782 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4783 { | 4783 { |
| 4784 v8::Local<v8::Object> holder = info.Holder(); | 4784 v8::Local<v8::Object> holder = info.Holder(); |
| 4785 TestObject* impl = V8TestObject::toImpl(holder); | 4785 TestObject* impl = V8TestObject::toImpl(holder); |
| 4786 V8StringResource<> cppValue = v8Value; | 4786 V8StringResource<> cppValue = v8Value; |
| 4787 if (!cppValue.prepare()) | 4787 if (!cppValue.prepare()) |
| 4788 return; | 4788 return; |
| 4789 impl->setCachedTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); | 4789 impl->setCachedTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); |
| 4790 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedTreatReturnedNullStringAsUndefinedStringAttribute")); /
/ Invalidate the cached value. | 4790 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedTreatReturnedNullStringAsUndefinedStringAttribute")); /
/ Invalidate the cached value. |
| 4791 } | 4791 } |
| 4792 | 4792 |
| 4793 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) | 4793 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
erCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) |
| 4794 { | 4794 { |
| 4795 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4795 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4796 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeSetter(v8Value, info); | 4796 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeSetter(v8Value, info); |
| 4797 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4797 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4798 } | 4798 } |
| 4799 | 4799 |
| 4800 static void treatReturnedNullStringAsNullByteStringAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 4800 static void treatReturnedNullStringAsNullByteStringAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 4801 { | 4801 { |
| 4802 v8::Local<v8::Object> holder = info.Holder(); | 4802 v8::Local<v8::Object> holder = info.Holder(); |
| 4803 TestObject* impl = V8TestObject::toImpl(holder); | 4803 TestObject* impl = V8TestObject::toImpl(holder); |
| 4804 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullByteSt
ringAttribute(), info.GetIsolate()); | 4804 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullByteSt
ringAttribute(), info.GetIsolate()); |
| 4805 } | 4805 } |
| 4806 | 4806 |
| 4807 static void treatReturnedNullStringAsNullByteStringAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4807 static void treatReturnedNullStringAsNullByteStringAttributeAttributeGetterCallb
ack(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4808 { | 4808 { |
| 4809 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4809 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4810 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttrib
uteGetter(info); | 4810 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttrib
uteGetter(info); |
| 4811 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4811 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4812 } | 4812 } |
| 4813 | 4813 |
| 4814 static void treatReturnedNullStringAsNullByteStringAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4814 static void treatReturnedNullStringAsNullByteStringAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4815 { | 4815 { |
| 4816 v8::Local<v8::Object> holder = info.Holder(); | 4816 v8::Local<v8::Object> holder = info.Holder(); |
| 4817 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsNullByteStringAttribute", "TestObject", holder, info.GetIsolate()); | 4817 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsNullByteStringAttribute", "TestObject", holder, info.GetIsolate()); |
| 4818 TestObject* impl = V8TestObject::toImpl(holder); | 4818 TestObject* impl = V8TestObject::toImpl(holder); |
| 4819 V8StringResource<> cppValue = toByteString(v8Value, exceptionState); | 4819 V8StringResource<> cppValue = toByteString(v8Value, exceptionState); |
| 4820 if (exceptionState.throwIfNeeded()) | 4820 if (exceptionState.throwIfNeeded()) |
| 4821 return; | 4821 return; |
| 4822 impl->setTreatReturnedNullStringAsNullByteStringAttribute(cppValue); | 4822 impl->setTreatReturnedNullStringAsNullByteStringAttribute(cppValue); |
| 4823 } | 4823 } |
| 4824 | 4824 |
| 4825 static void treatReturnedNullStringAsNullByteStringAttributeAttributeSetterCallb
ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | 4825 static void treatReturnedNullStringAsNullByteStringAttributeAttributeSetterCallb
ack(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) |
| 4826 { | 4826 { |
| 4827 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4827 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4828 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttrib
uteSetter(v8Value, info); | 4828 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttrib
uteSetter(v8Value, info); |
| 4829 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4829 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4830 } | 4830 } |
| 4831 | 4831 |
| 4832 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetter
(const v8::PropertyCallbackInfo<v8::Value>& info) | 4832 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetter
(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4833 { | 4833 { |
| 4834 v8::Local<v8::Object> holder = info.Holder(); | 4834 v8::Local<v8::Object> holder = info.Holder(); |
| 4835 TestObject* impl = V8TestObject::toImpl(holder); | 4835 TestObject* impl = V8TestObject::toImpl(holder); |
| 4836 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedByteStringAttribute(), info.GetIsolate()); | 4836 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedByteStringAttribute(), info.GetIsolate()); |
| 4837 } | 4837 } |
| 4838 | 4838 |
| 4839 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetter
Callback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4839 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetter
Callback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4840 { | 4840 { |
| 4841 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4841 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4842 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeA
ttributeGetter(info); | 4842 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeA
ttributeGetter(info); |
| 4843 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4843 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4844 } | 4844 } |
| 4845 | 4845 |
| 4846 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeSetter
(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4846 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeSetter
(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4847 { | 4847 { |
| 4848 v8::Local<v8::Object> holder = info.Holder(); | 4848 v8::Local<v8::Object> holder = info.Holder(); |
| 4849 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsUndefinedByteStringAttribute", "TestObject", holder, info.GetIsolate(
)); | 4849 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsUndefinedByteStringAttribute", "TestObject", holder, info.GetIsolate(
)); |
| 4850 TestObject* impl = V8TestObject::toImpl(holder); | 4850 TestObject* impl = V8TestObject::toImpl(holder); |
| 4851 V8StringResource<> cppValue = toByteString(v8Value, exceptionState); | 4851 V8StringResource<> cppValue = toByteString(v8Value, exceptionState); |
| 4852 if (exceptionState.throwIfNeeded()) | 4852 if (exceptionState.throwIfNeeded()) |
| 4853 return; | 4853 return; |
| 4854 impl->setTreatReturnedNullStringAsUndefinedByteStringAttribute(cppValue); | 4854 impl->setTreatReturnedNullStringAsUndefinedByteStringAttribute(cppValue); |
| 4855 } | 4855 } |
| 4856 | 4856 |
| 4857 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeSetter
Callback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) | 4857 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeSetter
Callback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCa
llbackInfo<void>& info) |
| 4858 { | 4858 { |
| 4859 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4859 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4860 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeA
ttributeSetter(v8Value, info); | 4860 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeA
ttributeSetter(v8Value, info); |
| 4861 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4861 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4862 } | 4862 } |
| 4863 | 4863 |
| 4864 static void treatReturnedNullStringAsNullUSVStringAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 4864 static void treatReturnedNullStringAsNullUSVStringAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 4865 { | 4865 { |
| 4866 v8::Local<v8::Object> holder = info.Holder(); | 4866 v8::Local<v8::Object> holder = info.Holder(); |
| 4867 TestObject* impl = V8TestObject::toImpl(holder); | 4867 TestObject* impl = V8TestObject::toImpl(holder); |
| 4868 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullUSVStr
ingAttribute(), info.GetIsolate()); | 4868 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullUSVStr
ingAttribute(), info.GetIsolate()); |
| 4869 } | 4869 } |
| 4870 | 4870 |
| 4871 static void treatReturnedNullStringAsNullUSVStringAttributeAttributeGetterCallba
ck(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4871 static void treatReturnedNullStringAsNullUSVStringAttributeAttributeGetterCallba
ck(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4872 { | 4872 { |
| 4873 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4873 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4874 TestObjectV8Internal::treatReturnedNullStringAsNullUSVStringAttributeAttribu
teGetter(info); | 4874 TestObjectV8Internal::treatReturnedNullStringAsNullUSVStringAttributeAttribu
teGetter(info); |
| 4875 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4875 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4876 } | 4876 } |
| 4877 | 4877 |
| 4878 static void treatReturnedNullStringAsNullUSVStringAttributeAttributeSetter(v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4878 static void treatReturnedNullStringAsNullUSVStringAttributeAttributeSetter(v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4879 { | 4879 { |
| 4880 v8::Local<v8::Object> holder = info.Holder(); | 4880 v8::Local<v8::Object> holder = info.Holder(); |
| 4881 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsNullUSVStringAttribute", "TestObject", holder, info.GetIsolate()); | 4881 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsNullUSVStringAttribute", "TestObject", holder, info.GetIsolate()); |
| 4882 TestObject* impl = V8TestObject::toImpl(holder); | 4882 TestObject* impl = V8TestObject::toImpl(holder); |
| 4883 V8StringResource<> cppValue = toUSVString(v8Value, exceptionState); | 4883 V8StringResource<> cppValue = toUSVString(v8Value, exceptionState); |
| 4884 if (exceptionState.throwIfNeeded()) | 4884 if (exceptionState.throwIfNeeded()) |
| 4885 return; | 4885 return; |
| 4886 impl->setTreatReturnedNullStringAsNullUSVStringAttribute(cppValue); | 4886 impl->setTreatReturnedNullStringAsNullUSVStringAttribute(cppValue); |
| 4887 } | 4887 } |
| 4888 | 4888 |
| 4889 static void treatReturnedNullStringAsNullUSVStringAttributeAttributeSetterCallba
ck(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallba
ckInfo<void>& info) | 4889 static void treatReturnedNullStringAsNullUSVStringAttributeAttributeSetterCallba
ck(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) |
| 4890 { | 4890 { |
| 4891 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4891 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4892 TestObjectV8Internal::treatReturnedNullStringAsNullUSVStringAttributeAttribu
teSetter(v8Value, info); | 4892 TestObjectV8Internal::treatReturnedNullStringAsNullUSVStringAttributeAttribu
teSetter(v8Value, info); |
| 4893 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4893 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4894 } | 4894 } |
| 4895 | 4895 |
| 4896 static void treatReturnedNullStringAsUndefinedUSVStringAttributeAttributeGetter(
const v8::PropertyCallbackInfo<v8::Value>& info) | 4896 static void treatReturnedNullStringAsUndefinedUSVStringAttributeAttributeGetter(
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4897 { | 4897 { |
| 4898 v8::Local<v8::Object> holder = info.Holder(); | 4898 v8::Local<v8::Object> holder = info.Holder(); |
| 4899 TestObject* impl = V8TestObject::toImpl(holder); | 4899 TestObject* impl = V8TestObject::toImpl(holder); |
| 4900 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedUSVStringAttribute(), info.GetIsolate()); | 4900 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedUSVStringAttribute(), info.GetIsolate()); |
| 4901 } | 4901 } |
| 4902 | 4902 |
| 4903 static void treatReturnedNullStringAsUndefinedUSVStringAttributeAttributeGetterC
allback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4903 static void treatReturnedNullStringAsUndefinedUSVStringAttributeAttributeGetterC
allback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4904 { | 4904 { |
| 4905 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4905 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4906 TestObjectV8Internal::treatReturnedNullStringAsUndefinedUSVStringAttributeAt
tributeGetter(info); | 4906 TestObjectV8Internal::treatReturnedNullStringAsUndefinedUSVStringAttributeAt
tributeGetter(info); |
| 4907 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4907 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4908 } | 4908 } |
| 4909 | 4909 |
| 4910 static void treatReturnedNullStringAsUndefinedUSVStringAttributeAttributeSetter(
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4910 static void treatReturnedNullStringAsUndefinedUSVStringAttributeAttributeSetter(
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4911 { | 4911 { |
| 4912 v8::Local<v8::Object> holder = info.Holder(); | 4912 v8::Local<v8::Object> holder = info.Holder(); |
| 4913 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsUndefinedUSVStringAttribute", "TestObject", holder, info.GetIsolate()
); | 4913 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsUndefinedUSVStringAttribute", "TestObject", holder, info.GetIsolate()
); |
| 4914 TestObject* impl = V8TestObject::toImpl(holder); | 4914 TestObject* impl = V8TestObject::toImpl(holder); |
| 4915 V8StringResource<> cppValue = toUSVString(v8Value, exceptionState); | 4915 V8StringResource<> cppValue = toUSVString(v8Value, exceptionState); |
| 4916 if (exceptionState.throwIfNeeded()) | 4916 if (exceptionState.throwIfNeeded()) |
| 4917 return; | 4917 return; |
| 4918 impl->setTreatReturnedNullStringAsUndefinedUSVStringAttribute(cppValue); | 4918 impl->setTreatReturnedNullStringAsUndefinedUSVStringAttribute(cppValue); |
| 4919 } | 4919 } |
| 4920 | 4920 |
| 4921 static void treatReturnedNullStringAsUndefinedUSVStringAttributeAttributeSetterC
allback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyC
allbackInfo<void>& info) | 4921 static void treatReturnedNullStringAsUndefinedUSVStringAttributeAttributeSetterC
allback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) |
| 4922 { | 4922 { |
| 4923 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4923 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4924 TestObjectV8Internal::treatReturnedNullStringAsUndefinedUSVStringAttributeAt
tributeSetter(v8Value, info); | 4924 TestObjectV8Internal::treatReturnedNullStringAsUndefinedUSVStringAttributeAt
tributeSetter(v8Value, info); |
| 4925 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4925 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4926 } | 4926 } |
| 4927 | 4927 |
| 4928 static void typeCheckingInterfaceFloatAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 4928 static void typeCheckingInterfaceFloatAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 4929 { | 4929 { |
| 4930 v8::Local<v8::Object> holder = info.Holder(); | 4930 v8::Local<v8::Object> holder = info.Holder(); |
| 4931 TestObject* impl = V8TestObject::toImpl(holder); | 4931 TestObject* impl = V8TestObject::toImpl(holder); |
| 4932 v8SetReturnValue(info, impl->typeCheckingInterfaceFloatAttribute()); | 4932 v8SetReturnValue(info, impl->typeCheckingInterfaceFloatAttribute()); |
| 4933 } | 4933 } |
| 4934 | 4934 |
| 4935 static void typeCheckingInterfaceFloatAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4935 static void typeCheckingInterfaceFloatAttributeAttributeGetterCallback(v8::Local
<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4936 { | 4936 { |
| 4937 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4937 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4938 TestObjectV8Internal::typeCheckingInterfaceFloatAttributeAttributeGetter(inf
o); | 4938 TestObjectV8Internal::typeCheckingInterfaceFloatAttributeAttributeGetter(inf
o); |
| 4939 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4939 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4940 } | 4940 } |
| 4941 | 4941 |
| 4942 static void typeCheckingInterfaceFloatAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4942 static void typeCheckingInterfaceFloatAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4943 { | 4943 { |
| 4944 v8::Local<v8::Object> holder = info.Holder(); | 4944 v8::Local<v8::Object> holder = info.Holder(); |
| 4945 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceFloatAttribute", "TestObject", holder, info.GetIsolate()); | 4945 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceFloatAttribute", "TestObject", holder, info.GetIsolate()); |
| 4946 TestObject* impl = V8TestObject::toImpl(holder); | 4946 TestObject* impl = V8TestObject::toImpl(holder); |
| 4947 float cppValue = toRestrictedFloat(v8Value, exceptionState); | 4947 float cppValue = toRestrictedFloat(v8Value, exceptionState); |
| 4948 if (exceptionState.throwIfNeeded()) | 4948 if (exceptionState.throwIfNeeded()) |
| 4949 return; | 4949 return; |
| 4950 impl->setTypeCheckingInterfaceFloatAttribute(cppValue); | 4950 impl->setTypeCheckingInterfaceFloatAttribute(cppValue); |
| 4951 } | 4951 } |
| 4952 | 4952 |
| 4953 static void typeCheckingInterfaceFloatAttributeAttributeSetterCallback(v8::Local
<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>
& info) | 4953 static void typeCheckingInterfaceFloatAttributeAttributeSetterCallback(v8::Local
<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 4954 { | 4954 { |
| 4955 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4955 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4956 TestObjectV8Internal::typeCheckingInterfaceFloatAttributeAttributeSetter(v8V
alue, info); | 4956 TestObjectV8Internal::typeCheckingInterfaceFloatAttributeAttributeSetter(v8V
alue, info); |
| 4957 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4957 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4958 } | 4958 } |
| 4959 | 4959 |
| 4960 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) | 4960 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 4961 { | 4961 { |
| 4962 v8::Local<v8::Object> holder = info.Holder(); | 4962 v8::Local<v8::Object> holder = info.Holder(); |
| 4963 TestObject* impl = V8TestObject::toImpl(holder); | 4963 TestObject* impl = V8TestObject::toImpl(holder); |
| 4964 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceAttribute()), impl); | 4964 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceAttribute()), impl); |
| 4965 } | 4965 } |
| 4966 | 4966 |
| 4967 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4967 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetterCallback(v
8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4968 { | 4968 { |
| 4969 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4969 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4970 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGe
tter(info); | 4970 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGe
tter(info); |
| 4971 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4971 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4972 } | 4972 } |
| 4973 | 4973 |
| 4974 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4974 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4975 { | 4975 { |
| 4976 v8::Local<v8::Object> holder = info.Holder(); | 4976 v8::Local<v8::Object> holder = info.Holder(); |
| 4977 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); | 4977 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); |
| 4978 TestObject* impl = V8TestObject::toImpl(holder); | 4978 TestObject* impl = V8TestObject::toImpl(holder); |
| 4979 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 4979 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 4980 if (!cppValue) { | 4980 if (!cppValue) { |
| 4981 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 4981 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 4982 exceptionState.throwIfNeeded(); | 4982 exceptionState.throwIfNeeded(); |
| 4983 return; | 4983 return; |
| 4984 } | 4984 } |
| 4985 impl->setTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppValue)); | 4985 impl->setTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 4986 } | 4986 } |
| 4987 | 4987 |
| 4988 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn
fo<void>& info) | 4988 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback(v
8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) |
| 4989 { | 4989 { |
| 4990 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4990 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4991 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSe
tter(v8Value, info); | 4991 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSe
tter(v8Value, info); |
| 4992 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4992 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4993 } | 4993 } |
| 4994 | 4994 |
| 4995 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) | 4995 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4996 { | 4996 { |
| 4997 v8::Local<v8::Object> holder = info.Holder(); | 4997 v8::Local<v8::Object> holder = info.Holder(); |
| 4998 TestObject* impl = V8TestObject::toImpl(holder); | 4998 TestObject* impl = V8TestObject::toImpl(holder); |
| 4999 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceOrNullAttribute()), impl); | 4999 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceOrNullAttribute()), impl); |
| 5000 } | 5000 } |
| 5001 | 5001 |
| 5002 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 5002 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetterCall
back(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 5003 { | 5003 { |
| 5004 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5004 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5005 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri
buteGetter(info); | 5005 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri
buteGetter(info); |
| 5006 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5006 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5007 } | 5007 } |
| 5008 | 5008 |
| 5009 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5009 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5010 { | 5010 { |
| 5011 v8::Local<v8::Object> holder = info.Holder(); | 5011 v8::Local<v8::Object> holder = info.Holder(); |
| 5012 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate()); | 5012 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate()); |
| 5013 TestObject* impl = V8TestObject::toImpl(holder); | 5013 TestObject* impl = V8TestObject::toImpl(holder); |
| 5014 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 5014 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 5015 if (!cppValue && !isUndefinedOrNull(v8Value)) { | 5015 if (!cppValue && !isUndefinedOrNull(v8Value)) { |
| 5016 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 5016 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 5017 exceptionState.throwIfNeeded(); | 5017 exceptionState.throwIfNeeded(); |
| 5018 return; | 5018 return; |
| 5019 } | 5019 } |
| 5020 impl->setTypeCheckingInterfaceTestInterfaceOrNullAttribute(WTF::getPtr(cppVa
lue)); | 5020 impl->setTypeCheckingInterfaceTestInterfaceOrNullAttribute(WTF::getPtr(cppVa
lue)); |
| 5021 } | 5021 } |
| 5022 | 5022 |
| 5023 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) | 5023 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetterCall
back(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallba
ckInfo<void>& info) |
| 5024 { | 5024 { |
| 5025 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5025 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5026 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri
buteSetter(v8Value, info); | 5026 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri
buteSetter(v8Value, info); |
| 5027 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5027 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5028 } | 5028 } |
| 5029 | 5029 |
| 5030 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 5030 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
| 5031 { | 5031 { |
| 5032 v8::Local<v8::Object> holder = info.Holder(); | 5032 v8::Local<v8::Object> holder = info.Holder(); |
| 5033 TestObject* impl = V8TestObject::toImpl(holder); | 5033 TestObject* impl = V8TestObject::toImpl(holder); |
| 5034 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattri
buteAttr), info.GetIsolate()); | 5034 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattri
buteAttr), info.GetIsolate()); |
| 5035 } | 5035 } |
| 5036 | 5036 |
| 5037 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 5037 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::Name>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 5038 { | 5038 { |
| 5039 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5039 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5040 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); | 5040 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); |
| 5041 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5041 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5042 } | 5042 } |
| 5043 | 5043 |
| 5044 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 5044 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
| 5045 { | 5045 { |
| 5046 v8::Local<v8::Object> holder = info.Holder(); | 5046 v8::Local<v8::Object> holder = info.Holder(); |
| 5047 TestObject* impl = V8TestObject::toImpl(holder); | 5047 TestObject* impl = V8TestObject::toImpl(holder); |
| 5048 V8StringResource<> cppValue = v8Value; | 5048 V8StringResource<> cppValue = v8Value; |
| 5049 if (!cppValue.prepare()) | 5049 if (!cppValue.prepare()) |
| 5050 return; | 5050 return; |
| 5051 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 5051 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 5052 impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue); | 5052 impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue); |
| 5053 } | 5053 } |
| 5054 | 5054 |
| 5055 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5055 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5056 { | 5056 { |
| 5057 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5057 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5058 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 5058 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 5059 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); | 5059 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); |
| 5060 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5060 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5061 } | 5061 } |
| 5062 | 5062 |
| 5063 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 5063 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
| 5064 { | 5064 { |
| 5065 v8::Local<v8::Object> holder = info.Holder(); | 5065 v8::Local<v8::Object> holder = info.Holder(); |
| 5066 TestObject* impl = V8TestObject::toImpl(holder); | 5066 TestObject* impl = V8TestObject::toImpl(holder); |
| 5067 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectUrlAttr
ibuteAttr), info.GetIsolate()); | 5067 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectUrlAttr
ibuteAttr), info.GetIsolate()); |
| 5068 } | 5068 } |
| 5069 | 5069 |
| 5070 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 5070 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::Name>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 5071 { | 5071 { |
| 5072 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5072 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5073 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); | 5073 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); |
| 5074 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5074 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5075 } | 5075 } |
| 5076 | 5076 |
| 5077 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 5077 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
| 5078 { | 5078 { |
| 5079 v8::Local<v8::Object> holder = info.Holder(); | 5079 v8::Local<v8::Object> holder = info.Holder(); |
| 5080 TestObject* impl = V8TestObject::toImpl(holder); | 5080 TestObject* impl = V8TestObject::toImpl(holder); |
| 5081 V8StringResource<> cppValue = v8Value; | 5081 V8StringResource<> cppValue = v8Value; |
| 5082 if (!cppValue.prepare()) | 5082 if (!cppValue.prepare()) |
| 5083 return; | 5083 return; |
| 5084 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 5084 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 5085 impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue); | 5085 impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue); |
| 5086 } | 5086 } |
| 5087 | 5087 |
| 5088 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5088 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5089 { | 5089 { |
| 5090 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5090 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5091 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 5091 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 5092 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); | 5092 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); |
| 5093 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5093 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5094 } | 5094 } |
| 5095 | 5095 |
| 5096 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 5096 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
| 5097 { | 5097 { |
| 5098 v8::Local<v8::Object> holder = info.Holder(); | 5098 v8::Local<v8::Object> holder = info.Holder(); |
| 5099 TestObject* impl = V8TestObject::toImpl(holder); | 5099 TestObject* impl = V8TestObject::toImpl(holder); |
| 5100 v8SetReturnValueInt(info, impl->unforgeableLongAttribute()); | 5100 v8SetReturnValueInt(info, impl->unforgeableLongAttribute()); |
| 5101 } | 5101 } |
| 5102 | 5102 |
| 5103 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 5103 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::Name>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 5104 { | 5104 { |
| 5105 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5105 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5106 TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info); | 5106 TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info); |
| 5107 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5107 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5108 } | 5108 } |
| 5109 | 5109 |
| 5110 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | 5110 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) |
| 5111 { | 5111 { |
| 5112 v8::Local<v8::Object> holder = info.Holder(); | 5112 v8::Local<v8::Object> holder = info.Holder(); |
| 5113 ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLon
gAttribute", "TestObject", holder, info.GetIsolate()); | 5113 ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLon
gAttribute", "TestObject", holder, info.GetIsolate()); |
| 5114 TestObject* impl = V8TestObject::toImpl(holder); | 5114 TestObject* impl = V8TestObject::toImpl(holder); |
| 5115 int cppValue = toInt32(v8Value, exceptionState); | 5115 int cppValue = toInt32(v8Value, exceptionState); |
| 5116 if (exceptionState.throwIfNeeded()) | 5116 if (exceptionState.throwIfNeeded()) |
| 5117 return; | 5117 return; |
| 5118 impl->setUnforgeableLongAttribute(cppValue); | 5118 impl->setUnforgeableLongAttribute(cppValue); |
| 5119 } | 5119 } |
| 5120 | 5120 |
| 5121 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5121 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5122 { | 5122 { |
| 5123 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5123 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5124 TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info)
; | 5124 TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info)
; |
| 5125 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5125 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5126 } | 5126 } |
| 5127 | 5127 |
| 5128 static void measuredLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 5128 static void measuredLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 5129 { | 5129 { |
| 5130 v8::Local<v8::Object> holder = info.Holder(); | 5130 v8::Local<v8::Object> holder = info.Holder(); |
| 5131 TestObject* impl = V8TestObject::toImpl(holder); | 5131 TestObject* impl = V8TestObject::toImpl(holder); |
| 5132 v8SetReturnValueInt(info, impl->measuredLongAttribute()); | 5132 v8SetReturnValueInt(info, impl->measuredLongAttribute()); |
| 5133 } | 5133 } |
| 5134 | 5134 |
| 5135 static void measuredLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 5135 static void measuredLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 5136 { | 5136 { |
| 5137 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5137 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5138 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeG
etter); | 5138 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeG
etter); |
| 5139 TestObjectV8Internal::measuredLongAttributeAttributeGetter(info); | 5139 TestObjectV8Internal::measuredLongAttributeAttributeGetter(info); |
| 5140 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5140 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5141 } | 5141 } |
| 5142 | 5142 |
| 5143 static void measuredLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 5143 static void measuredLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 5144 { | 5144 { |
| 5145 v8::Local<v8::Object> holder = info.Holder(); | 5145 v8::Local<v8::Object> holder = info.Holder(); |
| 5146 ExceptionState exceptionState(ExceptionState::SetterContext, "measuredLongAt
tribute", "TestObject", holder, info.GetIsolate()); | 5146 ExceptionState exceptionState(ExceptionState::SetterContext, "measuredLongAt
tribute", "TestObject", holder, info.GetIsolate()); |
| 5147 TestObject* impl = V8TestObject::toImpl(holder); | 5147 TestObject* impl = V8TestObject::toImpl(holder); |
| 5148 int cppValue = toInt32(v8Value, exceptionState); | 5148 int cppValue = toInt32(v8Value, exceptionState); |
| 5149 if (exceptionState.throwIfNeeded()) | 5149 if (exceptionState.throwIfNeeded()) |
| 5150 return; | 5150 return; |
| 5151 impl->setMeasuredLongAttribute(cppValue); | 5151 impl->setMeasuredLongAttribute(cppValue); |
| 5152 } | 5152 } |
| 5153 | 5153 |
| 5154 static void measuredLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5154 static void measuredLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5155 { | 5155 { |
| 5156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5157 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeS
etter); | 5157 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeS
etter); |
| 5158 TestObjectV8Internal::measuredLongAttributeAttributeSetter(v8Value, info); | 5158 TestObjectV8Internal::measuredLongAttributeAttributeSetter(v8Value, info); |
| 5159 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5159 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5160 } | 5160 } |
| 5161 | 5161 |
| 5162 static void sameObjectAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 5162 static void sameObjectAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 5163 { | 5163 { |
| 5164 v8::Local<v8::Object> holder = info.Holder(); | 5164 v8::Local<v8::Object> holder = info.Holder(); |
| 5165 TestObject* impl = V8TestObject::toImpl(holder); | 5165 TestObject* impl = V8TestObject::toImpl(holder); |
| 5166 v8SetReturnValueFast(info, WTF::getPtr(impl->sameObjectAttribute()), impl); | 5166 v8SetReturnValueFast(info, WTF::getPtr(impl->sameObjectAttribute()), impl); |
| 5167 } | 5167 } |
| 5168 | 5168 |
| 5169 static void sameObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 5169 static void sameObjectAttributeAttributeGetterCallback(v8::Local<v8::Name>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 5170 { | 5170 { |
| 5171 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5171 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5172 TestObjectV8Internal::sameObjectAttributeAttributeGetter(info); | 5172 TestObjectV8Internal::sameObjectAttributeAttributeGetter(info); |
| 5173 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5173 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5174 } | 5174 } |
| 5175 | 5175 |
| 5176 static void sameObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 5176 static void sameObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 5177 { | 5177 { |
| 5178 v8::Local<v8::Object> holder = info.Holder(); | 5178 v8::Local<v8::Object> holder = info.Holder(); |
| 5179 TestObject* impl = V8TestObject::toImpl(holder); | 5179 TestObject* impl = V8TestObject::toImpl(holder); |
| 5180 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 5180 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 5181 impl->setSameObjectAttribute(WTF::getPtr(cppValue)); | 5181 impl->setSameObjectAttribute(WTF::getPtr(cppValue)); |
| 5182 } | 5182 } |
| 5183 | 5183 |
| 5184 static void sameObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5184 static void sameObjectAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5185 { | 5185 { |
| 5186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5187 TestObjectV8Internal::sameObjectAttributeAttributeSetter(v8Value, info); | 5187 TestObjectV8Internal::sameObjectAttributeAttributeSetter(v8Value, info); |
| 5188 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5188 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5189 } | 5189 } |
| 5190 | 5190 |
| 5191 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 5191 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 5192 { | 5192 { |
| 5193 v8::Local<v8::Object> holder = info.Holder(); | 5193 v8::Local<v8::Object> holder = info.Holder(); |
| 5194 TestObject* impl = V8TestObject::toImpl(holder); | 5194 TestObject* impl = V8TestObject::toImpl(holder); |
| 5195 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | 5195 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); |
| 5196 } | 5196 } |
| 5197 | 5197 |
| 5198 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 5198 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 5199 { | 5199 { |
| 5200 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5200 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5201 TestObjectV8Internal::testInterfaceAttributeAttributeGetter(info); | 5201 TestObjectV8Internal::testInterfaceAttributeAttributeGetter(info); |
| 5202 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5202 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5203 } | 5203 } |
| 5204 | 5204 |
| 5205 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 5205 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 5206 { | 5206 { |
| 5207 v8::Local<v8::Object> holder = info.Holder(); | 5207 v8::Local<v8::Object> holder = info.Holder(); |
| 5208 TestObject* impl = V8TestObject::toImpl(holder); | 5208 TestObject* impl = V8TestObject::toImpl(holder); |
| 5209 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 5209 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 5210 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 5210 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 5211 } | 5211 } |
| 5212 | 5212 |
| 5213 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5213 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::Name>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5214 { | 5214 { |
| 5215 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5215 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5216 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); | 5216 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); |
| 5217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5218 } | 5218 } |
| 5219 | 5219 |
| 5220 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 5220 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 5221 { | 5221 { |
| 5222 v8::Local<v8::Object> holder = info.Holder(); | 5222 v8::Local<v8::Object> holder = info.Holder(); |
| 5223 TestObject* impl = V8TestObject::toImpl(holder); | 5223 TestObject* impl = V8TestObject::toImpl(holder); |
| 5224 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedAt
tribute()), impl); | 5224 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedAt
tribute()), impl); |
| 5225 } | 5225 } |
| 5226 | 5226 |
| 5227 static void testInterfaceGarbageCollectedAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 5227 static void testInterfaceGarbageCollectedAttributeAttributeGetterCallback(v8::Lo
cal<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 5228 { | 5228 { |
| 5229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5230 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetter(
info); | 5230 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetter(
info); |
| 5231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5232 } | 5232 } |
| 5233 | 5233 |
| 5234 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5234 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5235 { | 5235 { |
| 5236 v8::Local<v8::Object> holder = info.Holder(); | 5236 v8::Local<v8::Object> holder = info.Holder(); |
| 5237 TestObject* impl = V8TestObject::toImpl(holder); | 5237 TestObject* impl = V8TestObject::toImpl(holder); |
| 5238 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 5238 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 5239 impl->setTestInterfaceGarbageCollectedAttribute(WTF::getPtr(cppValue)); | 5239 impl->setTestInterfaceGarbageCollectedAttribute(WTF::getPtr(cppValue)); |
| 5240 } | 5240 } |
| 5241 | 5241 |
| 5242 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 5242 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(v8::Lo
cal<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 5243 { | 5243 { |
| 5244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5245 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(
v8Value, info); | 5245 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(
v8Value, info); |
| 5246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5247 } | 5247 } |
| 5248 | 5248 |
| 5249 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 5249 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 5250 { | 5250 { |
| 5251 v8::Local<v8::Object> holder = info.Holder(); | 5251 v8::Local<v8::Object> holder = info.Holder(); |
| 5252 TestObject* impl = V8TestObject::toImpl(holder); | 5252 TestObject* impl = V8TestObject::toImpl(holder); |
| 5253 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedOr
NullAttribute()), impl); | 5253 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedOr
NullAttribute()), impl); |
| 5254 } | 5254 } |
| 5255 | 5255 |
| 5256 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 5256 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback(
v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 5257 { | 5257 { |
| 5258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5259 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeG
etter(info); | 5259 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeG
etter(info); |
| 5260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5261 } | 5261 } |
| 5262 | 5262 |
| 5263 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5263 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5264 { | 5264 { |
| 5265 v8::Local<v8::Object> holder = info.Holder(); | 5265 v8::Local<v8::Object> holder = info.Holder(); |
| 5266 TestObject* impl = V8TestObject::toImpl(holder); | 5266 TestObject* impl = V8TestObject::toImpl(holder); |
| 5267 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 5267 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 5268 impl->setTestInterfaceGarbageCollectedOrNullAttribute(WTF::getPtr(cppValue))
; | 5268 impl->setTestInterfaceGarbageCollectedOrNullAttribute(WTF::getPtr(cppValue))
; |
| 5269 } | 5269 } |
| 5270 | 5270 |
| 5271 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 5271 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(
v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) |
| 5272 { | 5272 { |
| 5273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5274 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeS
etter(v8Value, info); | 5274 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeS
etter(v8Value, info); |
| 5275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5276 } | 5276 } |
| 5277 | 5277 |
| 5278 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 5278 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 5279 { | 5279 { |
| 5280 v8::Local<v8::Object> holder = info.Holder(); | 5280 v8::Local<v8::Object> holder = info.Holder(); |
| 5281 TestObject* impl = V8TestObject::toImpl(holder); | 5281 TestObject* impl = V8TestObject::toImpl(holder); |
| 5282 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedAttribute()), impl); | 5282 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedAttribute()), impl); |
| 5283 } | 5283 } |
| 5284 | 5284 |
| 5285 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 5285 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(
v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 5286 { | 5286 { |
| 5287 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5287 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5288 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeG
etter(info); | 5288 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeG
etter(info); |
| 5289 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5289 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5290 } | 5290 } |
| 5291 | 5291 |
| 5292 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5292 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5293 { | 5293 { |
| 5294 v8::Local<v8::Object> holder = info.Holder(); | 5294 v8::Local<v8::Object> holder = info.Holder(); |
| 5295 TestObject* impl = V8TestObject::toImpl(holder); | 5295 TestObject* impl = V8TestObject::toImpl(holder); |
| 5296 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 5296 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 5297 impl->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue))
; | 5297 impl->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue))
; |
| 5298 } | 5298 } |
| 5299 | 5299 |
| 5300 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 5300 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(
v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) |
| 5301 { | 5301 { |
| 5302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5303 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeS
etter(v8Value, info); | 5303 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeS
etter(v8Value, info); |
| 5304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5305 } | 5305 } |
| 5306 | 5306 |
| 5307 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 5307 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 5308 { | 5308 { |
| 5309 v8::Local<v8::Object> holder = info.Holder(); | 5309 v8::Local<v8::Object> holder = info.Holder(); |
| 5310 TestObject* impl = V8TestObject::toImpl(holder); | 5310 TestObject* impl = V8TestObject::toImpl(holder); |
| 5311 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedOrNullAttribute()), impl); | 5311 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedOrNullAttribute()), impl); |
| 5312 } | 5312 } |
| 5313 | 5313 |
| 5314 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 5314 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCal
lback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 5315 { | 5315 { |
| 5316 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5316 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5317 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteGetter(info); | 5317 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteGetter(info); |
| 5318 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5318 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5319 } | 5319 } |
| 5320 | 5320 |
| 5321 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5321 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5322 { | 5322 { |
| 5323 v8::Local<v8::Object> holder = info.Holder(); | 5323 v8::Local<v8::Object> holder = info.Holder(); |
| 5324 TestObject* impl = V8TestObject::toImpl(holder); | 5324 TestObject* impl = V8TestObject::toImpl(holder); |
| 5325 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 5325 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 5326 impl->setTestInterfaceWillBeGarbageCollectedOrNullAttribute(WTF::getPtr(cppV
alue)); | 5326 impl->setTestInterfaceWillBeGarbageCollectedOrNullAttribute(WTF::getPtr(cppV
alue)); |
| 5327 } | 5327 } |
| 5328 | 5328 |
| 5329 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | 5329 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetterCal
lback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
| 5330 { | 5330 { |
| 5331 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5331 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5332 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteSetter(v8Value, info); | 5332 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteSetter(v8Value, info); |
| 5333 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5333 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5334 } | 5334 } |
| 5335 | 5335 |
| 5336 static void readonlyShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 5336 static void readonlyShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 5337 { | 5337 { |
| 5338 v8::Local<v8::Object> holder = info.Holder(); | 5338 v8::Local<v8::Object> holder = info.Holder(); |
| 5339 TestObject* impl = V8TestObject::toImpl(holder); | 5339 TestObject* impl = V8TestObject::toImpl(holder); |
| 5340 int result = 0; | 5340 int result = 0; |
| 5341 if (!V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(toLo
calFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &r
esult)) | 5341 if (!V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(toLo
calFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &r
esult)) |
| 5342 return; | 5342 return; |
| 5343 v8SetReturnValueInt(info, result); | 5343 v8SetReturnValueInt(info, result); |
| 5344 } | 5344 } |
| 5345 | 5345 |
| 5346 static void readonlyShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 5346 static void readonlyShortAttributeAttributeGetterCallback(v8::Local<v8::Name>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 5347 { | 5347 { |
| 5348 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5348 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5349 TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info); | 5349 TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info); |
| 5350 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5350 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5351 } | 5351 } |
| 5352 | 5352 |
| 5353 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 5353 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 5354 { | 5354 { |
| 5355 v8::Local<v8::Object> holder = info.Holder(); | 5355 v8::Local<v8::Object> holder = info.Holder(); |
| 5356 TestObject* impl = V8TestObject::toImpl(holder); | 5356 TestObject* impl = V8TestObject::toImpl(holder); |
| 5357 int result = 0; | 5357 int result = 0; |
| 5358 if (!V8TestObject::PrivateScript::shortAttributeAttributeGetter(toLocalFrame
(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) | 5358 if (!V8TestObject::PrivateScript::shortAttributeAttributeGetter(toLocalFrame
(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) |
| 5359 return; | 5359 return; |
| 5360 v8SetReturnValueInt(info, result); | 5360 v8SetReturnValueInt(info, result); |
| 5361 } | 5361 } |
| 5362 | 5362 |
| 5363 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 5363 static void shortAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 5364 { | 5364 { |
| 5365 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5365 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5366 TestObjectV8Internal::shortAttributeAttributeGetter(info); | 5366 TestObjectV8Internal::shortAttributeAttributeGetter(info); |
| 5367 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5367 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5368 } | 5368 } |
| 5369 | 5369 |
| 5370 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 5370 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 5371 { | 5371 { |
| 5372 v8::Local<v8::Object> holder = info.Holder(); | 5372 v8::Local<v8::Object> holder = info.Holder(); |
| 5373 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); | 5373 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); |
| 5374 TestObject* impl = V8TestObject::toImpl(holder); | 5374 TestObject* impl = V8TestObject::toImpl(holder); |
| 5375 int cppValue = toInt16(v8Value, exceptionState); | 5375 int cppValue = toInt16(v8Value, exceptionState); |
| 5376 if (exceptionState.throwIfNeeded()) | 5376 if (exceptionState.throwIfNeeded()) |
| 5377 return; | 5377 return; |
| 5378 V8TestObject::PrivateScript::shortAttributeAttributeSetter(toLocalFrame(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); | 5378 V8TestObject::PrivateScript::shortAttributeAttributeSetter(toLocalFrame(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
| 5379 } | 5379 } |
| 5380 | 5380 |
| 5381 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5381 static void shortAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5382 { | 5382 { |
| 5383 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5383 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5384 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); | 5384 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); |
| 5385 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5385 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5386 } | 5386 } |
| 5387 | 5387 |
| 5388 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 5388 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 5389 { | 5389 { |
| 5390 v8::Local<v8::Object> holder = info.Holder(); | 5390 v8::Local<v8::Object> holder = info.Holder(); |
| 5391 TestObject* impl = V8TestObject::toImpl(holder); | 5391 TestObject* impl = V8TestObject::toImpl(holder); |
| 5392 String result; | 5392 String result; |
| 5393 if (!V8TestObject::PrivateScript::stringAttributeAttributeGetter(toLocalFram
e(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) | 5393 if (!V8TestObject::PrivateScript::stringAttributeAttributeGetter(toLocalFram
e(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) |
| 5394 return; | 5394 return; |
| 5395 v8SetReturnValueString(info, result, info.GetIsolate()); | 5395 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 5396 } | 5396 } |
| 5397 | 5397 |
| 5398 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 5398 static void stringAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 5399 { | 5399 { |
| 5400 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5400 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5401 TestObjectV8Internal::stringAttributeAttributeGetter(info); | 5401 TestObjectV8Internal::stringAttributeAttributeGetter(info); |
| 5402 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5402 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5403 } | 5403 } |
| 5404 | 5404 |
| 5405 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 5405 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 5406 { | 5406 { |
| 5407 v8::Local<v8::Object> holder = info.Holder(); | 5407 v8::Local<v8::Object> holder = info.Holder(); |
| 5408 TestObject* impl = V8TestObject::toImpl(holder); | 5408 TestObject* impl = V8TestObject::toImpl(holder); |
| 5409 V8StringResource<> cppValue = v8Value; | 5409 V8StringResource<> cppValue = v8Value; |
| 5410 if (!cppValue.prepare()) | 5410 if (!cppValue.prepare()) |
| 5411 return; | 5411 return; |
| 5412 V8TestObject::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(toF
rameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); | 5412 V8TestObject::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(toF
rameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
| 5413 } | 5413 } |
| 5414 | 5414 |
| 5415 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5415 static void stringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5416 { | 5416 { |
| 5417 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5417 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5418 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); | 5418 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); |
| 5419 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5419 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5420 } | 5420 } |
| 5421 | 5421 |
| 5422 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 5422 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 5423 { | 5423 { |
| 5424 v8::Local<v8::Object> holder = info.Holder(); | 5424 v8::Local<v8::Object> holder = info.Holder(); |
| 5425 TestObject* impl = V8TestObject::toImpl(holder); | 5425 TestObject* impl = V8TestObject::toImpl(holder); |
| 5426 RefPtrWillBeRawPtr<Node> result = nullptr; | 5426 RefPtrWillBeRawPtr<Node> result = nullptr; |
| 5427 if (!V8TestObject::PrivateScript::nodeAttributeAttributeGetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) | 5427 if (!V8TestObject::PrivateScript::nodeAttributeAttributeGetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) |
| 5428 return; | 5428 return; |
| 5429 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); | 5429 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); |
| 5430 } | 5430 } |
| 5431 | 5431 |
| 5432 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 5432 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 5433 { | 5433 { |
| 5434 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5434 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5435 TestObjectV8Internal::nodeAttributeAttributeGetter(info); | 5435 TestObjectV8Internal::nodeAttributeAttributeGetter(info); |
| 5436 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5436 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5437 } | 5437 } |
| 5438 | 5438 |
| 5439 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 5439 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 5440 { | 5440 { |
| 5441 v8::Local<v8::Object> holder = info.Holder(); | 5441 v8::Local<v8::Object> holder = info.Holder(); |
| 5442 TestObject* impl = V8TestObject::toImpl(holder); | 5442 TestObject* impl = V8TestObject::toImpl(holder); |
| 5443 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 5443 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 5444 V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toLocalFrame(toFra
meIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); | 5444 V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toLocalFrame(toFra
meIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
| 5445 } | 5445 } |
| 5446 | 5446 |
| 5447 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5447 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5448 { | 5448 { |
| 5449 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5449 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5450 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | 5450 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); |
| 5451 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5451 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5452 } | 5452 } |
| 5453 | 5453 |
| 5454 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | 5454 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 5455 { | 5455 { |
| 5456 v8::Local<v8::Object> holder = info.Holder(); | 5456 v8::Local<v8::Object> holder = info.Holder(); |
| 5457 TestObject* impl = V8TestObject::toImpl(holder); | 5457 TestObject* impl = V8TestObject::toImpl(holder); |
| 5458 v8SetReturnValueString(info, impl->attributeImplementedInCPPForPrivateScript
Only(), info.GetIsolate()); | 5458 v8SetReturnValueString(info, impl->attributeImplementedInCPPForPrivateScript
Only(), info.GetIsolate()); |
| 5459 } | 5459 } |
| 5460 | 5460 |
| 5461 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 5461 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback
(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 5462 { | 5462 { |
| 5463 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5463 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5464 TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttribute
Getter(info); | 5464 TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttribute
Getter(info); |
| 5465 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5465 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5466 } | 5466 } |
| 5467 | 5467 |
| 5468 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5468 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5469 { | 5469 { |
| 5470 v8::Local<v8::Object> holder = info.Holder(); | 5470 v8::Local<v8::Object> holder = info.Holder(); |
| 5471 TestObject* impl = V8TestObject::toImpl(holder); | 5471 TestObject* impl = V8TestObject::toImpl(holder); |
| 5472 V8StringResource<> cppValue = v8Value; | 5472 V8StringResource<> cppValue = v8Value; |
| 5473 if (!cppValue.prepare()) | 5473 if (!cppValue.prepare()) |
| 5474 return; | 5474 return; |
| 5475 impl->setAttributeImplementedInCPPForPrivateScriptOnly(cppValue); | 5475 impl->setAttributeImplementedInCPPForPrivateScriptOnly(cppValue); |
| 5476 } | 5476 } |
| 5477 | 5477 |
| 5478 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) | 5478 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback
(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn
fo<void>& info) |
| 5479 { | 5479 { |
| 5480 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5480 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5481 TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttribute
Setter(v8Value, info); | 5481 TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttribute
Setter(v8Value, info); |
| 5482 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5482 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5483 } | 5483 } |
| 5484 | 5484 |
| 5485 static void enumForPrivateScriptAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 5485 static void enumForPrivateScriptAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 5486 { | 5486 { |
| 5487 v8::Local<v8::Object> holder = info.Holder(); | 5487 v8::Local<v8::Object> holder = info.Holder(); |
| 5488 TestObject* impl = V8TestObject::toImpl(holder); | 5488 TestObject* impl = V8TestObject::toImpl(holder); |
| 5489 String result; | 5489 String result; |
| 5490 if (!V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(toLoca
lFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &res
ult)) | 5490 if (!V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(toLoca
lFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &res
ult)) |
| 5491 return; | 5491 return; |
| 5492 v8SetReturnValueString(info, result, info.GetIsolate()); | 5492 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 5493 } | 5493 } |
| 5494 | 5494 |
| 5495 static void enumForPrivateScriptAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 5495 static void enumForPrivateScriptAttributeGetterCallback(v8::Local<v8::Name>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 5496 { | 5496 { |
| 5497 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5497 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5498 TestObjectV8Internal::enumForPrivateScriptAttributeGetter(info); | 5498 TestObjectV8Internal::enumForPrivateScriptAttributeGetter(info); |
| 5499 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5499 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5500 } | 5500 } |
| 5501 | 5501 |
| 5502 static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 5502 static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 5503 { | 5503 { |
| 5504 v8::Local<v8::Object> holder = info.Holder(); | 5504 v8::Local<v8::Object> holder = info.Holder(); |
| 5505 TestObject* impl = V8TestObject::toImpl(holder); | 5505 TestObject* impl = V8TestObject::toImpl(holder); |
| 5506 V8StringResource<> cppValue = v8Value; | 5506 V8StringResource<> cppValue = v8Value; |
| 5507 if (!cppValue.prepare()) | 5507 if (!cppValue.prepare()) |
| 5508 return; | 5508 return; |
| 5509 String string = cppValue; | 5509 String string = cppValue; |
| 5510 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 5510 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
| 5511 return; | 5511 return; |
| 5512 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toLocalFram
e(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue)
; | 5512 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toLocalFram
e(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue)
; |
| 5513 } | 5513 } |
| 5514 | 5514 |
| 5515 static void enumForPrivateScriptAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5515 static void enumForPrivateScriptAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5516 { | 5516 { |
| 5517 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5517 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 5518 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); | 5518 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); |
| 5519 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5519 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5520 } | 5520 } |
| 5521 | 5521 |
| 5522 static void testInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::
Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) | 5522 static void testInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::
Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 5523 { | 5523 { |
| 5524 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5524 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5525 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::deprecatedTestInterfaceEmptyConstr
uctorAttribute); | 5525 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::deprecatedTestInterfaceEmptyConstr
uctorAttribute); |
| 5526 v8ConstructorAttributeGetterAsProperty(property, info); | 5526 v8ConstructorAttributeGetterAsProperty(property, info); |
| 5527 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5527 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5528 } | 5528 } |
| 5529 | 5529 |
| 5530 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructo
rGetterCallback(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v
8::Value>& info) | 5530 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructo
rGetterCallback(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8:
:Value>& info) |
| 5531 { | 5531 { |
| 5532 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 5532 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 5533 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::FeatureName); | 5533 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::FeatureName); |
| 5534 v8ConstructorAttributeGetterAsProperty(property, info); | 5534 v8ConstructorAttributeGetterAsProperty(property, info); |
| 5535 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5535 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5536 } | 5536 } |
| 5537 | 5537 |
| 5538 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5538 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5539 { | 5539 { |
| 5540 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 5540 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| (...skipping 7610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13151 return false; | 13151 return false; |
| 13152 | 13152 |
| 13153 ScriptState::Scope scope(scriptState); | 13153 ScriptState::Scope scope(scriptState); |
| 13154 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 13154 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
| 13155 | 13155 |
| 13156 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 13156 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
| 13157 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 13157 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
| 13158 } | 13158 } |
| 13159 | 13159 |
| 13160 } // namespace blink | 13160 } // namespace blink |
| OLD | NEW |