| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | |
| 6 | |
| 7 #include "config.h" | |
| 8 #include "V8TestObject.h" | |
| 9 | |
| 10 #include "bindings/core/v8/BindingSecurity.h" | |
| 11 #include "bindings/core/v8/Dictionary.h" | |
| 12 #include "bindings/core/v8/ExceptionState.h" | |
| 13 #include "bindings/core/v8/PrivateScriptRunner.h" | |
| 14 #include "bindings/core/v8/ScriptCallStackFactory.h" | |
| 15 #include "bindings/core/v8/ScriptPromise.h" | |
| 16 #include "bindings/core/v8/ScriptState.h" | |
| 17 #include "bindings/core/v8/ScriptValue.h" | |
| 18 #include "bindings/core/v8/SerializedScriptValue.h" | |
| 19 #include "bindings/core/v8/V8AbstractEventListener.h" | |
| 20 #include "bindings/core/v8/V8DOMActivityLogger.h" | |
| 21 #include "bindings/core/v8/V8DOMConfiguration.h" | |
| 22 #include "bindings/core/v8/V8EventListenerList.h" | |
| 23 #include "bindings/core/v8/V8HTMLCollection.h" | |
| 24 #include "bindings/core/v8/V8HiddenValue.h" | |
| 25 #include "bindings/core/v8/V8ObjectConstructor.h" | |
| 26 #include "bindings/core/v8/custom/V8ArrayBufferCustom.h" | |
| 27 #include "bindings/core/v8/custom/V8ArrayBufferViewCustom.h" | |
| 28 #include "bindings/core/v8/custom/V8Float32ArrayCustom.h" | |
| 29 #include "bindings/core/v8/custom/V8Int32ArrayCustom.h" | |
| 30 #include "bindings/core/v8/custom/V8Uint8ArrayCustom.h" | |
| 31 #include "bindings/tests/v8/V8Attr.h" | |
| 32 #include "bindings/tests/v8/V8Document.h" | |
| 33 #include "bindings/tests/v8/V8DocumentFragment.h" | |
| 34 #include "bindings/tests/v8/V8DocumentType.h" | |
| 35 #include "bindings/tests/v8/V8Element.h" | |
| 36 #include "bindings/tests/v8/V8EventTarget.h" | |
| 37 #include "bindings/tests/v8/V8HTMLElement.h" | |
| 38 #include "bindings/tests/v8/V8Node.h" | |
| 39 #include "bindings/tests/v8/V8NodeFilter.h" | |
| 40 #include "bindings/tests/v8/V8ShadowRoot.h" | |
| 41 #include "bindings/tests/v8/V8TestCallbackInterface.h" | |
| 42 #include "bindings/tests/v8/V8TestDictionary.h" | |
| 43 #include "bindings/tests/v8/V8TestInterface.h" | |
| 44 #include "bindings/tests/v8/V8TestInterfaceEmpty.h" | |
| 45 #include "bindings/tests/v8/V8TestInterfaceGarbageCollected.h" | |
| 46 #include "bindings/tests/v8/V8TestInterfaceWillBeGarbageCollected.h" | |
| 47 #include "bindings/tests/v8/V8TestNode.h" | |
| 48 #include "bindings/tests/v8/V8TestObject.h" | |
| 49 #include "bindings/tests/v8/V8Window.h" | |
| 50 #include "bindings/tests/v8/V8XPathNSResolver.h" | |
| 51 #include "core/HTMLNames.h" | |
| 52 #include "core/dom/ClassCollection.h" | |
| 53 #include "core/dom/ContextFeatures.h" | |
| 54 #include "core/dom/Document.h" | |
| 55 #include "core/dom/TagCollection.h" | |
| 56 #include "core/dom/custom/CustomElementProcessingStack.h" | |
| 57 #include "core/frame/LocalFrame.h" | |
| 58 #include "core/frame/UseCounter.h" | |
| 59 #include "core/html/HTMLCollection.h" | |
| 60 #include "core/html/HTMLDataListOptionsCollection.h" | |
| 61 #include "core/html/HTMLFormControlsCollection.h" | |
| 62 #include "core/html/HTMLTableRowsCollection.h" | |
| 63 #include "core/inspector/ScriptArguments.h" | |
| 64 #include "platform/RuntimeEnabledFeatures.h" | |
| 65 #include "platform/ScriptForbiddenScope.h" | |
| 66 #include "platform/TraceEvent.h" | |
| 67 #include "wtf/GetPtr.h" | |
| 68 #include "wtf/RefPtr.h" | |
| 69 | |
| 70 namespace blink { | |
| 71 | |
| 72 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::refObject, V8TestObject::derefObject, V8Te
stObject::createPersistentHandle, 0, 0, 0, V8TestObject::installConditionallyEna
bledMethods, V8TestObject::installConditionallyEnabledProperties, 0, WrapperType
Info::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInf
o::Independent, WrapperTypeInfo::RefCountedObject }; | |
| 73 | |
| 74 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestObject.h
. | |
| 75 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | |
| 76 // bindings/core/v8/ScriptWrappable.h. | |
| 77 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType
Info; | |
| 78 | |
| 79 namespace TestObjectV8Internal { | |
| 80 | |
| 81 template <typename T> void V8_USE(T) { } | |
| 82 | |
| 83 static void stringifierAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
| 84 { | |
| 85 v8::Handle<v8::Object> holder = info.Holder(); | |
| 86 TestObject* impl = V8TestObject::toImpl(holder); | |
| 87 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); | |
| 88 } | |
| 89 | |
| 90 static void stringifierAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 91 { | |
| 92 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 93 TestObjectV8Internal::stringifierAttributeAttributeGetter(info); | |
| 94 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 95 } | |
| 96 | |
| 97 static void stringifierAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | |
| 98 { | |
| 99 v8::Handle<v8::Object> holder = info.Holder(); | |
| 100 TestObject* impl = V8TestObject::toImpl(holder); | |
| 101 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 102 impl->setStringifierAttribute(cppValue); | |
| 103 } | |
| 104 | |
| 105 static void stringifierAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 106 { | |
| 107 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 108 TestObjectV8Internal::stringifierAttributeAttributeSetter(v8Value, info); | |
| 109 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 110 } | |
| 111 | |
| 112 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | |
| 113 { | |
| 114 v8::Handle<v8::Object> holder = info.Holder(); | |
| 115 TestObject* impl = V8TestObject::toImpl(holder); | |
| 116 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); | |
| 117 } | |
| 118 | |
| 119 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 120 { | |
| 121 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 122 TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info); | |
| 123 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 124 } | |
| 125 | |
| 126 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | |
| 127 { | |
| 128 v8::Handle<v8::Object> holder = info.Holder(); | |
| 129 TestObject* impl = V8TestObject::toImpl(holder); | |
| 130 RefPtr<TestInterfaceEmpty> cppValue(impl->readonlyTestInterfaceEmptyAttribut
e()); | |
| 131 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty
>(info.GetReturnValue(), cppValue.get())) | |
| 132 return; | |
| 133 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); | |
| 134 if (!wrapper.IsEmpty()) { | |
| 135 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), wrapper); | |
| 136 v8SetReturnValue(info, wrapper); | |
| 137 } | |
| 138 } | |
| 139 | |
| 140 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 141 { | |
| 142 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 143 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(inf
o); | |
| 144 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 145 } | |
| 146 | |
| 147 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
| 148 { | |
| 149 v8::Handle<v8::Object> holder = info.Holder(); | |
| 150 TestObject* impl = V8TestObject::toImpl(holder); | |
| 151 v8SetReturnValueInt(info, impl->readonlyLongAttribute()); | |
| 152 } | |
| 153 | |
| 154 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 155 { | |
| 156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 157 TestObjectV8Internal::readonlyLongAttributeAttributeGetter(info); | |
| 158 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 159 } | |
| 160 | |
| 161 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
| 162 { | |
| 163 v8::Handle<v8::Object> holder = info.Holder(); | |
| 164 TestObject* impl = V8TestObject::toImpl(holder); | |
| 165 v8SetReturnValue(info, v8DateOrNaN(impl->dateAttribute(), info.GetIsolate())
); | |
| 166 } | |
| 167 | |
| 168 static void dateAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 169 { | |
| 170 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 171 TestObjectV8Internal::dateAttributeAttributeGetter(info); | |
| 172 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 173 } | |
| 174 | |
| 175 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
| 176 { | |
| 177 v8::Handle<v8::Object> holder = info.Holder(); | |
| 178 TestObject* impl = V8TestObject::toImpl(holder); | |
| 179 TONATIVE_VOID(double, cppValue, toCoreDate(v8Value)); | |
| 180 impl->setDateAttribute(cppValue); | |
| 181 } | |
| 182 | |
| 183 static void dateAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 184 { | |
| 185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 186 TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info); | |
| 187 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 188 } | |
| 189 | |
| 190 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | |
| 191 { | |
| 192 v8::Handle<v8::Object> holder = info.Holder(); | |
| 193 TestObject* impl = V8TestObject::toImpl(holder); | |
| 194 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); | |
| 195 } | |
| 196 | |
| 197 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
| 198 { | |
| 199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 200 TestObjectV8Internal::stringAttributeAttributeGetter(info); | |
| 201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 202 } | |
| 203 | |
| 204 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | |
| 205 { | |
| 206 v8::Handle<v8::Object> holder = info.Holder(); | |
| 207 TestObject* impl = V8TestObject::toImpl(holder); | |
| 208 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 209 impl->setStringAttribute(cppValue); | |
| 210 } | |
| 211 | |
| 212 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 213 { | |
| 214 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 215 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); | |
| 216 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 217 } | |
| 218 | |
| 219 static void byteStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
| 220 { | |
| 221 v8::Handle<v8::Object> holder = info.Holder(); | |
| 222 TestObject* impl = V8TestObject::toImpl(holder); | |
| 223 v8SetReturnValueString(info, impl->byteStringAttribute(), info.GetIsolate())
; | |
| 224 } | |
| 225 | |
| 226 static void byteStringAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 227 { | |
| 228 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 229 TestObjectV8Internal::byteStringAttributeAttributeGetter(info); | |
| 230 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 231 } | |
| 232 | |
| 233 static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
| 234 { | |
| 235 v8::Handle<v8::Object> holder = info.Holder(); | |
| 236 ExceptionState exceptionState(ExceptionState::SetterContext, "byteStringAttr
ibute", "TestObject", holder, info.GetIsolate()); | |
| 237 TestObject* impl = V8TestObject::toImpl(holder); | |
| 238 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); | |
| 239 impl->setByteStringAttribute(cppValue); | |
| 240 } | |
| 241 | |
| 242 static void byteStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 243 { | |
| 244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 245 TestObjectV8Internal::byteStringAttributeAttributeSetter(v8Value, info); | |
| 246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 247 } | |
| 248 | |
| 249 static void scalarValueStringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | |
| 250 { | |
| 251 v8::Handle<v8::Object> holder = info.Holder(); | |
| 252 TestObject* impl = V8TestObject::toImpl(holder); | |
| 253 v8SetReturnValueString(info, impl->scalarValueStringAttribute(), info.GetIso
late()); | |
| 254 } | |
| 255 | |
| 256 static void scalarValueStringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 257 { | |
| 258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 259 TestObjectV8Internal::scalarValueStringAttributeAttributeGetter(info); | |
| 260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 261 } | |
| 262 | |
| 263 static void scalarValueStringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | |
| 264 { | |
| 265 v8::Handle<v8::Object> holder = info.Holder(); | |
| 266 ExceptionState exceptionState(ExceptionState::SetterContext, "scalarValueStr
ingAttribute", "TestObject", holder, info.GetIsolate()); | |
| 267 TestObject* impl = V8TestObject::toImpl(holder); | |
| 268 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toScalarValueStri
ng(v8Value, exceptionState), exceptionState); | |
| 269 impl->setScalarValueStringAttribute(cppValue); | |
| 270 } | |
| 271 | |
| 272 static void scalarValueStringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 273 { | |
| 274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 275 TestObjectV8Internal::scalarValueStringAttributeAttributeSetter(v8Value, inf
o); | |
| 276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 277 } | |
| 278 | |
| 279 static void domTimeStampAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
| 280 { | |
| 281 v8::Handle<v8::Object> holder = info.Holder(); | |
| 282 TestObject* impl = V8TestObject::toImpl(holder); | |
| 283 v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute())); | |
| 284 } | |
| 285 | |
| 286 static void domTimeStampAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 287 { | |
| 288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 289 TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info); | |
| 290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 291 } | |
| 292 | |
| 293 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
| 294 { | |
| 295 v8::Handle<v8::Object> holder = info.Holder(); | |
| 296 ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAt
tribute", "TestObject", holder, info.GetIsolate()); | |
| 297 TestObject* impl = V8TestObject::toImpl(holder); | |
| 298 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value,
exceptionState), exceptionState); | |
| 299 impl->setDomTimeStampAttribute(cppValue); | |
| 300 } | |
| 301 | |
| 302 static void domTimeStampAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 303 { | |
| 304 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 305 TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info); | |
| 306 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 307 } | |
| 308 | |
| 309 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | |
| 310 { | |
| 311 v8::Handle<v8::Object> holder = info.Holder(); | |
| 312 TestObject* impl = V8TestObject::toImpl(holder); | |
| 313 v8SetReturnValueBool(info, impl->booleanAttribute()); | |
| 314 } | |
| 315 | |
| 316 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
| 317 { | |
| 318 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 319 TestObjectV8Internal::booleanAttributeAttributeGetter(info); | |
| 320 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 321 } | |
| 322 | |
| 323 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
| 324 { | |
| 325 v8::Handle<v8::Object> holder = info.Holder(); | |
| 326 TestObject* impl = V8TestObject::toImpl(holder); | |
| 327 TONATIVE_VOID(bool, cppValue, v8Value->BooleanValue()); | |
| 328 impl->setBooleanAttribute(cppValue); | |
| 329 } | |
| 330 | |
| 331 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 332 { | |
| 333 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 334 TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info); | |
| 335 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 336 } | |
| 337 | |
| 338 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
| 339 { | |
| 340 v8::Handle<v8::Object> holder = info.Holder(); | |
| 341 TestObject* impl = V8TestObject::toImpl(holder); | |
| 342 v8SetReturnValueInt(info, impl->byteAttribute()); | |
| 343 } | |
| 344 | |
| 345 static void byteAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 346 { | |
| 347 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 348 TestObjectV8Internal::byteAttributeAttributeGetter(info); | |
| 349 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 350 } | |
| 351 | |
| 352 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
| 353 { | |
| 354 v8::Handle<v8::Object> holder = info.Holder(); | |
| 355 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute"
, "TestObject", holder, info.GetIsolate()); | |
| 356 TestObject* impl = V8TestObject::toImpl(holder); | |
| 357 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt8(v8Value, exceptionState),
exceptionState); | |
| 358 impl->setByteAttribute(cppValue); | |
| 359 } | |
| 360 | |
| 361 static void byteAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 362 { | |
| 363 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 364 TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info); | |
| 365 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 366 } | |
| 367 | |
| 368 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | |
| 369 { | |
| 370 v8::Handle<v8::Object> holder = info.Holder(); | |
| 371 TestObject* impl = V8TestObject::toImpl(holder); | |
| 372 v8SetReturnValue(info, impl->doubleAttribute()); | |
| 373 } | |
| 374 | |
| 375 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
| 376 { | |
| 377 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 378 TestObjectV8Internal::doubleAttributeAttributeGetter(info); | |
| 379 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 380 } | |
| 381 | |
| 382 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | |
| 383 { | |
| 384 v8::Handle<v8::Object> holder = info.Holder(); | |
| 385 TestObject* impl = V8TestObject::toImpl(holder); | |
| 386 TONATIVE_VOID(double, cppValue, static_cast<double>(v8Value->NumberValue()))
; | |
| 387 impl->setDoubleAttribute(cppValue); | |
| 388 } | |
| 389 | |
| 390 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 391 { | |
| 392 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 393 TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info); | |
| 394 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 395 } | |
| 396 | |
| 397 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
| 398 { | |
| 399 v8::Handle<v8::Object> holder = info.Holder(); | |
| 400 TestObject* impl = V8TestObject::toImpl(holder); | |
| 401 v8SetReturnValue(info, impl->floatAttribute()); | |
| 402 } | |
| 403 | |
| 404 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | |
| 405 { | |
| 406 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 407 TestObjectV8Internal::floatAttributeAttributeGetter(info); | |
| 408 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 409 } | |
| 410 | |
| 411 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | |
| 412 { | |
| 413 v8::Handle<v8::Object> holder = info.Holder(); | |
| 414 TestObject* impl = V8TestObject::toImpl(holder); | |
| 415 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); | |
| 416 impl->setFloatAttribute(cppValue); | |
| 417 } | |
| 418 | |
| 419 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 420 { | |
| 421 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 422 TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info); | |
| 423 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 424 } | |
| 425 | |
| 426 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
| 427 { | |
| 428 v8::Handle<v8::Object> holder = info.Holder(); | |
| 429 TestObject* impl = V8TestObject::toImpl(holder); | |
| 430 v8SetReturnValueInt(info, impl->longAttribute()); | |
| 431 } | |
| 432 | |
| 433 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 434 { | |
| 435 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 436 TestObjectV8Internal::longAttributeAttributeGetter(info); | |
| 437 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 438 } | |
| 439 | |
| 440 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
| 441 { | |
| 442 v8::Handle<v8::Object> holder = info.Holder(); | |
| 443 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute"
, "TestObject", holder, info.GetIsolate()); | |
| 444 TestObject* impl = V8TestObject::toImpl(holder); | |
| 445 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 446 impl->setLongAttribute(cppValue); | |
| 447 } | |
| 448 | |
| 449 static void longAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 450 { | |
| 451 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 452 TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info); | |
| 453 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 454 } | |
| 455 | |
| 456 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | |
| 457 { | |
| 458 v8::Handle<v8::Object> holder = info.Holder(); | |
| 459 TestObject* impl = V8TestObject::toImpl(holder); | |
| 460 v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute())); | |
| 461 } | |
| 462 | |
| 463 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | |
| 464 { | |
| 465 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 466 TestObjectV8Internal::longLongAttributeAttributeGetter(info); | |
| 467 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 468 } | |
| 469 | |
| 470 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
| 471 { | |
| 472 v8::Handle<v8::Object> holder = info.Holder(); | |
| 473 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttrib
ute", "TestObject", holder, info.GetIsolate()); | |
| 474 TestObject* impl = V8TestObject::toImpl(holder); | |
| 475 TONATIVE_VOID_EXCEPTIONSTATE(long long, cppValue, toInt64(v8Value, exception
State), exceptionState); | |
| 476 impl->setLongLongAttribute(cppValue); | |
| 477 } | |
| 478 | |
| 479 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 480 { | |
| 481 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 482 TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info); | |
| 483 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 484 } | |
| 485 | |
| 486 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
| 487 { | |
| 488 v8::Handle<v8::Object> holder = info.Holder(); | |
| 489 TestObject* impl = V8TestObject::toImpl(holder); | |
| 490 v8SetReturnValueUnsigned(info, impl->octetAttribute()); | |
| 491 } | |
| 492 | |
| 493 static void octetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | |
| 494 { | |
| 495 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 496 TestObjectV8Internal::octetAttributeAttributeGetter(info); | |
| 497 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 498 } | |
| 499 | |
| 500 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | |
| 501 { | |
| 502 v8::Handle<v8::Object> holder = info.Holder(); | |
| 503 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute
", "TestObject", holder, info.GetIsolate()); | |
| 504 TestObject* impl = V8TestObject::toImpl(holder); | |
| 505 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt8(v8Value, exceptionS
tate), exceptionState); | |
| 506 impl->setOctetAttribute(cppValue); | |
| 507 } | |
| 508 | |
| 509 static void octetAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 510 { | |
| 511 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 512 TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info); | |
| 513 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 514 } | |
| 515 | |
| 516 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
| 517 { | |
| 518 v8::Handle<v8::Object> holder = info.Holder(); | |
| 519 TestObject* impl = V8TestObject::toImpl(holder); | |
| 520 v8SetReturnValueInt(info, impl->shortAttribute()); | |
| 521 } | |
| 522 | |
| 523 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | |
| 524 { | |
| 525 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 526 TestObjectV8Internal::shortAttributeAttributeGetter(info); | |
| 527 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 528 } | |
| 529 | |
| 530 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | |
| 531 { | |
| 532 v8::Handle<v8::Object> holder = info.Holder(); | |
| 533 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); | |
| 534 TestObject* impl = V8TestObject::toImpl(holder); | |
| 535 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionState)
, exceptionState); | |
| 536 impl->setShortAttribute(cppValue); | |
| 537 } | |
| 538 | |
| 539 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 540 { | |
| 541 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 542 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); | |
| 543 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 544 } | |
| 545 | |
| 546 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | |
| 547 { | |
| 548 v8::Handle<v8::Object> holder = info.Holder(); | |
| 549 TestObject* impl = V8TestObject::toImpl(holder); | |
| 550 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | |
| 551 } | |
| 552 | |
| 553 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 554 { | |
| 555 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 556 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetter(info); | |
| 557 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 558 } | |
| 559 | |
| 560 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | |
| 561 { | |
| 562 v8::Handle<v8::Object> holder = info.Holder(); | |
| 563 TestObject* impl = V8TestObject::toImpl(holder); | |
| 564 TONATIVE_VOID(double, cppValue, static_cast<double>(v8Value->NumberValue()))
; | |
| 565 impl->setUnrestrictedDoubleAttribute(cppValue); | |
| 566 } | |
| 567 | |
| 568 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 569 { | |
| 570 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 571 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, in
fo); | |
| 572 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 573 } | |
| 574 | |
| 575 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | |
| 576 { | |
| 577 v8::Handle<v8::Object> holder = info.Holder(); | |
| 578 TestObject* impl = V8TestObject::toImpl(holder); | |
| 579 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | |
| 580 } | |
| 581 | |
| 582 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 583 { | |
| 584 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 585 TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetter(info); | |
| 586 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 587 } | |
| 588 | |
| 589 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | |
| 590 { | |
| 591 v8::Handle<v8::Object> holder = info.Holder(); | |
| 592 TestObject* impl = V8TestObject::toImpl(holder); | |
| 593 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); | |
| 594 impl->setUnrestrictedFloatAttribute(cppValue); | |
| 595 } | |
| 596 | |
| 597 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 598 { | |
| 599 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 600 TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, inf
o); | |
| 601 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 602 } | |
| 603 | |
| 604 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
| 605 { | |
| 606 v8::Handle<v8::Object> holder = info.Holder(); | |
| 607 TestObject* impl = V8TestObject::toImpl(holder); | |
| 608 v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute()); | |
| 609 } | |
| 610 | |
| 611 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 612 { | |
| 613 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 614 TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info); | |
| 615 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 616 } | |
| 617 | |
| 618 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
| 619 { | |
| 620 v8::Handle<v8::Object> holder = info.Holder(); | |
| 621 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAt
tribute", "TestObject", holder, info.GetIsolate()); | |
| 622 TestObject* impl = V8TestObject::toImpl(holder); | |
| 623 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt32(v8Value, exception
State), exceptionState); | |
| 624 impl->setUnsignedLongAttribute(cppValue); | |
| 625 } | |
| 626 | |
| 627 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 628 { | |
| 629 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 630 TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info); | |
| 631 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 632 } | |
| 633 | |
| 634 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | |
| 635 { | |
| 636 v8::Handle<v8::Object> holder = info.Holder(); | |
| 637 TestObject* impl = V8TestObject::toImpl(holder); | |
| 638 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()
)); | |
| 639 } | |
| 640 | |
| 641 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 642 { | |
| 643 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 644 TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info); | |
| 645 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 646 } | |
| 647 | |
| 648 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | |
| 649 { | |
| 650 v8::Handle<v8::Object> holder = info.Holder(); | |
| 651 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | |
| 652 TestObject* impl = V8TestObject::toImpl(holder); | |
| 653 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value,
exceptionState), exceptionState); | |
| 654 impl->setUnsignedLongLongAttribute(cppValue); | |
| 655 } | |
| 656 | |
| 657 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 658 { | |
| 659 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 660 TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info
); | |
| 661 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 662 } | |
| 663 | |
| 664 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | |
| 665 { | |
| 666 v8::Handle<v8::Object> holder = info.Holder(); | |
| 667 TestObject* impl = V8TestObject::toImpl(holder); | |
| 668 v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute()); | |
| 669 } | |
| 670 | |
| 671 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 672 { | |
| 673 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 674 TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info); | |
| 675 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 676 } | |
| 677 | |
| 678 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
| 679 { | |
| 680 v8::Handle<v8::Object> holder = info.Holder(); | |
| 681 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttribute", "TestObject", holder, info.GetIsolate()); | |
| 682 TestObject* impl = V8TestObject::toImpl(holder); | |
| 683 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt16(v8Value, exception
State), exceptionState); | |
| 684 impl->setUnsignedShortAttribute(cppValue); | |
| 685 } | |
| 686 | |
| 687 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 688 { | |
| 689 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 690 TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info); | |
| 691 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 692 } | |
| 693 | |
| 694 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | |
| 695 { | |
| 696 v8::Handle<v8::Object> holder = info.Holder(); | |
| 697 TestObject* impl = V8TestObject::toImpl(holder); | |
| 698 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyAttribute()),
impl); | |
| 699 } | |
| 700 | |
| 701 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 702 { | |
| 703 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 704 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetter(info); | |
| 705 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 706 } | |
| 707 | |
| 708 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | |
| 709 { | |
| 710 v8::Handle<v8::Object> holder = info.Holder(); | |
| 711 TestObject* impl = V8TestObject::toImpl(holder); | |
| 712 TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toImplWit
hTypeCheck(info.GetIsolate(), v8Value)); | |
| 713 impl->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue)); | |
| 714 } | |
| 715 | |
| 716 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 717 { | |
| 718 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 719 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, in
fo); | |
| 720 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 721 } | |
| 722 | |
| 723 static void testObjectAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
| 724 { | |
| 725 v8::Handle<v8::Object> holder = info.Holder(); | |
| 726 TestObject* impl = V8TestObject::toImpl(holder); | |
| 727 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjectAttribute()), impl); | |
| 728 } | |
| 729 | |
| 730 static void testObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 731 { | |
| 732 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 733 TestObjectV8Internal::testObjectAttributeAttributeGetter(info); | |
| 734 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 735 } | |
| 736 | |
| 737 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
| 738 { | |
| 739 v8::Handle<v8::Object> holder = info.Holder(); | |
| 740 TestObject* impl = V8TestObject::toImpl(holder); | |
| 741 TONATIVE_VOID(TestObject*, cppValue, V8TestObject::toImplWithTypeCheck(info.
GetIsolate(), v8Value)); | |
| 742 impl->setTestObjectAttribute(WTF::getPtr(cppValue)); | |
| 743 } | |
| 744 | |
| 745 static void testObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 746 { | |
| 747 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 748 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info); | |
| 749 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 750 } | |
| 751 | |
| 752 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | |
| 753 { | |
| 754 v8::Handle<v8::Object> holder = info.Holder(); | |
| 755 TestObject* impl = V8TestObject::toImpl(holder); | |
| 756 v8SetReturnValue(info, impl->voidCallbackFunctionAttribute().v8Value()); | |
| 757 } | |
| 758 | |
| 759 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 760 { | |
| 761 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 762 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetter(info); | |
| 763 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 764 } | |
| 765 | |
| 766 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | |
| 767 { | |
| 768 v8::Handle<v8::Object> holder = info.Holder(); | |
| 769 TestObject* impl = V8TestObject::toImpl(holder); | |
| 770 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | |
| 771 impl->setVoidCallbackFunctionAttribute(cppValue); | |
| 772 } | |
| 773 | |
| 774 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | |
| 775 { | |
| 776 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 777 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetter(v8Value,
info); | |
| 778 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 779 } | |
| 780 | |
| 781 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | |
| 782 { | |
| 783 v8::Handle<v8::Object> holder = info.Holder(); | |
| 784 TestObject* impl = V8TestObject::toImpl(holder); | |
| 785 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgAttribute().v8
Value()); | |
| 786 } | |
| 787 | |
| 788 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 789 { | |
| 790 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 791 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGet
ter(info); | |
| 792 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 793 } | |
| 794 | |
| 795 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 796 { | |
| 797 v8::Handle<v8::Object> holder = info.Holder(); | |
| 798 TestObject* impl = V8TestObject::toImpl(holder); | |
| 799 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | |
| 800 impl->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue); | |
| 801 } | |
| 802 | |
| 803 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | |
| 804 { | |
| 805 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 806 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSet
ter(v8Value, info); | |
| 807 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 808 } | |
| 809 | |
| 810 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | |
| 811 { | |
| 812 v8::Handle<v8::Object> holder = info.Holder(); | |
| 813 TestObject* impl = V8TestObject::toImpl(holder); | |
| 814 v8SetReturnValueInt(info, impl->cssAttribute()); | |
| 815 } | |
| 816 | |
| 817 static void cssAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
| 818 { | |
| 819 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 820 TestObjectV8Internal::cssAttributeAttributeGetter(info); | |
| 821 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 822 } | |
| 823 | |
| 824 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | |
| 825 { | |
| 826 v8::Handle<v8::Object> holder = info.Holder(); | |
| 827 ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute",
"TestObject", holder, info.GetIsolate()); | |
| 828 TestObject* impl = V8TestObject::toImpl(holder); | |
| 829 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 830 impl->setCSSAttribute(cppValue); | |
| 831 } | |
| 832 | |
| 833 static void cssAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 834 { | |
| 835 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 836 TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info); | |
| 837 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 838 } | |
| 839 | |
| 840 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | |
| 841 { | |
| 842 v8::Handle<v8::Object> holder = info.Holder(); | |
| 843 TestObject* impl = V8TestObject::toImpl(holder); | |
| 844 v8SetReturnValueInt(info, impl->imeAttribute()); | |
| 845 } | |
| 846 | |
| 847 static void imeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
| 848 { | |
| 849 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 850 TestObjectV8Internal::imeAttributeAttributeGetter(info); | |
| 851 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 852 } | |
| 853 | |
| 854 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | |
| 855 { | |
| 856 v8::Handle<v8::Object> holder = info.Holder(); | |
| 857 ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute",
"TestObject", holder, info.GetIsolate()); | |
| 858 TestObject* impl = V8TestObject::toImpl(holder); | |
| 859 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 860 impl->setIMEAttribute(cppValue); | |
| 861 } | |
| 862 | |
| 863 static void imeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 864 { | |
| 865 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 866 TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info); | |
| 867 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 868 } | |
| 869 | |
| 870 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | |
| 871 { | |
| 872 v8::Handle<v8::Object> holder = info.Holder(); | |
| 873 TestObject* impl = V8TestObject::toImpl(holder); | |
| 874 v8SetReturnValueInt(info, impl->svgAttribute()); | |
| 875 } | |
| 876 | |
| 877 static void svgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
| 878 { | |
| 879 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 880 TestObjectV8Internal::svgAttributeAttributeGetter(info); | |
| 881 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 882 } | |
| 883 | |
| 884 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | |
| 885 { | |
| 886 v8::Handle<v8::Object> holder = info.Holder(); | |
| 887 ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute",
"TestObject", holder, info.GetIsolate()); | |
| 888 TestObject* impl = V8TestObject::toImpl(holder); | |
| 889 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 890 impl->setSVGAttribute(cppValue); | |
| 891 } | |
| 892 | |
| 893 static void svgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 894 { | |
| 895 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 896 TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info); | |
| 897 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 898 } | |
| 899 | |
| 900 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | |
| 901 { | |
| 902 v8::Handle<v8::Object> holder = info.Holder(); | |
| 903 TestObject* impl = V8TestObject::toImpl(holder); | |
| 904 v8SetReturnValueInt(info, impl->xmlAttribute()); | |
| 905 } | |
| 906 | |
| 907 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
| 908 { | |
| 909 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 910 TestObjectV8Internal::xmlAttributeAttributeGetter(info); | |
| 911 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 912 } | |
| 913 | |
| 914 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | |
| 915 { | |
| 916 v8::Handle<v8::Object> holder = info.Holder(); | |
| 917 ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute",
"TestObject", holder, info.GetIsolate()); | |
| 918 TestObject* impl = V8TestObject::toImpl(holder); | |
| 919 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 920 impl->setXMLAttribute(cppValue); | |
| 921 } | |
| 922 | |
| 923 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 924 { | |
| 925 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 926 TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info); | |
| 927 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 928 } | |
| 929 | |
| 930 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
| 931 { | |
| 932 v8::Handle<v8::Object> holder = info.Holder(); | |
| 933 TestObject* impl = V8TestObject::toImpl(holder); | |
| 934 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeFilterAttribute()), impl); | |
| 935 } | |
| 936 | |
| 937 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 938 { | |
| 939 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 940 TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info); | |
| 941 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 942 } | |
| 943 | |
| 944 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
| 945 { | |
| 946 v8::Handle<v8::Object> holder = info.Holder(); | |
| 947 TestObject* impl = V8TestObject::toImpl(holder); | |
| 948 TONATIVE_VOID(RefPtrWillBeRawPtr<NodeFilter>, cppValue, toNodeFilter(v8Value
, info.Holder(), ScriptState::current(info.GetIsolate()))); | |
| 949 impl->setNodeFilterAttribute(WTF::getPtr(cppValue)); | |
| 950 } | |
| 951 | |
| 952 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 953 { | |
| 954 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 955 TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info); | |
| 956 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 957 } | |
| 958 | |
| 959 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | |
| 960 { | |
| 961 v8::Handle<v8::Object> holder = info.Holder(); | |
| 962 TestObject* impl = V8TestObject::toImpl(holder); | |
| 963 v8SetReturnValue(info, impl->serializedScriptValueAttribute() ? impl->serial
izedScriptValueAttribute()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.
GetIsolate()))); | |
| 964 } | |
| 965 | |
| 966 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 967 { | |
| 968 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 969 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); | |
| 970 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 971 } | |
| 972 | |
| 973 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 974 { | |
| 975 v8::Handle<v8::Object> holder = info.Holder(); | |
| 976 TestObject* impl = V8TestObject::toImpl(holder); | |
| 977 TONATIVE_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptValue
::create(v8Value, info.GetIsolate())); | |
| 978 impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue)); | |
| 979 } | |
| 980 | |
| 981 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | |
| 982 { | |
| 983 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 984 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value,
info); | |
| 985 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 986 } | |
| 987 | |
| 988 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | |
| 989 { | |
| 990 v8::Handle<v8::Object> holder = info.Holder(); | |
| 991 TestObject* impl = V8TestObject::toImpl(holder); | |
| 992 v8SetReturnValue(info, impl->anyAttribute().v8Value()); | |
| 993 } | |
| 994 | |
| 995 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
| 996 { | |
| 997 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 998 TestObjectV8Internal::anyAttributeAttributeGetter(info); | |
| 999 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1000 } | |
| 1001 | |
| 1002 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | |
| 1003 { | |
| 1004 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1005 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1006 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | |
| 1007 impl->setAnyAttribute(cppValue); | |
| 1008 } | |
| 1009 | |
| 1010 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1011 { | |
| 1012 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1013 TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info); | |
| 1014 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1015 } | |
| 1016 | |
| 1017 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | |
| 1018 { | |
| 1019 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1020 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1021 v8SetReturnValue(info, impl->promiseAttribute().v8Value()); | |
| 1022 } | |
| 1023 | |
| 1024 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1025 { | |
| 1026 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1027 TestObjectV8Internal::promiseAttributeAttributeGetter(info); | |
| 1028 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1029 } | |
| 1030 | |
| 1031 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
| 1032 { | |
| 1033 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1034 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1035 TONATIVE_VOID(ScriptPromise, cppValue, ScriptPromise::cast(ScriptState::curr
ent(info.GetIsolate()), v8Value)); | |
| 1036 impl->setPromiseAttribute(cppValue); | |
| 1037 } | |
| 1038 | |
| 1039 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1040 { | |
| 1041 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1042 TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info); | |
| 1043 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1044 } | |
| 1045 | |
| 1046 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | |
| 1047 { | |
| 1048 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1049 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1050 v8SetReturnValueFast(info, WTF::getPtr(impl->windowAttribute()), impl); | |
| 1051 } | |
| 1052 | |
| 1053 static void windowAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1054 { | |
| 1055 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1056 TestObjectV8Internal::windowAttributeAttributeGetter(info); | |
| 1057 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1058 } | |
| 1059 | |
| 1060 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | |
| 1061 { | |
| 1062 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1063 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1064 TONATIVE_VOID(LocalDOMWindow*, cppValue, toDOMWindow(v8Value, info.GetIsolat
e())); | |
| 1065 impl->setWindowAttribute(WTF::getPtr(cppValue)); | |
| 1066 } | |
| 1067 | |
| 1068 static void windowAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1069 { | |
| 1070 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1071 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info); | |
| 1072 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1073 } | |
| 1074 | |
| 1075 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | |
| 1076 { | |
| 1077 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1078 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1079 v8SetReturnValueFast(info, WTF::getPtr(impl->documentAttribute()), impl); | |
| 1080 } | |
| 1081 | |
| 1082 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1083 { | |
| 1084 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1085 TestObjectV8Internal::documentAttributeAttributeGetter(info); | |
| 1086 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1087 } | |
| 1088 | |
| 1089 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
| 1090 { | |
| 1091 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1092 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1093 TONATIVE_VOID(Document*, cppValue, V8Document::toImplWithTypeCheck(info.GetI
solate(), v8Value)); | |
| 1094 impl->setDocumentAttribute(WTF::getPtr(cppValue)); | |
| 1095 } | |
| 1096 | |
| 1097 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1098 { | |
| 1099 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1100 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info); | |
| 1101 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1102 } | |
| 1103 | |
| 1104 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | |
| 1105 { | |
| 1106 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1107 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1108 v8SetReturnValueFast(info, WTF::getPtr(impl->documentFragmentAttribute()), i
mpl); | |
| 1109 } | |
| 1110 | |
| 1111 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1112 { | |
| 1113 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1114 TestObjectV8Internal::documentFragmentAttributeAttributeGetter(info); | |
| 1115 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1116 } | |
| 1117 | |
| 1118 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | |
| 1119 { | |
| 1120 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1121 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1122 TONATIVE_VOID(DocumentFragment*, cppValue, V8DocumentFragment::toImplWithTyp
eCheck(info.GetIsolate(), v8Value)); | |
| 1123 impl->setDocumentFragmentAttribute(WTF::getPtr(cppValue)); | |
| 1124 } | |
| 1125 | |
| 1126 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1127 { | |
| 1128 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1129 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info
); | |
| 1130 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1131 } | |
| 1132 | |
| 1133 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
| 1134 { | |
| 1135 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1136 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1137 v8SetReturnValueFast(info, WTF::getPtr(impl->documentTypeAttribute()), impl)
; | |
| 1138 } | |
| 1139 | |
| 1140 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1141 { | |
| 1142 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1143 TestObjectV8Internal::documentTypeAttributeAttributeGetter(info); | |
| 1144 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1145 } | |
| 1146 | |
| 1147 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
| 1148 { | |
| 1149 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1150 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1151 TONATIVE_VOID(DocumentType*, cppValue, V8DocumentType::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value)); | |
| 1152 impl->setDocumentTypeAttribute(WTF::getPtr(cppValue)); | |
| 1153 } | |
| 1154 | |
| 1155 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1156 { | |
| 1157 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1158 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info); | |
| 1159 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1160 } | |
| 1161 | |
| 1162 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | |
| 1163 { | |
| 1164 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1165 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1166 v8SetReturnValueFast(info, WTF::getPtr(impl->elementAttribute()), impl); | |
| 1167 } | |
| 1168 | |
| 1169 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1170 { | |
| 1171 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1172 TestObjectV8Internal::elementAttributeAttributeGetter(info); | |
| 1173 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1174 } | |
| 1175 | |
| 1176 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
| 1177 { | |
| 1178 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1179 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1180 TONATIVE_VOID(Element*, cppValue, V8Element::toImplWithTypeCheck(info.GetIso
late(), v8Value)); | |
| 1181 impl->setElementAttribute(WTF::getPtr(cppValue)); | |
| 1182 } | |
| 1183 | |
| 1184 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1185 { | |
| 1186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1187 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info); | |
| 1188 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1189 } | |
| 1190 | |
| 1191 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
| 1192 { | |
| 1193 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1194 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1195 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeAttribute()), impl); | |
| 1196 } | |
| 1197 | |
| 1198 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 1199 { | |
| 1200 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1201 TestObjectV8Internal::nodeAttributeAttributeGetter(info); | |
| 1202 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1203 } | |
| 1204 | |
| 1205 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
| 1206 { | |
| 1207 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1208 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1209 TONATIVE_VOID(Node*, cppValue, V8Node::toImplWithTypeCheck(info.GetIsolate()
, v8Value)); | |
| 1210 impl->setNodeAttribute(WTF::getPtr(cppValue)); | |
| 1211 } | |
| 1212 | |
| 1213 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1214 { | |
| 1215 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1216 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | |
| 1217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1218 } | |
| 1219 | |
| 1220 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
| 1221 { | |
| 1222 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1223 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1224 v8SetReturnValueFast(info, WTF::getPtr(impl->shadowRootAttribute()), impl); | |
| 1225 } | |
| 1226 | |
| 1227 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1228 { | |
| 1229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1230 TestObjectV8Internal::shadowRootAttributeAttributeGetter(info); | |
| 1231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1232 } | |
| 1233 | |
| 1234 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
| 1235 { | |
| 1236 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1237 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1238 TONATIVE_VOID(ShadowRoot*, cppValue, V8ShadowRoot::toImplWithTypeCheck(info.
GetIsolate(), v8Value)); | |
| 1239 impl->setShadowRootAttribute(WTF::getPtr(cppValue)); | |
| 1240 } | |
| 1241 | |
| 1242 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1243 { | |
| 1244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1245 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info); | |
| 1246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1247 } | |
| 1248 | |
| 1249 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
| 1250 { | |
| 1251 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1252 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1253 v8SetReturnValueFast(info, WTF::getPtr(impl->arrayBufferAttribute()), impl); | |
| 1254 } | |
| 1255 | |
| 1256 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1257 { | |
| 1258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1259 TestObjectV8Internal::arrayBufferAttributeAttributeGetter(info); | |
| 1260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1261 } | |
| 1262 | |
| 1263 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | |
| 1264 { | |
| 1265 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1266 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1267 TONATIVE_VOID(ArrayBuffer*, cppValue, v8Value->IsArrayBuffer() ? V8ArrayBuff
er::toImpl(v8::Handle<v8::ArrayBuffer>::Cast(v8Value)) : 0); | |
| 1268 impl->setArrayBufferAttribute(WTF::getPtr(cppValue)); | |
| 1269 } | |
| 1270 | |
| 1271 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1272 { | |
| 1273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1274 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info); | |
| 1275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1276 } | |
| 1277 | |
| 1278 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
| 1279 { | |
| 1280 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1281 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1282 v8SetReturnValueFast(info, WTF::getPtr(impl->float32ArrayAttribute()), impl)
; | |
| 1283 } | |
| 1284 | |
| 1285 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1286 { | |
| 1287 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1288 TestObjectV8Internal::float32ArrayAttributeAttributeGetter(info); | |
| 1289 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1290 } | |
| 1291 | |
| 1292 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
| 1293 { | |
| 1294 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1295 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1296 TONATIVE_VOID(Float32Array*, cppValue, v8Value->IsFloat32Array() ? V8Float32
Array::toImpl(v8::Handle<v8::Float32Array>::Cast(v8Value)) : 0); | |
| 1297 impl->setFloat32ArrayAttribute(WTF::getPtr(cppValue)); | |
| 1298 } | |
| 1299 | |
| 1300 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1301 { | |
| 1302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1303 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info); | |
| 1304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1305 } | |
| 1306 | |
| 1307 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
| 1308 { | |
| 1309 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1310 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1311 v8SetReturnValueFast(info, WTF::getPtr(impl->uint8ArrayAttribute()), impl); | |
| 1312 } | |
| 1313 | |
| 1314 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1315 { | |
| 1316 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1317 TestObjectV8Internal::uint8ArrayAttributeAttributeGetter(info); | |
| 1318 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1319 } | |
| 1320 | |
| 1321 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
| 1322 { | |
| 1323 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1324 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1325 TONATIVE_VOID(Uint8Array*, cppValue, v8Value->IsUint8Array() ? V8Uint8Array:
:toImpl(v8::Handle<v8::Uint8Array>::Cast(v8Value)) : 0); | |
| 1326 impl->setUint8ArrayAttribute(WTF::getPtr(cppValue)); | |
| 1327 } | |
| 1328 | |
| 1329 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1330 { | |
| 1331 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1332 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info); | |
| 1333 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1334 } | |
| 1335 | |
| 1336 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1337 { | |
| 1338 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1339 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1340 v8SetReturnValueFast(info, WTF::getPtr(impl->self()), impl); | |
| 1341 } | |
| 1342 | |
| 1343 static void selfAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | |
| 1344 { | |
| 1345 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1346 TestObjectV8Internal::selfAttributeGetter(info); | |
| 1347 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1348 } | |
| 1349 | |
| 1350 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | |
| 1351 { | |
| 1352 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1353 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1354 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetAttribute())
, impl); | |
| 1355 } | |
| 1356 | |
| 1357 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1358 { | |
| 1359 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1360 TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetter(info); | |
| 1361 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1362 } | |
| 1363 | |
| 1364 static void readonlyEventTargetOrNullAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | |
| 1365 { | |
| 1366 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1367 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1368 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetOrNullAttrib
ute()), impl); | |
| 1369 } | |
| 1370 | |
| 1371 static void readonlyEventTargetOrNullAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1372 { | |
| 1373 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1374 TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetter(info
); | |
| 1375 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1376 } | |
| 1377 | |
| 1378 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | |
| 1379 { | |
| 1380 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1381 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1382 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyWindowAttribute()), imp
l); | |
| 1383 } | |
| 1384 | |
| 1385 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1386 { | |
| 1387 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1388 TestObjectV8Internal::readonlyWindowAttributeAttributeGetter(info); | |
| 1389 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1390 } | |
| 1391 | |
| 1392 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | |
| 1393 { | |
| 1394 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1395 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1396 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlCollectionAttribute()), imp
l); | |
| 1397 } | |
| 1398 | |
| 1399 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1400 { | |
| 1401 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1402 TestObjectV8Internal::htmlCollectionAttributeAttributeGetter(info); | |
| 1403 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1404 } | |
| 1405 | |
| 1406 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
| 1407 { | |
| 1408 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1409 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1410 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlElementAttribute()), impl); | |
| 1411 } | |
| 1412 | |
| 1413 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1414 { | |
| 1415 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1416 TestObjectV8Internal::htmlElementAttributeAttributeGetter(info); | |
| 1417 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1418 } | |
| 1419 | |
| 1420 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
| 1421 { | |
| 1422 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1423 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1424 v8SetReturnValue(info, v8Array(impl->stringArrayAttribute(), info.Holder(),
info.GetIsolate())); | |
| 1425 } | |
| 1426 | |
| 1427 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1428 { | |
| 1429 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1430 TestObjectV8Internal::stringArrayAttributeAttributeGetter(info); | |
| 1431 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1432 } | |
| 1433 | |
| 1434 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | |
| 1435 { | |
| 1436 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1437 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1438 TONATIVE_VOID(Vector<String>, cppValue, toImplArray<String>(v8Value, 0, info
.GetIsolate())); | |
| 1439 impl->setStringArrayAttribute(cppValue); | |
| 1440 } | |
| 1441 | |
| 1442 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1443 { | |
| 1444 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1445 TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info); | |
| 1446 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1447 } | |
| 1448 | |
| 1449 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | |
| 1450 { | |
| 1451 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1452 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1453 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayAttribute(), inf
o.Holder(), info.GetIsolate())); | |
| 1454 } | |
| 1455 | |
| 1456 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1457 { | |
| 1458 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1459 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info); | |
| 1460 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1461 } | |
| 1462 | |
| 1463 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1464 { | |
| 1465 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1466 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1467 TONATIVE_VOID(Vector<RefPtr<TestInterfaceEmpty> >, cppValue, (toRefPtrNative
Array<TestInterfaceEmpty, V8TestInterfaceEmpty>(v8Value, 0, info.GetIsolate())))
; | |
| 1468 impl->setTestInterfaceEmptyArrayAttribute(cppValue); | |
| 1469 } | |
| 1470 | |
| 1471 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | |
| 1472 { | |
| 1473 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1474 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Valu
e, info); | |
| 1475 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1476 } | |
| 1477 | |
| 1478 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
| 1479 { | |
| 1480 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1481 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1482 v8SetReturnValue(info, v8Array(impl->floatArrayAttribute(), info.Holder(), i
nfo.GetIsolate())); | |
| 1483 } | |
| 1484 | |
| 1485 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1486 { | |
| 1487 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1488 TestObjectV8Internal::floatArrayAttributeAttributeGetter(info); | |
| 1489 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1490 } | |
| 1491 | |
| 1492 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
| 1493 { | |
| 1494 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1495 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1496 TONATIVE_VOID(Vector<float>, cppValue, toImplArray<float>(v8Value, 0, info.G
etIsolate())); | |
| 1497 impl->setFloatArrayAttribute(cppValue); | |
| 1498 } | |
| 1499 | |
| 1500 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1501 { | |
| 1502 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1503 TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info); | |
| 1504 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1505 } | |
| 1506 | |
| 1507 static void stringOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
| 1508 { | |
| 1509 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1510 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1511 v8SetReturnValueStringOrNull(info, impl->stringOrNullAttribute(), info.GetIs
olate()); | |
| 1512 } | |
| 1513 | |
| 1514 static void stringOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1515 { | |
| 1516 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1517 TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info); | |
| 1518 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1519 } | |
| 1520 | |
| 1521 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
| 1522 { | |
| 1523 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1524 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1525 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); | |
| 1526 impl->setStringOrNullAttribute(cppValue); | |
| 1527 } | |
| 1528 | |
| 1529 static void stringOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1530 { | |
| 1531 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1532 TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info); | |
| 1533 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1534 } | |
| 1535 | |
| 1536 static void longOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
| 1537 { | |
| 1538 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1539 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1540 bool isNull = false; | |
| 1541 int cppValue(impl->longOrNullAttribute(isNull)); | |
| 1542 if (isNull) { | |
| 1543 v8SetReturnValueNull(info); | |
| 1544 return; | |
| 1545 } | |
| 1546 v8SetReturnValueInt(info, cppValue); | |
| 1547 } | |
| 1548 | |
| 1549 static void longOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1550 { | |
| 1551 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1552 TestObjectV8Internal::longOrNullAttributeAttributeGetter(info); | |
| 1553 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1554 } | |
| 1555 | |
| 1556 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
| 1557 { | |
| 1558 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1559 ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttr
ibute", "TestObject", holder, info.GetIsolate()); | |
| 1560 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1561 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 1562 impl->setLongOrNullAttribute(cppValue); | |
| 1563 } | |
| 1564 | |
| 1565 static void longOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1566 { | |
| 1567 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1568 TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info); | |
| 1569 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1570 } | |
| 1571 | |
| 1572 static void testInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | |
| 1573 { | |
| 1574 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1575 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1576 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceOrNullAttribute())
, impl); | |
| 1577 } | |
| 1578 | |
| 1579 static void testInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1580 { | |
| 1581 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1582 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetter(info); | |
| 1583 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1584 } | |
| 1585 | |
| 1586 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | |
| 1587 { | |
| 1588 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1589 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1590 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 1591 impl->setTestInterfaceOrNullAttribute(WTF::getPtr(cppValue)); | |
| 1592 } | |
| 1593 | |
| 1594 static void testInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1595 { | |
| 1596 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1597 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, i
nfo); | |
| 1598 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1599 } | |
| 1600 | |
| 1601 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | |
| 1602 { | |
| 1603 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1604 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1605 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); | |
| 1606 } | |
| 1607 | |
| 1608 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1609 { | |
| 1610 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1611 TestObjectV8Internal::testEnumAttributeAttributeGetter(info); | |
| 1612 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1613 } | |
| 1614 | |
| 1615 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
| 1616 { | |
| 1617 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1618 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1619 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 1620 String string = cppValue; | |
| 1621 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | |
| 1622 return; | |
| 1623 impl->setTestEnumAttribute(cppValue); | |
| 1624 } | |
| 1625 | |
| 1626 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1627 { | |
| 1628 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1629 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info); | |
| 1630 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1631 } | |
| 1632 | |
| 1633 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
| 1634 { | |
| 1635 v8SetReturnValueString(info, TestObject::staticStringAttribute(), info.GetIs
olate()); | |
| 1636 } | |
| 1637 | |
| 1638 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1639 { | |
| 1640 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1641 TestObjectV8Internal::staticStringAttributeAttributeGetter(info); | |
| 1642 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1643 } | |
| 1644 | |
| 1645 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
| 1646 { | |
| 1647 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 1648 TestObject::setStaticStringAttribute(cppValue); | |
| 1649 } | |
| 1650 | |
| 1651 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1652 { | |
| 1653 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1654 TestObjectV8Internal::staticStringAttributeAttributeSetter(v8Value, info); | |
| 1655 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1656 } | |
| 1657 | |
| 1658 static void staticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
| 1659 { | |
| 1660 v8SetReturnValueInt(info, TestObject::staticLongAttribute()); | |
| 1661 } | |
| 1662 | |
| 1663 static void staticLongAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1664 { | |
| 1665 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1666 TestObjectV8Internal::staticLongAttributeAttributeGetter(info); | |
| 1667 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1668 } | |
| 1669 | |
| 1670 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
| 1671 { | |
| 1672 ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttr
ibute", "TestObject", holder, info.GetIsolate()); | |
| 1673 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 1674 TestObject::setStaticLongAttribute(cppValue); | |
| 1675 } | |
| 1676 | |
| 1677 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1678 { | |
| 1679 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1680 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info); | |
| 1681 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1682 } | |
| 1683 | |
| 1684 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
| 1685 { | |
| 1686 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1687 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1688 EventListener* cppValue(impl->eventHandlerAttribute()); | |
| 1689 v8SetReturnValue(info, cppValue ? v8::Handle<v8::Value>(V8AbstractEventListe
ner::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Handle<v
8::Value>(v8::Null(info.GetIsolate()))); | |
| 1690 } | |
| 1691 | |
| 1692 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1693 { | |
| 1694 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1695 TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info); | |
| 1696 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1697 } | |
| 1698 | |
| 1699 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
| 1700 { | |
| 1701 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1702 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1703 moveEventListenerToNewWrapper(holder, impl->eventHandlerAttribute(), v8Value
, V8TestObject::eventListenerCacheIndex, info.GetIsolate()); | |
| 1704 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS
tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)); | |
| 1705 } | |
| 1706 | |
| 1707 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1708 { | |
| 1709 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1710 TestObjectV8Internal::eventHandlerAttributeAttributeSetter(v8Value, info); | |
| 1711 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1712 } | |
| 1713 | |
| 1714 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1715 { | |
| 1716 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1717 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1718 v8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribu
te()); | |
| 1719 } | |
| 1720 | |
| 1721 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1722 { | |
| 1723 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1724 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 1725 V8PerContextData* contextData = scriptState->perContextData(); | |
| 1726 if (contextData && contextData->activityLogger()) | |
| 1727 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute"); | |
| 1728 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eGetter(info); | |
| 1729 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1730 } | |
| 1731 | |
| 1732 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1733 { | |
| 1734 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1735 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 1736 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1737 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 1738 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); | |
| 1739 } | |
| 1740 | |
| 1741 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | |
| 1742 { | |
| 1743 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1744 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 1745 V8PerContextData* contextData = scriptState->perContextData(); | |
| 1746 if (contextData && contextData->activityLogger()) { | |
| 1747 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute", v8Value); | |
| 1748 } | |
| 1749 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | |
| 1750 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1751 } | |
| 1752 | |
| 1753 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1754 { | |
| 1755 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1756 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1757 v8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribu
te()); | |
| 1758 } | |
| 1759 | |
| 1760 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1761 { | |
| 1762 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1763 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 1764 V8PerContextData* contextData = scriptState->perContextData(); | |
| 1765 if (contextData && contextData->activityLogger()) | |
| 1766 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForAllWorldsLongAttribute"); | |
| 1767 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eGetter(info); | |
| 1768 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1769 } | |
| 1770 | |
| 1771 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1772 { | |
| 1773 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1774 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 1775 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1776 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 1777 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); | |
| 1778 } | |
| 1779 | |
| 1780 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | |
| 1781 { | |
| 1782 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1783 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | |
| 1784 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1785 } | |
| 1786 | |
| 1787 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1788 { | |
| 1789 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1790 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1791 v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribu
te()); | |
| 1792 } | |
| 1793 | |
| 1794 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1795 { | |
| 1796 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1797 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eGetter(info); | |
| 1798 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1799 } | |
| 1800 | |
| 1801 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1802 { | |
| 1803 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1804 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 1805 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1806 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 1807 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); | |
| 1808 } | |
| 1809 | |
| 1810 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | |
| 1811 { | |
| 1812 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1813 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 1814 V8PerContextData* contextData = scriptState->perContextData(); | |
| 1815 if (contextData && contextData->activityLogger()) { | |
| 1816 contextData->activityLogger()->logSetter("TestObject.activityLoggingSett
erForAllWorldsLongAttribute", v8Value); | |
| 1817 } | |
| 1818 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | |
| 1819 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1820 } | |
| 1821 | |
| 1822 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | |
| 1823 { | |
| 1824 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1825 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedAttributeAnyAttribute"); | |
| 1826 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1827 if (!impl->isValueDirty()) { | |
| 1828 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | |
| 1829 if (!v8Value.IsEmpty()) { | |
| 1830 v8SetReturnValue(info, v8Value); | |
| 1831 return; | |
| 1832 } | |
| 1833 } | |
| 1834 ScriptValue cppValue(impl->cachedAttributeAnyAttribute()); | |
| 1835 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); | |
| 1836 v8SetReturnValue(info, cppValue.v8Value()); | |
| 1837 } | |
| 1838 | |
| 1839 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1840 { | |
| 1841 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1842 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info); | |
| 1843 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1844 } | |
| 1845 | |
| 1846 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | |
| 1847 { | |
| 1848 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1849 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1850 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | |
| 1851 impl->setCachedAttributeAnyAttribute(cppValue); | |
| 1852 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeAnyAttribute")); // Invalidate the cached valu
e. | |
| 1853 } | |
| 1854 | |
| 1855 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1856 { | |
| 1857 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1858 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetter(v8Value, in
fo); | |
| 1859 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1860 } | |
| 1861 | |
| 1862 static void cachedArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
| 1863 { | |
| 1864 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1865 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedArrayAttribute"); | |
| 1866 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1867 if (!impl->isArrayDirty()) { | |
| 1868 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | |
| 1869 if (!v8Value.IsEmpty()) { | |
| 1870 v8SetReturnValue(info, v8Value); | |
| 1871 return; | |
| 1872 } | |
| 1873 } | |
| 1874 Vector<String> cppValue(impl->cachedArrayAttribute()); | |
| 1875 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Arr
ay(cppValue, info.Holder(), info.GetIsolate())); | |
| 1876 v8SetReturnValue(info, v8Array(cppValue, info.Holder(), info.GetIsolate())); | |
| 1877 } | |
| 1878 | |
| 1879 static void cachedArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1880 { | |
| 1881 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1882 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info); | |
| 1883 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1884 } | |
| 1885 | |
| 1886 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | |
| 1887 { | |
| 1888 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1889 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1890 TONATIVE_VOID(Vector<String>, cppValue, toImplArray<String>(v8Value, 0, info
.GetIsolate())); | |
| 1891 impl->setCachedArrayAttribute(cppValue); | |
| 1892 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedArrayAttribute")); // Invalidate the cached value. | |
| 1893 } | |
| 1894 | |
| 1895 static void cachedArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1896 { | |
| 1897 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1898 TestObjectV8Internal::cachedArrayAttributeAttributeSetter(v8Value, info); | |
| 1899 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1900 } | |
| 1901 | |
| 1902 static void cachedStringOrNoneAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | |
| 1903 { | |
| 1904 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1905 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedStringOrNoneAttribute"); | |
| 1906 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1907 if (!impl->isStringDirty()) { | |
| 1908 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | |
| 1909 if (!v8Value.IsEmpty()) { | |
| 1910 v8SetReturnValue(info, v8Value); | |
| 1911 return; | |
| 1912 } | |
| 1913 } | |
| 1914 String cppValue(impl->cachedStringOrNoneAttribute()); | |
| 1915 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8::Handle<v8::Value>(v8::Null(info.GetIsolate())) : v8String(inf
o.GetIsolate(), cppValue)); | |
| 1916 v8SetReturnValueStringOrNull(info, cppValue, info.GetIsolate()); | |
| 1917 } | |
| 1918 | |
| 1919 static void cachedStringOrNoneAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1920 { | |
| 1921 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1922 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info); | |
| 1923 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1924 } | |
| 1925 | |
| 1926 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | |
| 1927 { | |
| 1928 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1929 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1930 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); | |
| 1931 impl->setCachedStringOrNoneAttribute(cppValue); | |
| 1932 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedStringOrNoneAttribute")); // Invalidate the cached valu
e. | |
| 1933 } | |
| 1934 | |
| 1935 static void cachedStringOrNoneAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1936 { | |
| 1937 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1938 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetter(v8Value, in
fo); | |
| 1939 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1940 } | |
| 1941 | |
| 1942 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) | |
| 1943 { | |
| 1944 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1945 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1946 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | |
| 1947 v8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(executionC
ontext).v8Value()); | |
| 1948 } | |
| 1949 | |
| 1950 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1951 { | |
| 1952 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1953 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(in
fo); | |
| 1954 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1955 } | |
| 1956 | |
| 1957 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1958 { | |
| 1959 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1960 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1961 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | |
| 1962 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | |
| 1963 impl->setCallWithExecutionContextAnyAttribute(executionContext, cppValue); | |
| 1964 } | |
| 1965 | |
| 1966 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | |
| 1967 { | |
| 1968 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1969 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(v8
Value, info); | |
| 1970 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1971 } | |
| 1972 | |
| 1973 static void callWithScriptStateAnyAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | |
| 1974 { | |
| 1975 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1976 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1977 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | |
| 1978 v8SetReturnValue(info, impl->callWithScriptStateAnyAttribute(scriptState).v8
Value()); | |
| 1979 } | |
| 1980 | |
| 1981 static void callWithScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1982 { | |
| 1983 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 1984 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetter(info); | |
| 1985 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 1986 } | |
| 1987 | |
| 1988 static void callWithScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 1989 { | |
| 1990 v8::Handle<v8::Object> holder = info.Holder(); | |
| 1991 TestObject* impl = V8TestObject::toImpl(holder); | |
| 1992 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | |
| 1993 impl->setCallWithScriptStateAnyAttribute(scriptState, cppValue); | |
| 1994 } | |
| 1995 | |
| 1996 static void callWithScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | |
| 1997 { | |
| 1998 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 1999 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetter(v8Value
, info); | |
| 2000 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2001 } | |
| 2002 | |
| 2003 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2004 { | |
| 2005 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2006 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2007 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | |
| 2008 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | |
| 2009 v8SetReturnValue(info, impl->callWithExecutionContextAndScriptStateAnyAttrib
ute(scriptState, executionContext).v8Value()); | |
| 2010 } | |
| 2011 | |
| 2012 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2013 { | |
| 2014 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2015 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteGetter(info); | |
| 2016 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2017 } | |
| 2018 | |
| 2019 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2020 { | |
| 2021 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2022 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2023 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | |
| 2024 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | |
| 2025 impl->setCallWithExecutionContextAndScriptStateAnyAttribute(scriptState, exe
cutionContext, cppValue); | |
| 2026 } | |
| 2027 | |
| 2028 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | |
| 2029 { | |
| 2030 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2031 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteSetter(v8Value, info); | |
| 2032 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2033 } | |
| 2034 | |
| 2035 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | |
| 2036 { | |
| 2037 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2038 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2039 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF
orNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2040 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check
SecurityForNodeReadonlyDocumentAttribute(), exceptionState)) { | |
| 2041 v8SetReturnValueNull(info); | |
| 2042 exceptionState.throwIfNeeded(); | |
| 2043 return; | |
| 2044 } | |
| 2045 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc
umentAttribute()), impl); | |
| 2046 } | |
| 2047 | |
| 2048 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2049 { | |
| 2050 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2051 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttribute
Getter(info); | |
| 2052 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2053 } | |
| 2054 | |
| 2055 #if ENABLE(CONDITION) | |
| 2056 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | |
| 2057 { | |
| 2058 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2059 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2060 v8SetReturnValueInt(info, impl->conditionalLongAttribute()); | |
| 2061 } | |
| 2062 #endif // ENABLE(CONDITION) | |
| 2063 | |
| 2064 #if ENABLE(CONDITION) | |
| 2065 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2066 { | |
| 2067 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2068 TestObjectV8Internal::conditionalLongAttributeAttributeGetter(info); | |
| 2069 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2070 } | |
| 2071 #endif // ENABLE(CONDITION) | |
| 2072 | |
| 2073 #if ENABLE(CONDITION) | |
| 2074 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | |
| 2075 { | |
| 2076 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2077 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon
gAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2078 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2079 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2080 impl->setConditionalLongAttribute(cppValue); | |
| 2081 } | |
| 2082 #endif // ENABLE(CONDITION) | |
| 2083 | |
| 2084 #if ENABLE(CONDITION) | |
| 2085 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2086 { | |
| 2087 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2088 TestObjectV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info)
; | |
| 2089 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2090 } | |
| 2091 #endif // ENABLE(CONDITION) | |
| 2092 | |
| 2093 static void customObjectAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2094 { | |
| 2095 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2096 V8TestObject::customObjectAttributeAttributeGetterCustom(info); | |
| 2097 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2098 } | |
| 2099 | |
| 2100 static void customObjectAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2101 { | |
| 2102 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2103 V8TestObject::customObjectAttributeAttributeSetterCustom(v8Value, info); | |
| 2104 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2105 } | |
| 2106 | |
| 2107 static void customGetterLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2108 { | |
| 2109 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2110 V8TestObject::customGetterLongAttributeAttributeGetterCustom(info); | |
| 2111 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2112 } | |
| 2113 | |
| 2114 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | |
| 2115 { | |
| 2116 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2117 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2118 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2119 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2120 impl->setCustomGetterLongAttribute(cppValue); | |
| 2121 } | |
| 2122 | |
| 2123 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2124 { | |
| 2125 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2126 TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info
); | |
| 2127 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2128 } | |
| 2129 | |
| 2130 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2131 { | |
| 2132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2133 V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCustom(info)
; | |
| 2134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2135 } | |
| 2136 | |
| 2137 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | |
| 2138 { | |
| 2139 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2140 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2141 v8SetReturnValueInt(info, impl->customSetterLongAttribute()); | |
| 2142 } | |
| 2143 | |
| 2144 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2145 { | |
| 2146 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2147 TestObjectV8Internal::customSetterLongAttributeAttributeGetter(info); | |
| 2148 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2149 } | |
| 2150 | |
| 2151 static void customSetterLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2152 { | |
| 2153 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2154 V8TestObject::customSetterLongAttributeAttributeSetterCustom(v8Value, info); | |
| 2155 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2156 } | |
| 2157 | |
| 2158 #if ENABLE(CONDITION) | |
| 2159 static void customLongAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2160 { | |
| 2161 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2162 V8TestObject::customLongAttributeAttributeGetterCustom(info); | |
| 2163 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2164 } | |
| 2165 #endif // ENABLE(CONDITION) | |
| 2166 | |
| 2167 #if ENABLE(CONDITION) | |
| 2168 static void customLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2169 { | |
| 2170 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2171 V8TestObject::customLongAttributeAttributeSetterCustom(v8Value, info); | |
| 2172 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2173 } | |
| 2174 #endif // ENABLE(CONDITION) | |
| 2175 | |
| 2176 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 2177 { | |
| 2178 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2179 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2180 v8SetReturnValueInt(info, impl->customElementsCallbacksReadonlyLongAttribute
()); | |
| 2181 } | |
| 2182 | |
| 2183 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2184 { | |
| 2185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2186 TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeG
etter(info); | |
| 2187 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2188 } | |
| 2189 | |
| 2190 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | |
| 2191 { | |
| 2192 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2193 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2194 v8SetReturnValueInt(info, impl->deprecatedLongAttribute()); | |
| 2195 } | |
| 2196 | |
| 2197 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2198 { | |
| 2199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2200 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::LongAttribute); | |
| 2201 TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info); | |
| 2202 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2203 } | |
| 2204 | |
| 2205 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
| 2206 { | |
| 2207 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2208 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLong
Attribute", "TestObject", holder, info.GetIsolate()); | |
| 2209 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2210 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2211 impl->setDeprecatedLongAttribute(cppValue); | |
| 2212 } | |
| 2213 | |
| 2214 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2215 { | |
| 2216 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2217 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::LongAttribute); | |
| 2218 TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info); | |
| 2219 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2220 } | |
| 2221 | |
| 2222 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | |
| 2223 { | |
| 2224 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2225 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2226 v8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); | |
| 2227 } | |
| 2228 | |
| 2229 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2230 { | |
| 2231 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2232 TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info); | |
| 2233 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2234 } | |
| 2235 | |
| 2236 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | |
| 2237 { | |
| 2238 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2239 ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2240 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2241 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, EnforceRange, e
xceptionState), exceptionState); | |
| 2242 impl->setEnforceRangeLongAttribute(cppValue); | |
| 2243 } | |
| 2244 | |
| 2245 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2246 { | |
| 2247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2248 TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info
); | |
| 2249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2250 } | |
| 2251 | |
| 2252 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 2253 { | |
| 2254 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2255 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2256 v8SetReturnValueInt(info, impl->exposeJSAccessorsLongAttribute()); | |
| 2257 } | |
| 2258 | |
| 2259 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 2260 { | |
| 2261 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2262 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(info); | |
| 2263 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2264 } | |
| 2265 | |
| 2266 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 2267 { | |
| 2268 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2269 ExceptionState exceptionState(ExceptionState::SetterContext, "exposeJSAccess
orsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2270 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2271 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2272 impl->setExposeJSAccessorsLongAttribute(cppValue); | |
| 2273 } | |
| 2274 | |
| 2275 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 2276 { | |
| 2277 v8::Local<v8::Value> v8Value = info[0]; | |
| 2278 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2279 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeSetter(v8Value,
info); | |
| 2280 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2281 } | |
| 2282 | |
| 2283 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | |
| 2284 { | |
| 2285 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2286 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2287 v8SetReturnValueInt(info, impl->implementedAsName()); | |
| 2288 } | |
| 2289 | |
| 2290 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2291 { | |
| 2292 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2293 TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info); | |
| 2294 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2295 } | |
| 2296 | |
| 2297 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | |
| 2298 { | |
| 2299 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2300 ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsL
ongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2301 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2302 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2303 impl->setImplementedAsName(cppValue); | |
| 2304 } | |
| 2305 | |
| 2306 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2307 { | |
| 2308 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2309 TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, inf
o); | |
| 2310 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2311 } | |
| 2312 | |
| 2313 static void customImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2314 { | |
| 2315 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2316 V8TestObject::customImplementedAsLongAttributeAttributeGetterCustom(info); | |
| 2317 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2318 } | |
| 2319 | |
| 2320 static void customImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | |
| 2321 { | |
| 2322 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2323 V8TestObject::customImplementedAsLongAttributeAttributeSetterCustom(v8Value,
info); | |
| 2324 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2325 } | |
| 2326 | |
| 2327 static void customGetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2328 { | |
| 2329 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2330 V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(in
fo); | |
| 2331 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2332 } | |
| 2333 | |
| 2334 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2335 { | |
| 2336 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2337 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterIm
plementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2338 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2339 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2340 impl->setImplementedAsNameWithCustomGetter(cppValue); | |
| 2341 } | |
| 2342 | |
| 2343 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | |
| 2344 { | |
| 2345 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2346 TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(
v8Value, info); | |
| 2347 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2348 } | |
| 2349 | |
| 2350 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | |
| 2351 { | |
| 2352 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2353 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2354 v8SetReturnValueInt(info, impl->implementedAsNameWithCustomGetter()); | |
| 2355 } | |
| 2356 | |
| 2357 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2358 { | |
| 2359 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2360 TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(
info); | |
| 2361 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2362 } | |
| 2363 | |
| 2364 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | |
| 2365 { | |
| 2366 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2367 V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCustom(v8
Value, info); | |
| 2368 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2369 } | |
| 2370 | |
| 2371 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | |
| 2372 { | |
| 2373 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2374 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2375 v8SetReturnValueInt(info, impl->measureAsLongAttribute()); | |
| 2376 } | |
| 2377 | |
| 2378 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2379 { | |
| 2380 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2381 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | |
| 2382 TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info); | |
| 2383 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2384 } | |
| 2385 | |
| 2386 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
| 2387 { | |
| 2388 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2389 ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongA
ttribute", "TestObject", holder, info.GetIsolate()); | |
| 2390 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2391 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2392 impl->setMeasureAsLongAttribute(cppValue); | |
| 2393 } | |
| 2394 | |
| 2395 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2396 { | |
| 2397 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2398 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | |
| 2399 TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info); | |
| 2400 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2401 } | |
| 2402 | |
| 2403 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | |
| 2404 { | |
| 2405 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2406 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2407 v8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); | |
| 2408 } | |
| 2409 | |
| 2410 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2411 { | |
| 2412 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2413 TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info); | |
| 2414 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2415 } | |
| 2416 | |
| 2417 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | |
| 2418 { | |
| 2419 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2420 ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableL
ongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2421 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2422 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2423 impl->setNotEnumerableLongAttribute(cppValue); | |
| 2424 } | |
| 2425 | |
| 2426 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2427 { | |
| 2428 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2429 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, inf
o); | |
| 2430 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2431 } | |
| 2432 | |
| 2433 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | |
| 2434 { | |
| 2435 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2436 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2437 v8SetReturnValueInt(info, impl->perContextEnabledLongAttribute()); | |
| 2438 } | |
| 2439 | |
| 2440 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2441 { | |
| 2442 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2443 TestObjectV8Internal::perContextEnabledLongAttributeAttributeGetter(info); | |
| 2444 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2445 } | |
| 2446 | |
| 2447 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2448 { | |
| 2449 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2450 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2451 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2452 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2453 impl->setPerContextEnabledLongAttribute(cppValue); | |
| 2454 } | |
| 2455 | |
| 2456 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | |
| 2457 { | |
| 2458 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2459 TestObjectV8Internal::perContextEnabledLongAttributeAttributeSetter(v8Value,
info); | |
| 2460 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2461 } | |
| 2462 | |
| 2463 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2464 { | |
| 2465 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2466 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2467 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | |
| 2468 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty
>(info.GetReturnValue(), cppValue.get())) | |
| 2469 return; | |
| 2470 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); | |
| 2471 if (!wrapper.IsEmpty()) { | |
| 2472 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); | |
| 2473 v8SetReturnValue(info, wrapper); | |
| 2474 } | |
| 2475 } | |
| 2476 | |
| 2477 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2478 { | |
| 2479 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2480 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetter(info); | |
| 2481 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2482 } | |
| 2483 | |
| 2484 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2485 { | |
| 2486 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2487 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2488 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | |
| 2489 if (cppValue && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestIn
terfaceEmpty>(info.GetReturnValue(), cppValue.get())) | |
| 2490 return; | |
| 2491 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); | |
| 2492 if (!wrapper.IsEmpty()) { | |
| 2493 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); | |
| 2494 v8SetReturnValue(info, wrapper); | |
| 2495 } | |
| 2496 } | |
| 2497 | |
| 2498 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
| 2499 { | |
| 2500 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2501 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetterForMainWorld(info); | |
| 2502 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2503 } | |
| 2504 | |
| 2505 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2506 { | |
| 2507 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2508 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2509 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); | |
| 2510 } | |
| 2511 | |
| 2512 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2513 { | |
| 2514 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2515 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 2516 V8PerContextData* contextData = scriptState->perContextData(); | |
| 2517 if (contextData && contextData->activityLogger()) | |
| 2518 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); | |
| 2519 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetter(info); | |
| 2520 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2521 } | |
| 2522 | |
| 2523 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2524 { | |
| 2525 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2526 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2527 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2528 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2529 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | |
| 2530 } | |
| 2531 | |
| 2532 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | |
| 2533 { | |
| 2534 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2535 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 2536 V8PerContextData* contextData = scriptState->perContextData(); | |
| 2537 if (contextData && contextData->activityLogger()) { | |
| 2538 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute", v8Value); | |
| 2539 } | |
| 2540 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); | |
| 2541 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2542 } | |
| 2543 | |
| 2544 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2545 { | |
| 2546 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2547 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2548 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); | |
| 2549 } | |
| 2550 | |
| 2551 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
| 2552 { | |
| 2553 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2554 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 2555 V8PerContextData* contextData = scriptState->perContextData(); | |
| 2556 if (contextData && contextData->activityLogger()) | |
| 2557 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); | |
| 2558 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); | |
| 2559 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2560 } | |
| 2561 | |
| 2562 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | |
| 2563 { | |
| 2564 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2565 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2566 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2567 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2568 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | |
| 2569 } | |
| 2570 | |
| 2571 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
| 2572 { | |
| 2573 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2574 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 2575 V8PerContextData* contextData = scriptState->perContextData(); | |
| 2576 if (contextData && contextData->activityLogger()) { | |
| 2577 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute", v8Value); | |
| 2578 } | |
| 2579 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); | |
| 2580 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2581 } | |
| 2582 | |
| 2583 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2584 { | |
| 2585 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2586 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2587 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | |
| 2588 } | |
| 2589 | |
| 2590 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8:
:Value>& info) | |
| 2591 { | |
| 2592 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2593 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 2594 V8PerContextData* contextData = scriptState->perContextData(); | |
| 2595 if (contextData && contextData->activityLogger()) | |
| 2596 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute"); | |
| 2597 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); | |
| 2598 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2599 } | |
| 2600 | |
| 2601 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | |
| 2602 { | |
| 2603 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2604 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | |
| 2605 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2606 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2607 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | |
| 2608 } | |
| 2609 | |
| 2610 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | |
| 2611 { | |
| 2612 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2613 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 2614 V8PerContextData* contextData = scriptState->perContextData(); | |
| 2615 if (contextData && contextData->activityLogger()) { | |
| 2616 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute", v8Value); | |
| 2617 } | |
| 2618 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); | |
| 2619 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2620 } | |
| 2621 | |
| 2622 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2623 { | |
| 2624 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2625 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2626 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | |
| 2627 } | |
| 2628 | |
| 2629 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall
backInfo<v8::Value>& info) | |
| 2630 { | |
| 2631 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2632 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); | |
| 2633 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2634 } | |
| 2635 | |
| 2636 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | |
| 2637 { | |
| 2638 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2639 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | |
| 2640 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2641 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2642 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | |
| 2643 } | |
| 2644 | |
| 2645 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2646 { | |
| 2647 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2648 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); | |
| 2649 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2650 } | |
| 2651 | |
| 2652 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2653 { | |
| 2654 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2655 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2656 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); | |
| 2657 } | |
| 2658 | |
| 2659 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2660 { | |
| 2661 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2662 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 2663 V8PerContextData* contextData = scriptState->perContextData(); | |
| 2664 if (contextData && contextData->activityLogger()) | |
| 2665 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); | |
| 2666 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetter(info); | |
| 2667 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2668 } | |
| 2669 | |
| 2670 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2671 { | |
| 2672 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2673 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2674 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2675 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2676 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | |
| 2677 } | |
| 2678 | |
| 2679 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | |
| 2680 { | |
| 2681 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2682 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); | |
| 2683 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2684 } | |
| 2685 | |
| 2686 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2687 { | |
| 2688 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2689 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2690 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); | |
| 2691 } | |
| 2692 | |
| 2693 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
| 2694 { | |
| 2695 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2696 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 2697 V8PerContextData* contextData = scriptState->perContextData(); | |
| 2698 if (contextData && contextData->activityLogger()) | |
| 2699 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); | |
| 2700 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); | |
| 2701 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2702 } | |
| 2703 | |
| 2704 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | |
| 2705 { | |
| 2706 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2707 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 2708 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2709 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2710 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | |
| 2711 } | |
| 2712 | |
| 2713 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
| 2714 { | |
| 2715 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2716 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); | |
| 2717 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2718 } | |
| 2719 | |
| 2720 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2721 { | |
| 2722 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2723 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2724 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | |
| 2725 } | |
| 2726 | |
| 2727 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8:
:Value>& info) | |
| 2728 { | |
| 2729 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2730 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 2731 V8PerContextData* contextData = scriptState->perContextData(); | |
| 2732 if (contextData && contextData->activityLogger()) | |
| 2733 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForIsolatedWorldsPerWorldBindingsLongAttribute"); | |
| 2734 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); | |
| 2735 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2736 } | |
| 2737 | |
| 2738 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | |
| 2739 { | |
| 2740 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2741 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | |
| 2742 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2743 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2744 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | |
| 2745 } | |
| 2746 | |
| 2747 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | |
| 2748 { | |
| 2749 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2750 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); | |
| 2751 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2752 } | |
| 2753 | |
| 2754 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2755 { | |
| 2756 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2757 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2758 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | |
| 2759 } | |
| 2760 | |
| 2761 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall
backInfo<v8::Value>& info) | |
| 2762 { | |
| 2763 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2764 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); | |
| 2765 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2766 } | |
| 2767 | |
| 2768 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | |
| 2769 { | |
| 2770 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2771 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | |
| 2772 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2773 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 2774 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | |
| 2775 } | |
| 2776 | |
| 2777 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2778 { | |
| 2779 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2780 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); | |
| 2781 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2782 } | |
| 2783 | |
| 2784 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | |
| 2785 { | |
| 2786 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2787 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2788 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); | |
| 2789 } | |
| 2790 | |
| 2791 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | |
| 2792 { | |
| 2793 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2794 TestObjectV8Internal::locationAttributeGetter(info); | |
| 2795 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2796 } | |
| 2797 | |
| 2798 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) | |
| 2799 { | |
| 2800 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2801 TestObject* proxyImpl = V8TestObject::toImpl(holder); | |
| 2802 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); | |
| 2803 if (!impl) | |
| 2804 return; | |
| 2805 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 2806 impl->setHref(cppValue); | |
| 2807 } | |
| 2808 | |
| 2809 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2810 { | |
| 2811 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2812 TestObjectV8Internal::locationAttributeSetter(v8Value, info); | |
| 2813 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2814 } | |
| 2815 | |
| 2816 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
| 2817 { | |
| 2818 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2819 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2820 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; | |
| 2821 } | |
| 2822 | |
| 2823 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2824 { | |
| 2825 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2826 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); | |
| 2827 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2828 } | |
| 2829 | |
| 2830 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
| 2831 { | |
| 2832 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2833 ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithEx
ception", "TestObject", holder, info.GetIsolate()); | |
| 2834 TestObject* proxyImpl = V8TestObject::toImpl(holder); | |
| 2835 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithExcep
tion()); | |
| 2836 if (!impl) | |
| 2837 return; | |
| 2838 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 2839 impl->setHrefThrows(cppValue, exceptionState); | |
| 2840 exceptionState.throwIfNeeded(); | |
| 2841 } | |
| 2842 | |
| 2843 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2844 { | |
| 2845 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2846 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); | |
| 2847 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2848 } | |
| 2849 | |
| 2850 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
| 2851 { | |
| 2852 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2853 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2854 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithCallWith()), impl); | |
| 2855 } | |
| 2856 | |
| 2857 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2858 { | |
| 2859 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2860 TestObjectV8Internal::locationWithCallWithAttributeGetter(info); | |
| 2861 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2862 } | |
| 2863 | |
| 2864 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | |
| 2865 { | |
| 2866 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2867 TestObject* proxyImpl = V8TestObject::toImpl(holder); | |
| 2868 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithCallW
ith()); | |
| 2869 if (!impl) | |
| 2870 return; | |
| 2871 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 2872 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | |
| 2873 impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate()), cppValue); | |
| 2874 } | |
| 2875 | |
| 2876 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2877 { | |
| 2878 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2879 TestObjectV8Internal::locationWithCallWithAttributeSetter(v8Value, info); | |
| 2880 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2881 } | |
| 2882 | |
| 2883 static void locationByteStringAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | |
| 2884 { | |
| 2885 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2886 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2887 v8SetReturnValueFast(info, WTF::getPtr(impl->locationByteString()), impl); | |
| 2888 } | |
| 2889 | |
| 2890 static void locationByteStringAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2891 { | |
| 2892 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2893 TestObjectV8Internal::locationByteStringAttributeGetter(info); | |
| 2894 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2895 } | |
| 2896 | |
| 2897 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | |
| 2898 { | |
| 2899 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2900 ExceptionState exceptionState(ExceptionState::SetterContext, "locationByteSt
ring", "TestObject", holder, info.GetIsolate()); | |
| 2901 TestObject* proxyImpl = V8TestObject::toImpl(holder); | |
| 2902 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationByteStrin
g()); | |
| 2903 if (!impl) | |
| 2904 return; | |
| 2905 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); | |
| 2906 impl->setHrefByteString(cppValue); | |
| 2907 } | |
| 2908 | |
| 2909 static void locationByteStringAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2910 { | |
| 2911 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2912 TestObjectV8Internal::locationByteStringAttributeSetter(v8Value, info); | |
| 2913 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2914 } | |
| 2915 | |
| 2916 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | |
| 2917 { | |
| 2918 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2919 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2920 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithPerWorldBindings())
, impl); | |
| 2921 } | |
| 2922 | |
| 2923 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2924 { | |
| 2925 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2926 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info); | |
| 2927 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2928 } | |
| 2929 | |
| 2930 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | |
| 2931 { | |
| 2932 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2933 TestObject* proxyImpl = V8TestObject::toImpl(holder); | |
| 2934 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWo
rldBindings()); | |
| 2935 if (!impl) | |
| 2936 return; | |
| 2937 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 2938 impl->setHref(cppValue); | |
| 2939 } | |
| 2940 | |
| 2941 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2942 { | |
| 2943 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2944 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetter(v8Value, i
nfo); | |
| 2945 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2946 } | |
| 2947 | |
| 2948 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | |
| 2949 { | |
| 2950 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2951 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2952 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->locationWithPerWorldBin
dings())); | |
| 2953 } | |
| 2954 | |
| 2955 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2956 { | |
| 2957 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2958 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorl
d(info); | |
| 2959 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2960 } | |
| 2961 | |
| 2962 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2963 { | |
| 2964 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2965 TestObject* proxyImpl = V8TestObject::toImpl(holder); | |
| 2966 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWo
rldBindings()); | |
| 2967 if (!impl) | |
| 2968 return; | |
| 2969 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 2970 impl->setHref(cppValue); | |
| 2971 } | |
| 2972 | |
| 2973 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) | |
| 2974 { | |
| 2975 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 2976 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorl
d(v8Value, info); | |
| 2977 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2978 } | |
| 2979 | |
| 2980 static void locationTypeCheckingInterfaceAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | |
| 2981 { | |
| 2982 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2983 TestObject* impl = V8TestObject::toImpl(holder); | |
| 2984 v8SetReturnValueFast(info, WTF::getPtr(impl->locationTypeCheckingInterface()
), impl); | |
| 2985 } | |
| 2986 | |
| 2987 static void locationTypeCheckingInterfaceAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 2988 { | |
| 2989 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 2990 TestObjectV8Internal::locationTypeCheckingInterfaceAttributeGetter(info); | |
| 2991 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 2992 } | |
| 2993 | |
| 2994 static void locationTypeCheckingInterfaceAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | |
| 2995 { | |
| 2996 v8::Handle<v8::Object> holder = info.Holder(); | |
| 2997 TestObject* proxyImpl = V8TestObject::toImpl(holder); | |
| 2998 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationTypeCheck
ingInterface()); | |
| 2999 if (!impl) | |
| 3000 return; | |
| 3001 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3002 impl->setHref(cppValue); | |
| 3003 } | |
| 3004 | |
| 3005 static void locationTypeCheckingInterfaceAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | |
| 3006 { | |
| 3007 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3008 TestObjectV8Internal::locationTypeCheckingInterfaceAttributeSetter(v8Value,
info); | |
| 3009 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3010 } | |
| 3011 | |
| 3012 static void locationGarbageCollectedAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | |
| 3013 { | |
| 3014 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3015 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3016 RawPtr<TestInterfaceGarbageCollected> cppValue(impl->locationGarbageCollecte
d()); | |
| 3017 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceGarba
geCollected>(info.GetReturnValue(), cppValue.get())) | |
| 3018 return; | |
| 3019 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); | |
| 3020 if (!wrapper.IsEmpty()) { | |
| 3021 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationGarbageCollected"), wrapper); | |
| 3022 v8SetReturnValue(info, wrapper); | |
| 3023 } | |
| 3024 } | |
| 3025 | |
| 3026 static void locationGarbageCollectedAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3027 { | |
| 3028 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3029 TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info); | |
| 3030 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3031 } | |
| 3032 | |
| 3033 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | |
| 3034 { | |
| 3035 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3036 TestObject* proxyImpl = V8TestObject::toImpl(holder); | |
| 3037 RawPtr<TestInterfaceGarbageCollected> impl = WTF::getPtr(proxyImpl->location
GarbageCollected()); | |
| 3038 if (!impl) | |
| 3039 return; | |
| 3040 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 3041 impl->setAttr1(WTF::getPtr(cppValue)); | |
| 3042 } | |
| 3043 | |
| 3044 static void locationGarbageCollectedAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3045 { | |
| 3046 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3047 TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info)
; | |
| 3048 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3049 } | |
| 3050 | |
| 3051 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | |
| 3052 { | |
| 3053 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3054 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3055 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> cppValue(impl->locat
ionWillBeGarbageCollected()); | |
| 3056 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceWillB
eGarbageCollected>(info.GetReturnValue(), cppValue.get())) | |
| 3057 return; | |
| 3058 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); | |
| 3059 if (!wrapper.IsEmpty()) { | |
| 3060 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationWillBeGarbageCollected"), wrapper); | |
| 3061 v8SetReturnValue(info, wrapper); | |
| 3062 } | |
| 3063 } | |
| 3064 | |
| 3065 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3066 { | |
| 3067 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3068 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetter(info); | |
| 3069 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3070 } | |
| 3071 | |
| 3072 static void locationWillBeGarbageCollectedAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3073 { | |
| 3074 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3075 TestObject* proxyImpl = V8TestObject::toImpl(holder); | |
| 3076 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = WTF::getPtr(p
roxyImpl->locationWillBeGarbageCollected()); | |
| 3077 if (!impl) | |
| 3078 return; | |
| 3079 TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfac
eWillBeGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 3080 impl->setAttr1(WTF::getPtr(cppValue)); | |
| 3081 } | |
| 3082 | |
| 3083 static void locationWillBeGarbageCollectedAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | |
| 3084 { | |
| 3085 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3086 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeSetter(v8Value,
info); | |
| 3087 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3088 } | |
| 3089 | |
| 3090 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | |
| 3091 { | |
| 3092 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3093 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3094 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3095 int cppValue(impl->raisesExceptionLongAttribute(exceptionState)); | |
| 3096 if (UNLIKELY(exceptionState.throwIfNeeded())) | |
| 3097 return; | |
| 3098 v8SetReturnValueInt(info, cppValue); | |
| 3099 } | |
| 3100 | |
| 3101 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3102 { | |
| 3103 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3104 TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info); | |
| 3105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3106 } | |
| 3107 | |
| 3108 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | |
| 3109 { | |
| 3110 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3111 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3112 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3113 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 3114 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); | |
| 3115 exceptionState.throwIfNeeded(); | |
| 3116 } | |
| 3117 | |
| 3118 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3119 { | |
| 3120 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3121 TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, i
nfo); | |
| 3122 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3123 } | |
| 3124 | |
| 3125 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | |
| 3126 { | |
| 3127 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3128 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3129 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3130 int cppValue(impl->raisesExceptionGetterLongAttribute(exceptionState)); | |
| 3131 if (UNLIKELY(exceptionState.throwIfNeeded())) | |
| 3132 return; | |
| 3133 v8SetReturnValueInt(info, cppValue); | |
| 3134 } | |
| 3135 | |
| 3136 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3137 { | |
| 3138 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3139 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info
); | |
| 3140 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3141 } | |
| 3142 | |
| 3143 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3144 { | |
| 3145 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3146 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3147 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3148 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 3149 impl->setRaisesExceptionGetterLongAttribute(cppValue); | |
| 3150 } | |
| 3151 | |
| 3152 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | |
| 3153 { | |
| 3154 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3155 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Va
lue, info); | |
| 3156 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3157 } | |
| 3158 | |
| 3159 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | |
| 3160 { | |
| 3161 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3162 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3163 v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); | |
| 3164 } | |
| 3165 | |
| 3166 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3167 { | |
| 3168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3169 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info
); | |
| 3170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3171 } | |
| 3172 | |
| 3173 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3174 { | |
| 3175 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3176 ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesEx
ceptionLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3177 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3178 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 3179 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); | |
| 3180 exceptionState.throwIfNeeded(); | |
| 3181 } | |
| 3182 | |
| 3183 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | |
| 3184 { | |
| 3185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3186 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Va
lue, info); | |
| 3187 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3188 } | |
| 3189 | |
| 3190 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | |
| 3191 { | |
| 3192 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3193 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3194 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3195 RefPtr<TestInterfaceEmpty> cppValue(impl->raisesExceptionTestInterfaceEmptyA
ttribute(exceptionState)); | |
| 3196 if (UNLIKELY(exceptionState.throwIfNeeded())) | |
| 3197 return; | |
| 3198 v8SetReturnValueFast(info, WTF::getPtr(cppValue.release()), impl); | |
| 3199 } | |
| 3200 | |
| 3201 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3202 { | |
| 3203 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3204 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGet
ter(info); | |
| 3205 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3206 } | |
| 3207 | |
| 3208 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3209 { | |
| 3210 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3211 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3212 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3213 TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toImplWit
hTypeCheck(info.GetIsolate(), v8Value)); | |
| 3214 impl->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), e
xceptionState); | |
| 3215 exceptionState.throwIfNeeded(); | |
| 3216 } | |
| 3217 | |
| 3218 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | |
| 3219 { | |
| 3220 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3221 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSet
ter(v8Value, info); | |
| 3222 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3223 } | |
| 3224 | |
| 3225 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3226 { | |
| 3227 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3228 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedAttributeRaisesExceptionGetterAnyAttribute"); | |
| 3229 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3230 if (!impl->isValueDirty()) { | |
| 3231 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | |
| 3232 if (!v8Value.IsEmpty()) { | |
| 3233 v8SetReturnValue(info, v8Value); | |
| 3234 return; | |
| 3235 } | |
| 3236 } | |
| 3237 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3238 ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(
exceptionState)); | |
| 3239 if (UNLIKELY(exceptionState.throwIfNeeded())) | |
| 3240 return; | |
| 3241 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); | |
| 3242 v8SetReturnValue(info, cppValue.v8Value()); | |
| 3243 } | |
| 3244 | |
| 3245 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3246 { | |
| 3247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3248 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteGetter(info); | |
| 3249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3250 } | |
| 3251 | |
| 3252 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3253 { | |
| 3254 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3255 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3256 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3257 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | |
| 3258 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptio
nState); | |
| 3259 exceptionState.throwIfNeeded(); | |
| 3260 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute")); // Inval
idate the cached value. | |
| 3261 } | |
| 3262 | |
| 3263 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb
ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | |
| 3264 { | |
| 3265 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3266 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteSetter(v8Value, info); | |
| 3267 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3268 } | |
| 3269 | |
| 3270 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | |
| 3271 { | |
| 3272 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3273 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3274 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lecttestinterfaceattributeAttr)), impl); | |
| 3275 } | |
| 3276 | |
| 3277 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3278 { | |
| 3279 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3280 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); | |
| 3281 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3282 } | |
| 3283 | |
| 3284 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3285 { | |
| 3286 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3287 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3288 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 3289 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3290 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr
(cppValue)); | |
| 3291 } | |
| 3292 | |
| 3293 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | |
| 3294 { | |
| 3295 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3296 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3297 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8Value,
info); | |
| 3298 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3299 } | |
| 3300 | |
| 3301 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | |
| 3302 { | |
| 3303 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3304 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3305 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lectedNameAttributeAttr)), impl); | |
| 3306 } | |
| 3307 | |
| 3308 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3309 { | |
| 3310 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3311 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGet
ter(info); | |
| 3312 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3313 } | |
| 3314 | |
| 3315 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3316 { | |
| 3317 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3318 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3319 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 3320 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3321 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppVal
ue)); | |
| 3322 } | |
| 3323 | |
| 3324 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | |
| 3325 { | |
| 3326 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3327 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3328 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSet
ter(v8Value, info); | |
| 3329 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3330 } | |
| 3331 | |
| 3332 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | |
| 3333 { | |
| 3334 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3335 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3336 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectbooleana
ttributeAttr)); | |
| 3337 } | |
| 3338 | |
| 3339 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3340 { | |
| 3341 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3342 TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info); | |
| 3343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3344 } | |
| 3345 | |
| 3346 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
| 3347 { | |
| 3348 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3349 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3350 TONATIVE_VOID(bool, cppValue, v8Value->BooleanValue()); | |
| 3351 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3352 impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); | |
| 3353 } | |
| 3354 | |
| 3355 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3356 { | |
| 3357 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3358 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3359 TestObjectV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info); | |
| 3360 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3361 } | |
| 3362 | |
| 3363 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
| 3364 { | |
| 3365 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3366 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3367 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectlonga
ttributeAttr)); | |
| 3368 } | |
| 3369 | |
| 3370 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3371 { | |
| 3372 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3373 TestObjectV8Internal::reflectLongAttributeAttributeGetter(info); | |
| 3374 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3375 } | |
| 3376 | |
| 3377 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | |
| 3378 { | |
| 3379 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3380 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAtt
ribute", "TestObject", holder, info.GetIsolate()); | |
| 3381 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3382 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 3383 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3384 impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); | |
| 3385 } | |
| 3386 | |
| 3387 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3388 { | |
| 3389 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3390 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3391 TestObjectV8Internal::reflectLongAttributeAttributeSetter(v8Value, info); | |
| 3392 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3393 } | |
| 3394 | |
| 3395 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | |
| 3396 { | |
| 3397 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3398 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3399 v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->fastGetAtt
ribute(HTMLNames::reflectunsignedshortattributeAttr)))); | |
| 3400 } | |
| 3401 | |
| 3402 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3403 { | |
| 3404 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3405 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info); | |
| 3406 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3407 } | |
| 3408 | |
| 3409 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3410 { | |
| 3411 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3412 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dShortAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3413 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3414 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt16(v8Value, exception
State), exceptionState); | |
| 3415 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3416 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); | |
| 3417 } | |
| 3418 | |
| 3419 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | |
| 3420 { | |
| 3421 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3422 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3423 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8Value,
info); | |
| 3424 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3425 } | |
| 3426 | |
| 3427 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | |
| 3428 { | |
| 3429 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3430 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3431 v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->getIntegra
lAttribute(HTMLNames::reflectunsignedlongattributeAttr)))); | |
| 3432 } | |
| 3433 | |
| 3434 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3435 { | |
| 3436 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3437 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info); | |
| 3438 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3439 } | |
| 3440 | |
| 3441 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | |
| 3442 { | |
| 3443 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3444 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3445 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3446 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt32(v8Value, exception
State), exceptionState); | |
| 3447 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3448 impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAt
tr, cppValue); | |
| 3449 } | |
| 3450 | |
| 3451 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3452 { | |
| 3453 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3454 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3455 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Value, i
nfo); | |
| 3456 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3457 } | |
| 3458 | |
| 3459 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3460 { | |
| 3461 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3462 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3463 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); | |
| 3464 } | |
| 3465 | |
| 3466 static void idAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyC
allbackInfo<v8::Value>& info) | |
| 3467 { | |
| 3468 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3469 TestObjectV8Internal::idAttributeGetter(info); | |
| 3470 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3471 } | |
| 3472 | |
| 3473 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCa
llbackInfo<void>& info) | |
| 3474 { | |
| 3475 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3476 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3477 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3478 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3479 impl->setAttribute(HTMLNames::idAttr, cppValue); | |
| 3480 } | |
| 3481 | |
| 3482 static void idAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3483 { | |
| 3484 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3485 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3486 TestObjectV8Internal::idAttributeSetter(v8Value, info); | |
| 3487 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3488 } | |
| 3489 | |
| 3490 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3491 { | |
| 3492 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3493 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3494 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); | |
| 3495 } | |
| 3496 | |
| 3497 static void nameAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | |
| 3498 { | |
| 3499 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3500 TestObjectV8Internal::nameAttributeGetter(info); | |
| 3501 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3502 } | |
| 3503 | |
| 3504 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) | |
| 3505 { | |
| 3506 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3507 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3508 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3509 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3510 impl->setAttribute(HTMLNames::nameAttr, cppValue); | |
| 3511 } | |
| 3512 | |
| 3513 static void nameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3514 { | |
| 3515 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3516 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3517 TestObjectV8Internal::nameAttributeSetter(v8Value, info); | |
| 3518 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3519 } | |
| 3520 | |
| 3521 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) | |
| 3522 { | |
| 3523 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3524 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3525 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); | |
| 3526 } | |
| 3527 | |
| 3528 static void classAttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) | |
| 3529 { | |
| 3530 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3531 TestObjectV8Internal::classAttributeGetter(info); | |
| 3532 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3533 } | |
| 3534 | |
| 3535 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) | |
| 3536 { | |
| 3537 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3538 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3539 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3540 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3541 impl->setAttribute(HTMLNames::classAttr, cppValue); | |
| 3542 } | |
| 3543 | |
| 3544 static void classAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3545 { | |
| 3546 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3547 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3548 TestObjectV8Internal::classAttributeSetter(v8Value, info); | |
| 3549 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3550 } | |
| 3551 | |
| 3552 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | |
| 3553 { | |
| 3554 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3555 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3556 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); | |
| 3557 } | |
| 3558 | |
| 3559 static void reflectedIdAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | |
| 3560 { | |
| 3561 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3562 TestObjectV8Internal::reflectedIdAttributeGetter(info); | |
| 3563 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3564 } | |
| 3565 | |
| 3566 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) | |
| 3567 { | |
| 3568 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3569 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3570 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3571 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3572 impl->setAttribute(HTMLNames::idAttr, cppValue); | |
| 3573 } | |
| 3574 | |
| 3575 static void reflectedIdAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3576 { | |
| 3577 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3578 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3579 TestObjectV8Internal::reflectedIdAttributeSetter(v8Value, info); | |
| 3580 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3581 } | |
| 3582 | |
| 3583 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
| 3584 { | |
| 3585 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3586 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3587 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); | |
| 3588 } | |
| 3589 | |
| 3590 static void reflectedNameAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 3591 { | |
| 3592 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3593 TestObjectV8Internal::reflectedNameAttributeGetter(info); | |
| 3594 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3595 } | |
| 3596 | |
| 3597 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
| 3598 { | |
| 3599 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3600 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3601 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3602 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3603 impl->setAttribute(HTMLNames::nameAttr, cppValue); | |
| 3604 } | |
| 3605 | |
| 3606 static void reflectedNameAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3607 { | |
| 3608 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3609 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3610 TestObjectV8Internal::reflectedNameAttributeSetter(v8Value, info); | |
| 3611 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3612 } | |
| 3613 | |
| 3614 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
| 3615 { | |
| 3616 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3617 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3618 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); | |
| 3619 } | |
| 3620 | |
| 3621 static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | |
| 3622 { | |
| 3623 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3624 TestObjectV8Internal::reflectedClassAttributeGetter(info); | |
| 3625 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3626 } | |
| 3627 | |
| 3628 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | |
| 3629 { | |
| 3630 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3631 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3632 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3633 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3634 impl->setAttribute(HTMLNames::classAttr, cppValue); | |
| 3635 } | |
| 3636 | |
| 3637 static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3638 { | |
| 3639 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3640 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3641 TestObjectV8Internal::reflectedClassAttributeSetter(v8Value, info); | |
| 3642 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3643 } | |
| 3644 | |
| 3645 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | |
| 3646 { | |
| 3647 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3648 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3649 String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeA
ttr)); | |
| 3650 if (cppValue.isEmpty()) { | |
| 3651 ; | |
| 3652 } else if (equalIgnoringCase(cppValue, "unique")) { | |
| 3653 cppValue = "unique"; | |
| 3654 } else { | |
| 3655 cppValue = ""; | |
| 3656 } | |
| 3657 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | |
| 3658 } | |
| 3659 | |
| 3660 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3661 { | |
| 3662 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3663 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); | |
| 3664 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3665 } | |
| 3666 | |
| 3667 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | |
| 3668 { | |
| 3669 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3670 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3671 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3672 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3673 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); | |
| 3674 } | |
| 3675 | |
| 3676 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3677 { | |
| 3678 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3679 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3680 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(v8Value, info
); | |
| 3681 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3682 } | |
| 3683 | |
| 3684 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | |
| 3685 { | |
| 3686 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3687 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3688 String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr
)); | |
| 3689 if (cppValue.isEmpty()) { | |
| 3690 ; | |
| 3691 } else if (equalIgnoringCase(cppValue, "Per")) { | |
| 3692 cppValue = "Per"; | |
| 3693 } else if (equalIgnoringCase(cppValue, "Paal")) { | |
| 3694 cppValue = "Paal"; | |
| 3695 } else if (equalIgnoringCase(cppValue, "Espen")) { | |
| 3696 cppValue = "Espen"; | |
| 3697 } else { | |
| 3698 cppValue = ""; | |
| 3699 } | |
| 3700 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | |
| 3701 } | |
| 3702 | |
| 3703 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3704 { | |
| 3705 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3706 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); | |
| 3707 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3708 } | |
| 3709 | |
| 3710 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
| 3711 { | |
| 3712 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3713 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3714 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3715 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3716 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); | |
| 3717 } | |
| 3718 | |
| 3719 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3720 { | |
| 3721 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3722 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3723 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, info); | |
| 3724 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3725 } | |
| 3726 | |
| 3727 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | |
| 3728 { | |
| 3729 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3730 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3731 String cppValue(impl->fastGetAttribute(HTMLNames::otherAttr)); | |
| 3732 if (cppValue.isEmpty()) { | |
| 3733 ; | |
| 3734 } else if (equalIgnoringCase(cppValue, "Value1")) { | |
| 3735 cppValue = "Value1"; | |
| 3736 } else if (equalIgnoringCase(cppValue, "Value2")) { | |
| 3737 cppValue = "Value2"; | |
| 3738 } else { | |
| 3739 cppValue = ""; | |
| 3740 } | |
| 3741 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | |
| 3742 } | |
| 3743 | |
| 3744 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3745 { | |
| 3746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3747 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); | |
| 3748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3749 } | |
| 3750 | |
| 3751 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | |
| 3752 { | |
| 3753 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3754 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3755 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3756 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3757 impl->setAttribute(HTMLNames::otherAttr, cppValue); | |
| 3758 } | |
| 3759 | |
| 3760 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3761 { | |
| 3762 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3763 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3764 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Value, in
fo); | |
| 3765 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3766 } | |
| 3767 | |
| 3768 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | |
| 3769 { | |
| 3770 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3771 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3772 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithmissingdefaulta
ttributeAttr)); | |
| 3773 if (cppValue.isEmpty()) { | |
| 3774 cppValue = "rsa"; | |
| 3775 } else if (equalIgnoringCase(cppValue, "rsa")) { | |
| 3776 cppValue = "rsa"; | |
| 3777 } else if (equalIgnoringCase(cppValue, "dsa")) { | |
| 3778 cppValue = "dsa"; | |
| 3779 } else { | |
| 3780 cppValue = ""; | |
| 3781 } | |
| 3782 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | |
| 3783 } | |
| 3784 | |
| 3785 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3786 { | |
| 3787 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3788 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); | |
| 3789 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3790 } | |
| 3791 | |
| 3792 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3793 { | |
| 3794 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3795 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3796 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3797 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3798 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal
ue); | |
| 3799 } | |
| 3800 | |
| 3801 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | |
| 3802 { | |
| 3803 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3804 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3805 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(v8Va
lue, info); | |
| 3806 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3807 } | |
| 3808 | |
| 3809 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) | |
| 3810 { | |
| 3811 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3812 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3813 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissingd
efaultattributeAttr)); | |
| 3814 if (cppValue.isEmpty()) { | |
| 3815 cppValue = "auto"; | |
| 3816 } else if (equalIgnoringCase(cppValue, "ltr")) { | |
| 3817 cppValue = "ltr"; | |
| 3818 } else if (equalIgnoringCase(cppValue, "rtl")) { | |
| 3819 cppValue = "rtl"; | |
| 3820 } else if (equalIgnoringCase(cppValue, "auto")) { | |
| 3821 cppValue = "auto"; | |
| 3822 } else { | |
| 3823 cppValue = "ltr"; | |
| 3824 } | |
| 3825 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | |
| 3826 } | |
| 3827 | |
| 3828 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3829 { | |
| 3830 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3831 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); | |
| 3832 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3833 } | |
| 3834 | |
| 3835 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3836 { | |
| 3837 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3838 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3839 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3840 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3841 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); | |
| 3842 } | |
| 3843 | |
| 3844 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) | |
| 3845 { | |
| 3846 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3847 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 3848 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(v8Value, info); | |
| 3849 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3850 } | |
| 3851 | |
| 3852 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
| 3853 { | |
| 3854 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3855 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3856 String cppValue(impl->fastGetAttribute(HTMLNames::corssettingattributeAttr))
; | |
| 3857 if (cppValue.isNull()) { | |
| 3858 ; | |
| 3859 } else if (cppValue.isEmpty()) { | |
| 3860 cppValue = "anonymous"; | |
| 3861 } else if (equalIgnoringCase(cppValue, "anonymous")) { | |
| 3862 cppValue = "anonymous"; | |
| 3863 } else if (equalIgnoringCase(cppValue, "use-credentials")) { | |
| 3864 cppValue = "use-credentials"; | |
| 3865 } else { | |
| 3866 cppValue = "anonymous"; | |
| 3867 } | |
| 3868 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | |
| 3869 } | |
| 3870 | |
| 3871 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3872 { | |
| 3873 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3874 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); | |
| 3875 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3876 } | |
| 3877 | |
| 3878 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | |
| 3879 { | |
| 3880 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3881 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3882 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithemptymissinginv
alidattributeAttr)); | |
| 3883 if (cppValue.isNull()) { | |
| 3884 cppValue = "missing"; | |
| 3885 } else if (cppValue.isEmpty()) { | |
| 3886 cppValue = "empty"; | |
| 3887 } else if (equalIgnoringCase(cppValue, "empty")) { | |
| 3888 cppValue = "empty"; | |
| 3889 } else if (equalIgnoringCase(cppValue, "missing")) { | |
| 3890 cppValue = "missing"; | |
| 3891 } else if (equalIgnoringCase(cppValue, "invalid")) { | |
| 3892 cppValue = "invalid"; | |
| 3893 } else if (equalIgnoringCase(cppValue, "a-normal")) { | |
| 3894 cppValue = "a-normal"; | |
| 3895 } else { | |
| 3896 cppValue = "invalid"; | |
| 3897 } | |
| 3898 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | |
| 3899 } | |
| 3900 | |
| 3901 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3902 { | |
| 3903 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3904 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); | |
| 3905 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3906 } | |
| 3907 | |
| 3908 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | |
| 3909 { | |
| 3910 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3911 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3912 v8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute()); | |
| 3913 } | |
| 3914 | |
| 3915 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3916 { | |
| 3917 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3918 TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info); | |
| 3919 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3920 } | |
| 3921 | |
| 3922 static void locationReplaceableAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
| 3923 { | |
| 3924 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3925 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3926 v8SetReturnValueFast(info, WTF::getPtr(impl->locationReplaceable()), impl); | |
| 3927 } | |
| 3928 | |
| 3929 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3930 { | |
| 3931 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3932 TestObjectV8Internal::locationReplaceableAttributeGetter(info); | |
| 3933 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3934 } | |
| 3935 | |
| 3936 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
| 3937 { | |
| 3938 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3939 TestObject* proxyImpl = V8TestObject::toImpl(holder); | |
| 3940 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationReplaceab
le()); | |
| 3941 if (!impl) | |
| 3942 return; | |
| 3943 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 3944 impl->setHref(cppValue); | |
| 3945 } | |
| 3946 | |
| 3947 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3948 { | |
| 3949 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3950 TestObjectV8Internal::locationReplaceableAttributeSetter(v8Value, info); | |
| 3951 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3952 } | |
| 3953 | |
| 3954 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | |
| 3955 { | |
| 3956 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3957 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3958 v8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); | |
| 3959 } | |
| 3960 | |
| 3961 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3962 { | |
| 3963 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3964 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info); | |
| 3965 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3966 } | |
| 3967 | |
| 3968 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | |
| 3969 { | |
| 3970 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3971 ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabled
LongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 3972 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3973 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 3974 impl->setRuntimeEnabledLongAttribute(cppValue); | |
| 3975 } | |
| 3976 | |
| 3977 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3978 { | |
| 3979 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 3980 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, in
fo); | |
| 3981 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3982 } | |
| 3983 | |
| 3984 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 3985 { | |
| 3986 v8::Handle<v8::Object> holder = info.Holder(); | |
| 3987 TestObject* impl = V8TestObject::toImpl(holder); | |
| 3988 v8SetReturnValueInt(info, impl->perContextEnabledRuntimeEnabledLongAttribute
()); | |
| 3989 } | |
| 3990 | |
| 3991 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 3992 { | |
| 3993 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 3994 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeG
etter(info); | |
| 3995 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 3996 } | |
| 3997 | |
| 3998 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 3999 { | |
| 4000 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4001 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 4002 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4003 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 4004 impl->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue); | |
| 4005 } | |
| 4006 | |
| 4007 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | |
| 4008 { | |
| 4009 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4010 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeS
etter(v8Value, info); | |
| 4011 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4012 } | |
| 4013 | |
| 4014 #if ENABLE(CONDITION) | |
| 4015 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | |
| 4016 { | |
| 4017 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4018 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4019 v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute()); | |
| 4020 } | |
| 4021 #endif // ENABLE(CONDITION) | |
| 4022 | |
| 4023 #if ENABLE(CONDITION) | |
| 4024 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4025 { | |
| 4026 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4027 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetter(
info); | |
| 4028 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4029 } | |
| 4030 #endif // ENABLE(CONDITION) | |
| 4031 | |
| 4032 #if ENABLE(CONDITION) | |
| 4033 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4034 { | |
| 4035 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4036 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalRun
timeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | |
| 4037 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4038 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 4039 impl->setConditionalRuntimeEnabledLongAttribute(cppValue); | |
| 4040 } | |
| 4041 #endif // ENABLE(CONDITION) | |
| 4042 | |
| 4043 #if ENABLE(CONDITION) | |
| 4044 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | |
| 4045 { | |
| 4046 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4047 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetter(
v8Value, info); | |
| 4048 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4049 } | |
| 4050 #endif // ENABLE(CONDITION) | |
| 4051 | |
| 4052 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4053 { | |
| 4054 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4055 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4056 v8SetReturnValueString(info, impl->setterCallWithActiveWindowAndFirstWindowS
tringAttribute(), info.GetIsolate()); | |
| 4057 } | |
| 4058 | |
| 4059 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | |
| 4060 { | |
| 4061 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4062 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeGetter(info); | |
| 4063 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4064 } | |
| 4065 | |
| 4066 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4067 { | |
| 4068 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4069 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4070 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 4071 impl->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(callingDOMW
indow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue); | |
| 4072 } | |
| 4073 | |
| 4074 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) | |
| 4075 { | |
| 4076 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4077 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeSetter(v8Value, info); | |
| 4078 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4079 } | |
| 4080 | |
| 4081 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | |
| 4082 { | |
| 4083 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4084 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4085 v8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttri
bute(), info.GetIsolate()); | |
| 4086 } | |
| 4087 | |
| 4088 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4089 { | |
| 4090 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4091 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Getter(info); | |
| 4092 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4093 } | |
| 4094 | |
| 4095 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4096 { | |
| 4097 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4098 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4099 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 4100 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | |
| 4101 impl->setSetterCallWithExecutionContextStringAttribute(executionContext, cpp
Value); | |
| 4102 } | |
| 4103 | |
| 4104 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) | |
| 4105 { | |
| 4106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4107 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Setter(v8Value, info); | |
| 4108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4109 } | |
| 4110 | |
| 4111 static void treatNullAsEmptyStringStringAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | |
| 4112 { | |
| 4113 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4114 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4115 v8SetReturnValueString(info, impl->treatNullAsEmptyStringStringAttribute(),
info.GetIsolate()); | |
| 4116 } | |
| 4117 | |
| 4118 static void treatNullAsEmptyStringStringAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4119 { | |
| 4120 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4121 TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeGetter(i
nfo); | |
| 4122 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4123 } | |
| 4124 | |
| 4125 static void treatNullAsEmptyStringStringAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4126 { | |
| 4127 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4128 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4129 TOSTRING_VOID(V8StringResource<TreatNullAsEmptyString>, cppValue, v8Value); | |
| 4130 impl->setTreatNullAsEmptyStringStringAttribute(cppValue); | |
| 4131 } | |
| 4132 | |
| 4133 static void treatNullAsEmptyStringStringAttributeAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) | |
| 4134 { | |
| 4135 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4136 TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeSetter(v
8Value, info); | |
| 4137 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4138 } | |
| 4139 | |
| 4140 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) | |
| 4141 { | |
| 4142 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4143 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4144 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), i
nfo.GetIsolate()); | |
| 4145 } | |
| 4146 | |
| 4147 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4148 { | |
| 4149 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4150 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(in
fo); | |
| 4151 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4152 } | |
| 4153 | |
| 4154 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4155 { | |
| 4156 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4157 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4158 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); | |
| 4159 impl->setTreatNullAsNullStringStringAttribute(cppValue); | |
| 4160 } | |
| 4161 | |
| 4162 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | |
| 4163 { | |
| 4164 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4165 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8
Value, info); | |
| 4166 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4167 } | |
| 4168 | |
| 4169 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 4170 { | |
| 4171 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4172 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4173 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Attribute(), info.GetIsolate()); | |
| 4174 } | |
| 4175 | |
| 4176 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4177 { | |
| 4178 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4179 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeG
etter(info); | |
| 4180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4181 } | |
| 4182 | |
| 4183 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4184 { | |
| 4185 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4186 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4187 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 4188 impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue); | |
| 4189 } | |
| 4190 | |
| 4191 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | |
| 4192 { | |
| 4193 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4194 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeS
etter(v8Value, info); | |
| 4195 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4196 } | |
| 4197 | |
| 4198 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4199 { | |
| 4200 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4201 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4202 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringAttribute(), info.GetIsolate()); | |
| 4203 } | |
| 4204 | |
| 4205 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4206 { | |
| 4207 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4208 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteGetter(info); | |
| 4209 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4210 } | |
| 4211 | |
| 4212 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4213 { | |
| 4214 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4215 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4216 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 4217 impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); | |
| 4218 } | |
| 4219 | |
| 4220 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) | |
| 4221 { | |
| 4222 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4223 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteSetter(v8Value, info); | |
| 4224 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4225 } | |
| 4226 | |
| 4227 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4228 { | |
| 4229 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4230 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedTreatReturnedNullStringAsUndefinedStringAttribute"); | |
| 4231 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4232 if (!impl->isStringDirty()) { | |
| 4233 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | |
| 4234 if (!v8Value.IsEmpty()) { | |
| 4235 v8SetReturnValue(info, v8Value); | |
| 4236 return; | |
| 4237 } | |
| 4238 } | |
| 4239 String cppValue(impl->cachedTreatReturnedNullStringAsUndefinedStringAttribut
e()); | |
| 4240 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8Undefined() : v8String(info.GetIsolate(), cppValue)); | |
| 4241 v8SetReturnValueStringOrUndefined(info, cppValue, info.GetIsolate()); | |
| 4242 } | |
| 4243 | |
| 4244 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | |
| 4245 { | |
| 4246 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4247 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeGetter(info); | |
| 4248 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4249 } | |
| 4250 | |
| 4251 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4252 { | |
| 4253 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4254 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4255 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 4256 impl->setCachedTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); | |
| 4257 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedTreatReturnedNullStringAsUndefinedStringAttribute")); /
/ Invalidate the cached value. | |
| 4258 } | |
| 4259 | |
| 4260 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) | |
| 4261 { | |
| 4262 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4263 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeSetter(v8Value, info); | |
| 4264 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4265 } | |
| 4266 | |
| 4267 static void treatReturnedNullStringAsNullByteStringAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4268 { | |
| 4269 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4270 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4271 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullByteSt
ringAttribute(), info.GetIsolate()); | |
| 4272 } | |
| 4273 | |
| 4274 static void treatReturnedNullStringAsNullByteStringAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4275 { | |
| 4276 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4277 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttrib
uteGetter(info); | |
| 4278 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4279 } | |
| 4280 | |
| 4281 static void treatReturnedNullStringAsNullByteStringAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4282 { | |
| 4283 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4284 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsNullByteStringAttribute", "TestObject", holder, info.GetIsolate()); | |
| 4285 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4286 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); | |
| 4287 impl->setTreatReturnedNullStringAsNullByteStringAttribute(cppValue); | |
| 4288 } | |
| 4289 | |
| 4290 static void treatReturnedNullStringAsNullByteStringAttributeAttributeSetterCallb
ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | |
| 4291 { | |
| 4292 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4293 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttrib
uteSetter(v8Value, info); | |
| 4294 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4295 } | |
| 4296 | |
| 4297 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetter
(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4298 { | |
| 4299 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4300 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4301 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedByteStringAttribute(), info.GetIsolate()); | |
| 4302 } | |
| 4303 | |
| 4304 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetter
Callback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4305 { | |
| 4306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4307 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeA
ttributeGetter(info); | |
| 4308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4309 } | |
| 4310 | |
| 4311 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeSetter
(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4312 { | |
| 4313 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4314 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsUndefinedByteStringAttribute", "TestObject", holder, info.GetIsolate(
)); | |
| 4315 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4316 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); | |
| 4317 impl->setTreatReturnedNullStringAsUndefinedByteStringAttribute(cppValue); | |
| 4318 } | |
| 4319 | |
| 4320 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeSetter
Callback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) | |
| 4321 { | |
| 4322 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4323 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeA
ttributeSetter(v8Value, info); | |
| 4324 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4325 } | |
| 4326 | |
| 4327 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4328 { | |
| 4329 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4330 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4331 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullScalar
ValueStringAttribute(), info.GetIsolate()); | |
| 4332 } | |
| 4333 | |
| 4334 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | |
| 4335 { | |
| 4336 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4337 TestObjectV8Internal::treatReturnedNullStringAsNullScalarValueStringAttribut
eAttributeGetter(info); | |
| 4338 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4339 } | |
| 4340 | |
| 4341 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4342 { | |
| 4343 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4344 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsNullScalarValueStringAttribute", "TestObject", holder, info.GetIsolat
e()); | |
| 4345 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4346 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toScalarValueStri
ng(v8Value, exceptionState), exceptionState); | |
| 4347 impl->setTreatReturnedNullStringAsNullScalarValueStringAttribute(cppValue); | |
| 4348 } | |
| 4349 | |
| 4350 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) | |
| 4351 { | |
| 4352 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4353 TestObjectV8Internal::treatReturnedNullStringAsNullScalarValueStringAttribut
eAttributeSetter(v8Value, info); | |
| 4354 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4355 } | |
| 4356 | |
| 4357 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4358 { | |
| 4359 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4360 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4361 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedScalarValueStringAttribute(), info.GetIsolate()); | |
| 4362 } | |
| 4363 | |
| 4364 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>
& info) | |
| 4365 { | |
| 4366 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4367 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringAtt
ributeAttributeGetter(info); | |
| 4368 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4369 } | |
| 4370 | |
| 4371 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | |
| 4372 { | |
| 4373 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4374 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsUndefinedScalarValueStringAttribute", "TestObject", holder, info.GetI
solate()); | |
| 4375 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4376 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toScalarValueStri
ng(v8Value, exceptionState), exceptionState); | |
| 4377 impl->setTreatReturnedNullStringAsUndefinedScalarValueStringAttribute(cppVal
ue); | |
| 4378 } | |
| 4379 | |
| 4380 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) | |
| 4381 { | |
| 4382 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4383 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringAtt
ributeAttributeSetter(v8Value, info); | |
| 4384 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4385 } | |
| 4386 | |
| 4387 static void typeCheckingInterfaceFloatAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | |
| 4388 { | |
| 4389 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4390 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4391 v8SetReturnValue(info, impl->typeCheckingInterfaceFloatAttribute()); | |
| 4392 } | |
| 4393 | |
| 4394 static void typeCheckingInterfaceFloatAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4395 { | |
| 4396 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4397 TestObjectV8Internal::typeCheckingInterfaceFloatAttributeAttributeGetter(inf
o); | |
| 4398 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4399 } | |
| 4400 | |
| 4401 static void typeCheckingInterfaceFloatAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4402 { | |
| 4403 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4404 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4405 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); | |
| 4406 impl->setTypeCheckingInterfaceFloatAttribute(cppValue); | |
| 4407 } | |
| 4408 | |
| 4409 static void typeCheckingInterfaceFloatAttributeAttributeSetterCallback(v8::Local
<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>
& info) | |
| 4410 { | |
| 4411 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4412 TestObjectV8Internal::typeCheckingInterfaceFloatAttributeAttributeSetter(v8V
alue, info); | |
| 4413 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4414 } | |
| 4415 | |
| 4416 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
| 4417 { | |
| 4418 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4419 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4420 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceAttribute()), impl); | |
| 4421 } | |
| 4422 | |
| 4423 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4424 { | |
| 4425 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4426 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGe
tter(info); | |
| 4427 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4428 } | |
| 4429 | |
| 4430 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4431 { | |
| 4432 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4433 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); | |
| 4434 if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) { | |
| 4435 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | |
| 4436 exceptionState.throwIfNeeded(); | |
| 4437 return; | |
| 4438 } | |
| 4439 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4440 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 4441 impl->setTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppValue)); | |
| 4442 } | |
| 4443 | |
| 4444 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn
fo<void>& info) | |
| 4445 { | |
| 4446 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4447 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSe
tter(v8Value, info); | |
| 4448 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4449 } | |
| 4450 | |
| 4451 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4452 { | |
| 4453 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4454 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4455 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceOrNullAttribute()), impl); | |
| 4456 } | |
| 4457 | |
| 4458 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4459 { | |
| 4460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4461 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri
buteGetter(info); | |
| 4462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4463 } | |
| 4464 | |
| 4465 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4466 { | |
| 4467 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4468 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate()); | |
| 4469 if (!isUndefinedOrNull(v8Value) && !V8TestInterface::hasInstance(v8Value, in
fo.GetIsolate())) { | |
| 4470 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | |
| 4471 exceptionState.throwIfNeeded(); | |
| 4472 return; | |
| 4473 } | |
| 4474 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4475 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 4476 impl->setTypeCheckingInterfaceTestInterfaceOrNullAttribute(WTF::getPtr(cppVa
lue)); | |
| 4477 } | |
| 4478 | |
| 4479 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) | |
| 4480 { | |
| 4481 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4482 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri
buteSetter(v8Value, info); | |
| 4483 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4484 } | |
| 4485 | |
| 4486 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | |
| 4487 { | |
| 4488 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4489 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4490 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattri
buteAttr), info.GetIsolate()); | |
| 4491 } | |
| 4492 | |
| 4493 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4494 { | |
| 4495 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4496 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); | |
| 4497 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4498 } | |
| 4499 | |
| 4500 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | |
| 4501 { | |
| 4502 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4503 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4504 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 4505 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 4506 impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue); | |
| 4507 } | |
| 4508 | |
| 4509 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4510 { | |
| 4511 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4512 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 4513 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); | |
| 4514 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4515 } | |
| 4516 | |
| 4517 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | |
| 4518 { | |
| 4519 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4520 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4521 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectUrlAttr
ibuteAttr), info.GetIsolate()); | |
| 4522 } | |
| 4523 | |
| 4524 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4525 { | |
| 4526 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4527 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); | |
| 4528 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4529 } | |
| 4530 | |
| 4531 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | |
| 4532 { | |
| 4533 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4534 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4535 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 4536 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 4537 impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue); | |
| 4538 } | |
| 4539 | |
| 4540 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4541 { | |
| 4542 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4543 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 4544 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); | |
| 4545 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4546 } | |
| 4547 | |
| 4548 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | |
| 4549 { | |
| 4550 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4551 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4552 v8SetReturnValueInt(info, impl->unforgeableLongAttribute()); | |
| 4553 } | |
| 4554 | |
| 4555 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4556 { | |
| 4557 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4558 TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info); | |
| 4559 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4560 } | |
| 4561 | |
| 4562 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | |
| 4563 { | |
| 4564 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4565 ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLon
gAttribute", "TestObject", holder, info.GetIsolate()); | |
| 4566 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4567 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | |
| 4568 impl->setUnforgeableLongAttribute(cppValue); | |
| 4569 } | |
| 4570 | |
| 4571 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4572 { | |
| 4573 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4574 TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info)
; | |
| 4575 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4576 } | |
| 4577 | |
| 4578 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | |
| 4579 { | |
| 4580 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4581 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4582 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | |
| 4583 } | |
| 4584 | |
| 4585 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4586 { | |
| 4587 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4588 TestObjectV8Internal::testInterfaceAttributeAttributeGetter(info); | |
| 4589 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4590 } | |
| 4591 | |
| 4592 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
| 4593 { | |
| 4594 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4595 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4596 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 4597 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | |
| 4598 } | |
| 4599 | |
| 4600 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4601 { | |
| 4602 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4603 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); | |
| 4604 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4605 } | |
| 4606 | |
| 4607 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | |
| 4608 { | |
| 4609 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4610 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4611 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedAt
tribute()), impl); | |
| 4612 } | |
| 4613 | |
| 4614 static void testInterfaceGarbageCollectedAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4615 { | |
| 4616 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4617 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetter(
info); | |
| 4618 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4619 } | |
| 4620 | |
| 4621 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4622 { | |
| 4623 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4624 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4625 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 4626 impl->setTestInterfaceGarbageCollectedAttribute(WTF::getPtr(cppValue)); | |
| 4627 } | |
| 4628 | |
| 4629 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | |
| 4630 { | |
| 4631 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4632 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(
v8Value, info); | |
| 4633 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4634 } | |
| 4635 | |
| 4636 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 4637 { | |
| 4638 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4639 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4640 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedOr
NullAttribute()), impl); | |
| 4641 } | |
| 4642 | |
| 4643 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4644 { | |
| 4645 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4646 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeG
etter(info); | |
| 4647 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4648 } | |
| 4649 | |
| 4650 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4651 { | |
| 4652 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4653 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4654 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 4655 impl->setTestInterfaceGarbageCollectedOrNullAttribute(WTF::getPtr(cppValue))
; | |
| 4656 } | |
| 4657 | |
| 4658 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | |
| 4659 { | |
| 4660 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4661 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeS
etter(v8Value, info); | |
| 4662 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4663 } | |
| 4664 | |
| 4665 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 4666 { | |
| 4667 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4668 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4669 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedAttribute()), impl); | |
| 4670 } | |
| 4671 | |
| 4672 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4673 { | |
| 4674 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4675 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeG
etter(info); | |
| 4676 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4677 } | |
| 4678 | |
| 4679 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4680 { | |
| 4681 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4682 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4683 TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfac
eWillBeGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 4684 impl->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue))
; | |
| 4685 } | |
| 4686 | |
| 4687 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | |
| 4688 { | |
| 4689 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4690 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeS
etter(v8Value, info); | |
| 4691 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4692 } | |
| 4693 | |
| 4694 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4695 { | |
| 4696 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4697 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4698 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedOrNullAttribute()), impl); | |
| 4699 } | |
| 4700 | |
| 4701 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4702 { | |
| 4703 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4704 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteGetter(info); | |
| 4705 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4706 } | |
| 4707 | |
| 4708 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4709 { | |
| 4710 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4711 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4712 TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfac
eWillBeGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); | |
| 4713 impl->setTestInterfaceWillBeGarbageCollectedOrNullAttribute(WTF::getPtr(cppV
alue)); | |
| 4714 } | |
| 4715 | |
| 4716 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | |
| 4717 { | |
| 4718 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4719 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteSetter(v8Value, info); | |
| 4720 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4721 } | |
| 4722 | |
| 4723 static void readonlyShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | |
| 4724 { | |
| 4725 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4726 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4727 int result = 0; | |
| 4728 if (!V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | |
| 4729 return; | |
| 4730 v8SetReturnValueInt(info, result); | |
| 4731 } | |
| 4732 | |
| 4733 static void readonlyShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4734 { | |
| 4735 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4736 TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info); | |
| 4737 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4738 } | |
| 4739 | |
| 4740 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
| 4741 { | |
| 4742 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4743 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4744 int result = 0; | |
| 4745 if (!V8TestObject::PrivateScript::shortAttributeAttributeGetter(toFrameIfNot
Detached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | |
| 4746 return; | |
| 4747 v8SetReturnValueInt(info, result); | |
| 4748 } | |
| 4749 | |
| 4750 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | |
| 4751 { | |
| 4752 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4753 TestObjectV8Internal::shortAttributeAttributeGetter(info); | |
| 4754 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4755 } | |
| 4756 | |
| 4757 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | |
| 4758 { | |
| 4759 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4760 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); | |
| 4761 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4762 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionState)
, exceptionState); | |
| 4763 V8TestObject::PrivateScript::shortAttributeAttributeSetter(toFrameIfNotDetac
hed(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | |
| 4764 } | |
| 4765 | |
| 4766 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4767 { | |
| 4768 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4769 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); | |
| 4770 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4771 } | |
| 4772 | |
| 4773 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | |
| 4774 { | |
| 4775 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4776 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4777 String result; | |
| 4778 if (!V8TestObject::PrivateScript::stringAttributeAttributeGetter(toFrameIfNo
tDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | |
| 4779 return; | |
| 4780 v8SetReturnValueString(info, result, info.GetIsolate()); | |
| 4781 } | |
| 4782 | |
| 4783 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4784 { | |
| 4785 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4786 TestObjectV8Internal::stringAttributeAttributeGetter(info); | |
| 4787 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4788 } | |
| 4789 | |
| 4790 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | |
| 4791 { | |
| 4792 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4793 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4794 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 4795 V8TestObject::PrivateScript::stringAttributeAttributeSetter(toFrameIfNotDeta
ched(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | |
| 4796 } | |
| 4797 | |
| 4798 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4799 { | |
| 4800 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4801 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); | |
| 4802 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4803 } | |
| 4804 | |
| 4805 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
| 4806 { | |
| 4807 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4808 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4809 RefPtrWillBeRawPtr<Node> result = nullptr; | |
| 4810 if (!V8TestObject::PrivateScript::nodeAttributeAttributeGetter(toFrameIfNotD
etached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | |
| 4811 return; | |
| 4812 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); | |
| 4813 } | |
| 4814 | |
| 4815 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | |
| 4816 { | |
| 4817 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4818 TestObjectV8Internal::nodeAttributeAttributeGetter(info); | |
| 4819 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4820 } | |
| 4821 | |
| 4822 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
| 4823 { | |
| 4824 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4825 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4826 TONATIVE_VOID(Node*, cppValue, V8Node::toImplWithTypeCheck(info.GetIsolate()
, v8Value)); | |
| 4827 V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toFrameIfNotDetach
ed(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | |
| 4828 } | |
| 4829 | |
| 4830 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4831 { | |
| 4832 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4833 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | |
| 4834 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4835 } | |
| 4836 | |
| 4837 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | |
| 4838 { | |
| 4839 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4840 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4841 v8SetReturnValueString(info, impl->attributeImplementedInCPPForPrivateScript
Only(), info.GetIsolate()); | |
| 4842 } | |
| 4843 | |
| 4844 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4845 { | |
| 4846 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4847 TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttribute
Getter(info); | |
| 4848 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4849 } | |
| 4850 | |
| 4851 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4852 { | |
| 4853 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4854 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4855 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 4856 impl->setAttributeImplementedInCPPForPrivateScriptOnly(cppValue); | |
| 4857 } | |
| 4858 | |
| 4859 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) | |
| 4860 { | |
| 4861 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4862 TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttribute
Setter(v8Value, info); | |
| 4863 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4864 } | |
| 4865 | |
| 4866 static void enumForPrivateScriptAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
| 4867 { | |
| 4868 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4869 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4870 String result; | |
| 4871 if (!V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(toFram
eIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | |
| 4872 return; | |
| 4873 v8SetReturnValueString(info, result, info.GetIsolate()); | |
| 4874 } | |
| 4875 | |
| 4876 static void enumForPrivateScriptAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4877 { | |
| 4878 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4879 TestObjectV8Internal::enumForPrivateScriptAttributeGetter(info); | |
| 4880 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4881 } | |
| 4882 | |
| 4883 static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | |
| 4884 { | |
| 4885 v8::Handle<v8::Object> holder = info.Holder(); | |
| 4886 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4887 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | |
| 4888 String string = cppValue; | |
| 4889 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | |
| 4890 return; | |
| 4891 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toFrameIfNo
tDetached(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | |
| 4892 } | |
| 4893 | |
| 4894 static void enumForPrivateScriptAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4895 { | |
| 4896 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | |
| 4897 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); | |
| 4898 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4899 } | |
| 4900 | |
| 4901 static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | |
| 4902 { | |
| 4903 v8::Handle<v8::Value> data = info.Data(); | |
| 4904 ASSERT(data->IsExternal()); | |
| 4905 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | |
| 4906 if (!perContextData) | |
| 4907 return; | |
| 4908 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | |
| 4909 } | |
| 4910 | |
| 4911 static void testInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::
Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 4912 { | |
| 4913 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4914 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::deprecatedTestInterfaceEmptyConstructorAttribute); | |
| 4915 TestObjectV8Internal::TestObjectConstructorGetter(property, info); | |
| 4916 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4917 } | |
| 4918 | |
| 4919 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructo
rGetterCallback(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v
8::Value>& info) | |
| 4920 { | |
| 4921 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | |
| 4922 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Fe
atureName); | |
| 4923 TestObjectV8Internal::TestObjectConstructorGetter(property, info); | |
| 4924 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4925 } | |
| 4926 | |
| 4927 static void TestObjectForceSetAttributeOnThis(v8::Local<v8::String> name, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4928 { | |
| 4929 if (info.This()->IsObject()) | |
| 4930 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); | |
| 4931 } | |
| 4932 | |
| 4933 static void TestObjectForceSetAttributeOnThisCallback(v8::Local<v8::String> name
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
| 4934 { | |
| 4935 TestObjectV8Internal::TestObjectForceSetAttributeOnThis(name, v8Value, info)
; | |
| 4936 } | |
| 4937 | |
| 4938 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 4939 { | |
| 4940 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 4941 impl->voidMethod(); | |
| 4942 } | |
| 4943 | |
| 4944 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 4945 { | |
| 4946 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 4947 TestObjectV8Internal::voidMethodMethod(info); | |
| 4948 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4949 } | |
| 4950 | |
| 4951 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
| 4952 { | |
| 4953 TestObject::staticVoidMethod(); | |
| 4954 } | |
| 4955 | |
| 4956 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 4957 { | |
| 4958 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 4959 TestObjectV8Internal::staticVoidMethodMethod(info); | |
| 4960 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4961 } | |
| 4962 | |
| 4963 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 4964 { | |
| 4965 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 4966 v8SetReturnValue(info, v8DateOrNaN(impl->dateMethod(), info.GetIsolate())); | |
| 4967 } | |
| 4968 | |
| 4969 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 4970 { | |
| 4971 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 4972 TestObjectV8Internal::dateMethodMethod(info); | |
| 4973 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4974 } | |
| 4975 | |
| 4976 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 4977 { | |
| 4978 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 4979 v8SetReturnValueString(info, impl->stringMethod(), info.GetIsolate()); | |
| 4980 } | |
| 4981 | |
| 4982 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
| 4983 { | |
| 4984 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 4985 TestObjectV8Internal::stringMethodMethod(info); | |
| 4986 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 4987 } | |
| 4988 | |
| 4989 static void byteStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
| 4990 { | |
| 4991 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 4992 v8SetReturnValueString(info, impl->byteStringMethod(), info.GetIsolate()); | |
| 4993 } | |
| 4994 | |
| 4995 static void byteStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 4996 { | |
| 4997 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 4998 TestObjectV8Internal::byteStringMethodMethod(info); | |
| 4999 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5000 } | |
| 5001 | |
| 5002 static void scalarValueStringMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 5003 { | |
| 5004 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5005 v8SetReturnValueString(info, impl->scalarValueStringMethod(), info.GetIsolat
e()); | |
| 5006 } | |
| 5007 | |
| 5008 static void scalarValueStringMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 5009 { | |
| 5010 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5011 TestObjectV8Internal::scalarValueStringMethodMethod(info); | |
| 5012 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5013 } | |
| 5014 | |
| 5015 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 5016 { | |
| 5017 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5018 v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampMethod(
))); | |
| 5019 } | |
| 5020 | |
| 5021 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 5022 { | |
| 5023 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5024 TestObjectV8Internal::readonlyDOMTimeStampMethodMethod(info); | |
| 5025 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5026 } | |
| 5027 | |
| 5028 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 5029 { | |
| 5030 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5031 v8SetReturnValueBool(info, impl->booleanMethod()); | |
| 5032 } | |
| 5033 | |
| 5034 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
| 5035 { | |
| 5036 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5037 TestObjectV8Internal::booleanMethodMethod(info); | |
| 5038 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5039 } | |
| 5040 | |
| 5041 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 5042 { | |
| 5043 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5044 v8SetReturnValueInt(info, impl->byteMethod()); | |
| 5045 } | |
| 5046 | |
| 5047 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5048 { | |
| 5049 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5050 TestObjectV8Internal::byteMethodMethod(info); | |
| 5051 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5052 } | |
| 5053 | |
| 5054 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 5055 { | |
| 5056 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5057 v8SetReturnValue(info, impl->doubleMethod()); | |
| 5058 } | |
| 5059 | |
| 5060 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
| 5061 { | |
| 5062 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5063 TestObjectV8Internal::doubleMethodMethod(info); | |
| 5064 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5065 } | |
| 5066 | |
| 5067 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 5068 { | |
| 5069 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5070 v8SetReturnValue(info, impl->floatMethod()); | |
| 5071 } | |
| 5072 | |
| 5073 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5074 { | |
| 5075 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5076 TestObjectV8Internal::floatMethodMethod(info); | |
| 5077 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5078 } | |
| 5079 | |
| 5080 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 5081 { | |
| 5082 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5083 v8SetReturnValueInt(info, impl->longMethod()); | |
| 5084 } | |
| 5085 | |
| 5086 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5087 { | |
| 5088 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5089 TestObjectV8Internal::longMethodMethod(info); | |
| 5090 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5091 } | |
| 5092 | |
| 5093 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) | |
| 5094 { | |
| 5095 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5096 v8SetReturnValue(info, static_cast<double>(impl->longLongMethod())); | |
| 5097 } | |
| 5098 | |
| 5099 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
| 5100 { | |
| 5101 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5102 TestObjectV8Internal::longLongMethodMethod(info); | |
| 5103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5104 } | |
| 5105 | |
| 5106 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 5107 { | |
| 5108 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5109 v8SetReturnValueUnsigned(info, impl->octetMethod()); | |
| 5110 } | |
| 5111 | |
| 5112 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5113 { | |
| 5114 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5115 TestObjectV8Internal::octetMethodMethod(info); | |
| 5116 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5117 } | |
| 5118 | |
| 5119 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 5120 { | |
| 5121 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5122 v8SetReturnValueInt(info, impl->shortMethod()); | |
| 5123 } | |
| 5124 | |
| 5125 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5126 { | |
| 5127 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5128 TestObjectV8Internal::shortMethodMethod(info); | |
| 5129 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5130 } | |
| 5131 | |
| 5132 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5133 { | |
| 5134 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5135 v8SetReturnValueUnsigned(info, impl->unsignedLongMethod()); | |
| 5136 } | |
| 5137 | |
| 5138 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 5139 { | |
| 5140 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5141 TestObjectV8Internal::unsignedLongMethodMethod(info); | |
| 5142 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5143 } | |
| 5144 | |
| 5145 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
| 5146 { | |
| 5147 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5148 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongMethod())); | |
| 5149 } | |
| 5150 | |
| 5151 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
| 5152 { | |
| 5153 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5154 TestObjectV8Internal::unsignedLongLongMethodMethod(info); | |
| 5155 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5156 } | |
| 5157 | |
| 5158 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5159 { | |
| 5160 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5161 v8SetReturnValueUnsigned(info, impl->unsignedShortMethod()); | |
| 5162 } | |
| 5163 | |
| 5164 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 5165 { | |
| 5166 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5167 TestObjectV8Internal::unsignedShortMethodMethod(info); | |
| 5168 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5169 } | |
| 5170 | |
| 5171 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 5172 { | |
| 5173 if (UNLIKELY(info.Length() < 1)) { | |
| 5174 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDateArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI
solate()); | |
| 5175 return; | |
| 5176 } | |
| 5177 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5178 double dateArg; | |
| 5179 { | |
| 5180 v8::TryCatch block; | |
| 5181 V8RethrowTryCatchScope rethrow(block); | |
| 5182 TONATIVE_VOID_INTERNAL(dateArg, toCoreDate(info[0])); | |
| 5183 } | |
| 5184 impl->voidMethodDateArg(dateArg); | |
| 5185 } | |
| 5186 | |
| 5187 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 5188 { | |
| 5189 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5190 TestObjectV8Internal::voidMethodDateArgMethod(info); | |
| 5191 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5192 } | |
| 5193 | |
| 5194 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5195 { | |
| 5196 if (UNLIKELY(info.Length() < 1)) { | |
| 5197 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodStringArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Ge
tIsolate()); | |
| 5198 return; | |
| 5199 } | |
| 5200 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5201 V8StringResource<> stringArg; | |
| 5202 { | |
| 5203 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | |
| 5204 } | |
| 5205 impl->voidMethodStringArg(stringArg); | |
| 5206 } | |
| 5207 | |
| 5208 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 5209 { | |
| 5210 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5211 TestObjectV8Internal::voidMethodStringArgMethod(info); | |
| 5212 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5213 } | |
| 5214 | |
| 5215 static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 5216 { | |
| 5217 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteStringArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5218 if (UNLIKELY(info.Length() < 1)) { | |
| 5219 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5220 exceptionState.throwIfNeeded(); | |
| 5221 return; | |
| 5222 } | |
| 5223 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5224 V8StringResource<> stringArg; | |
| 5225 { | |
| 5226 v8::TryCatch block; | |
| 5227 V8RethrowTryCatchScope rethrow(block); | |
| 5228 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringArg, toByteString(info[0], e
xceptionState), exceptionState); | |
| 5229 } | |
| 5230 impl->voidMethodByteStringArg(stringArg); | |
| 5231 } | |
| 5232 | |
| 5233 static void voidMethodByteStringArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 5234 { | |
| 5235 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5236 TestObjectV8Internal::voidMethodByteStringArgMethod(info); | |
| 5237 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5238 } | |
| 5239 | |
| 5240 static void voidMethodScalarValueStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
| 5241 { | |
| 5242 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
calarValueStringArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5243 if (UNLIKELY(info.Length() < 1)) { | |
| 5244 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5245 exceptionState.throwIfNeeded(); | |
| 5246 return; | |
| 5247 } | |
| 5248 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5249 V8StringResource<> scalarValueStringArg; | |
| 5250 { | |
| 5251 v8::TryCatch block; | |
| 5252 V8RethrowTryCatchScope rethrow(block); | |
| 5253 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(scalarValueStringArg, toScalarValu
eString(info[0], exceptionState), exceptionState); | |
| 5254 } | |
| 5255 impl->voidMethodScalarValueStringArg(scalarValueStringArg); | |
| 5256 } | |
| 5257 | |
| 5258 static void voidMethodScalarValueStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
| 5259 { | |
| 5260 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5261 TestObjectV8Internal::voidMethodScalarValueStringArgMethod(info); | |
| 5262 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5263 } | |
| 5264 | |
| 5265 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 5266 { | |
| 5267 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
OMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5268 if (UNLIKELY(info.Length() < 1)) { | |
| 5269 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5270 exceptionState.throwIfNeeded(); | |
| 5271 return; | |
| 5272 } | |
| 5273 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5274 unsigned long long domTimeStampArg; | |
| 5275 { | |
| 5276 v8::TryCatch block; | |
| 5277 V8RethrowTryCatchScope rethrow(block); | |
| 5278 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(domTimeStampArg, toUInt64(info[0],
exceptionState), exceptionState); | |
| 5279 } | |
| 5280 impl->voidMethodDOMTimeStampArg(domTimeStampArg); | |
| 5281 } | |
| 5282 | |
| 5283 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 5284 { | |
| 5285 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5286 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info); | |
| 5287 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5288 } | |
| 5289 | |
| 5290 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
| 5291 { | |
| 5292 if (UNLIKELY(info.Length() < 1)) { | |
| 5293 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodBooleanArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); | |
| 5294 return; | |
| 5295 } | |
| 5296 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5297 bool booleanArg; | |
| 5298 { | |
| 5299 v8::TryCatch block; | |
| 5300 V8RethrowTryCatchScope rethrow(block); | |
| 5301 TONATIVE_VOID_INTERNAL(booleanArg, info[0]->BooleanValue()); | |
| 5302 } | |
| 5303 impl->voidMethodBooleanArg(booleanArg); | |
| 5304 } | |
| 5305 | |
| 5306 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 5307 { | |
| 5308 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5309 TestObjectV8Internal::voidMethodBooleanArgMethod(info); | |
| 5310 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5311 } | |
| 5312 | |
| 5313 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 5314 { | |
| 5315 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5316 if (UNLIKELY(info.Length() < 1)) { | |
| 5317 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5318 exceptionState.throwIfNeeded(); | |
| 5319 return; | |
| 5320 } | |
| 5321 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5322 int byteArg; | |
| 5323 { | |
| 5324 v8::TryCatch block; | |
| 5325 V8RethrowTryCatchScope rethrow(block); | |
| 5326 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(byteArg, toInt8(info[0], exception
State), exceptionState); | |
| 5327 } | |
| 5328 impl->voidMethodByteArg(byteArg); | |
| 5329 } | |
| 5330 | |
| 5331 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 5332 { | |
| 5333 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5334 TestObjectV8Internal::voidMethodByteArgMethod(info); | |
| 5335 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5336 } | |
| 5337 | |
| 5338 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5339 { | |
| 5340 if (UNLIKELY(info.Length() < 1)) { | |
| 5341 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDoubleArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Ge
tIsolate()); | |
| 5342 return; | |
| 5343 } | |
| 5344 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5345 double doubleArg; | |
| 5346 { | |
| 5347 v8::TryCatch block; | |
| 5348 V8RethrowTryCatchScope rethrow(block); | |
| 5349 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); | |
| 5350 } | |
| 5351 impl->voidMethodDoubleArg(doubleArg); | |
| 5352 } | |
| 5353 | |
| 5354 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 5355 { | |
| 5356 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5357 TestObjectV8Internal::voidMethodDoubleArgMethod(info); | |
| 5358 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5359 } | |
| 5360 | |
| 5361 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5362 { | |
| 5363 if (UNLIKELY(info.Length() < 1)) { | |
| 5364 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodFloatArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Get
Isolate()); | |
| 5365 return; | |
| 5366 } | |
| 5367 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5368 float floatArg; | |
| 5369 { | |
| 5370 v8::TryCatch block; | |
| 5371 V8RethrowTryCatchScope rethrow(block); | |
| 5372 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue
())); | |
| 5373 } | |
| 5374 impl->voidMethodFloatArg(floatArg); | |
| 5375 } | |
| 5376 | |
| 5377 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 5378 { | |
| 5379 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5380 TestObjectV8Internal::voidMethodFloatArgMethod(info); | |
| 5381 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5382 } | |
| 5383 | |
| 5384 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 5385 { | |
| 5386 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5387 if (UNLIKELY(info.Length() < 1)) { | |
| 5388 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5389 exceptionState.throwIfNeeded(); | |
| 5390 return; | |
| 5391 } | |
| 5392 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5393 int longArg; | |
| 5394 { | |
| 5395 v8::TryCatch block; | |
| 5396 V8RethrowTryCatchScope rethrow(block); | |
| 5397 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 5398 } | |
| 5399 impl->voidMethodLongArg(longArg); | |
| 5400 } | |
| 5401 | |
| 5402 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 5403 { | |
| 5404 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5405 TestObjectV8Internal::voidMethodLongArgMethod(info); | |
| 5406 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5407 } | |
| 5408 | |
| 5409 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
| 5410 { | |
| 5411 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5412 if (UNLIKELY(info.Length() < 1)) { | |
| 5413 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5414 exceptionState.throwIfNeeded(); | |
| 5415 return; | |
| 5416 } | |
| 5417 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5418 long long longLongArg; | |
| 5419 { | |
| 5420 v8::TryCatch block; | |
| 5421 V8RethrowTryCatchScope rethrow(block); | |
| 5422 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longLongArg, toInt64(info[0], exce
ptionState), exceptionState); | |
| 5423 } | |
| 5424 impl->voidMethodLongLongArg(longLongArg); | |
| 5425 } | |
| 5426 | |
| 5427 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 5428 { | |
| 5429 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5430 TestObjectV8Internal::voidMethodLongLongArgMethod(info); | |
| 5431 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5432 } | |
| 5433 | |
| 5434 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5435 { | |
| 5436 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ctetArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5437 if (UNLIKELY(info.Length() < 1)) { | |
| 5438 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5439 exceptionState.throwIfNeeded(); | |
| 5440 return; | |
| 5441 } | |
| 5442 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5443 unsigned octetArg; | |
| 5444 { | |
| 5445 v8::TryCatch block; | |
| 5446 V8RethrowTryCatchScope rethrow(block); | |
| 5447 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(octetArg, toUInt8(info[0], excepti
onState), exceptionState); | |
| 5448 } | |
| 5449 impl->voidMethodOctetArg(octetArg); | |
| 5450 } | |
| 5451 | |
| 5452 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 5453 { | |
| 5454 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5455 TestObjectV8Internal::voidMethodOctetArgMethod(info); | |
| 5456 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5457 } | |
| 5458 | |
| 5459 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5460 { | |
| 5461 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
hortArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5462 if (UNLIKELY(info.Length() < 1)) { | |
| 5463 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5464 exceptionState.throwIfNeeded(); | |
| 5465 return; | |
| 5466 } | |
| 5467 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5468 int shortArg; | |
| 5469 { | |
| 5470 v8::TryCatch block; | |
| 5471 V8RethrowTryCatchScope rethrow(block); | |
| 5472 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(shortArg, toInt16(info[0], excepti
onState), exceptionState); | |
| 5473 } | |
| 5474 impl->voidMethodShortArg(shortArg); | |
| 5475 } | |
| 5476 | |
| 5477 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 5478 { | |
| 5479 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5480 TestObjectV8Internal::voidMethodShortArgMethod(info); | |
| 5481 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5482 } | |
| 5483 | |
| 5484 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 5485 { | |
| 5486 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5487 if (UNLIKELY(info.Length() < 1)) { | |
| 5488 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5489 exceptionState.throwIfNeeded(); | |
| 5490 return; | |
| 5491 } | |
| 5492 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5493 unsigned unsignedLongArg; | |
| 5494 { | |
| 5495 v8::TryCatch block; | |
| 5496 V8RethrowTryCatchScope rethrow(block); | |
| 5497 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedLongArg, toUInt32(info[0],
exceptionState), exceptionState); | |
| 5498 } | |
| 5499 impl->voidMethodUnsignedLongArg(unsignedLongArg); | |
| 5500 } | |
| 5501 | |
| 5502 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 5503 { | |
| 5504 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5505 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info); | |
| 5506 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5507 } | |
| 5508 | |
| 5509 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 5510 { | |
| 5511 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5512 if (UNLIKELY(info.Length() < 1)) { | |
| 5513 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5514 exceptionState.throwIfNeeded(); | |
| 5515 return; | |
| 5516 } | |
| 5517 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5518 unsigned long long unsignedLongLongArg; | |
| 5519 { | |
| 5520 v8::TryCatch block; | |
| 5521 V8RethrowTryCatchScope rethrow(block); | |
| 5522 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedLongLongArg, toUInt64(info
[0], exceptionState), exceptionState); | |
| 5523 } | |
| 5524 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg); | |
| 5525 } | |
| 5526 | |
| 5527 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
| 5528 { | |
| 5529 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5530 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info); | |
| 5531 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5532 } | |
| 5533 | |
| 5534 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 5535 { | |
| 5536 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5537 if (UNLIKELY(info.Length() < 1)) { | |
| 5538 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 5539 exceptionState.throwIfNeeded(); | |
| 5540 return; | |
| 5541 } | |
| 5542 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5543 unsigned unsignedShortArg; | |
| 5544 { | |
| 5545 v8::TryCatch block; | |
| 5546 V8RethrowTryCatchScope rethrow(block); | |
| 5547 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedShortArg, toUInt16(info[0]
, exceptionState), exceptionState); | |
| 5548 } | |
| 5549 impl->voidMethodUnsignedShortArg(unsignedShortArg); | |
| 5550 } | |
| 5551 | |
| 5552 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 5553 { | |
| 5554 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5555 TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info); | |
| 5556 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5557 } | |
| 5558 | |
| 5559 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 5560 { | |
| 5561 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5562 v8SetReturnValue(info, impl->testInterfaceEmptyMethod()); | |
| 5563 } | |
| 5564 | |
| 5565 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 5566 { | |
| 5567 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5568 TestObjectV8Internal::testInterfaceEmptyMethodMethod(info); | |
| 5569 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5570 } | |
| 5571 | |
| 5572 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 5573 { | |
| 5574 if (UNLIKELY(info.Length() < 1)) { | |
| 5575 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate
()), info.GetIsolate()); | |
| 5576 return; | |
| 5577 } | |
| 5578 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5579 TestInterfaceEmpty* testInterfaceEmptyArg; | |
| 5580 { | |
| 5581 v8::TryCatch block; | |
| 5582 V8RethrowTryCatchScope rethrow(block); | |
| 5583 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); | |
| 5584 } | |
| 5585 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); | |
| 5586 } | |
| 5587 | |
| 5588 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 5589 { | |
| 5590 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5591 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); | |
| 5592 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5593 } | |
| 5594 | |
| 5595 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
| 5596 { | |
| 5597 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 5598 if (UNLIKELY(info.Length() < 2)) { | |
| 5599 setMinimumArityTypeError(exceptionState, 2, info.Length()); | |
| 5600 exceptionState.throwIfNeeded(); | |
| 5601 return; | |
| 5602 } | |
| 5603 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5604 int longArg; | |
| 5605 TestInterfaceEmpty* testInterfaceEmptyArg; | |
| 5606 { | |
| 5607 v8::TryCatch block; | |
| 5608 V8RethrowTryCatchScope rethrow(block); | |
| 5609 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 5610 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[1])); | |
| 5611 } | |
| 5612 impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg)
; | |
| 5613 } | |
| 5614 | |
| 5615 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 5616 { | |
| 5617 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5618 TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info); | |
| 5619 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5620 } | |
| 5621 | |
| 5622 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 5623 { | |
| 5624 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5625 v8SetReturnValue(info, impl->voidCallbackFunctionMethod().v8Value()); | |
| 5626 } | |
| 5627 | |
| 5628 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 5629 { | |
| 5630 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5631 TestObjectV8Internal::voidCallbackFunctionMethodMethod(info); | |
| 5632 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5633 } | |
| 5634 | |
| 5635 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 5636 { | |
| 5637 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5638 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgMethod().v8Val
ue()); | |
| 5639 } | |
| 5640 | |
| 5641 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 5642 { | |
| 5643 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5644 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info); | |
| 5645 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5646 } | |
| 5647 | |
| 5648 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 5649 { | |
| 5650 if (UNLIKELY(info.Length() < 1)) { | |
| 5651 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodVoidCallbackFunctionArg", "TestObject", 1, info.Length(), info.GetIsola
te()), info.GetIsolate()); | |
| 5652 return; | |
| 5653 } | |
| 5654 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5655 ScriptValue voidCallbackFunctionArg; | |
| 5656 { | |
| 5657 v8::TryCatch block; | |
| 5658 V8RethrowTryCatchScope rethrow(block); | |
| 5659 TONATIVE_VOID_INTERNAL(voidCallbackFunctionArg, ScriptValue(ScriptState:
:current(info.GetIsolate()), info[0])); | |
| 5660 } | |
| 5661 impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg); | |
| 5662 } | |
| 5663 | |
| 5664 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | |
| 5665 { | |
| 5666 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5667 TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info); | |
| 5668 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5669 } | |
| 5670 | |
| 5671 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::Function
CallbackInfo<v8::Value>& info) | |
| 5672 { | |
| 5673 if (UNLIKELY(info.Length() < 1)) { | |
| 5674 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", 1, info.Length(), inf
o.GetIsolate()), info.GetIsolate()); | |
| 5675 return; | |
| 5676 } | |
| 5677 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5678 ScriptValue anyCallbackFunctionOptionalAnyArgArg; | |
| 5679 { | |
| 5680 v8::TryCatch block; | |
| 5681 V8RethrowTryCatchScope rethrow(block); | |
| 5682 TONATIVE_VOID_INTERNAL(anyCallbackFunctionOptionalAnyArgArg, ScriptValue
(ScriptState::current(info.GetIsolate()), info[0])); | |
| 5683 } | |
| 5684 impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptiona
lAnyArgArg); | |
| 5685 } | |
| 5686 | |
| 5687 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | |
| 5688 { | |
| 5689 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5690 TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info
); | |
| 5691 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5692 } | |
| 5693 | |
| 5694 static void compareHowMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
| 5695 { | |
| 5696 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5697 v8SetReturnValue(info, impl->compareHowMethod()); | |
| 5698 } | |
| 5699 | |
| 5700 static void compareHowMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 5701 { | |
| 5702 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5703 TestObjectV8Internal::compareHowMethodMethod(info); | |
| 5704 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5705 } | |
| 5706 | |
| 5707 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 5708 { | |
| 5709 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5710 v8SetReturnValue(info, impl->anyMethod().v8Value()); | |
| 5711 } | |
| 5712 | |
| 5713 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 5714 { | |
| 5715 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5716 TestObjectV8Internal::anyMethodMethod(info); | |
| 5717 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5718 } | |
| 5719 | |
| 5720 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 5721 { | |
| 5722 if (UNLIKELY(info.Length() < 1)) { | |
| 5723 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodCompareHowArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | |
| 5724 return; | |
| 5725 } | |
| 5726 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5727 Range::CompareHow compareHowArg; | |
| 5728 { | |
| 5729 v8::TryCatch block; | |
| 5730 V8RethrowTryCatchScope rethrow(block); | |
| 5731 TONATIVE_VOID_INTERNAL(compareHowArg, static_cast<Range::CompareHow>(inf
o[0]->Int32Value())); | |
| 5732 } | |
| 5733 impl->voidMethodCompareHowArg(compareHowArg); | |
| 5734 } | |
| 5735 | |
| 5736 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 5737 { | |
| 5738 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5739 TestObjectV8Internal::voidMethodCompareHowArgMethod(info); | |
| 5740 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5741 } | |
| 5742 | |
| 5743 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 5744 { | |
| 5745 if (UNLIKELY(info.Length() < 1)) { | |
| 5746 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodEventTargetArg", "TestObject", 1, info.Length(), info.GetIsolate()), in
fo.GetIsolate()); | |
| 5747 return; | |
| 5748 } | |
| 5749 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5750 EventTarget* eventTargetArg; | |
| 5751 { | |
| 5752 v8::TryCatch block; | |
| 5753 V8RethrowTryCatchScope rethrow(block); | |
| 5754 TONATIVE_VOID_INTERNAL(eventTargetArg, V8DOMWrapper::isDOMWrapper(info[0
]) ? toWrapperTypeInfo(v8::Handle<v8::Object>::Cast(info[0]))->toEventTarget(v8:
:Handle<v8::Object>::Cast(info[0])) : 0); | |
| 5755 } | |
| 5756 impl->voidMethodEventTargetArg(eventTargetArg); | |
| 5757 } | |
| 5758 | |
| 5759 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 5760 { | |
| 5761 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5762 TestObjectV8Internal::voidMethodEventTargetArgMethod(info); | |
| 5763 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5764 } | |
| 5765 | |
| 5766 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
| 5767 { | |
| 5768 if (UNLIKELY(info.Length() < 1)) { | |
| 5769 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodAnyArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetIs
olate()); | |
| 5770 return; | |
| 5771 } | |
| 5772 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5773 ScriptValue anyArg; | |
| 5774 { | |
| 5775 v8::TryCatch block; | |
| 5776 V8RethrowTryCatchScope rethrow(block); | |
| 5777 TONATIVE_VOID_INTERNAL(anyArg, ScriptValue(ScriptState::current(info.Get
Isolate()), info[0])); | |
| 5778 } | |
| 5779 impl->voidMethodAnyArg(anyArg); | |
| 5780 } | |
| 5781 | |
| 5782 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 5783 { | |
| 5784 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5785 TestObjectV8Internal::voidMethodAnyArgMethod(info); | |
| 5786 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5787 } | |
| 5788 | |
| 5789 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 5790 { | |
| 5791 if (UNLIKELY(info.Length() < 1)) { | |
| 5792 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodAttrArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI
solate()); | |
| 5793 return; | |
| 5794 } | |
| 5795 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5796 Attr* attrArg; | |
| 5797 { | |
| 5798 v8::TryCatch block; | |
| 5799 V8RethrowTryCatchScope rethrow(block); | |
| 5800 TONATIVE_VOID_INTERNAL(attrArg, V8Attr::toImplWithTypeCheck(info.GetIsol
ate(), info[0])); | |
| 5801 } | |
| 5802 impl->voidMethodAttrArg(attrArg); | |
| 5803 } | |
| 5804 | |
| 5805 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 5806 { | |
| 5807 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5808 TestObjectV8Internal::voidMethodAttrArgMethod(info); | |
| 5809 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5810 } | |
| 5811 | |
| 5812 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
| 5813 { | |
| 5814 if (UNLIKELY(info.Length() < 1)) { | |
| 5815 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDocumentArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.
GetIsolate()); | |
| 5816 return; | |
| 5817 } | |
| 5818 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5819 Document* documentArg; | |
| 5820 { | |
| 5821 v8::TryCatch block; | |
| 5822 V8RethrowTryCatchScope rethrow(block); | |
| 5823 TONATIVE_VOID_INTERNAL(documentArg, V8Document::toImplWithTypeCheck(info
.GetIsolate(), info[0])); | |
| 5824 } | |
| 5825 impl->voidMethodDocumentArg(documentArg); | |
| 5826 } | |
| 5827 | |
| 5828 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 5829 { | |
| 5830 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5831 TestObjectV8Internal::voidMethodDocumentArgMethod(info); | |
| 5832 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5833 } | |
| 5834 | |
| 5835 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 5836 { | |
| 5837 if (UNLIKELY(info.Length() < 1)) { | |
| 5838 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDocumentTypeArg", "TestObject", 1, info.Length(), info.GetIsolate()), i
nfo.GetIsolate()); | |
| 5839 return; | |
| 5840 } | |
| 5841 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5842 DocumentType* documentTypeArg; | |
| 5843 { | |
| 5844 v8::TryCatch block; | |
| 5845 V8RethrowTryCatchScope rethrow(block); | |
| 5846 TONATIVE_VOID_INTERNAL(documentTypeArg, V8DocumentType::toImplWithTypeCh
eck(info.GetIsolate(), info[0])); | |
| 5847 } | |
| 5848 impl->voidMethodDocumentTypeArg(documentTypeArg); | |
| 5849 } | |
| 5850 | |
| 5851 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 5852 { | |
| 5853 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5854 TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info); | |
| 5855 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5856 } | |
| 5857 | |
| 5858 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
| 5859 { | |
| 5860 if (UNLIKELY(info.Length() < 1)) { | |
| 5861 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodElementArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); | |
| 5862 return; | |
| 5863 } | |
| 5864 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5865 Element* elementArg; | |
| 5866 { | |
| 5867 v8::TryCatch block; | |
| 5868 V8RethrowTryCatchScope rethrow(block); | |
| 5869 TONATIVE_VOID_INTERNAL(elementArg, V8Element::toImplWithTypeCheck(info.G
etIsolate(), info[0])); | |
| 5870 } | |
| 5871 impl->voidMethodElementArg(elementArg); | |
| 5872 } | |
| 5873 | |
| 5874 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 5875 { | |
| 5876 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5877 TestObjectV8Internal::voidMethodElementArgMethod(info); | |
| 5878 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5879 } | |
| 5880 | |
| 5881 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 5882 { | |
| 5883 if (UNLIKELY(info.Length() < 1)) { | |
| 5884 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodNodeArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI
solate()); | |
| 5885 return; | |
| 5886 } | |
| 5887 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5888 Node* nodeArg; | |
| 5889 { | |
| 5890 v8::TryCatch block; | |
| 5891 V8RethrowTryCatchScope rethrow(block); | |
| 5892 TONATIVE_VOID_INTERNAL(nodeArg, V8Node::toImplWithTypeCheck(info.GetIsol
ate(), info[0])); | |
| 5893 } | |
| 5894 impl->voidMethodNodeArg(nodeArg); | |
| 5895 } | |
| 5896 | |
| 5897 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 5898 { | |
| 5899 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5900 TestObjectV8Internal::voidMethodNodeArgMethod(info); | |
| 5901 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5902 } | |
| 5903 | |
| 5904 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 5905 { | |
| 5906 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5907 v8SetReturnValue(info, impl->arrayBufferMethod()); | |
| 5908 } | |
| 5909 | |
| 5910 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 5911 { | |
| 5912 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5913 TestObjectV8Internal::arrayBufferMethodMethod(info); | |
| 5914 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5915 } | |
| 5916 | |
| 5917 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
| 5918 { | |
| 5919 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5920 v8SetReturnValue(info, impl->arrayBufferViewMethod()); | |
| 5921 } | |
| 5922 | |
| 5923 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 5924 { | |
| 5925 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5926 TestObjectV8Internal::arrayBufferViewMethodMethod(info); | |
| 5927 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5928 } | |
| 5929 | |
| 5930 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 5931 { | |
| 5932 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5933 v8SetReturnValue(info, impl->float32ArrayMethod()); | |
| 5934 } | |
| 5935 | |
| 5936 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 5937 { | |
| 5938 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5939 TestObjectV8Internal::float32ArrayMethodMethod(info); | |
| 5940 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5941 } | |
| 5942 | |
| 5943 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
| 5944 { | |
| 5945 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5946 v8SetReturnValue(info, impl->int32ArrayMethod()); | |
| 5947 } | |
| 5948 | |
| 5949 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 5950 { | |
| 5951 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5952 TestObjectV8Internal::int32ArrayMethodMethod(info); | |
| 5953 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5954 } | |
| 5955 | |
| 5956 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
| 5957 { | |
| 5958 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5959 v8SetReturnValue(info, impl->uint8ArrayMethod()); | |
| 5960 } | |
| 5961 | |
| 5962 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 5963 { | |
| 5964 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5965 TestObjectV8Internal::uint8ArrayMethodMethod(info); | |
| 5966 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5967 } | |
| 5968 | |
| 5969 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 5970 { | |
| 5971 if (UNLIKELY(info.Length() < 1)) { | |
| 5972 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayBufferArg", "TestObject", 1, info.Length(), info.GetIsolate()), in
fo.GetIsolate()); | |
| 5973 return; | |
| 5974 } | |
| 5975 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5976 ArrayBuffer* arrayBufferArg; | |
| 5977 { | |
| 5978 v8::TryCatch block; | |
| 5979 V8RethrowTryCatchScope rethrow(block); | |
| 5980 TONATIVE_VOID_INTERNAL(arrayBufferArg, info[0]->IsArrayBuffer() ? V8Arra
yBuffer::toImpl(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0); | |
| 5981 } | |
| 5982 impl->voidMethodArrayBufferArg(arrayBufferArg); | |
| 5983 } | |
| 5984 | |
| 5985 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 5986 { | |
| 5987 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 5988 TestObjectV8Internal::voidMethodArrayBufferArgMethod(info); | |
| 5989 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 5990 } | |
| 5991 | |
| 5992 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
| 5993 { | |
| 5994 if (UNLIKELY(info.Length() < 1)) { | |
| 5995 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayBufferOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate(
)), info.GetIsolate()); | |
| 5996 return; | |
| 5997 } | |
| 5998 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 5999 ArrayBuffer* arrayBufferArg; | |
| 6000 { | |
| 6001 v8::TryCatch block; | |
| 6002 V8RethrowTryCatchScope rethrow(block); | |
| 6003 TONATIVE_VOID_INTERNAL(arrayBufferArg, info[0]->IsArrayBuffer() ? V8Arra
yBuffer::toImpl(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0); | |
| 6004 } | |
| 6005 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg); | |
| 6006 } | |
| 6007 | |
| 6008 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
| 6009 { | |
| 6010 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6011 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info); | |
| 6012 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6013 } | |
| 6014 | |
| 6015 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 6016 { | |
| 6017 if (UNLIKELY(info.Length() < 1)) { | |
| 6018 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayBufferViewArg", "TestObject", 1, info.Length(), info.GetIsolate())
, info.GetIsolate()); | |
| 6019 return; | |
| 6020 } | |
| 6021 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6022 ArrayBufferView* arrayBufferViewArg; | |
| 6023 { | |
| 6024 v8::TryCatch block; | |
| 6025 V8RethrowTryCatchScope rethrow(block); | |
| 6026 TONATIVE_VOID_INTERNAL(arrayBufferViewArg, info[0]->IsArrayBufferView()
? V8ArrayBufferView::toImpl(v8::Handle<v8::ArrayBufferView>::Cast(info[0])) : 0)
; | |
| 6027 } | |
| 6028 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg); | |
| 6029 } | |
| 6030 | |
| 6031 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
| 6032 { | |
| 6033 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6034 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info); | |
| 6035 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6036 } | |
| 6037 | |
| 6038 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 6039 { | |
| 6040 if (UNLIKELY(info.Length() < 1)) { | |
| 6041 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodFloat32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), i
nfo.GetIsolate()); | |
| 6042 return; | |
| 6043 } | |
| 6044 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6045 Float32Array* float32ArrayArg; | |
| 6046 { | |
| 6047 v8::TryCatch block; | |
| 6048 V8RethrowTryCatchScope rethrow(block); | |
| 6049 TONATIVE_VOID_INTERNAL(float32ArrayArg, info[0]->IsFloat32Array() ? V8Fl
oat32Array::toImpl(v8::Handle<v8::Float32Array>::Cast(info[0])) : 0); | |
| 6050 } | |
| 6051 impl->voidMethodFloat32ArrayArg(float32ArrayArg); | |
| 6052 } | |
| 6053 | |
| 6054 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 6055 { | |
| 6056 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6057 TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info); | |
| 6058 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6059 } | |
| 6060 | |
| 6061 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 6062 { | |
| 6063 if (UNLIKELY(info.Length() < 1)) { | |
| 6064 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodInt32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | |
| 6065 return; | |
| 6066 } | |
| 6067 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6068 Int32Array* int32ArrayArg; | |
| 6069 { | |
| 6070 v8::TryCatch block; | |
| 6071 V8RethrowTryCatchScope rethrow(block); | |
| 6072 TONATIVE_VOID_INTERNAL(int32ArrayArg, info[0]->IsInt32Array() ? V8Int32A
rray::toImpl(v8::Handle<v8::Int32Array>::Cast(info[0])) : 0); | |
| 6073 } | |
| 6074 impl->voidMethodInt32ArrayArg(int32ArrayArg); | |
| 6075 } | |
| 6076 | |
| 6077 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 6078 { | |
| 6079 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6080 TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info); | |
| 6081 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6082 } | |
| 6083 | |
| 6084 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 6085 { | |
| 6086 if (UNLIKELY(info.Length() < 1)) { | |
| 6087 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodUint8ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | |
| 6088 return; | |
| 6089 } | |
| 6090 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6091 Uint8Array* uint8ArrayArg; | |
| 6092 { | |
| 6093 v8::TryCatch block; | |
| 6094 V8RethrowTryCatchScope rethrow(block); | |
| 6095 TONATIVE_VOID_INTERNAL(uint8ArrayArg, info[0]->IsUint8Array() ? V8Uint8A
rray::toImpl(v8::Handle<v8::Uint8Array>::Cast(info[0])) : 0); | |
| 6096 } | |
| 6097 impl->voidMethodUint8ArrayArg(uint8ArrayArg); | |
| 6098 } | |
| 6099 | |
| 6100 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 6101 { | |
| 6102 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6103 TestObjectV8Internal::voidMethodUint8ArrayArgMethod(info); | |
| 6104 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6105 } | |
| 6106 | |
| 6107 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | |
| 6108 { | |
| 6109 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6110 v8SetReturnValue(info, v8Array(impl->longArrayMethod(), info.Holder(), info.
GetIsolate())); | |
| 6111 } | |
| 6112 | |
| 6113 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 6114 { | |
| 6115 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6116 TestObjectV8Internal::longArrayMethodMethod(info); | |
| 6117 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6118 } | |
| 6119 | |
| 6120 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 6121 { | |
| 6122 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6123 v8SetReturnValue(info, v8Array(impl->stringArrayMethod(), info.Holder(), inf
o.GetIsolate())); | |
| 6124 } | |
| 6125 | |
| 6126 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 6127 { | |
| 6128 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6129 TestObjectV8Internal::stringArrayMethodMethod(info); | |
| 6130 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6131 } | |
| 6132 | |
| 6133 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 6134 { | |
| 6135 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6136 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayMethod(), info.H
older(), info.GetIsolate())); | |
| 6137 } | |
| 6138 | |
| 6139 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
| 6140 { | |
| 6141 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6142 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info); | |
| 6143 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6144 } | |
| 6145 | |
| 6146 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
| 6147 { | |
| 6148 if (UNLIKELY(info.Length() < 1)) { | |
| 6149 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayLongArg", "TestObject", 1, info.Length(), info.GetIsolate()), info
.GetIsolate()); | |
| 6150 return; | |
| 6151 } | |
| 6152 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6153 Vector<int> arrayLongArg; | |
| 6154 { | |
| 6155 v8::TryCatch block; | |
| 6156 V8RethrowTryCatchScope rethrow(block); | |
| 6157 TONATIVE_VOID_INTERNAL(arrayLongArg, toImplArray<int>(info[0], 1, info.G
etIsolate())); | |
| 6158 } | |
| 6159 impl->voidMethodArrayLongArg(arrayLongArg); | |
| 6160 } | |
| 6161 | |
| 6162 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
| 6163 { | |
| 6164 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6165 TestObjectV8Internal::voidMethodArrayLongArgMethod(info); | |
| 6166 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6167 } | |
| 6168 | |
| 6169 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 6170 { | |
| 6171 if (UNLIKELY(info.Length() < 1)) { | |
| 6172 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayStringArg", "TestObject", 1, info.Length(), info.GetIsolate()), in
fo.GetIsolate()); | |
| 6173 return; | |
| 6174 } | |
| 6175 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6176 Vector<String> arrayStringArg; | |
| 6177 { | |
| 6178 v8::TryCatch block; | |
| 6179 V8RethrowTryCatchScope rethrow(block); | |
| 6180 TONATIVE_VOID_INTERNAL(arrayStringArg, toImplArray<String>(info[0], 1, i
nfo.GetIsolate())); | |
| 6181 } | |
| 6182 impl->voidMethodArrayStringArg(arrayStringArg); | |
| 6183 } | |
| 6184 | |
| 6185 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 6186 { | |
| 6187 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6188 TestObjectV8Internal::voidMethodArrayStringArgMethod(info); | |
| 6189 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6190 } | |
| 6191 | |
| 6192 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
| 6193 { | |
| 6194 if (UNLIKELY(info.Length() < 1)) { | |
| 6195 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIs
olate()), info.GetIsolate()); | |
| 6196 return; | |
| 6197 } | |
| 6198 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6199 Vector<RefPtr<TestInterfaceEmpty> > arrayTestInterfaceEmptyArg; | |
| 6200 { | |
| 6201 v8::TryCatch block; | |
| 6202 V8RethrowTryCatchScope rethrow(block); | |
| 6203 TONATIVE_VOID_INTERNAL(arrayTestInterfaceEmptyArg, (toRefPtrNativeArray<
TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))); | |
| 6204 } | |
| 6205 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); | |
| 6206 } | |
| 6207 | |
| 6208 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 6209 { | |
| 6210 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6211 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info); | |
| 6212 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6213 } | |
| 6214 | |
| 6215 static void longSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 6216 { | |
| 6217 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6218 v8SetReturnValue(info, v8Array(impl->longSequenceMethod(), info.Holder(), in
fo.GetIsolate())); | |
| 6219 } | |
| 6220 | |
| 6221 static void longSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 6222 { | |
| 6223 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6224 TestObjectV8Internal::longSequenceMethodMethod(info); | |
| 6225 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6226 } | |
| 6227 | |
| 6228 static void stringSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
| 6229 { | |
| 6230 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6231 v8SetReturnValue(info, v8Array(impl->stringSequenceMethod(), info.Holder(),
info.GetIsolate())); | |
| 6232 } | |
| 6233 | |
| 6234 static void stringSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 6235 { | |
| 6236 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6237 TestObjectV8Internal::stringSequenceMethodMethod(info); | |
| 6238 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6239 } | |
| 6240 | |
| 6241 static void testInterfaceEmptySequenceMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 6242 { | |
| 6243 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6244 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptySequenceMethod(), inf
o.Holder(), info.GetIsolate())); | |
| 6245 } | |
| 6246 | |
| 6247 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
| 6248 { | |
| 6249 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6250 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info); | |
| 6251 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6252 } | |
| 6253 | |
| 6254 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 6255 { | |
| 6256 if (UNLIKELY(info.Length() < 1)) { | |
| 6257 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodSequenceLongArg", "TestObject", 1, info.Length(), info.GetIsolate()), i
nfo.GetIsolate()); | |
| 6258 return; | |
| 6259 } | |
| 6260 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6261 Vector<int> longSequenceArg; | |
| 6262 { | |
| 6263 v8::TryCatch block; | |
| 6264 V8RethrowTryCatchScope rethrow(block); | |
| 6265 TONATIVE_VOID_INTERNAL(longSequenceArg, toImplArray<int>(info[0], 1, inf
o.GetIsolate())); | |
| 6266 } | |
| 6267 impl->voidMethodSequenceLongArg(longSequenceArg); | |
| 6268 } | |
| 6269 | |
| 6270 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 6271 { | |
| 6272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6273 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info); | |
| 6274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6275 } | |
| 6276 | |
| 6277 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 6278 { | |
| 6279 if (UNLIKELY(info.Length() < 1)) { | |
| 6280 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodSequenceStringArg", "TestObject", 1, info.Length(), info.GetIsolate()),
info.GetIsolate()); | |
| 6281 return; | |
| 6282 } | |
| 6283 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6284 Vector<String> stringSequenceArg; | |
| 6285 { | |
| 6286 v8::TryCatch block; | |
| 6287 V8RethrowTryCatchScope rethrow(block); | |
| 6288 TONATIVE_VOID_INTERNAL(stringSequenceArg, toImplArray<String>(info[0], 1
, info.GetIsolate())); | |
| 6289 } | |
| 6290 impl->voidMethodSequenceStringArg(stringSequenceArg); | |
| 6291 } | |
| 6292 | |
| 6293 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 6294 { | |
| 6295 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6296 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info); | |
| 6297 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6298 } | |
| 6299 | |
| 6300 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 6301 { | |
| 6302 if (UNLIKELY(info.Length() < 1)) { | |
| 6303 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodSequenceTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.Ge
tIsolate()), info.GetIsolate()); | |
| 6304 return; | |
| 6305 } | |
| 6306 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6307 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptySequenceArg; | |
| 6308 { | |
| 6309 v8::TryCatch block; | |
| 6310 V8RethrowTryCatchScope rethrow(block); | |
| 6311 TONATIVE_VOID_INTERNAL(testInterfaceEmptySequenceArg, (toRefPtrNativeArr
ay<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))); | |
| 6312 } | |
| 6313 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg)
; | |
| 6314 } | |
| 6315 | |
| 6316 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 6317 { | |
| 6318 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6319 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info); | |
| 6320 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6321 } | |
| 6322 | |
| 6323 static void nullableLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 6324 { | |
| 6325 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6326 Nullable<int> result = impl->nullableLongMethod(); | |
| 6327 if (result.isNull()) | |
| 6328 v8SetReturnValueNull(info); | |
| 6329 else | |
| 6330 v8SetReturnValueInt(info, result.get()); | |
| 6331 } | |
| 6332 | |
| 6333 static void nullableLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 6334 { | |
| 6335 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6336 TestObjectV8Internal::nullableLongMethodMethod(info); | |
| 6337 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6338 } | |
| 6339 | |
| 6340 static void nullableStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
| 6341 { | |
| 6342 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6343 v8SetReturnValueStringOrNull(info, impl->nullableStringMethod(), info.GetIso
late()); | |
| 6344 } | |
| 6345 | |
| 6346 static void nullableStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 6347 { | |
| 6348 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6349 TestObjectV8Internal::nullableStringMethodMethod(info); | |
| 6350 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6351 } | |
| 6352 | |
| 6353 static void nullableTestInterfaceMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 6354 { | |
| 6355 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6356 v8SetReturnValue(info, impl->nullableTestInterfaceMethod()); | |
| 6357 } | |
| 6358 | |
| 6359 static void nullableTestInterfaceMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 6360 { | |
| 6361 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6362 TestObjectV8Internal::nullableTestInterfaceMethodMethod(info); | |
| 6363 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6364 } | |
| 6365 | |
| 6366 static void nullableLongSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 6367 { | |
| 6368 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6369 Nullable<Vector<int> > result = impl->nullableLongSequenceMethod(); | |
| 6370 if (result.isNull()) | |
| 6371 v8SetReturnValueNull(info); | |
| 6372 else | |
| 6373 v8SetReturnValue(info, v8Array(result.get(), info.Holder(), info.GetIsol
ate())); | |
| 6374 } | |
| 6375 | |
| 6376 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 6377 { | |
| 6378 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6379 TestObjectV8Internal::nullableLongSequenceMethodMethod(info); | |
| 6380 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6381 } | |
| 6382 | |
| 6383 static void testInterfaceGarbageCollectedOrDOMStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 6384 { | |
| 6385 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6386 RawPtr<TestInterfaceGarbageCollected> result0 = nullptr; | |
| 6387 String result1; | |
| 6388 impl->testInterfaceGarbageCollectedOrDOMStringMethod(result0, result1); | |
| 6389 if (result0) { | |
| 6390 v8SetReturnValue(info, result0.release()); | |
| 6391 return; | |
| 6392 } | |
| 6393 if (!result1.isNull()) { | |
| 6394 v8SetReturnValueString(info, result1, info.GetIsolate()); | |
| 6395 return; | |
| 6396 } | |
| 6397 v8SetReturnValueNull(info); | |
| 6398 } | |
| 6399 | |
| 6400 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | |
| 6401 { | |
| 6402 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6403 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i
nfo); | |
| 6404 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6405 } | |
| 6406 | |
| 6407 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | |
| 6408 { | |
| 6409 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6410 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result0 = nullptr; | |
| 6411 TestDictionary* result1 = nullptr; | |
| 6412 impl->testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(result0, res
ult1); | |
| 6413 if (result0) { | |
| 6414 v8SetReturnValue(info, result0.release()); | |
| 6415 return; | |
| 6416 } | |
| 6417 if (result1) { | |
| 6418 v8SetReturnValue(info, result1); | |
| 6419 return; | |
| 6420 } | |
| 6421 v8SetReturnValueNull(info); | |
| 6422 } | |
| 6423 | |
| 6424 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 6425 { | |
| 6426 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6427 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMet
hodMethod(info); | |
| 6428 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6429 } | |
| 6430 | |
| 6431 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | |
| 6432 { | |
| 6433 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6434 Nullable<Vector<int> > result0; | |
| 6435 Nullable<Vector<String> > result1; | |
| 6436 Nullable<double> result2; | |
| 6437 impl->longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod(result0, result
1, result2); | |
| 6438 if (result0) { | |
| 6439 v8SetReturnValue(info, v8Array(result0.get(), info.Holder(), info.GetIso
late())); | |
| 6440 return; | |
| 6441 } | |
| 6442 if (result1) { | |
| 6443 v8SetReturnValue(info, v8Array(result1.get(), info.Holder(), info.GetIso
late())); | |
| 6444 return; | |
| 6445 } | |
| 6446 if (result2) { | |
| 6447 v8SetReturnValue(info, result2.get()); | |
| 6448 return; | |
| 6449 } | |
| 6450 v8SetReturnValueNull(info); | |
| 6451 } | |
| 6452 | |
| 6453 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 6454 { | |
| 6455 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6456 TestObjectV8Internal::longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod
Method(info); | |
| 6457 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6458 } | |
| 6459 | |
| 6460 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
| 6461 { | |
| 6462 if (UNLIKELY(info.Length() < 1)) { | |
| 6463 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetI
solate()), info.GetIsolate()); | |
| 6464 return; | |
| 6465 } | |
| 6466 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6467 TestInterfaceEmpty* nullableTestInterfaceEmptyArg; | |
| 6468 { | |
| 6469 v8::TryCatch block; | |
| 6470 V8RethrowTryCatchScope rethrow(block); | |
| 6471 TONATIVE_VOID_INTERNAL(nullableTestInterfaceEmptyArg, V8TestInterfaceEmp
ty::toImplWithTypeCheck(info.GetIsolate(), info[0])); | |
| 6472 } | |
| 6473 impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg); | |
| 6474 } | |
| 6475 | |
| 6476 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
| 6477 { | |
| 6478 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6479 TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info); | |
| 6480 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6481 } | |
| 6482 | |
| 6483 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 6484 { | |
| 6485 if (UNLIKELY(info.Length() < 1)) { | |
| 6486 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Length(), info.GetIsol
ate()), info.GetIsolate()); | |
| 6487 return; | |
| 6488 } | |
| 6489 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6490 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; | |
| 6491 { | |
| 6492 if (info.Length() <= 0 || !info[0]->IsFunction()) { | |
| 6493 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as pa
rameter 1 is not a function."), info.GetIsolate()); | |
| 6494 return; | |
| 6495 } | |
| 6496 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | |
| 6497 } | |
| 6498 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release())
; | |
| 6499 } | |
| 6500 | |
| 6501 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
| 6502 { | |
| 6503 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6504 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); | |
| 6505 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6506 } | |
| 6507 | |
| 6508 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
| 6509 { | |
| 6510 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6511 OwnPtrWillBeRawPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg =
nullptr;; | |
| 6512 { | |
| 6513 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | |
| 6514 if (!info[0]->IsFunction()) { | |
| 6515 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback pr
ovided as parameter 1 is not a function."), info.GetIsolate()); | |
| 6516 return; | |
| 6517 } | |
| 6518 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; | |
| 6519 } | |
| 6520 } | |
| 6521 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa
ceArg.release()); | |
| 6522 } | |
| 6523 | |
| 6524 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | |
| 6525 { | |
| 6526 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6527 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info)
; | |
| 6528 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6529 } | |
| 6530 | |
| 6531 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
| 6532 { | |
| 6533 if (UNLIKELY(info.Length() < 1)) { | |
| 6534 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, info.Length(), info.G
etIsolate()), info.GetIsolate()); | |
| 6535 return; | |
| 6536 } | |
| 6537 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6538 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; | |
| 6539 { | |
| 6540 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull()))
{ | |
| 6541 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided
as parameter 1 is not a function."), info.GetIsolate()); | |
| 6542 return; | |
| 6543 } | |
| 6544 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI
nterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(i
nfo.GetIsolate())); | |
| 6545 } | |
| 6546 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg.rele
ase()); | |
| 6547 } | |
| 6548 | |
| 6549 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | |
| 6550 { | |
| 6551 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6552 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info); | |
| 6553 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6554 } | |
| 6555 | |
| 6556 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) | |
| 6557 { | |
| 6558 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6559 v8SetReturnValueString(info, impl->testEnumMethod(), info.GetIsolate()); | |
| 6560 } | |
| 6561 | |
| 6562 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
| 6563 { | |
| 6564 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6565 TestObjectV8Internal::testEnumMethodMethod(info); | |
| 6566 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6567 } | |
| 6568 | |
| 6569 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
| 6570 { | |
| 6571 if (UNLIKELY(info.Length() < 1)) { | |
| 6572 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestEnumArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.
GetIsolate()); | |
| 6573 return; | |
| 6574 } | |
| 6575 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6576 V8StringResource<> testEnumTypeArg; | |
| 6577 { | |
| 6578 TOSTRING_VOID_INTERNAL(testEnumTypeArg, info[0]); | |
| 6579 String string = testEnumTypeArg; | |
| 6580 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" |
| string == "EnumValue3")) { | |
| 6581 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestEnumArg", "TestObject", "parameter 1 ('" + string + "') is not a
valid enum value."), info.GetIsolate()); | |
| 6582 return; | |
| 6583 } | |
| 6584 } | |
| 6585 impl->voidMethodTestEnumArg(testEnumTypeArg); | |
| 6586 } | |
| 6587 | |
| 6588 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 6589 { | |
| 6590 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6591 TestObjectV8Internal::voidMethodTestEnumArgMethod(info); | |
| 6592 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6593 } | |
| 6594 | |
| 6595 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
| 6596 { | |
| 6597 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6598 v8SetReturnValue(info, impl->dictionaryMethod()); | |
| 6599 } | |
| 6600 | |
| 6601 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 6602 { | |
| 6603 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6604 TestObjectV8Internal::dictionaryMethodMethod(info); | |
| 6605 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6606 } | |
| 6607 | |
| 6608 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
| 6609 { | |
| 6610 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6611 v8SetReturnValue(info, impl->nodeFilterMethod()); | |
| 6612 } | |
| 6613 | |
| 6614 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 6615 { | |
| 6616 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6617 TestObjectV8Internal::nodeFilterMethodMethod(info); | |
| 6618 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6619 } | |
| 6620 | |
| 6621 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 6622 { | |
| 6623 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth
od", "TestObject", info.Holder(), info.GetIsolate()); | |
| 6624 if (UNLIKELY(info.Length() < 3)) { | |
| 6625 setMinimumArityTypeError(exceptionState, 3, info.Length()); | |
| 6626 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); | |
| 6627 return; | |
| 6628 } | |
| 6629 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6630 int arg1; | |
| 6631 Dictionary arg2; | |
| 6632 V8StringResource<> arg3; | |
| 6633 Vector<String> variadic; | |
| 6634 { | |
| 6635 v8::TryCatch block; | |
| 6636 V8RethrowTryCatchScope rethrow(block); | |
| 6637 TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg1, toInt32(info[0], exc
eptionState), exceptionState, info, ScriptState::current(info.GetIsolate())); | |
| 6638 TONATIVE_VOID_PROMISE_INTERNAL(arg2, Dictionary(info[1], info.GetIsolate
()), info); | |
| 6639 if (!arg2.isUndefinedOrNull() && !arg2.isObject()) { | |
| 6640 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object
."); | |
| 6641 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in
fo.GetIsolate())).v8Value()); | |
| 6642 return; | |
| 6643 } | |
| 6644 TOSTRING_VOID_PROMISE_INTERNAL(arg3, info[2], info); | |
| 6645 TONATIVE_VOID_PROMISE_INTERNAL(variadic, toImplArguments<String>(info, 3
), info); | |
| 6646 } | |
| 6647 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val
ue()); | |
| 6648 } | |
| 6649 | |
| 6650 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
| 6651 { | |
| 6652 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6653 TestObjectV8Internal::promiseMethodMethod(info); | |
| 6654 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6655 } | |
| 6656 | |
| 6657 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 6658 { | |
| 6659 if (UNLIKELY(info.Length() < 1)) { | |
| 6660 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), creat
eMinimumArityTypeErrorForMethod("promiseMethodWithoutExceptionState", "TestObjec
t", 1, info.Length(), info.GetIsolate()))); | |
| 6661 return; | |
| 6662 } | |
| 6663 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6664 Dictionary arg1; | |
| 6665 { | |
| 6666 v8::TryCatch block; | |
| 6667 V8RethrowTryCatchScope rethrow(block); | |
| 6668 TONATIVE_VOID_PROMISE_INTERNAL(arg1, Dictionary(info[0], info.GetIsolate
()), info); | |
| 6669 if (!arg1.isUndefinedOrNull() && !arg1.isObject()) { | |
| 6670 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V
8ThrowException::createTypeError(ExceptionMessages::failedToExecute("promiseMeth
odWithoutExceptionState", "TestObject", "parameter 1 ('arg1') is not an object."
), info.GetIsolate()))); | |
| 6671 return; | |
| 6672 } | |
| 6673 } | |
| 6674 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu
e()); | |
| 6675 } | |
| 6676 | |
| 6677 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
| 6678 { | |
| 6679 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6680 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); | |
| 6681 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6682 } | |
| 6683 | |
| 6684 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 6685 { | |
| 6686 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6687 v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serialize
dScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIso
late()))); | |
| 6688 } | |
| 6689 | |
| 6690 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 6691 { | |
| 6692 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6693 TestObjectV8Internal::serializedScriptValueMethodMethod(info); | |
| 6694 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6695 } | |
| 6696 | |
| 6697 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
| 6698 { | |
| 6699 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6700 v8SetReturnValue(info, impl->xPathNSResolverMethod()); | |
| 6701 } | |
| 6702 | |
| 6703 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 6704 { | |
| 6705 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6706 TestObjectV8Internal::xPathNSResolverMethodMethod(info); | |
| 6707 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6708 } | |
| 6709 | |
| 6710 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 6711 { | |
| 6712 if (UNLIKELY(info.Length() < 1)) { | |
| 6713 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDictionaryArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | |
| 6714 return; | |
| 6715 } | |
| 6716 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6717 Dictionary dictionaryArg; | |
| 6718 { | |
| 6719 v8::TryCatch block; | |
| 6720 V8RethrowTryCatchScope rethrow(block); | |
| 6721 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); | |
| 6722 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | |
| 6723 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not a
n object."), info.GetIsolate()); | |
| 6724 return; | |
| 6725 } | |
| 6726 } | |
| 6727 impl->voidMethodDictionaryArg(dictionaryArg); | |
| 6728 } | |
| 6729 | |
| 6730 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 6731 { | |
| 6732 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6733 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); | |
| 6734 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6735 } | |
| 6736 | |
| 6737 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 6738 { | |
| 6739 if (UNLIKELY(info.Length() < 1)) { | |
| 6740 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodNodeFilterArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | |
| 6741 return; | |
| 6742 } | |
| 6743 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6744 RefPtrWillBeRawPtr<NodeFilter> nodeFilterArg; | |
| 6745 { | |
| 6746 v8::TryCatch block; | |
| 6747 V8RethrowTryCatchScope rethrow(block); | |
| 6748 TONATIVE_VOID_INTERNAL(nodeFilterArg, toNodeFilter(info[0], info.Holder(
), ScriptState::current(info.GetIsolate()))); | |
| 6749 } | |
| 6750 impl->voidMethodNodeFilterArg(nodeFilterArg.release()); | |
| 6751 } | |
| 6752 | |
| 6753 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 6754 { | |
| 6755 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6756 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info); | |
| 6757 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6758 } | |
| 6759 | |
| 6760 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
| 6761 { | |
| 6762 if (UNLIKELY(info.Length() < 1)) { | |
| 6763 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodPromiseArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); | |
| 6764 return; | |
| 6765 } | |
| 6766 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6767 ScriptPromise promiseArg; | |
| 6768 { | |
| 6769 v8::TryCatch block; | |
| 6770 V8RethrowTryCatchScope rethrow(block); | |
| 6771 TONATIVE_VOID_INTERNAL(promiseArg, ScriptPromise::cast(ScriptState::curr
ent(info.GetIsolate()), info[0])); | |
| 6772 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) { | |
| 6773 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an obje
ct."), info.GetIsolate()); | |
| 6774 return; | |
| 6775 } | |
| 6776 } | |
| 6777 impl->voidMethodPromiseArg(promiseArg); | |
| 6778 } | |
| 6779 | |
| 6780 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 6781 { | |
| 6782 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6783 TestObjectV8Internal::voidMethodPromiseArgMethod(info); | |
| 6784 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6785 } | |
| 6786 | |
| 6787 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 6788 { | |
| 6789 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 6790 if (UNLIKELY(info.Length() < 1)) { | |
| 6791 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 6792 exceptionState.throwIfNeeded(); | |
| 6793 return; | |
| 6794 } | |
| 6795 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6796 RefPtr<SerializedScriptValue> serializedScriptValueArg; | |
| 6797 { | |
| 6798 serializedScriptValueArg = SerializedScriptValue::create(info[0], 0, 0,
exceptionState, info.GetIsolate()); | |
| 6799 if (exceptionState.hadException()) { | |
| 6800 exceptionState.throwIfNeeded(); | |
| 6801 return; | |
| 6802 } | |
| 6803 } | |
| 6804 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); | |
| 6805 } | |
| 6806 | |
| 6807 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
| 6808 { | |
| 6809 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6810 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); | |
| 6811 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6812 } | |
| 6813 | |
| 6814 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 6815 { | |
| 6816 if (UNLIKELY(info.Length() < 1)) { | |
| 6817 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodXPathNSResolverArg", "TestObject", 1, info.Length(), info.GetIsolate())
, info.GetIsolate()); | |
| 6818 return; | |
| 6819 } | |
| 6820 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6821 RefPtrWillBeRawPtr<XPathNSResolver> xPathNSResolverArg; | |
| 6822 { | |
| 6823 v8::TryCatch block; | |
| 6824 V8RethrowTryCatchScope rethrow(block); | |
| 6825 TONATIVE_VOID_INTERNAL(xPathNSResolverArg, toXPathNSResolver(info[0], in
fo.GetIsolate())); | |
| 6826 } | |
| 6827 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg.release()); | |
| 6828 } | |
| 6829 | |
| 6830 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
| 6831 { | |
| 6832 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6833 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); | |
| 6834 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6835 } | |
| 6836 | |
| 6837 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 6838 { | |
| 6839 if (UNLIKELY(info.Length() < 1)) { | |
| 6840 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDictionarySequenceArg", "TestObject", 1, info.Length(), info.GetIsolate
()), info.GetIsolate()); | |
| 6841 return; | |
| 6842 } | |
| 6843 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6844 Vector<Dictionary> dictionarySequenceArg; | |
| 6845 { | |
| 6846 v8::TryCatch block; | |
| 6847 V8RethrowTryCatchScope rethrow(block); | |
| 6848 TONATIVE_VOID_INTERNAL(dictionarySequenceArg, toImplArray<Dictionary>(in
fo[0], 1, info.GetIsolate())); | |
| 6849 } | |
| 6850 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg); | |
| 6851 } | |
| 6852 | |
| 6853 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 6854 { | |
| 6855 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6856 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info); | |
| 6857 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6858 } | |
| 6859 | |
| 6860 static void overloadedPromiseMethod1Method(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 6861 { | |
| 6862 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
romiseMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 6863 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6864 int arg; | |
| 6865 { | |
| 6866 v8::TryCatch block; | |
| 6867 V8RethrowTryCatchScope rethrow(block); | |
| 6868 TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg, toInt32(info[0], exce
ptionState), exceptionState, info, ScriptState::current(info.GetIsolate())); | |
| 6869 } | |
| 6870 v8SetReturnValue(info, impl->overloadedPromiseMethod(arg).v8Value()); | |
| 6871 } | |
| 6872 | |
| 6873 static void overloadedPromiseMethod2Method(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 6874 { | |
| 6875 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6876 V8StringResource<> arg; | |
| 6877 { | |
| 6878 v8::TryCatch block; | |
| 6879 V8RethrowTryCatchScope rethrow(block); | |
| 6880 TOSTRING_VOID_PROMISE_INTERNAL(arg, info[0], info); | |
| 6881 } | |
| 6882 v8SetReturnValue(info, impl->overloadedPromiseMethod(arg).v8Value()); | |
| 6883 } | |
| 6884 | |
| 6885 static void overloadedPromiseMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 6886 { | |
| 6887 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
romiseMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 6888 switch (std::min(1, info.Length())) { | |
| 6889 case 1: | |
| 6890 if (info[0]->IsNumber()) { | |
| 6891 overloadedPromiseMethod1Method(info); | |
| 6892 return; | |
| 6893 } | |
| 6894 if (true) { | |
| 6895 overloadedPromiseMethod2Method(info); | |
| 6896 return; | |
| 6897 } | |
| 6898 if (true) { | |
| 6899 overloadedPromiseMethod1Method(info); | |
| 6900 return; | |
| 6901 } | |
| 6902 break; | |
| 6903 default: | |
| 6904 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 6905 exceptionState.throwIfNeeded(); | |
| 6906 return; | |
| 6907 } | |
| 6908 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 6909 exceptionState.throwIfNeeded(); | |
| 6910 } | |
| 6911 | |
| 6912 static void overloadedPromiseMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 6913 { | |
| 6914 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6915 TestObjectV8Internal::overloadedPromiseMethodMethod(info); | |
| 6916 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6917 } | |
| 6918 | |
| 6919 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 6920 { | |
| 6921 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
tringArgLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 6922 if (UNLIKELY(info.Length() < 2)) { | |
| 6923 setMinimumArityTypeError(exceptionState, 2, info.Length()); | |
| 6924 exceptionState.throwIfNeeded(); | |
| 6925 return; | |
| 6926 } | |
| 6927 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6928 V8StringResource<> stringArg; | |
| 6929 int longArg; | |
| 6930 { | |
| 6931 v8::TryCatch block; | |
| 6932 V8RethrowTryCatchScope rethrow(block); | |
| 6933 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | |
| 6934 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | |
| 6935 } | |
| 6936 impl->voidMethodStringArgLongArg(stringArg, longArg); | |
| 6937 } | |
| 6938 | |
| 6939 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 6940 { | |
| 6941 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6942 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info); | |
| 6943 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6944 } | |
| 6945 | |
| 6946 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 6947 { | |
| 6948 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6949 V8StringResource<> optionalStringArg; | |
| 6950 { | |
| 6951 if (UNLIKELY(info.Length() <= 0)) { | |
| 6952 impl->voidMethodOptionalStringArg(); | |
| 6953 return; | |
| 6954 } | |
| 6955 TOSTRING_VOID_INTERNAL(optionalStringArg, info[0]); | |
| 6956 } | |
| 6957 impl->voidMethodOptionalStringArg(optionalStringArg); | |
| 6958 } | |
| 6959 | |
| 6960 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 6961 { | |
| 6962 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6963 TestObjectV8Internal::voidMethodOptionalStringArgMethod(info); | |
| 6964 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6965 } | |
| 6966 | |
| 6967 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 6968 { | |
| 6969 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6970 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; | |
| 6971 { | |
| 6972 v8::TryCatch block; | |
| 6973 V8RethrowTryCatchScope rethrow(block); | |
| 6974 if (UNLIKELY(info.Length() <= 0)) { | |
| 6975 impl->voidMethodOptionalTestInterfaceEmptyArg(); | |
| 6976 return; | |
| 6977 } | |
| 6978 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp
ty::toImplWithTypeCheck(info.GetIsolate(), info[0])); | |
| 6979 } | |
| 6980 impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg)
; | |
| 6981 } | |
| 6982 | |
| 6983 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 6984 { | |
| 6985 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 6986 TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info); | |
| 6987 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 6988 } | |
| 6989 | |
| 6990 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 6991 { | |
| 6992 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 6993 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 6994 int optionalLongArg; | |
| 6995 { | |
| 6996 v8::TryCatch block; | |
| 6997 V8RethrowTryCatchScope rethrow(block); | |
| 6998 if (UNLIKELY(info.Length() <= 0)) { | |
| 6999 impl->voidMethodOptionalLongArg(); | |
| 7000 return; | |
| 7001 } | |
| 7002 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | |
| 7003 } | |
| 7004 impl->voidMethodOptionalLongArg(optionalLongArg); | |
| 7005 } | |
| 7006 | |
| 7007 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 7008 { | |
| 7009 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7010 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info); | |
| 7011 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7012 } | |
| 7013 | |
| 7014 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 7015 { | |
| 7016 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7017 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7018 int optionalLongArg; | |
| 7019 { | |
| 7020 v8::TryCatch block; | |
| 7021 V8RethrowTryCatchScope rethrow(block); | |
| 7022 if (UNLIKELY(info.Length() <= 0)) { | |
| 7023 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), in
fo.GetIsolate()); | |
| 7024 return; | |
| 7025 } | |
| 7026 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | |
| 7027 } | |
| 7028 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongA
rg), info.GetIsolate()); | |
| 7029 } | |
| 7030 | |
| 7031 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 7032 { | |
| 7033 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7034 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info); | |
| 7035 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7036 } | |
| 7037 | |
| 7038 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 7039 { | |
| 7040 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfa
ceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7041 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7042 int optionalLongArg; | |
| 7043 { | |
| 7044 v8::TryCatch block; | |
| 7045 V8RethrowTryCatchScope rethrow(block); | |
| 7046 if (UNLIKELY(info.Length() <= 0)) { | |
| 7047 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg
()); | |
| 7048 return; | |
| 7049 } | |
| 7050 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | |
| 7051 } | |
| 7052 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optiona
lLongArg)); | |
| 7053 } | |
| 7054 | |
| 7055 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 7056 { | |
| 7057 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7058 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info); | |
| 7059 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7060 } | |
| 7061 | |
| 7062 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 7063 { | |
| 7064 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7065 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7066 int optionalLongArg; | |
| 7067 { | |
| 7068 v8::TryCatch block; | |
| 7069 V8RethrowTryCatchScope rethrow(block); | |
| 7070 if (UNLIKELY(info.Length() <= 0)) { | |
| 7071 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg()); | |
| 7072 return; | |
| 7073 } | |
| 7074 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | |
| 7075 } | |
| 7076 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg)); | |
| 7077 } | |
| 7078 | |
| 7079 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 7080 { | |
| 7081 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7082 TestObjectV8Internal::longMethodOptionalLongArgMethod(info); | |
| 7083 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7084 } | |
| 7085 | |
| 7086 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 7087 { | |
| 7088 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7089 if (UNLIKELY(info.Length() < 1)) { | |
| 7090 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 7091 exceptionState.throwIfNeeded(); | |
| 7092 return; | |
| 7093 } | |
| 7094 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7095 int longArg; | |
| 7096 int optionalLongArg; | |
| 7097 { | |
| 7098 v8::TryCatch block; | |
| 7099 V8RethrowTryCatchScope rethrow(block); | |
| 7100 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 7101 if (UNLIKELY(info.Length() <= 1)) { | |
| 7102 impl->voidMethodLongArgOptionalLongArg(longArg); | |
| 7103 return; | |
| 7104 } | |
| 7105 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[1],
exceptionState), exceptionState); | |
| 7106 } | |
| 7107 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg); | |
| 7108 } | |
| 7109 | |
| 7110 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
| 7111 { | |
| 7112 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7113 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info); | |
| 7114 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7115 } | |
| 7116 | |
| 7117 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 7118 { | |
| 7119 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol
ate()); | |
| 7120 if (UNLIKELY(info.Length() < 1)) { | |
| 7121 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 7122 exceptionState.throwIfNeeded(); | |
| 7123 return; | |
| 7124 } | |
| 7125 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7126 int longArg; | |
| 7127 int optionalLongArg1; | |
| 7128 int optionalLongArg2; | |
| 7129 { | |
| 7130 v8::TryCatch block; | |
| 7131 V8RethrowTryCatchScope rethrow(block); | |
| 7132 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 7133 if (UNLIKELY(info.Length() <= 1)) { | |
| 7134 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg); | |
| 7135 return; | |
| 7136 } | |
| 7137 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg1, toInt32(info[1],
exceptionState), exceptionState); | |
| 7138 if (UNLIKELY(info.Length() <= 2)) { | |
| 7139 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optio
nalLongArg1); | |
| 7140 return; | |
| 7141 } | |
| 7142 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg2, toInt32(info[2],
exceptionState), exceptionState); | |
| 7143 } | |
| 7144 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongA
rg1, optionalLongArg2); | |
| 7145 } | |
| 7146 | |
| 7147 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 7148 { | |
| 7149 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7150 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(
info); | |
| 7151 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7152 } | |
| 7153 | |
| 7154 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 7155 { | |
| 7156 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola
te()); | |
| 7157 if (UNLIKELY(info.Length() < 1)) { | |
| 7158 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 7159 exceptionState.throwIfNeeded(); | |
| 7160 return; | |
| 7161 } | |
| 7162 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7163 int longArg; | |
| 7164 TestInterfaceEmpty* optionalTestInterfaceEmpty; | |
| 7165 { | |
| 7166 v8::TryCatch block; | |
| 7167 V8RethrowTryCatchScope rethrow(block); | |
| 7168 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 7169 if (UNLIKELY(info.Length() <= 1)) { | |
| 7170 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); | |
| 7171 return; | |
| 7172 } | |
| 7173 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty:
:toImplWithTypeCheck(info.GetIsolate(), info[1])); | |
| 7174 } | |
| 7175 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn
terfaceEmpty); | |
| 7176 } | |
| 7177 | |
| 7178 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | |
| 7179 { | |
| 7180 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7181 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i
nfo); | |
| 7182 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7183 } | |
| 7184 | |
| 7185 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 7186 { | |
| 7187 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola
te()); | |
| 7188 if (UNLIKELY(info.Length() < 1)) { | |
| 7189 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 7190 exceptionState.throwIfNeeded(); | |
| 7191 return; | |
| 7192 } | |
| 7193 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7194 TestInterfaceEmpty* optionalTestInterfaceEmpty; | |
| 7195 int longArg; | |
| 7196 { | |
| 7197 v8::TryCatch block; | |
| 7198 V8RethrowTryCatchScope rethrow(block); | |
| 7199 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty:
:toImplWithTypeCheck(info.GetIsolate(), info[0])); | |
| 7200 if (UNLIKELY(info.Length() <= 1)) { | |
| 7201 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInt
erfaceEmpty); | |
| 7202 return; | |
| 7203 } | |
| 7204 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | |
| 7205 } | |
| 7206 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm
pty, longArg); | |
| 7207 } | |
| 7208 | |
| 7209 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | |
| 7210 { | |
| 7211 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7212 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i
nfo); | |
| 7213 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7214 } | |
| 7215 | |
| 7216 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 7217 { | |
| 7218 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7219 Dictionary optionalDictionaryArg; | |
| 7220 { | |
| 7221 v8::TryCatch block; | |
| 7222 V8RethrowTryCatchScope rethrow(block); | |
| 7223 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[0], info.G
etIsolate())); | |
| 7224 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg
.isObject()) { | |
| 7225 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictiona
ryArg') is not an object."), info.GetIsolate()); | |
| 7226 return; | |
| 7227 } | |
| 7228 } | |
| 7229 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); | |
| 7230 } | |
| 7231 | |
| 7232 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 7233 { | |
| 7234 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7235 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); | |
| 7236 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7237 } | |
| 7238 | |
| 7239 static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
| 7240 { | |
| 7241 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7242 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7243 V8StringResource<> defaultByteStringArg; | |
| 7244 { | |
| 7245 v8::TryCatch block; | |
| 7246 V8RethrowTryCatchScope rethrow(block); | |
| 7247 if (!info[0]->IsUndefined()) { | |
| 7248 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultByteStringArg, toByteSt
ring(info[0], exceptionState), exceptionState); | |
| 7249 } else { | |
| 7250 defaultByteStringArg = String("foo"); | |
| 7251 } | |
| 7252 } | |
| 7253 impl->voidMethodDefaultByteStringArg(defaultByteStringArg); | |
| 7254 } | |
| 7255 | |
| 7256 static void voidMethodDefaultByteStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
| 7257 { | |
| 7258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7259 TestObjectV8Internal::voidMethodDefaultByteStringArgMethod(info); | |
| 7260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7261 } | |
| 7262 | |
| 7263 static void voidMethodDefaultStringArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 7264 { | |
| 7265 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7266 V8StringResource<> defaultStringArg; | |
| 7267 { | |
| 7268 if (!info[0]->IsUndefined()) { | |
| 7269 TOSTRING_VOID_INTERNAL(defaultStringArg, info[0]); | |
| 7270 } else { | |
| 7271 defaultStringArg = String("foo"); | |
| 7272 } | |
| 7273 } | |
| 7274 impl->voidMethodDefaultStringArg(defaultStringArg); | |
| 7275 } | |
| 7276 | |
| 7277 static void voidMethodDefaultStringArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 7278 { | |
| 7279 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7280 TestObjectV8Internal::voidMethodDefaultStringArgMethod(info); | |
| 7281 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7282 } | |
| 7283 | |
| 7284 static void voidMethodDefaultIntegerArgsMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 7285 { | |
| 7286 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultIntegerArgs", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7287 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7288 int defaultLongArg; | |
| 7289 long long defaultLongLongArg; | |
| 7290 unsigned defaultUnsignedArg; | |
| 7291 { | |
| 7292 v8::TryCatch block; | |
| 7293 V8RethrowTryCatchScope rethrow(block); | |
| 7294 if (!info[0]->IsUndefined()) { | |
| 7295 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultLongArg, toInt32(info[0
], exceptionState), exceptionState); | |
| 7296 } else { | |
| 7297 defaultLongArg = 10; | |
| 7298 } | |
| 7299 if (!info[1]->IsUndefined()) { | |
| 7300 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultLongLongArg, toInt64(in
fo[1], exceptionState), exceptionState); | |
| 7301 } else { | |
| 7302 defaultLongLongArg = -10; | |
| 7303 } | |
| 7304 if (!info[2]->IsUndefined()) { | |
| 7305 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUnsignedArg, toUInt32(i
nfo[2], exceptionState), exceptionState); | |
| 7306 } else { | |
| 7307 defaultUnsignedArg = 4294967295u; | |
| 7308 } | |
| 7309 } | |
| 7310 impl->voidMethodDefaultIntegerArgs(defaultLongArg, defaultLongLongArg, defau
ltUnsignedArg); | |
| 7311 } | |
| 7312 | |
| 7313 static void voidMethodDefaultIntegerArgsMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
| 7314 { | |
| 7315 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7316 TestObjectV8Internal::voidMethodDefaultIntegerArgsMethod(info); | |
| 7317 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7318 } | |
| 7319 | |
| 7320 static void voidMethodDefaultDoubleArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 7321 { | |
| 7322 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7323 double defaultDoubleArg; | |
| 7324 { | |
| 7325 v8::TryCatch block; | |
| 7326 V8RethrowTryCatchScope rethrow(block); | |
| 7327 if (!info[0]->IsUndefined()) { | |
| 7328 TONATIVE_VOID_INTERNAL(defaultDoubleArg, static_cast<double>(info[0]
->NumberValue())); | |
| 7329 } else { | |
| 7330 defaultDoubleArg = 0.5; | |
| 7331 } | |
| 7332 } | |
| 7333 impl->voidMethodDefaultDoubleArg(defaultDoubleArg); | |
| 7334 } | |
| 7335 | |
| 7336 static void voidMethodDefaultDoubleArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 7337 { | |
| 7338 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7339 TestObjectV8Internal::voidMethodDefaultDoubleArgMethod(info); | |
| 7340 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7341 } | |
| 7342 | |
| 7343 static void voidMethodDefaultTrueBooleanArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 7344 { | |
| 7345 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7346 bool defaultBooleanArg; | |
| 7347 { | |
| 7348 v8::TryCatch block; | |
| 7349 V8RethrowTryCatchScope rethrow(block); | |
| 7350 if (!info[0]->IsUndefined()) { | |
| 7351 TONATIVE_VOID_INTERNAL(defaultBooleanArg, info[0]->BooleanValue()); | |
| 7352 } else { | |
| 7353 defaultBooleanArg = true; | |
| 7354 } | |
| 7355 } | |
| 7356 impl->voidMethodDefaultTrueBooleanArg(defaultBooleanArg); | |
| 7357 } | |
| 7358 | |
| 7359 static void voidMethodDefaultTrueBooleanArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 7360 { | |
| 7361 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7362 TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethod(info); | |
| 7363 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7364 } | |
| 7365 | |
| 7366 static void voidMethodDefaultFalseBooleanArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 7367 { | |
| 7368 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7369 bool defaultBooleanArg; | |
| 7370 { | |
| 7371 v8::TryCatch block; | |
| 7372 V8RethrowTryCatchScope rethrow(block); | |
| 7373 if (!info[0]->IsUndefined()) { | |
| 7374 TONATIVE_VOID_INTERNAL(defaultBooleanArg, info[0]->BooleanValue()); | |
| 7375 } else { | |
| 7376 defaultBooleanArg = false; | |
| 7377 } | |
| 7378 } | |
| 7379 impl->voidMethodDefaultFalseBooleanArg(defaultBooleanArg); | |
| 7380 } | |
| 7381 | |
| 7382 static void voidMethodDefaultFalseBooleanArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
| 7383 { | |
| 7384 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7385 TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethod(info); | |
| 7386 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7387 } | |
| 7388 | |
| 7389 static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
| 7390 { | |
| 7391 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultNullableByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7392 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7393 V8StringResource<TreatNullAsNullString> defaultStringArg; | |
| 7394 { | |
| 7395 v8::TryCatch block; | |
| 7396 V8RethrowTryCatchScope rethrow(block); | |
| 7397 if (!info[0]->IsUndefined()) { | |
| 7398 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultStringArg, toByteString
(info[0], exceptionState), exceptionState); | |
| 7399 } else { | |
| 7400 defaultStringArg = nullptr; | |
| 7401 } | |
| 7402 } | |
| 7403 impl->voidMethodDefaultNullableByteStringArg(defaultStringArg); | |
| 7404 } | |
| 7405 | |
| 7406 static void voidMethodDefaultNullableByteStringArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 7407 { | |
| 7408 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7409 TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethod(info); | |
| 7410 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7411 } | |
| 7412 | |
| 7413 static void voidMethodDefaultNullableStringArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 7414 { | |
| 7415 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7416 V8StringResource<TreatNullAsNullString> defaultStringArg; | |
| 7417 { | |
| 7418 if (!info[0]->IsUndefined()) { | |
| 7419 TOSTRING_VOID_INTERNAL(defaultStringArg, info[0]); | |
| 7420 } else { | |
| 7421 defaultStringArg = nullptr; | |
| 7422 } | |
| 7423 } | |
| 7424 impl->voidMethodDefaultNullableStringArg(defaultStringArg); | |
| 7425 } | |
| 7426 | |
| 7427 static void voidMethodDefaultNullableStringArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
| 7428 { | |
| 7429 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7430 TestObjectV8Internal::voidMethodDefaultNullableStringArgMethod(info); | |
| 7431 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7432 } | |
| 7433 | |
| 7434 static void voidMethodDefaultNullableTestInterfaceArgMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) | |
| 7435 { | |
| 7436 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7437 TestInterfaceImplementation* defaultTestInterfaceArg; | |
| 7438 { | |
| 7439 v8::TryCatch block; | |
| 7440 V8RethrowTryCatchScope rethrow(block); | |
| 7441 if (!info[0]->IsUndefined()) { | |
| 7442 TONATIVE_VOID_INTERNAL(defaultTestInterfaceArg, V8TestInterface::toI
mplWithTypeCheck(info.GetIsolate(), info[0])); | |
| 7443 } else { | |
| 7444 defaultTestInterfaceArg = nullptr; | |
| 7445 } | |
| 7446 } | |
| 7447 impl->voidMethodDefaultNullableTestInterfaceArg(defaultTestInterfaceArg); | |
| 7448 } | |
| 7449 | |
| 7450 static void voidMethodDefaultNullableTestInterfaceArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | |
| 7451 { | |
| 7452 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7453 TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethod(info); | |
| 7454 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7455 } | |
| 7456 | |
| 7457 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 7458 { | |
| 7459 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7460 Vector<String> variadicStringArgs; | |
| 7461 { | |
| 7462 v8::TryCatch block; | |
| 7463 V8RethrowTryCatchScope rethrow(block); | |
| 7464 TONATIVE_VOID_INTERNAL(variadicStringArgs, toImplArguments<String>(info,
0)); | |
| 7465 } | |
| 7466 impl->voidMethodVariadicStringArg(variadicStringArgs); | |
| 7467 } | |
| 7468 | |
| 7469 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 7470 { | |
| 7471 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7472 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info); | |
| 7473 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7474 } | |
| 7475 | |
| 7476 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
| 7477 { | |
| 7478 if (UNLIKELY(info.Length() < 1)) { | |
| 7479 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodStringArgVariadicStringArg", "TestObject", 1, info.Length(), info.GetIs
olate()), info.GetIsolate()); | |
| 7480 return; | |
| 7481 } | |
| 7482 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7483 V8StringResource<> stringArg; | |
| 7484 Vector<String> variadicStringArgs; | |
| 7485 { | |
| 7486 v8::TryCatch block; | |
| 7487 V8RethrowTryCatchScope rethrow(block); | |
| 7488 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | |
| 7489 TONATIVE_VOID_INTERNAL(variadicStringArgs, toImplArguments<String>(info,
1)); | |
| 7490 } | |
| 7491 impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs); | |
| 7492 } | |
| 7493 | |
| 7494 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 7495 { | |
| 7496 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7497 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info); | |
| 7498 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7499 } | |
| 7500 | |
| 7501 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 7502 { | |
| 7503 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7504 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; | |
| 7505 { | |
| 7506 for (int i = 0; i < info.Length(); ++i) { | |
| 7507 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | |
| 7508 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodVariadicTestInterfaceEmptyArg", "TestObject", "parameter 1 is not
of type 'TestInterfaceEmpty'."), info.GetIsolate()); | |
| 7509 return; | |
| 7510 } | |
| 7511 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Handle<v8::Object>::Cast(info[i]))); | |
| 7512 } | |
| 7513 } | |
| 7514 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs
); | |
| 7515 } | |
| 7516 | |
| 7517 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 7518 { | |
| 7519 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7520 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); | |
| 7521 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7522 } | |
| 7523 | |
| 7524 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | |
| 7525 { | |
| 7526 if (UNLIKELY(info.Length() < 1)) { | |
| 7527 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", 1, i
nfo.Length(), info.GetIsolate()), info.GetIsolate()); | |
| 7528 return; | |
| 7529 } | |
| 7530 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7531 TestInterfaceEmpty* testInterfaceEmptyArg; | |
| 7532 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; | |
| 7533 { | |
| 7534 v8::TryCatch block; | |
| 7535 V8RethrowTryCatchScope rethrow(block); | |
| 7536 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); | |
| 7537 for (int i = 1; i < info.Length(); ++i) { | |
| 7538 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | |
| 7539 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject"
, "parameter 2 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); | |
| 7540 return; | |
| 7541 } | |
| 7542 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Handle<v8::Object>::Cast(info[i]))); | |
| 7543 } | |
| 7544 } | |
| 7545 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter
faceEmptyArg, variadicTestInterfaceEmptyArgs); | |
| 7546 } | |
| 7547 | |
| 7548 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 7549 { | |
| 7550 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7551 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEm
ptyArgMethod(info); | |
| 7552 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7553 } | |
| 7554 | |
| 7555 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) | |
| 7556 { | |
| 7557 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7558 HeapVector<Member<TestInterfaceGarbageCollected> > variadicTestInterfaceGarb
ageCollectedArg; | |
| 7559 { | |
| 7560 for (int i = 0; i < info.Length(); ++i) { | |
| 7561 if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetI
solate())) { | |
| 7562 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodVariadicTestInterfaceGarbageCollectedArg", "TestObject", "paramet
er 1 is not of type 'TestInterfaceGarbageCollected'."), info.GetIsolate()); | |
| 7563 return; | |
| 7564 } | |
| 7565 variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarba
geCollected::toImpl(v8::Handle<v8::Object>::Cast(info[i]))); | |
| 7566 } | |
| 7567 } | |
| 7568 impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfa
ceGarbageCollectedArg); | |
| 7569 } | |
| 7570 | |
| 7571 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) | |
| 7572 { | |
| 7573 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7574 TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMeth
od(info); | |
| 7575 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7576 } | |
| 7577 | |
| 7578 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 7579 { | |
| 7580 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7581 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > v
ariadicTestInterfaceWillBeGarbageCollectedArg; | |
| 7582 { | |
| 7583 for (int i = 0; i < info.Length(); ++i) { | |
| 7584 if (!V8TestInterfaceWillBeGarbageCollected::hasInstance(info[i], inf
o.GetIsolate())) { | |
| 7585 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", "TestObject", "p
arameter 1 is not of type 'TestInterfaceWillBeGarbageCollected'."), info.GetIsol
ate()); | |
| 7586 return; | |
| 7587 } | |
| 7588 variadicTestInterfaceWillBeGarbageCollectedArg.append(V8TestInterfac
eWillBeGarbageCollected::toImpl(v8::Handle<v8::Object>::Cast(info[i]))); | |
| 7589 } | |
| 7590 } | |
| 7591 impl->voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(variadicTestI
nterfaceWillBeGarbageCollectedArg); | |
| 7592 } | |
| 7593 | |
| 7594 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 7595 { | |
| 7596 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7597 TestObjectV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedA
rgMethod(info); | |
| 7598 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7599 } | |
| 7600 | |
| 7601 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7602 { | |
| 7603 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7604 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7605 int longArg; | |
| 7606 { | |
| 7607 v8::TryCatch block; | |
| 7608 V8RethrowTryCatchScope rethrow(block); | |
| 7609 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 7610 } | |
| 7611 impl->overloadedMethodA(longArg); | |
| 7612 } | |
| 7613 | |
| 7614 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7615 { | |
| 7616 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7617 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7618 int longArg1; | |
| 7619 int longArg2; | |
| 7620 { | |
| 7621 v8::TryCatch block; | |
| 7622 V8RethrowTryCatchScope rethrow(block); | |
| 7623 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg1, toInt32(info[0], excepti
onState), exceptionState); | |
| 7624 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg2, toInt32(info[1], excepti
onState), exceptionState); | |
| 7625 } | |
| 7626 impl->overloadedMethodA(longArg1, longArg2); | |
| 7627 } | |
| 7628 | |
| 7629 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 7630 { | |
| 7631 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7632 switch (std::min(2, info.Length())) { | |
| 7633 case 1: | |
| 7634 if (true) { | |
| 7635 overloadedMethodA1Method(info); | |
| 7636 return; | |
| 7637 } | |
| 7638 break; | |
| 7639 case 2: | |
| 7640 if (true) { | |
| 7641 overloadedMethodA2Method(info); | |
| 7642 return; | |
| 7643 } | |
| 7644 break; | |
| 7645 default: | |
| 7646 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 7647 exceptionState.throwIfNeeded(); | |
| 7648 return; | |
| 7649 } | |
| 7650 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 7651 exceptionState.throwIfNeeded(); | |
| 7652 } | |
| 7653 | |
| 7654 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 7655 { | |
| 7656 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7657 TestObjectV8Internal::overloadedMethodAMethod(info); | |
| 7658 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7659 } | |
| 7660 | |
| 7661 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7662 { | |
| 7663 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7664 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7665 int longArg; | |
| 7666 { | |
| 7667 v8::TryCatch block; | |
| 7668 V8RethrowTryCatchScope rethrow(block); | |
| 7669 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 7670 } | |
| 7671 impl->overloadedMethodB(longArg); | |
| 7672 } | |
| 7673 | |
| 7674 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7675 { | |
| 7676 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7677 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7678 V8StringResource<> stringArg; | |
| 7679 int longArg; | |
| 7680 { | |
| 7681 v8::TryCatch block; | |
| 7682 V8RethrowTryCatchScope rethrow(block); | |
| 7683 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | |
| 7684 if (UNLIKELY(info.Length() <= 1)) { | |
| 7685 impl->overloadedMethodB(stringArg); | |
| 7686 return; | |
| 7687 } | |
| 7688 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | |
| 7689 } | |
| 7690 impl->overloadedMethodB(stringArg, longArg); | |
| 7691 } | |
| 7692 | |
| 7693 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 7694 { | |
| 7695 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7696 switch (std::min(2, info.Length())) { | |
| 7697 case 1: | |
| 7698 if (info[0]->IsNumber()) { | |
| 7699 overloadedMethodB1Method(info); | |
| 7700 return; | |
| 7701 } | |
| 7702 if (true) { | |
| 7703 overloadedMethodB2Method(info); | |
| 7704 return; | |
| 7705 } | |
| 7706 if (true) { | |
| 7707 overloadedMethodB1Method(info); | |
| 7708 return; | |
| 7709 } | |
| 7710 break; | |
| 7711 case 2: | |
| 7712 if (true) { | |
| 7713 overloadedMethodB2Method(info); | |
| 7714 return; | |
| 7715 } | |
| 7716 break; | |
| 7717 default: | |
| 7718 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 7719 exceptionState.throwIfNeeded(); | |
| 7720 return; | |
| 7721 } | |
| 7722 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 7723 exceptionState.throwIfNeeded(); | |
| 7724 } | |
| 7725 | |
| 7726 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 7727 { | |
| 7728 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7729 TestObjectV8Internal::overloadedMethodBMethod(info); | |
| 7730 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7731 } | |
| 7732 | |
| 7733 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7734 { | |
| 7735 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7736 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7737 int longArg; | |
| 7738 { | |
| 7739 v8::TryCatch block; | |
| 7740 V8RethrowTryCatchScope rethrow(block); | |
| 7741 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 7742 } | |
| 7743 impl->overloadedMethodC(longArg); | |
| 7744 } | |
| 7745 | |
| 7746 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7747 { | |
| 7748 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7749 TestInterfaceEmpty* testInterfaceEmptyArg; | |
| 7750 { | |
| 7751 v8::TryCatch block; | |
| 7752 V8RethrowTryCatchScope rethrow(block); | |
| 7753 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); | |
| 7754 } | |
| 7755 impl->overloadedMethodC(testInterfaceEmptyArg); | |
| 7756 } | |
| 7757 | |
| 7758 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 7759 { | |
| 7760 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7761 switch (std::min(1, info.Length())) { | |
| 7762 case 1: | |
| 7763 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { | |
| 7764 overloadedMethodC2Method(info); | |
| 7765 return; | |
| 7766 } | |
| 7767 if (true) { | |
| 7768 overloadedMethodC1Method(info); | |
| 7769 return; | |
| 7770 } | |
| 7771 break; | |
| 7772 default: | |
| 7773 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 7774 exceptionState.throwIfNeeded(); | |
| 7775 return; | |
| 7776 } | |
| 7777 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 7778 exceptionState.throwIfNeeded(); | |
| 7779 } | |
| 7780 | |
| 7781 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 7782 { | |
| 7783 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7784 TestObjectV8Internal::overloadedMethodCMethod(info); | |
| 7785 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7786 } | |
| 7787 | |
| 7788 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7789 { | |
| 7790 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7791 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7792 int longArg; | |
| 7793 { | |
| 7794 v8::TryCatch block; | |
| 7795 V8RethrowTryCatchScope rethrow(block); | |
| 7796 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 7797 } | |
| 7798 impl->overloadedMethodD(longArg); | |
| 7799 } | |
| 7800 | |
| 7801 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7802 { | |
| 7803 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7804 Vector<int> longArrayArg; | |
| 7805 { | |
| 7806 v8::TryCatch block; | |
| 7807 V8RethrowTryCatchScope rethrow(block); | |
| 7808 TONATIVE_VOID_INTERNAL(longArrayArg, toImplArray<int>(info[0], 1, info.G
etIsolate())); | |
| 7809 } | |
| 7810 impl->overloadedMethodD(longArrayArg); | |
| 7811 } | |
| 7812 | |
| 7813 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 7814 { | |
| 7815 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7816 switch (std::min(1, info.Length())) { | |
| 7817 case 1: | |
| 7818 if (info[0]->IsArray()) { | |
| 7819 overloadedMethodD2Method(info); | |
| 7820 return; | |
| 7821 } | |
| 7822 if (true) { | |
| 7823 overloadedMethodD1Method(info); | |
| 7824 return; | |
| 7825 } | |
| 7826 break; | |
| 7827 default: | |
| 7828 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 7829 exceptionState.throwIfNeeded(); | |
| 7830 return; | |
| 7831 } | |
| 7832 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 7833 exceptionState.throwIfNeeded(); | |
| 7834 } | |
| 7835 | |
| 7836 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 7837 { | |
| 7838 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7839 TestObjectV8Internal::overloadedMethodDMethod(info); | |
| 7840 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7841 } | |
| 7842 | |
| 7843 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7844 { | |
| 7845 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7846 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7847 int longArg; | |
| 7848 { | |
| 7849 v8::TryCatch block; | |
| 7850 V8RethrowTryCatchScope rethrow(block); | |
| 7851 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 7852 } | |
| 7853 impl->overloadedMethodE(longArg); | |
| 7854 } | |
| 7855 | |
| 7856 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7857 { | |
| 7858 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7859 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; | |
| 7860 { | |
| 7861 v8::TryCatch block; | |
| 7862 V8RethrowTryCatchScope rethrow(block); | |
| 7863 TONATIVE_VOID_INTERNAL(testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty
::toImplWithTypeCheck(info.GetIsolate(), info[0])); | |
| 7864 } | |
| 7865 impl->overloadedMethodE(testInterfaceEmptyOrNullArg); | |
| 7866 } | |
| 7867 | |
| 7868 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 7869 { | |
| 7870 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7871 switch (std::min(1, info.Length())) { | |
| 7872 case 1: | |
| 7873 if (isUndefinedOrNull(info[0])) { | |
| 7874 overloadedMethodE2Method(info); | |
| 7875 return; | |
| 7876 } | |
| 7877 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { | |
| 7878 overloadedMethodE2Method(info); | |
| 7879 return; | |
| 7880 } | |
| 7881 if (true) { | |
| 7882 overloadedMethodE1Method(info); | |
| 7883 return; | |
| 7884 } | |
| 7885 break; | |
| 7886 default: | |
| 7887 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 7888 exceptionState.throwIfNeeded(); | |
| 7889 return; | |
| 7890 } | |
| 7891 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 7892 exceptionState.throwIfNeeded(); | |
| 7893 } | |
| 7894 | |
| 7895 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 7896 { | |
| 7897 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7898 TestObjectV8Internal::overloadedMethodEMethod(info); | |
| 7899 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7900 } | |
| 7901 | |
| 7902 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7903 { | |
| 7904 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7905 V8StringResource<> stringArg; | |
| 7906 { | |
| 7907 if (UNLIKELY(info.Length() <= 0)) { | |
| 7908 impl->overloadedMethodF(); | |
| 7909 return; | |
| 7910 } | |
| 7911 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | |
| 7912 } | |
| 7913 impl->overloadedMethodF(stringArg); | |
| 7914 } | |
| 7915 | |
| 7916 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7917 { | |
| 7918 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7919 double doubleArg; | |
| 7920 { | |
| 7921 v8::TryCatch block; | |
| 7922 V8RethrowTryCatchScope rethrow(block); | |
| 7923 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); | |
| 7924 } | |
| 7925 impl->overloadedMethodF(doubleArg); | |
| 7926 } | |
| 7927 | |
| 7928 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 7929 { | |
| 7930 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodF", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7931 switch (std::min(1, info.Length())) { | |
| 7932 case 0: | |
| 7933 if (true) { | |
| 7934 overloadedMethodF1Method(info); | |
| 7935 return; | |
| 7936 } | |
| 7937 break; | |
| 7938 case 1: | |
| 7939 if (info[0]->IsUndefined()) { | |
| 7940 overloadedMethodF1Method(info); | |
| 7941 return; | |
| 7942 } | |
| 7943 if (info[0]->IsNumber()) { | |
| 7944 overloadedMethodF2Method(info); | |
| 7945 return; | |
| 7946 } | |
| 7947 if (true) { | |
| 7948 overloadedMethodF1Method(info); | |
| 7949 return; | |
| 7950 } | |
| 7951 if (true) { | |
| 7952 overloadedMethodF2Method(info); | |
| 7953 return; | |
| 7954 } | |
| 7955 break; | |
| 7956 default: | |
| 7957 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 7958 exceptionState.throwIfNeeded(); | |
| 7959 return; | |
| 7960 } | |
| 7961 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 7962 exceptionState.throwIfNeeded(); | |
| 7963 } | |
| 7964 | |
| 7965 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 7966 { | |
| 7967 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 7968 TestObjectV8Internal::overloadedMethodFMethod(info); | |
| 7969 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 7970 } | |
| 7971 | |
| 7972 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7973 { | |
| 7974 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodG", "TestObject", info.Holder(), info.GetIsolate()); | |
| 7975 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7976 int longArg; | |
| 7977 { | |
| 7978 v8::TryCatch block; | |
| 7979 V8RethrowTryCatchScope rethrow(block); | |
| 7980 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 7981 } | |
| 7982 impl->overloadedMethodG(longArg); | |
| 7983 } | |
| 7984 | |
| 7985 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 7986 { | |
| 7987 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 7988 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; | |
| 7989 { | |
| 7990 v8::TryCatch block; | |
| 7991 V8RethrowTryCatchScope rethrow(block); | |
| 7992 if (!info[0]->IsUndefined()) { | |
| 7993 TONATIVE_VOID_INTERNAL(testInterfaceEmptyOrNullArg, V8TestInterfaceE
mpty::toImplWithTypeCheck(info.GetIsolate(), info[0])); | |
| 7994 } else { | |
| 7995 testInterfaceEmptyOrNullArg = nullptr; | |
| 7996 } | |
| 7997 } | |
| 7998 impl->overloadedMethodG(testInterfaceEmptyOrNullArg); | |
| 7999 } | |
| 8000 | |
| 8001 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 8002 { | |
| 8003 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodG", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8004 switch (std::min(1, info.Length())) { | |
| 8005 case 0: | |
| 8006 if (true) { | |
| 8007 overloadedMethodG2Method(info); | |
| 8008 return; | |
| 8009 } | |
| 8010 break; | |
| 8011 case 1: | |
| 8012 if (info[0]->IsUndefined()) { | |
| 8013 overloadedMethodG2Method(info); | |
| 8014 return; | |
| 8015 } | |
| 8016 if (isUndefinedOrNull(info[0])) { | |
| 8017 overloadedMethodG2Method(info); | |
| 8018 return; | |
| 8019 } | |
| 8020 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { | |
| 8021 overloadedMethodG2Method(info); | |
| 8022 return; | |
| 8023 } | |
| 8024 if (true) { | |
| 8025 overloadedMethodG1Method(info); | |
| 8026 return; | |
| 8027 } | |
| 8028 break; | |
| 8029 default: | |
| 8030 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 8031 exceptionState.throwIfNeeded(); | |
| 8032 return; | |
| 8033 } | |
| 8034 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 8035 exceptionState.throwIfNeeded(); | |
| 8036 } | |
| 8037 | |
| 8038 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 8039 { | |
| 8040 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8041 TestObjectV8Internal::overloadedMethodGMethod(info); | |
| 8042 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8043 } | |
| 8044 | |
| 8045 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 8046 { | |
| 8047 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8048 TestInterfaceImplementation* testInterfaceArg; | |
| 8049 { | |
| 8050 v8::TryCatch block; | |
| 8051 V8RethrowTryCatchScope rethrow(block); | |
| 8052 TONATIVE_VOID_INTERNAL(testInterfaceArg, V8TestInterface::toImplWithType
Check(info.GetIsolate(), info[0])); | |
| 8053 } | |
| 8054 impl->overloadedMethodH(testInterfaceArg); | |
| 8055 } | |
| 8056 | |
| 8057 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 8058 { | |
| 8059 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8060 TestInterfaceEmpty* testInterfaceEmptyArg; | |
| 8061 { | |
| 8062 v8::TryCatch block; | |
| 8063 V8RethrowTryCatchScope rethrow(block); | |
| 8064 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); | |
| 8065 } | |
| 8066 impl->overloadedMethodH(testInterfaceEmptyArg); | |
| 8067 } | |
| 8068 | |
| 8069 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 8070 { | |
| 8071 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodH", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8072 switch (std::min(1, info.Length())) { | |
| 8073 case 1: | |
| 8074 if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) { | |
| 8075 overloadedMethodH1Method(info); | |
| 8076 return; | |
| 8077 } | |
| 8078 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { | |
| 8079 overloadedMethodH2Method(info); | |
| 8080 return; | |
| 8081 } | |
| 8082 break; | |
| 8083 default: | |
| 8084 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 8085 exceptionState.throwIfNeeded(); | |
| 8086 return; | |
| 8087 } | |
| 8088 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 8089 exceptionState.throwIfNeeded(); | |
| 8090 } | |
| 8091 | |
| 8092 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 8093 { | |
| 8094 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8095 TestObjectV8Internal::overloadedMethodHMethod(info); | |
| 8096 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8097 } | |
| 8098 | |
| 8099 static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 8100 { | |
| 8101 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8102 V8StringResource<> stringArg; | |
| 8103 { | |
| 8104 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | |
| 8105 } | |
| 8106 impl->overloadedMethodI(stringArg); | |
| 8107 } | |
| 8108 | |
| 8109 static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 8110 { | |
| 8111 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8112 double doubleArg; | |
| 8113 { | |
| 8114 v8::TryCatch block; | |
| 8115 V8RethrowTryCatchScope rethrow(block); | |
| 8116 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); | |
| 8117 } | |
| 8118 impl->overloadedMethodI(doubleArg); | |
| 8119 } | |
| 8120 | |
| 8121 static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 8122 { | |
| 8123 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodI", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8124 switch (std::min(1, info.Length())) { | |
| 8125 case 1: | |
| 8126 if (info[0]->IsNumber()) { | |
| 8127 overloadedMethodI2Method(info); | |
| 8128 return; | |
| 8129 } | |
| 8130 if (true) { | |
| 8131 overloadedMethodI1Method(info); | |
| 8132 return; | |
| 8133 } | |
| 8134 if (true) { | |
| 8135 overloadedMethodI2Method(info); | |
| 8136 return; | |
| 8137 } | |
| 8138 break; | |
| 8139 default: | |
| 8140 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 8141 exceptionState.throwIfNeeded(); | |
| 8142 return; | |
| 8143 } | |
| 8144 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 8145 exceptionState.throwIfNeeded(); | |
| 8146 } | |
| 8147 | |
| 8148 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 8149 { | |
| 8150 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8151 TestObjectV8Internal::overloadedMethodIMethod(info); | |
| 8152 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8153 } | |
| 8154 | |
| 8155 static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 8156 { | |
| 8157 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8158 V8StringResource<> stringArg; | |
| 8159 { | |
| 8160 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | |
| 8161 } | |
| 8162 impl->overloadedMethodJ(stringArg); | |
| 8163 } | |
| 8164 | |
| 8165 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 8166 { | |
| 8167 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8168 TestDictionary* testDictionaryArg; | |
| 8169 { | |
| 8170 v8::TryCatch block; | |
| 8171 V8RethrowTryCatchScope rethrow(block); | |
| 8172 if (!info[0]->IsUndefined()) { | |
| 8173 TONATIVE_VOID_INTERNAL(testDictionaryArg, V8TestDictionary::toImpl(i
nfo.GetIsolate(), info[0])); | |
| 8174 } else { | |
| 8175 testDictionaryArg = TestDictionary::create(); | |
| 8176 } | |
| 8177 } | |
| 8178 impl->overloadedMethodJ(testDictionaryArg); | |
| 8179 } | |
| 8180 | |
| 8181 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
| 8182 { | |
| 8183 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodJ", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8184 switch (std::min(1, info.Length())) { | |
| 8185 case 1: | |
| 8186 if (info[0]->IsObject()) { | |
| 8187 overloadedMethodJ2Method(info); | |
| 8188 return; | |
| 8189 } | |
| 8190 if (true) { | |
| 8191 overloadedMethodJ1Method(info); | |
| 8192 return; | |
| 8193 } | |
| 8194 break; | |
| 8195 default: | |
| 8196 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 8197 exceptionState.throwIfNeeded(); | |
| 8198 return; | |
| 8199 } | |
| 8200 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 8201 exceptionState.throwIfNeeded(); | |
| 8202 } | |
| 8203 | |
| 8204 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 8205 { | |
| 8206 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8207 TestObjectV8Internal::overloadedMethodJMethod(info); | |
| 8208 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8209 } | |
| 8210 | |
| 8211 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 8212 { | |
| 8213 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8214 impl->overloadedPerWorldBindingsMethod(); | |
| 8215 } | |
| 8216 | |
| 8217 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
| 8218 { | |
| 8219 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8220 impl->overloadedPerWorldBindingsMethod(); | |
| 8221 } | |
| 8222 | |
| 8223 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 8224 { | |
| 8225 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8226 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8227 int longArg; | |
| 8228 { | |
| 8229 v8::TryCatch block; | |
| 8230 V8RethrowTryCatchScope rethrow(block); | |
| 8231 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 8232 } | |
| 8233 impl->overloadedPerWorldBindingsMethod(longArg); | |
| 8234 } | |
| 8235 | |
| 8236 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 8237 { | |
| 8238 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8239 switch (std::min(1, info.Length())) { | |
| 8240 case 0: | |
| 8241 if (true) { | |
| 8242 overloadedPerWorldBindingsMethod1Method(info); | |
| 8243 return; | |
| 8244 } | |
| 8245 break; | |
| 8246 case 1: | |
| 8247 if (true) { | |
| 8248 overloadedPerWorldBindingsMethod2Method(info); | |
| 8249 return; | |
| 8250 } | |
| 8251 break; | |
| 8252 default: | |
| 8253 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 8254 exceptionState.throwIfNeeded(); | |
| 8255 return; | |
| 8256 } | |
| 8257 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 8258 exceptionState.throwIfNeeded(); | |
| 8259 } | |
| 8260 | |
| 8261 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
| 8262 { | |
| 8263 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8264 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info); | |
| 8265 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8266 } | |
| 8267 | |
| 8268 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
| 8269 { | |
| 8270 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8271 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8272 int longArg; | |
| 8273 { | |
| 8274 v8::TryCatch block; | |
| 8275 V8RethrowTryCatchScope rethrow(block); | |
| 8276 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 8277 } | |
| 8278 impl->overloadedPerWorldBindingsMethod(longArg); | |
| 8279 } | |
| 8280 | |
| 8281 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 8282 { | |
| 8283 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8284 switch (std::min(1, info.Length())) { | |
| 8285 case 0: | |
| 8286 if (true) { | |
| 8287 overloadedPerWorldBindingsMethod1MethodForMainWorld(info); | |
| 8288 return; | |
| 8289 } | |
| 8290 break; | |
| 8291 case 1: | |
| 8292 if (true) { | |
| 8293 overloadedPerWorldBindingsMethod2MethodForMainWorld(info); | |
| 8294 return; | |
| 8295 } | |
| 8296 break; | |
| 8297 default: | |
| 8298 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 8299 exceptionState.throwIfNeeded(); | |
| 8300 return; | |
| 8301 } | |
| 8302 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 8303 exceptionState.throwIfNeeded(); | |
| 8304 } | |
| 8305 | |
| 8306 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) | |
| 8307 { | |
| 8308 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8309 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(inf
o); | |
| 8310 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8311 } | |
| 8312 | |
| 8313 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 8314 { | |
| 8315 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8316 int longArg; | |
| 8317 { | |
| 8318 v8::TryCatch block; | |
| 8319 V8RethrowTryCatchScope rethrow(block); | |
| 8320 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 8321 } | |
| 8322 TestObject::overloadedStaticMethod(longArg); | |
| 8323 } | |
| 8324 | |
| 8325 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 8326 { | |
| 8327 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8328 int longArg1; | |
| 8329 int longArg2; | |
| 8330 { | |
| 8331 v8::TryCatch block; | |
| 8332 V8RethrowTryCatchScope rethrow(block); | |
| 8333 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg1, toInt32(info[0], excepti
onState), exceptionState); | |
| 8334 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg2, toInt32(info[1], excepti
onState), exceptionState); | |
| 8335 } | |
| 8336 TestObject::overloadedStaticMethod(longArg1, longArg2); | |
| 8337 } | |
| 8338 | |
| 8339 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
| 8340 { | |
| 8341 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8342 switch (std::min(2, info.Length())) { | |
| 8343 case 1: | |
| 8344 if (true) { | |
| 8345 overloadedStaticMethod1Method(info); | |
| 8346 return; | |
| 8347 } | |
| 8348 break; | |
| 8349 case 2: | |
| 8350 if (true) { | |
| 8351 overloadedStaticMethod2Method(info); | |
| 8352 return; | |
| 8353 } | |
| 8354 break; | |
| 8355 default: | |
| 8356 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 8357 exceptionState.throwIfNeeded(); | |
| 8358 return; | |
| 8359 } | |
| 8360 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 8361 exceptionState.throwIfNeeded(); | |
| 8362 } | |
| 8363 | |
| 8364 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
| 8365 { | |
| 8366 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8367 TestObjectV8Internal::overloadedStaticMethodMethod(info); | |
| 8368 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8369 } | |
| 8370 | |
| 8371 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 8372 { | |
| 8373 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8374 if (UNLIKELY(info.Length() < 1)) { | |
| 8375 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 8376 exceptionState.throwIfNeeded(); | |
| 8377 return; | |
| 8378 } | |
| 8379 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8380 unsigned clampUnsignedShortArg = 0; | |
| 8381 { | |
| 8382 v8::TryCatch block; | |
| 8383 V8RethrowTryCatchScope rethrow(block); | |
| 8384 double clampUnsignedShortArgNativeValue; | |
| 8385 TONATIVE_VOID_INTERNAL(clampUnsignedShortArgNativeValue, info[0]->Number
Value()); | |
| 8386 if (!std::isnan(clampUnsignedShortArgNativeValue)) | |
| 8387 clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortAr
gNativeValue); | |
| 8388 } | |
| 8389 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); | |
| 8390 } | |
| 8391 | |
| 8392 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 8393 { | |
| 8394 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8395 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info); | |
| 8396 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8397 } | |
| 8398 | |
| 8399 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
| 8400 { | |
| 8401 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8402 if (UNLIKELY(info.Length() < 1)) { | |
| 8403 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 8404 exceptionState.throwIfNeeded(); | |
| 8405 return; | |
| 8406 } | |
| 8407 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8408 unsigned clampUnsignedLongArg = 0; | |
| 8409 { | |
| 8410 v8::TryCatch block; | |
| 8411 V8RethrowTryCatchScope rethrow(block); | |
| 8412 double clampUnsignedLongArgNativeValue; | |
| 8413 TONATIVE_VOID_INTERNAL(clampUnsignedLongArgNativeValue, info[0]->NumberV
alue()); | |
| 8414 if (!std::isnan(clampUnsignedLongArgNativeValue)) | |
| 8415 clampUnsignedLongArg = clampTo<unsigned long>(clampUnsignedLongArgNa
tiveValue); | |
| 8416 } | |
| 8417 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); | |
| 8418 } | |
| 8419 | |
| 8420 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
| 8421 { | |
| 8422 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8423 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info); | |
| 8424 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8425 } | |
| 8426 | |
| 8427 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 8428 { | |
| 8429 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8430 TestInterfaceEmpty* defaultUndefinedTestInterfaceEmptyArg; | |
| 8431 { | |
| 8432 v8::TryCatch block; | |
| 8433 V8RethrowTryCatchScope rethrow(block); | |
| 8434 TONATIVE_VOID_INTERNAL(defaultUndefinedTestInterfaceEmptyArg, V8TestInte
rfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0])); | |
| 8435 } | |
| 8436 impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestIn
terfaceEmptyArg); | |
| 8437 } | |
| 8438 | |
| 8439 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 8440 { | |
| 8441 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8442 TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(
info); | |
| 8443 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8444 } | |
| 8445 | |
| 8446 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 8447 { | |
| 8448 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultUndefinedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8449 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8450 int defaultUndefinedLongArg; | |
| 8451 { | |
| 8452 v8::TryCatch block; | |
| 8453 V8RethrowTryCatchScope rethrow(block); | |
| 8454 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedLongArg, toInt32(i
nfo[0], exceptionState), exceptionState); | |
| 8455 } | |
| 8456 impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); | |
| 8457 } | |
| 8458 | |
| 8459 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | |
| 8460 { | |
| 8461 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8462 TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info); | |
| 8463 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8464 } | |
| 8465 | |
| 8466 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 8467 { | |
| 8468 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8469 V8StringResource<> defaultUndefinedStringArg; | |
| 8470 { | |
| 8471 TOSTRING_VOID_INTERNAL(defaultUndefinedStringArg, info[0]); | |
| 8472 } | |
| 8473 impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg); | |
| 8474 } | |
| 8475 | |
| 8476 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | |
| 8477 { | |
| 8478 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8479 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info); | |
| 8480 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8481 } | |
| 8482 | |
| 8483 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 8484 { | |
| 8485 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE
nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8486 if (UNLIKELY(info.Length() < 1)) { | |
| 8487 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 8488 exceptionState.throwIfNeeded(); | |
| 8489 return; | |
| 8490 } | |
| 8491 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8492 int enforceRangeLongArg; | |
| 8493 { | |
| 8494 v8::TryCatch block; | |
| 8495 V8RethrowTryCatchScope rethrow(block); | |
| 8496 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(enforceRangeLongArg, toInt32(info[
0], EnforceRange, exceptionState), exceptionState); | |
| 8497 } | |
| 8498 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg); | |
| 8499 } | |
| 8500 | |
| 8501 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
| 8502 { | |
| 8503 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8504 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info); | |
| 8505 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8506 } | |
| 8507 | |
| 8508 static void voidMethodTreatNullAsEmptyStringStringArgMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) | |
| 8509 { | |
| 8510 if (UNLIKELY(info.Length() < 1)) { | |
| 8511 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTreatNullAsEmptyStringStringArg", "TestObject", 1, info.Length(), info.
GetIsolate()), info.GetIsolate()); | |
| 8512 return; | |
| 8513 } | |
| 8514 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8515 V8StringResource<TreatNullAsEmptyString> treatNullAsEmptyStringStringArg; | |
| 8516 { | |
| 8517 TOSTRING_VOID_INTERNAL(treatNullAsEmptyStringStringArg, info[0]); | |
| 8518 } | |
| 8519 impl->voidMethodTreatNullAsEmptyStringStringArg(treatNullAsEmptyStringString
Arg); | |
| 8520 } | |
| 8521 | |
| 8522 static void voidMethodTreatNullAsEmptyStringStringArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | |
| 8523 { | |
| 8524 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8525 TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethod(info); | |
| 8526 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8527 } | |
| 8528 | |
| 8529 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
| 8530 { | |
| 8531 if (UNLIKELY(info.Length() < 1)) { | |
| 8532 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTreatNullAsNullStringStringArg", "TestObject", 1, info.Length(), info.G
etIsolate()), info.GetIsolate()); | |
| 8533 return; | |
| 8534 } | |
| 8535 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8536 V8StringResource<TreatNullAsNullString> treatNullAsNullStringStringArg; | |
| 8537 { | |
| 8538 TOSTRING_VOID_INTERNAL(treatNullAsNullStringStringArg, info[0]); | |
| 8539 } | |
| 8540 impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringAr
g); | |
| 8541 } | |
| 8542 | |
| 8543 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | |
| 8544 { | |
| 8545 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8546 TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info); | |
| 8547 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8548 } | |
| 8549 | |
| 8550 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe
thod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 8551 { | |
| 8552 if (UNLIKELY(info.Length() < 1)) { | |
| 8553 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", "TestObject"
, 1, info.Length(), info.GetIsolate()), info.GetIsolate()); | |
| 8554 return; | |
| 8555 } | |
| 8556 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8557 V8StringResource<TreatNullAndUndefinedAsNullString> treatNullAsNullStringStr
ingArg; | |
| 8558 { | |
| 8559 TOSTRING_VOID_INTERNAL(treatNullAsNullStringStringArg, info[0]); | |
| 8560 } | |
| 8561 impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(tre
atNullAsNullStringStringArg); | |
| 8562 } | |
| 8563 | |
| 8564 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe
thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 8565 { | |
| 8566 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8567 TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStr
ingStringArgMethod(info); | |
| 8568 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8569 } | |
| 8570 | |
| 8571 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
| 8572 { | |
| 8573 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8574 impl->activityLoggingAccessForAllWorldsMethod(); | |
| 8575 } | |
| 8576 | |
| 8577 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 8578 { | |
| 8579 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8580 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 8581 V8PerContextData* contextData = scriptState->perContextData(); | |
| 8582 if (contextData && contextData->activityLogger()) { | |
| 8583 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0); | |
| 8584 contextData->activityLogger()->logMethod("TestObject.activityLoggingAcce
ssForAllWorldsMethod", info.Length(), loggerArgs.data()); | |
| 8585 } | |
| 8586 TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info); | |
| 8587 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8588 } | |
| 8589 | |
| 8590 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 8591 { | |
| 8592 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8593 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | |
| 8594 impl->callWithExecutionContextVoidMethod(executionContext); | |
| 8595 } | |
| 8596 | |
| 8597 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
| 8598 { | |
| 8599 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8600 TestObjectV8Internal::callWithExecutionContextVoidMethodMethod(info); | |
| 8601 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8602 } | |
| 8603 | |
| 8604 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 8605 { | |
| 8606 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8607 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | |
| 8608 impl->callWithScriptStateVoidMethod(scriptState); | |
| 8609 } | |
| 8610 | |
| 8611 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
| 8612 { | |
| 8613 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8614 TestObjectV8Internal::callWithScriptStateVoidMethodMethod(info); | |
| 8615 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8616 } | |
| 8617 | |
| 8618 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 8619 { | |
| 8620 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8621 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | |
| 8622 int result = impl->callWithScriptStateLongMethod(scriptState); | |
| 8623 v8SetReturnValueInt(info, result); | |
| 8624 } | |
| 8625 | |
| 8626 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
| 8627 { | |
| 8628 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8629 TestObjectV8Internal::callWithScriptStateLongMethodMethod(info); | |
| 8630 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8631 } | |
| 8632 | |
| 8633 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
| 8634 { | |
| 8635 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8636 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | |
| 8637 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | |
| 8638 impl->callWithScriptStateExecutionContextVoidMethod(scriptState, executionCo
ntext); | |
| 8639 } | |
| 8640 | |
| 8641 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | |
| 8642 { | |
| 8643 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8644 TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(in
fo); | |
| 8645 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8646 } | |
| 8647 | |
| 8648 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 8649 { | |
| 8650 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8651 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | |
| 8652 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArguments(sc
riptState, info, 0)); | |
| 8653 impl->callWithScriptStateScriptArgumentsVoidMethod(scriptState, scriptArgume
nts.release()); | |
| 8654 } | |
| 8655 | |
| 8656 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | |
| 8657 { | |
| 8658 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8659 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(inf
o); | |
| 8660 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8661 } | |
| 8662 | |
| 8663 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 8664 { | |
| 8665 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8666 bool optionalBooleanArg; | |
| 8667 { | |
| 8668 v8::TryCatch block; | |
| 8669 V8RethrowTryCatchScope rethrow(block); | |
| 8670 if (UNLIKELY(info.Length() <= 0)) { | |
| 8671 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | |
| 8672 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArgu
ments(scriptState, info, 1)); | |
| 8673 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg
(scriptState, scriptArguments.release()); | |
| 8674 return; | |
| 8675 } | |
| 8676 TONATIVE_VOID_INTERNAL(optionalBooleanArg, info[0]->BooleanValue()); | |
| 8677 } | |
| 8678 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | |
| 8679 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArguments(sc
riptState, info, 1)); | |
| 8680 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS
tate, scriptArguments.release(), optionalBooleanArg); | |
| 8681 } | |
| 8682 | |
| 8683 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
Callback(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 8684 { | |
| 8685 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8686 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo
oleanArgMethod(info); | |
| 8687 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8688 } | |
| 8689 | |
| 8690 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
| 8691 { | |
| 8692 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8693 impl->callWithActiveWindow(callingDOMWindow(info.GetIsolate())); | |
| 8694 } | |
| 8695 | |
| 8696 static void callWithActiveWindowMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 8697 { | |
| 8698 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8699 TestObjectV8Internal::callWithActiveWindowMethod(info); | |
| 8700 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8701 } | |
| 8702 | |
| 8703 static void callWithActiveWindowScriptWindowMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 8704 { | |
| 8705 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8706 impl->callWithActiveWindowScriptWindow(callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate())); | |
| 8707 } | |
| 8708 | |
| 8709 static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
| 8710 { | |
| 8711 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8712 TestObjectV8Internal::callWithActiveWindowScriptWindowMethod(info); | |
| 8713 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8714 } | |
| 8715 | |
| 8716 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
| 8717 { | |
| 8718 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8719 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check
SecurityForNodeVoidMethod(exceptionState), exceptionState)) { | |
| 8720 v8SetReturnValueNull(info); | |
| 8721 exceptionState.throwIfNeeded(); | |
| 8722 return; | |
| 8723 } | |
| 8724 impl->checkSecurityForNodeVoidMethod(); | |
| 8725 } | |
| 8726 | |
| 8727 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
| 8728 { | |
| 8729 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8730 TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info); | |
| 8731 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8732 } | |
| 8733 | |
| 8734 #if ENABLE(CONDITION) | |
| 8735 static void conditionalConditionVoidMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
| 8736 { | |
| 8737 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8738 impl->conditionalConditionVoidMethod(); | |
| 8739 } | |
| 8740 #endif // ENABLE(CONDITION) | |
| 8741 | |
| 8742 #if ENABLE(CONDITION) | |
| 8743 static void conditionalConditionVoidMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
| 8744 { | |
| 8745 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8746 TestObjectV8Internal::conditionalConditionVoidMethodMethod(info); | |
| 8747 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8748 } | |
| 8749 #endif // ENABLE(CONDITION) | |
| 8750 | |
| 8751 #if ENABLE(CONDITION) | |
| 8752 static void conditionalConditionStaticVoidMethodMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
| 8753 { | |
| 8754 TestObject::conditionalConditionStaticVoidMethod(); | |
| 8755 } | |
| 8756 #endif // ENABLE(CONDITION) | |
| 8757 | |
| 8758 #if ENABLE(CONDITION) | |
| 8759 static void conditionalConditionStaticVoidMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 8760 { | |
| 8761 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8762 TestObjectV8Internal::conditionalConditionStaticVoidMethodMethod(info); | |
| 8763 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8764 } | |
| 8765 #endif // ENABLE(CONDITION) | |
| 8766 | |
| 8767 static void customVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 8768 { | |
| 8769 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8770 V8TestObject::customVoidMethodMethodCustom(info); | |
| 8771 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8772 } | |
| 8773 | |
| 8774 #if ENABLE(CONDITION) | |
| 8775 static void conditionalConditionCustomVoidMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 8776 { | |
| 8777 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8778 V8TestObject::conditionalConditionCustomVoidMethodMethodCustom(info); | |
| 8779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8780 } | |
| 8781 #endif // ENABLE(CONDITION) | |
| 8782 | |
| 8783 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 8784 { | |
| 8785 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8786 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | |
| 8787 impl->customElementCallbacksVoidMethod(); | |
| 8788 } | |
| 8789 | |
| 8790 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
| 8791 { | |
| 8792 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8793 TestObjectV8Internal::customElementCallbacksVoidMethodMethod(info); | |
| 8794 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8795 } | |
| 8796 | |
| 8797 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
| 8798 { | |
| 8799 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8800 impl->deprecatedVoidMethod(); | |
| 8801 } | |
| 8802 | |
| 8803 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 8804 { | |
| 8805 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8806 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::voidMethod); | |
| 8807 TestObjectV8Internal::deprecatedVoidMethodMethod(info); | |
| 8808 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8809 } | |
| 8810 | |
| 8811 static void doNotCheckSignatureVoidMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 8812 { | |
| 8813 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8814 impl->doNotCheckSignatureVoidMethod(); | |
| 8815 } | |
| 8816 | |
| 8817 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
| 8818 { | |
| 8819 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8820 TestObjectV8Internal::doNotCheckSignatureVoidMethodMethod(info); | |
| 8821 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8822 } | |
| 8823 | |
| 8824 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 8825 { | |
| 8826 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8827 impl->implementedAsMethodName(); | |
| 8828 } | |
| 8829 | |
| 8830 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 8831 { | |
| 8832 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8833 TestObjectV8Internal::implementedAsVoidMethodMethod(info); | |
| 8834 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8835 } | |
| 8836 | |
| 8837 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 8838 { | |
| 8839 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8840 impl->measureAsVoidMethod(); | |
| 8841 } | |
| 8842 | |
| 8843 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 8844 { | |
| 8845 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8846 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | |
| 8847 TestObjectV8Internal::measureAsVoidMethodMethod(info); | |
| 8848 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8849 } | |
| 8850 | |
| 8851 static void DeprecateAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 8852 { | |
| 8853 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8854 impl->DeprecateAsOverloadedMethod(); | |
| 8855 } | |
| 8856 | |
| 8857 static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
| 8858 { | |
| 8859 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
OverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8860 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8861 int arg; | |
| 8862 { | |
| 8863 v8::TryCatch block; | |
| 8864 V8RethrowTryCatchScope rethrow(block); | |
| 8865 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | |
| 8866 } | |
| 8867 impl->DeprecateAsOverloadedMethod(arg); | |
| 8868 } | |
| 8869 | |
| 8870 static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 8871 { | |
| 8872 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
OverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8873 switch (std::min(1, info.Length())) { | |
| 8874 case 0: | |
| 8875 if (true) { | |
| 8876 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate
()), UseCounter::TestFeatureA); | |
| 8877 DeprecateAsOverloadedMethod1Method(info); | |
| 8878 return; | |
| 8879 } | |
| 8880 break; | |
| 8881 case 1: | |
| 8882 if (true) { | |
| 8883 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate
()), UseCounter::TestFeatureB); | |
| 8884 DeprecateAsOverloadedMethod2Method(info); | |
| 8885 return; | |
| 8886 } | |
| 8887 break; | |
| 8888 default: | |
| 8889 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 8890 exceptionState.throwIfNeeded(); | |
| 8891 return; | |
| 8892 } | |
| 8893 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 8894 exceptionState.throwIfNeeded(); | |
| 8895 } | |
| 8896 | |
| 8897 static void DeprecateAsOverloadedMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 8898 { | |
| 8899 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8900 TestObjectV8Internal::DeprecateAsOverloadedMethodMethod(info); | |
| 8901 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8902 } | |
| 8903 | |
| 8904 static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
| 8905 { | |
| 8906 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8907 impl->DeprecateAsSameValueOverloadedMethod(); | |
| 8908 } | |
| 8909 | |
| 8910 static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
| 8911 { | |
| 8912 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
SameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8913 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8914 int arg; | |
| 8915 { | |
| 8916 v8::TryCatch block; | |
| 8917 V8RethrowTryCatchScope rethrow(block); | |
| 8918 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | |
| 8919 } | |
| 8920 impl->DeprecateAsSameValueOverloadedMethod(arg); | |
| 8921 } | |
| 8922 | |
| 8923 static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
| 8924 { | |
| 8925 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
SameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8926 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::TestFeature); | |
| 8927 switch (std::min(1, info.Length())) { | |
| 8928 case 0: | |
| 8929 if (true) { | |
| 8930 DeprecateAsSameValueOverloadedMethod1Method(info); | |
| 8931 return; | |
| 8932 } | |
| 8933 break; | |
| 8934 case 1: | |
| 8935 if (true) { | |
| 8936 DeprecateAsSameValueOverloadedMethod2Method(info); | |
| 8937 return; | |
| 8938 } | |
| 8939 break; | |
| 8940 default: | |
| 8941 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 8942 exceptionState.throwIfNeeded(); | |
| 8943 return; | |
| 8944 } | |
| 8945 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 8946 exceptionState.throwIfNeeded(); | |
| 8947 } | |
| 8948 | |
| 8949 static void DeprecateAsSameValueOverloadedMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 8950 { | |
| 8951 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 8952 TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethod(info); | |
| 8953 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 8954 } | |
| 8955 | |
| 8956 static void measureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 8957 { | |
| 8958 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8959 impl->measureAsOverloadedMethod(); | |
| 8960 } | |
| 8961 | |
| 8962 static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 8963 { | |
| 8964 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOv
erloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8965 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 8966 int arg; | |
| 8967 { | |
| 8968 v8::TryCatch block; | |
| 8969 V8RethrowTryCatchScope rethrow(block); | |
| 8970 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | |
| 8971 } | |
| 8972 impl->measureAsOverloadedMethod(arg); | |
| 8973 } | |
| 8974 | |
| 8975 static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 8976 { | |
| 8977 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOv
erloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 8978 switch (std::min(1, info.Length())) { | |
| 8979 case 0: | |
| 8980 if (true) { | |
| 8981 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCou
nter::TestFeatureA); | |
| 8982 measureAsOverloadedMethod1Method(info); | |
| 8983 return; | |
| 8984 } | |
| 8985 break; | |
| 8986 case 1: | |
| 8987 if (true) { | |
| 8988 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCou
nter::TestFeatureB); | |
| 8989 measureAsOverloadedMethod2Method(info); | |
| 8990 return; | |
| 8991 } | |
| 8992 break; | |
| 8993 default: | |
| 8994 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 8995 exceptionState.throwIfNeeded(); | |
| 8996 return; | |
| 8997 } | |
| 8998 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 8999 exceptionState.throwIfNeeded(); | |
| 9000 } | |
| 9001 | |
| 9002 static void measureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 9003 { | |
| 9004 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9005 TestObjectV8Internal::measureAsOverloadedMethodMethod(info); | |
| 9006 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9007 } | |
| 9008 | |
| 9009 static void measureAsSameValueOverloadedMethod1Method(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 9010 { | |
| 9011 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9012 impl->measureAsSameValueOverloadedMethod(); | |
| 9013 } | |
| 9014 | |
| 9015 static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 9016 { | |
| 9017 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSa
meValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 9018 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9019 int arg; | |
| 9020 { | |
| 9021 v8::TryCatch block; | |
| 9022 V8RethrowTryCatchScope rethrow(block); | |
| 9023 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | |
| 9024 } | |
| 9025 impl->measureAsSameValueOverloadedMethod(arg); | |
| 9026 } | |
| 9027 | |
| 9028 static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 9029 { | |
| 9030 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSa
meValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 9031 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | |
| 9032 switch (std::min(1, info.Length())) { | |
| 9033 case 0: | |
| 9034 if (true) { | |
| 9035 measureAsSameValueOverloadedMethod1Method(info); | |
| 9036 return; | |
| 9037 } | |
| 9038 break; | |
| 9039 case 1: | |
| 9040 if (true) { | |
| 9041 measureAsSameValueOverloadedMethod2Method(info); | |
| 9042 return; | |
| 9043 } | |
| 9044 break; | |
| 9045 default: | |
| 9046 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 9047 exceptionState.throwIfNeeded(); | |
| 9048 return; | |
| 9049 } | |
| 9050 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 9051 exceptionState.throwIfNeeded(); | |
| 9052 } | |
| 9053 | |
| 9054 static void measureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
| 9055 { | |
| 9056 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9057 TestObjectV8Internal::measureAsSameValueOverloadedMethodMethod(info); | |
| 9058 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9059 } | |
| 9060 | |
| 9061 static void deprecateAsMeasureAsSameValueOverloadedMethod1Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 9062 { | |
| 9063 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9064 impl->deprecateAsMeasureAsSameValueOverloadedMethod(); | |
| 9065 } | |
| 9066 | |
| 9067 static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 9068 { | |
| 9069 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
MeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | |
| 9070 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9071 int arg; | |
| 9072 { | |
| 9073 v8::TryCatch block; | |
| 9074 V8RethrowTryCatchScope rethrow(block); | |
| 9075 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | |
| 9076 } | |
| 9077 impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg); | |
| 9078 } | |
| 9079 | |
| 9080 static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
| 9081 { | |
| 9082 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
MeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | |
| 9083 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | |
| 9084 switch (std::min(1, info.Length())) { | |
| 9085 case 0: | |
| 9086 if (true) { | |
| 9087 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate
()), UseCounter::TestFeatureA); | |
| 9088 deprecateAsMeasureAsSameValueOverloadedMethod1Method(info); | |
| 9089 return; | |
| 9090 } | |
| 9091 break; | |
| 9092 case 1: | |
| 9093 if (true) { | |
| 9094 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate
()), UseCounter::TestFeatureB); | |
| 9095 deprecateAsMeasureAsSameValueOverloadedMethod2Method(info); | |
| 9096 return; | |
| 9097 } | |
| 9098 break; | |
| 9099 default: | |
| 9100 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 9101 exceptionState.throwIfNeeded(); | |
| 9102 return; | |
| 9103 } | |
| 9104 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 9105 exceptionState.throwIfNeeded(); | |
| 9106 } | |
| 9107 | |
| 9108 static void deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | |
| 9109 { | |
| 9110 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9111 TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethod(in
fo); | |
| 9112 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9113 } | |
| 9114 | |
| 9115 static void deprecateAsSameValueMeasureAsOverloadedMethod1Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 9116 { | |
| 9117 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9118 impl->deprecateAsSameValueMeasureAsOverloadedMethod(); | |
| 9119 } | |
| 9120 | |
| 9121 static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 9122 { | |
| 9123 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | |
| 9124 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9125 int arg; | |
| 9126 { | |
| 9127 v8::TryCatch block; | |
| 9128 V8RethrowTryCatchScope rethrow(block); | |
| 9129 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | |
| 9130 } | |
| 9131 impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg); | |
| 9132 } | |
| 9133 | |
| 9134 static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
| 9135 { | |
| 9136 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | |
| 9137 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::TestFeature); | |
| 9138 switch (std::min(1, info.Length())) { | |
| 9139 case 0: | |
| 9140 if (true) { | |
| 9141 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCou
nter::TestFeatureA); | |
| 9142 deprecateAsSameValueMeasureAsOverloadedMethod1Method(info); | |
| 9143 return; | |
| 9144 } | |
| 9145 break; | |
| 9146 case 1: | |
| 9147 if (true) { | |
| 9148 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCou
nter::TestFeatureB); | |
| 9149 deprecateAsSameValueMeasureAsOverloadedMethod2Method(info); | |
| 9150 return; | |
| 9151 } | |
| 9152 break; | |
| 9153 default: | |
| 9154 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 9155 exceptionState.throwIfNeeded(); | |
| 9156 return; | |
| 9157 } | |
| 9158 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 9159 exceptionState.throwIfNeeded(); | |
| 9160 } | |
| 9161 | |
| 9162 static void deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | |
| 9163 { | |
| 9164 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9165 TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethod(in
fo); | |
| 9166 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9167 } | |
| 9168 | |
| 9169 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9170 { | |
| 9171 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9172 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(); | |
| 9173 } | |
| 9174 | |
| 9175 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9176 { | |
| 9177 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.
GetIsolate()); | |
| 9178 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9179 int arg; | |
| 9180 { | |
| 9181 v8::TryCatch block; | |
| 9182 V8RethrowTryCatchScope rethrow(block); | |
| 9183 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | |
| 9184 } | |
| 9185 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg); | |
| 9186 } | |
| 9187 | |
| 9188 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | |
| 9189 { | |
| 9190 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.
GetIsolate()); | |
| 9191 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeatureB); | |
| 9192 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::TestFeatureA); | |
| 9193 switch (std::min(1, info.Length())) { | |
| 9194 case 0: | |
| 9195 if (true) { | |
| 9196 deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(info); | |
| 9197 return; | |
| 9198 } | |
| 9199 break; | |
| 9200 case 1: | |
| 9201 if (true) { | |
| 9202 deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(info); | |
| 9203 return; | |
| 9204 } | |
| 9205 break; | |
| 9206 default: | |
| 9207 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | |
| 9208 exceptionState.throwIfNeeded(); | |
| 9209 return; | |
| 9210 } | |
| 9211 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 9212 exceptionState.throwIfNeeded(); | |
| 9213 } | |
| 9214 | |
| 9215 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9216 { | |
| 9217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9218 TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethod
Method(info); | |
| 9219 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9220 } | |
| 9221 | |
| 9222 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
| 9223 { | |
| 9224 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9225 impl->notEnumerableVoidMethod(); | |
| 9226 } | |
| 9227 | |
| 9228 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
| 9229 { | |
| 9230 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9231 TestObjectV8Internal::notEnumerableVoidMethodMethod(info); | |
| 9232 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9233 } | |
| 9234 | |
| 9235 static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 9236 { | |
| 9237 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9238 impl->perContextEnabledVoidMethod(); | |
| 9239 } | |
| 9240 | |
| 9241 static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 9242 { | |
| 9243 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9244 TestObjectV8Internal::perContextEnabledVoidMethodMethod(info); | |
| 9245 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9246 } | |
| 9247 | |
| 9248 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
| 9249 { | |
| 9250 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9251 impl->perWorldBindingsVoidMethod(); | |
| 9252 } | |
| 9253 | |
| 9254 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 9255 { | |
| 9256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9257 TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info); | |
| 9258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9259 } | |
| 9260 | |
| 9261 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
| 9262 { | |
| 9263 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9264 impl->perWorldBindingsVoidMethod(); | |
| 9265 } | |
| 9266 | |
| 9267 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 9268 { | |
| 9269 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9270 TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info); | |
| 9271 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9272 } | |
| 9273 | |
| 9274 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 9275 { | |
| 9276 if (UNLIKELY(info.Length() < 1)) { | |
| 9277 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("p
erWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(),
info.GetIsolate()), info.GetIsolate()); | |
| 9278 return; | |
| 9279 } | |
| 9280 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9281 TestInterfaceEmpty* testInterfaceEmptyArg; | |
| 9282 { | |
| 9283 v8::TryCatch block; | |
| 9284 V8RethrowTryCatchScope rethrow(block); | |
| 9285 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); | |
| 9286 } | |
| 9287 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg)
; | |
| 9288 } | |
| 9289 | |
| 9290 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9291 { | |
| 9292 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9293 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(
info); | |
| 9294 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9295 } | |
| 9296 | |
| 9297 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9298 { | |
| 9299 if (UNLIKELY(info.Length() < 1)) { | |
| 9300 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("p
erWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(),
info.GetIsolate()), info.GetIsolate()); | |
| 9301 return; | |
| 9302 } | |
| 9303 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9304 TestInterfaceEmpty* testInterfaceEmptyArg; | |
| 9305 { | |
| 9306 v8::TryCatch block; | |
| 9307 V8RethrowTryCatchScope rethrow(block); | |
| 9308 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); | |
| 9309 } | |
| 9310 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg)
; | |
| 9311 } | |
| 9312 | |
| 9313 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain
World(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9314 { | |
| 9315 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9316 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodF
orMainWorld(info); | |
| 9317 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9318 } | |
| 9319 | |
| 9320 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) | |
| 9321 { | |
| 9322 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9323 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); | |
| 9324 } | |
| 9325 | |
| 9326 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9327 { | |
| 9328 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9329 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 9330 V8PerContextData* contextData = scriptState->perContextData(); | |
| 9331 if (contextData && contextData->activityLogger()) { | |
| 9332 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0); | |
| 9333 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA
llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); | |
| 9334 } | |
| 9335 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethod(info); | |
| 9336 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9337 } | |
| 9338 | |
| 9339 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWo
rld(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9340 { | |
| 9341 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9342 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); | |
| 9343 } | |
| 9344 | |
| 9345 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackF
orMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9346 { | |
| 9347 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9348 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 9349 V8PerContextData* contextData = scriptState->perContextData(); | |
| 9350 if (contextData && contextData->activityLogger()) { | |
| 9351 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0); | |
| 9352 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA
llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); | |
| 9353 } | |
| 9354 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethodForMainWorld(info); | |
| 9355 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9356 } | |
| 9357 | |
| 9358 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9359 { | |
| 9360 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9361 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); | |
| 9362 } | |
| 9363 | |
| 9364 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9365 { | |
| 9366 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9367 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | |
| 9368 V8PerContextData* contextData = scriptState->perContextData(); | |
| 9369 if (contextData && contextData->activityLogger()) { | |
| 9370 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0); | |
| 9371 contextData->activityLogger()->logMethod("TestObject.activityLoggingForI
solatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); | |
| 9372 } | |
| 9373 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethod(info); | |
| 9374 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9375 } | |
| 9376 | |
| 9377 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForM
ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9378 { | |
| 9379 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9380 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); | |
| 9381 } | |
| 9382 | |
| 9383 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9384 { | |
| 9385 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9386 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethodForMainWorld(info); | |
| 9387 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9388 } | |
| 9389 | |
| 9390 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 9391 { | |
| 9392 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 9393 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9394 impl->raisesExceptionVoidMethod(exceptionState); | |
| 9395 if (exceptionState.hadException()) { | |
| 9396 exceptionState.throwIfNeeded(); | |
| 9397 return; | |
| 9398 } | |
| 9399 } | |
| 9400 | |
| 9401 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
| 9402 { | |
| 9403 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9404 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); | |
| 9405 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9406 } | |
| 9407 | |
| 9408 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
| 9409 { | |
| 9410 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 9411 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9412 String result = impl->raisesExceptionStringMethod(exceptionState); | |
| 9413 if (exceptionState.hadException()) { | |
| 9414 exceptionState.throwIfNeeded(); | |
| 9415 return; | |
| 9416 } | |
| 9417 v8SetReturnValueString(info, result, info.GetIsolate()); | |
| 9418 } | |
| 9419 | |
| 9420 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 9421 { | |
| 9422 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9423 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); | |
| 9424 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9425 } | |
| 9426 | |
| 9427 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
| 9428 { | |
| 9429 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
| 9430 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9431 int optionalLongArg; | |
| 9432 { | |
| 9433 v8::TryCatch block; | |
| 9434 V8RethrowTryCatchScope rethrow(block); | |
| 9435 if (UNLIKELY(info.Length() <= 0)) { | |
| 9436 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); | |
| 9437 if (exceptionState.hadException()) { | |
| 9438 exceptionState.throwIfNeeded(); | |
| 9439 return; | |
| 9440 } | |
| 9441 return; | |
| 9442 } | |
| 9443 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | |
| 9444 } | |
| 9445 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta
te); | |
| 9446 if (exceptionState.hadException()) { | |
| 9447 exceptionState.throwIfNeeded(); | |
| 9448 return; | |
| 9449 } | |
| 9450 } | |
| 9451 | |
| 9452 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | |
| 9453 { | |
| 9454 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9455 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); | |
| 9456 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9457 } | |
| 9458 | |
| 9459 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | |
| 9460 { | |
| 9461 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); | |
| 9462 if (UNLIKELY(info.Length() < 1)) { | |
| 9463 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 9464 exceptionState.throwIfNeeded(); | |
| 9465 return; | |
| 9466 } | |
| 9467 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9468 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; | |
| 9469 { | |
| 9470 if (info.Length() <= 0 || !info[0]->IsFunction()) { | |
| 9471 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | |
| 9472 exceptionState.throwIfNeeded(); | |
| 9473 return; | |
| 9474 } | |
| 9475 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | |
| 9476 } | |
| 9477 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg.release(), exceptionState); | |
| 9478 if (exceptionState.hadException()) { | |
| 9479 exceptionState.throwIfNeeded(); | |
| 9480 return; | |
| 9481 } | |
| 9482 } | |
| 9483 | |
| 9484 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9485 { | |
| 9486 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9487 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); | |
| 9488 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9489 } | |
| 9490 | |
| 9491 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9492 { | |
| 9493 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); | |
| 9494 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9495 OwnPtrWillBeRawPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg =
nullptr;; | |
| 9496 { | |
| 9497 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | |
| 9498 if (!info[0]->IsFunction()) { | |
| 9499 exceptionState.throwTypeError("The callback provided as paramete
r 1 is not a function."); | |
| 9500 exceptionState.throwIfNeeded(); | |
| 9501 return; | |
| 9502 } | |
| 9503 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; | |
| 9504 } | |
| 9505 } | |
| 9506 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg.release(), exceptionState); | |
| 9507 if (exceptionState.hadException()) { | |
| 9508 exceptionState.throwIfNeeded(); | |
| 9509 return; | |
| 9510 } | |
| 9511 } | |
| 9512 | |
| 9513 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9514 { | |
| 9515 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9516 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); | |
| 9517 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9518 } | |
| 9519 | |
| 9520 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) | |
| 9521 { | |
| 9522 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | |
| 9523 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9524 RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyV
oidMethod(exceptionState); | |
| 9525 if (exceptionState.hadException()) { | |
| 9526 exceptionState.throwIfNeeded(); | |
| 9527 return; | |
| 9528 } | |
| 9529 v8SetReturnValue(info, result.release()); | |
| 9530 } | |
| 9531 | |
| 9532 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | |
| 9533 { | |
| 9534 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9535 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); | |
| 9536 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9537 } | |
| 9538 | |
| 9539 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9540 { | |
| 9541 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); | |
| 9542 if (UNLIKELY(info.Length() < 1)) { | |
| 9543 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 9544 exceptionState.throwIfNeeded(); | |
| 9545 return; | |
| 9546 } | |
| 9547 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9548 int longArg; | |
| 9549 { | |
| 9550 v8::TryCatch block; | |
| 9551 V8RethrowTryCatchScope rethrow(block); | |
| 9552 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 9553 } | |
| 9554 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | |
| 9555 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(executionCont
ext, longArg, exceptionState); | |
| 9556 if (exceptionState.hadException()) { | |
| 9557 exceptionState.throwIfNeeded(); | |
| 9558 return; | |
| 9559 } | |
| 9560 } | |
| 9561 | |
| 9562 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9563 { | |
| 9564 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9565 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA
rgMethod(info); | |
| 9566 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9567 } | |
| 9568 | |
| 9569 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 9570 { | |
| 9571 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9572 impl->runtimeEnabledVoidMethod(); | |
| 9573 } | |
| 9574 | |
| 9575 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
| 9576 { | |
| 9577 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9578 TestObjectV8Internal::runtimeEnabledVoidMethodMethod(info); | |
| 9579 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9580 } | |
| 9581 | |
| 9582 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
| 9583 { | |
| 9584 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9585 impl->perWorldBindingsRuntimeEnabledVoidMethod(); | |
| 9586 } | |
| 9587 | |
| 9588 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | |
| 9589 { | |
| 9590 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9591 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info); | |
| 9592 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9593 } | |
| 9594 | |
| 9595 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) | |
| 9596 { | |
| 9597 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9598 impl->perWorldBindingsRuntimeEnabledVoidMethod(); | |
| 9599 } | |
| 9600 | |
| 9601 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9602 { | |
| 9603 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9604 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainW
orld(info); | |
| 9605 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9606 } | |
| 9607 | |
| 9608 static void runtimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 9609 { | |
| 9610 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9611 V8StringResource<> stringArg; | |
| 9612 { | |
| 9613 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | |
| 9614 } | |
| 9615 impl->runtimeEnabledOverloadedVoidMethod(stringArg); | |
| 9616 } | |
| 9617 | |
| 9618 static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallback
Info<v8::Value>& info) | |
| 9619 { | |
| 9620 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab
ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 9621 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9622 int longArg; | |
| 9623 { | |
| 9624 v8::TryCatch block; | |
| 9625 V8RethrowTryCatchScope rethrow(block); | |
| 9626 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 9627 } | |
| 9628 impl->runtimeEnabledOverloadedVoidMethod(longArg); | |
| 9629 } | |
| 9630 | |
| 9631 static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
| 9632 { | |
| 9633 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab
ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
| 9634 switch (std::min(1, info.Length())) { | |
| 9635 case 1: | |
| 9636 if (info[0]->IsNumber()) { | |
| 9637 runtimeEnabledOverloadedVoidMethod2Method(info); | |
| 9638 return; | |
| 9639 } | |
| 9640 if (true) { | |
| 9641 runtimeEnabledOverloadedVoidMethod1Method(info); | |
| 9642 return; | |
| 9643 } | |
| 9644 if (true) { | |
| 9645 runtimeEnabledOverloadedVoidMethod2Method(info); | |
| 9646 return; | |
| 9647 } | |
| 9648 break; | |
| 9649 default: | |
| 9650 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 9651 exceptionState.throwIfNeeded(); | |
| 9652 return; | |
| 9653 } | |
| 9654 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 9655 exceptionState.throwIfNeeded(); | |
| 9656 } | |
| 9657 | |
| 9658 static void runtimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
| 9659 { | |
| 9660 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9661 TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethod(info); | |
| 9662 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9663 } | |
| 9664 | |
| 9665 static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 9666 { | |
| 9667 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9668 V8StringResource<> stringArg; | |
| 9669 { | |
| 9670 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | |
| 9671 } | |
| 9672 impl->partiallyRuntimeEnabledOverloadedVoidMethod(stringArg); | |
| 9673 } | |
| 9674 | |
| 9675 static void partiallyRuntimeEnabledOverloadedVoidMethod2Method(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 9676 { | |
| 9677 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9678 TestInterfaceImplementation* testInterface; | |
| 9679 { | |
| 9680 v8::TryCatch block; | |
| 9681 V8RethrowTryCatchScope rethrow(block); | |
| 9682 TONATIVE_VOID_INTERNAL(testInterface, V8TestInterface::toImplWithTypeChe
ck(info.GetIsolate(), info[0])); | |
| 9683 } | |
| 9684 impl->partiallyRuntimeEnabledOverloadedVoidMethod(testInterface); | |
| 9685 } | |
| 9686 | |
| 9687 static void partiallyRuntimeEnabledOverloadedVoidMethod3Method(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 9688 { | |
| 9689 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu
ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | |
| 9690 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9691 int longArg; | |
| 9692 { | |
| 9693 v8::TryCatch block; | |
| 9694 V8RethrowTryCatchScope rethrow(block); | |
| 9695 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | |
| 9696 } | |
| 9697 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg); | |
| 9698 } | |
| 9699 | |
| 9700 static void partiallyRuntimeEnabledOverloadedVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) | |
| 9701 { | |
| 9702 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu
ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | |
| 9703 switch (std::min(1, info.Length())) { | |
| 9704 case 1: | |
| 9705 if (RuntimeEnabledFeatures::featureName2Enabled()) { | |
| 9706 if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) { | |
| 9707 partiallyRuntimeEnabledOverloadedVoidMethod2Method(info); | |
| 9708 return; | |
| 9709 } | |
| 9710 } | |
| 9711 if (info[0]->IsNumber()) { | |
| 9712 partiallyRuntimeEnabledOverloadedVoidMethod3Method(info); | |
| 9713 return; | |
| 9714 } | |
| 9715 if (RuntimeEnabledFeatures::featureName1Enabled()) { | |
| 9716 if (true) { | |
| 9717 partiallyRuntimeEnabledOverloadedVoidMethod1Method(info); | |
| 9718 return; | |
| 9719 } | |
| 9720 } | |
| 9721 if (true) { | |
| 9722 partiallyRuntimeEnabledOverloadedVoidMethod3Method(info); | |
| 9723 return; | |
| 9724 } | |
| 9725 break; | |
| 9726 default: | |
| 9727 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
| 9728 exceptionState.throwIfNeeded(); | |
| 9729 return; | |
| 9730 } | |
| 9731 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
| 9732 exceptionState.throwIfNeeded(); | |
| 9733 } | |
| 9734 | |
| 9735 static void partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | |
| 9736 { | |
| 9737 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9738 TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethod(info
); | |
| 9739 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9740 } | |
| 9741 | |
| 9742 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) | |
| 9743 { | |
| 9744 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9745 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Method(), info.GetIsolate()); | |
| 9746 } | |
| 9747 | |
| 9748 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | |
| 9749 { | |
| 9750 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9751 TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info); | |
| 9752 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9753 } | |
| 9754 | |
| 9755 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
| 9756 { | |
| 9757 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9758 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringMethod(), info.GetIsolate()); | |
| 9759 } | |
| 9760 | |
| 9761 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | |
| 9762 { | |
| 9763 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9764 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethod(i
nfo); | |
| 9765 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9766 } | |
| 9767 | |
| 9768 static void treatReturnedNullStringAsNullByteStringMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
| 9769 { | |
| 9770 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9771 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullByteSt
ringMethod(), info.GetIsolate()); | |
| 9772 } | |
| 9773 | |
| 9774 static void treatReturnedNullStringAsNullByteStringMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | |
| 9775 { | |
| 9776 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9777 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringMethodMethod(in
fo); | |
| 9778 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9779 } | |
| 9780 | |
| 9781 static void treatReturnedNullStringAsUndefinedByteStringMethodMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) | |
| 9782 { | |
| 9783 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9784 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedByteStringMethod(), info.GetIsolate()); | |
| 9785 } | |
| 9786 | |
| 9787 static void treatReturnedNullStringAsUndefinedByteStringMethodMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9788 { | |
| 9789 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9790 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringMethodMeth
od(info); | |
| 9791 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9792 } | |
| 9793 | |
| 9794 static void treatReturnedNullStringAsNullScalarValueStringMethodMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) | |
| 9795 { | |
| 9796 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9797 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullScalar
ValueStringMethod(), info.GetIsolate()); | |
| 9798 } | |
| 9799 | |
| 9800 static void treatReturnedNullStringAsNullScalarValueStringMethodMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9801 { | |
| 9802 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9803 TestObjectV8Internal::treatReturnedNullStringAsNullScalarValueStringMethodMe
thod(info); | |
| 9804 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9805 } | |
| 9806 | |
| 9807 static void treatReturnedNullStringAsUndefinedScalarValueStringMethodMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9808 { | |
| 9809 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9810 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedScalarValueStringMethod(), info.GetIsolate()); | |
| 9811 } | |
| 9812 | |
| 9813 static void treatReturnedNullStringAsUndefinedScalarValueStringMethodMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9814 { | |
| 9815 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9816 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringMet
hodMethod(info); | |
| 9817 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9818 } | |
| 9819 | |
| 9820 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) | |
| 9821 { | |
| 9822 if (UNLIKELY(info.Length() < 1)) { | |
| 9823 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("t
ypeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Leng
th(), info.GetIsolate()), info.GetIsolate()); | |
| 9824 return; | |
| 9825 } | |
| 9826 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9827 TestInterfaceEmpty* testInterfaceEmptyArg; | |
| 9828 { | |
| 9829 v8::TryCatch block; | |
| 9830 V8RethrowTryCatchScope rethrow(block); | |
| 9831 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate())) { | |
| 9832 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter
1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); | |
| 9833 return; | |
| 9834 } | |
| 9835 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); | |
| 9836 } | |
| 9837 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmpt
yArg); | |
| 9838 } | |
| 9839 | |
| 9840 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9841 { | |
| 9842 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9843 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMe
thod(info); | |
| 9844 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9845 } | |
| 9846 | |
| 9847 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9848 { | |
| 9849 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9850 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyArg; | |
| 9851 { | |
| 9852 for (int i = 0; i < info.Length(); ++i) { | |
| 9853 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | |
| 9854 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg", "TestObject"
, "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); | |
| 9855 return; | |
| 9856 } | |
| 9857 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Handle
<v8::Object>::Cast(info[i]))); | |
| 9858 } | |
| 9859 } | |
| 9860 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg(testInter
faceEmptyArg); | |
| 9861 } | |
| 9862 | |
| 9863 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9864 { | |
| 9865 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9866 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyVaria
dicArgMethod(info); | |
| 9867 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9868 } | |
| 9869 | |
| 9870 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) | |
| 9871 { | |
| 9872 if (UNLIKELY(info.Length() < 2)) { | |
| 9873 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("t
ypeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", 2, info.Lengt
h(), info.GetIsolate()), info.GetIsolate()); | |
| 9874 return; | |
| 9875 } | |
| 9876 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9877 float floatArg; | |
| 9878 double doubleArg; | |
| 9879 { | |
| 9880 v8::TryCatch block; | |
| 9881 V8RethrowTryCatchScope rethrow(block); | |
| 9882 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue
())); | |
| 9883 if (!std::isfinite(floatArg)) { | |
| 9884 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", "float para
meter 1 is non-finite."), info.GetIsolate()); | |
| 9885 return; | |
| 9886 } | |
| 9887 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[1]->NumberVal
ue())); | |
| 9888 if (!std::isfinite(doubleArg)) { | |
| 9889 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", "double par
ameter 2 is non-finite."), info.GetIsolate()); | |
| 9890 return; | |
| 9891 } | |
| 9892 } | |
| 9893 impl->typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(floatArg, doubleAr
g); | |
| 9894 } | |
| 9895 | |
| 9896 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9897 { | |
| 9898 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9899 TestObjectV8Internal::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMet
hod(info); | |
| 9900 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9901 } | |
| 9902 | |
| 9903 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
| 9904 { | |
| 9905 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9906 impl->unforgeableVoidMethod(); | |
| 9907 } | |
| 9908 | |
| 9909 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
| 9910 { | |
| 9911 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9912 TestObjectV8Internal::unforgeableVoidMethodMethod(info); | |
| 9913 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9914 } | |
| 9915 | |
| 9916 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) | |
| 9917 { | |
| 9918 if (UNLIKELY(info.Length() < 1)) { | |
| 9919 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceGarbageCollectedSequenceArg", "TestObject", 1, info.Length
(), info.GetIsolate()), info.GetIsolate()); | |
| 9920 return; | |
| 9921 } | |
| 9922 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9923 HeapVector<Member<TestInterfaceGarbageCollected> > testInterfaceGarbageColle
ctedSequenceArg; | |
| 9924 { | |
| 9925 v8::TryCatch block; | |
| 9926 V8RethrowTryCatchScope rethrow(block); | |
| 9927 TONATIVE_VOID_INTERNAL(testInterfaceGarbageCollectedSequenceArg, (toMemb
erNativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(in
fo[0], 1, info.GetIsolate()))); | |
| 9928 } | |
| 9929 impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbag
eCollectedSequenceArg); | |
| 9930 } | |
| 9931 | |
| 9932 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9933 { | |
| 9934 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9935 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMeth
od(info); | |
| 9936 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9937 } | |
| 9938 | |
| 9939 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
| 9940 { | |
| 9941 if (UNLIKELY(info.Length() < 1)) { | |
| 9942 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceGarbageCollectedArrayArg", "TestObject", 1, info.Length(),
info.GetIsolate()), info.GetIsolate()); | |
| 9943 return; | |
| 9944 } | |
| 9945 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9946 HeapVector<Member<TestInterfaceGarbageCollected> > testInterfaceGarbageColle
ctedArrayArg; | |
| 9947 { | |
| 9948 v8::TryCatch block; | |
| 9949 V8RethrowTryCatchScope rethrow(block); | |
| 9950 TONATIVE_VOID_INTERNAL(testInterfaceGarbageCollectedArrayArg, (toMemberN
ativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(info[
0], 1, info.GetIsolate()))); | |
| 9951 } | |
| 9952 impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCo
llectedArrayArg); | |
| 9953 } | |
| 9954 | |
| 9955 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9956 { | |
| 9957 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9958 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod(
info); | |
| 9959 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9960 } | |
| 9961 | |
| 9962 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9963 { | |
| 9964 if (UNLIKELY(info.Length() < 1)) { | |
| 9965 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", "TestObject", 1, info.
Length(), info.GetIsolate()), info.GetIsolate()); | |
| 9966 return; | |
| 9967 } | |
| 9968 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9969 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > t
estInterfaceWillBeGarbageCollectedSequenceArg; | |
| 9970 { | |
| 9971 v8::TryCatch block; | |
| 9972 V8RethrowTryCatchScope rethrow(block); | |
| 9973 TONATIVE_VOID_INTERNAL(testInterfaceWillBeGarbageCollectedSequenceArg, (
toRefPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInter
faceWillBeGarbageCollected>(info[0], 1, info.GetIsolate()))); | |
| 9974 } | |
| 9975 impl->voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(testInterface
WillBeGarbageCollectedSequenceArg); | |
| 9976 } | |
| 9977 | |
| 9978 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 9979 { | |
| 9980 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 9981 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceA
rgMethod(info); | |
| 9982 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 9983 } | |
| 9984 | |
| 9985 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) | |
| 9986 { | |
| 9987 if (UNLIKELY(info.Length() < 1)) { | |
| 9988 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceWillBeGarbageCollectedArrayArg", "TestObject", 1, info.Len
gth(), info.GetIsolate()), info.GetIsolate()); | |
| 9989 return; | |
| 9990 } | |
| 9991 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 9992 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > t
estInterfaceWillBeGarbageCollectedArrayArg; | |
| 9993 { | |
| 9994 v8::TryCatch block; | |
| 9995 V8RethrowTryCatchScope rethrow(block); | |
| 9996 TONATIVE_VOID_INTERNAL(testInterfaceWillBeGarbageCollectedArrayArg, (toR
efPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInterfac
eWillBeGarbageCollected>(info[0], 1, info.GetIsolate()))); | |
| 9997 } | |
| 9998 impl->voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(testInterfaceWil
lBeGarbageCollectedArrayArg); | |
| 9999 } | |
| 10000 | |
| 10001 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 10002 { | |
| 10003 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 10004 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgM
ethod(info); | |
| 10005 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 10006 } | |
| 10007 | |
| 10008 static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
| 10009 { | |
| 10010 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 10011 V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl); | |
| 10012 } | |
| 10013 | |
| 10014 static void voidMethodImplementedInPrivateScriptMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
| 10015 { | |
| 10016 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 10017 TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethod(info); | |
| 10018 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 10019 } | |
| 10020 | |
| 10021 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
| 10022 { | |
| 10023 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 10024 int result = 0; | |
| 10025 if (!V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMetho
d(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | |
| 10026 return; | |
| 10027 v8SetReturnValueInt(info, result); | |
| 10028 } | |
| 10029 | |
| 10030 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
| 10031 { | |
| 10032 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 10033 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); | |
| 10034 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 10035 } | |
| 10036 | |
| 10037 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | |
| 10038 { | |
| 10039 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info.
GetIsolate()); | |
| 10040 if (UNLIKELY(info.Length() < 1)) { | |
| 10041 setMinimumArityTypeError(exceptionState, 1, info.Length()); | |
| 10042 exceptionState.throwIfNeeded(); | |
| 10043 return; | |
| 10044 } | |
| 10045 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 10046 int value; | |
| 10047 { | |
| 10048 v8::TryCatch block; | |
| 10049 V8RethrowTryCatchScope rethrow(block); | |
| 10050 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS
tate), exceptionState); | |
| 10051 } | |
| 10052 int result = 0; | |
| 10053 if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInP
rivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()),
impl, value, &result)) | |
| 10054 return; | |
| 10055 v8SetReturnValueInt(info, result); | |
| 10056 } | |
| 10057 | |
| 10058 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 10059 { | |
| 10060 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 10061 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript
Method(info); | |
| 10062 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 10063 } | |
| 10064 | |
| 10065 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 10066 { | |
| 10067 if (UNLIKELY(info.Length() < 1)) { | |
| 10068 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("s
tringMethodWithStringArgumentImplementedInPrivateScript", "TestObject", 1, info.
Length(), info.GetIsolate()), info.GetIsolate()); | |
| 10069 return; | |
| 10070 } | |
| 10071 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 10072 V8StringResource<> value; | |
| 10073 { | |
| 10074 TOSTRING_VOID_INTERNAL(value, info[0]); | |
| 10075 } | |
| 10076 String result; | |
| 10077 if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedI
nPrivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()
), impl, value, &result)) | |
| 10078 return; | |
| 10079 v8SetReturnValueString(info, result, info.GetIsolate()); | |
| 10080 } | |
| 10081 | |
| 10082 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 10083 { | |
| 10084 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 10085 TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScri
ptMethod(info); | |
| 10086 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 10087 } | |
| 10088 | |
| 10089 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) | |
| 10090 { | |
| 10091 if (UNLIKELY(info.Length() < 1)) { | |
| 10092 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("n
odeMethodWithNodeArgumentImplementedInPrivateScript", "TestObject", 1, info.Leng
th(), info.GetIsolate()), info.GetIsolate()); | |
| 10093 return; | |
| 10094 } | |
| 10095 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 10096 Node* value; | |
| 10097 { | |
| 10098 v8::TryCatch block; | |
| 10099 V8RethrowTryCatchScope rethrow(block); | |
| 10100 TONATIVE_VOID_INTERNAL(value, V8Node::toImplWithTypeCheck(info.GetIsolat
e(), info[0])); | |
| 10101 } | |
| 10102 RefPtrWillBeRawPtr<Node> result = nullptr; | |
| 10103 if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPri
vateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), i
mpl, value, &result)) | |
| 10104 return; | |
| 10105 v8SetReturnValue(info, result.release()); | |
| 10106 } | |
| 10107 | |
| 10108 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | |
| 10109 { | |
| 10110 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 10111 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe
thod(info); | |
| 10112 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 10113 } | |
| 10114 | |
| 10115 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
| 10116 { | |
| 10117 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), inf
o.GetIsolate()); | |
| 10118 if (UNLIKELY(info.Length() < 5)) { | |
| 10119 setMinimumArityTypeError(exceptionState, 5, info.Length()); | |
| 10120 exceptionState.throwIfNeeded(); | |
| 10121 return; | |
| 10122 } | |
| 10123 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 10124 Document* document; | |
| 10125 Node* node; | |
| 10126 int value1; | |
| 10127 double value2; | |
| 10128 V8StringResource<> string; | |
| 10129 { | |
| 10130 v8::TryCatch block; | |
| 10131 V8RethrowTryCatchScope rethrow(block); | |
| 10132 TONATIVE_VOID_INTERNAL(document, V8Document::toImplWithTypeCheck(info.Ge
tIsolate(), info[0])); | |
| 10133 TONATIVE_VOID_INTERNAL(node, V8Node::toImplWithTypeCheck(info.GetIsolate
(), info[1])); | |
| 10134 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value1, toInt16(info[2], exception
State), exceptionState); | |
| 10135 TONATIVE_VOID_INTERNAL(value2, static_cast<double>(info[3]->NumberValue(
))); | |
| 10136 TOSTRING_VOID_INTERNAL(string, info[4]); | |
| 10137 } | |
| 10138 RefPtrWillBeRawPtr<Node> result = nullptr; | |
| 10139 if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedI
nPrivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()
), impl, document, node, value1, value2, string, &result)) | |
| 10140 return; | |
| 10141 v8SetReturnValue(info, result.release()); | |
| 10142 } | |
| 10143 | |
| 10144 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 10145 { | |
| 10146 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 10147 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri
ptMethod(info); | |
| 10148 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 10149 } | |
| 10150 | |
| 10151 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
| 10152 { | |
| 10153 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImple
mentedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate()
); | |
| 10154 if (UNLIKELY(info.Length() < 2)) { | |
| 10155 setMinimumArityTypeError(exceptionState, 2, info.Length()); | |
| 10156 exceptionState.throwIfNeeded(); | |
| 10157 return; | |
| 10158 } | |
| 10159 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 10160 int value1; | |
| 10161 int value2; | |
| 10162 { | |
| 10163 v8::TryCatch block; | |
| 10164 V8RethrowTryCatchScope rethrow(block); | |
| 10165 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value1, toInt16(info[0], exception
State), exceptionState); | |
| 10166 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value2, toInt16(info[1], exception
State), exceptionState); | |
| 10167 } | |
| 10168 v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(v
alue1, value2)); | |
| 10169 } | |
| 10170 | |
| 10171 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | |
| 10172 { | |
| 10173 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 10174 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info)
; | |
| 10175 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 10176 } | |
| 10177 | |
| 10178 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
| 10179 { | |
| 10180 TestObject* impl = V8TestObject::toImpl(info.Holder()); | |
| 10181 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); | |
| 10182 } | |
| 10183 | |
| 10184 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
| 10185 { | |
| 10186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
| 10187 TestObjectV8Internal::toStringMethod(info); | |
| 10188 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
| 10189 } | |
| 10190 | |
| 10191 } // namespace TestObjectV8Internal | |
| 10192 | |
| 10193 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[]
= { | |
| 10194 {"stringifierAttribute", TestObjectV8Internal::stringifierAttributeAttribute
GetterCallback, TestObjectV8Internal::stringifierAttributeAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati
on::OnInstance}, | |
| 10195 {"readonlyStringAttribute", TestObjectV8Internal::readonlyStringAttributeAtt
ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScr
ipts, V8DOMConfiguration::OnInstance}, | |
| 10196 {"readonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::readonlyTestIn
terfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Access
Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfig
uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10197 {"readonlyLongAttribute", TestObjectV8Internal::readonlyLongAttributeAttribu
teGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnInstance}, | |
| 10198 {"dateAttribute", TestObjectV8Internal::dateAttributeAttributeGetterCallback
, TestObjectV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10199 {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCall
back, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, sta
tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8:
:None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}
, | |
| 10200 {"byteStringAttribute", TestObjectV8Internal::byteStringAttributeAttributeGe
tterCallback, TestObjectV8Internal::byteStringAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnInstance}, | |
| 10201 {"scalarValueStringAttribute", TestObjectV8Internal::scalarValueStringAttrib
uteAttributeGetterCallback, TestObjectV8Internal::scalarValueStringAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnInstance}, | |
| 10202 {"domTimeStampAttribute", TestObjectV8Internal::domTimeStampAttributeAttribu
teGetterCallback, TestObjectV8Internal::domTimeStampAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur
ation::OnInstance}, | |
| 10203 {"booleanAttribute", TestObjectV8Internal::booleanAttributeAttributeGetterCa
llback, TestObjectV8Internal::booleanAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstan
ce}, | |
| 10204 {"byteAttribute", TestObjectV8Internal::byteAttributeAttributeGetterCallback
, TestObjectV8Internal::byteAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10205 {"doubleAttribute", TestObjectV8Internal::doubleAttributeAttributeGetterCall
back, TestObjectV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, 0, sta
tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8:
:None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}
, | |
| 10206 {"floatAttribute", TestObjectV8Internal::floatAttributeAttributeGetterCallba
ck, TestObjectV8Internal::floatAttributeAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10207 {"longAttribute", TestObjectV8Internal::longAttributeAttributeGetterCallback
, TestObjectV8Internal::longAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10208 {"longLongAttribute", TestObjectV8Internal::longLongAttributeAttributeGetter
Callback, TestObjectV8Internal::longLongAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut
e>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIns
tance}, | |
| 10209 {"octetAttribute", TestObjectV8Internal::octetAttributeAttributeGetterCallba
ck, TestObjectV8Internal::octetAttributeAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10210 {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallba
ck, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10211 {"unrestrictedDoubleAttribute", TestObjectV8Internal::unrestrictedDoubleAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::unrestrictedDoubleAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri
pts, V8DOMConfiguration::OnInstance}, | |
| 10212 {"unrestrictedFloatAttribute", TestObjectV8Internal::unrestrictedFloatAttrib
uteAttributeGetterCallback, TestObjectV8Internal::unrestrictedFloatAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnInstance}, | |
| 10213 {"unsignedLongAttribute", TestObjectV8Internal::unsignedLongAttributeAttribu
teGetterCallback, TestObjectV8Internal::unsignedLongAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur
ation::OnInstance}, | |
| 10214 {"unsignedLongLongAttribute", TestObjectV8Internal::unsignedLongLongAttribut
eAttributeGetterCallback, TestObjectV8Internal::unsignedLongLongAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance}, | |
| 10215 {"unsignedShortAttribute", TestObjectV8Internal::unsignedShortAttributeAttri
buteGetterCallback, TestObjectV8Internal::unsignedShortAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi
guration::OnInstance}, | |
| 10216 {"testInterfaceEmptyAttribute", TestObjectV8Internal::testInterfaceEmptyAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri
pts, V8DOMConfiguration::OnInstance}, | |
| 10217 {"testObjectAttribute", TestObjectV8Internal::testObjectAttributeAttributeGe
tterCallback, TestObjectV8Internal::testObjectAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnInstance}, | |
| 10218 {"voidCallbackFunctionAttribute", TestObjectV8Internal::voidCallbackFunction
AttributeAttributeGetterCallback, TestObjectV8Internal::voidCallbackFunctionAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToA
llScripts, V8DOMConfiguration::OnInstance}, | |
| 10219 {"anyCallbackFunctionOptionalAnyArgAttribute", TestObjectV8Internal::anyCall
backFunctionOptionalAnyArgAttributeAttributeGetterCallback, TestObjectV8Internal
::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance
}, | |
| 10220 {"cssAttribute", TestObjectV8Internal::cssAttributeAttributeGetterCallback,
TestObjectV8Internal::cssAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V
8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10221 {"imeAttribute", TestObjectV8Internal::imeAttributeAttributeGetterCallback,
TestObjectV8Internal::imeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V
8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10222 {"svgAttribute", TestObjectV8Internal::svgAttributeAttributeGetterCallback,
TestObjectV8Internal::svgAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V
8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10223 {"xmlAttribute", TestObjectV8Internal::xmlAttributeAttributeGetterCallback,
TestObjectV8Internal::xmlAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V
8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10224 {"nodeFilterAttribute", TestObjectV8Internal::nodeFilterAttributeAttributeGe
tterCallback, TestObjectV8Internal::nodeFilterAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnInstance}, | |
| 10225 {"serializedScriptValueAttribute", TestObjectV8Internal::serializedScriptVal
ueAttributeAttributeGetterCallback, TestObjectV8Internal::serializedScriptValueA
ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed
ToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10226 {"anyAttribute", TestObjectV8Internal::anyAttributeAttributeGetterCallback,
TestObjectV8Internal::anyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V
8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10227 {"promiseAttribute", TestObjectV8Internal::promiseAttributeAttributeGetterCa
llback, TestObjectV8Internal::promiseAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstan
ce}, | |
| 10228 {"windowAttribute", TestObjectV8Internal::windowAttributeAttributeGetterCall
back, TestObjectV8Internal::windowAttributeAttributeSetterCallback, 0, 0, 0, sta
tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8:
:None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}
, | |
| 10229 {"documentAttribute", TestObjectV8Internal::documentAttributeAttributeGetter
Callback, TestObjectV8Internal::documentAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut
e>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIns
tance}, | |
| 10230 {"documentFragmentAttribute", TestObjectV8Internal::documentFragmentAttribut
eAttributeGetterCallback, TestObjectV8Internal::documentFragmentAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance}, | |
| 10231 {"documentTypeAttribute", TestObjectV8Internal::documentTypeAttributeAttribu
teGetterCallback, TestObjectV8Internal::documentTypeAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur
ation::OnInstance}, | |
| 10232 {"elementAttribute", TestObjectV8Internal::elementAttributeAttributeGetterCa
llback, TestObjectV8Internal::elementAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstan
ce}, | |
| 10233 {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback
, TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10234 {"shadowRootAttribute", TestObjectV8Internal::shadowRootAttributeAttributeGe
tterCallback, TestObjectV8Internal::shadowRootAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnInstance}, | |
| 10235 {"arrayBufferAttribute", TestObjectV8Internal::arrayBufferAttributeAttribute
GetterCallback, TestObjectV8Internal::arrayBufferAttributeAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati
on::OnInstance}, | |
| 10236 {"float32ArrayAttribute", TestObjectV8Internal::float32ArrayAttributeAttribu
teGetterCallback, TestObjectV8Internal::float32ArrayAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur
ation::OnInstance}, | |
| 10237 {"uint8ArrayAttribute", TestObjectV8Internal::uint8ArrayAttributeAttributeGe
tterCallback, TestObjectV8Internal::uint8ArrayAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnInstance}, | |
| 10238 {"self", TestObjectV8Internal::selfAttributeGetterCallback, 0, 0, 0, 0, stat
ic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::
None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10239 {"readonlyEventTargetAttribute", TestObjectV8Internal::readonlyEventTargetAt
tributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::D
EFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Expos
edToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10240 {"readonlyEventTargetOrNullAttribute", TestObjectV8Internal::readonlyEventTa
rgetOrNullAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur
ation::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10241 {"readonlyWindowAttribute", TestObjectV8Internal::readonlyWindowAttributeAtt
ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScr
ipts, V8DOMConfiguration::OnInstance}, | |
| 10242 {"htmlCollectionAttribute", TestObjectV8Internal::htmlCollectionAttributeAtt
ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScr
ipts, V8DOMConfiguration::OnInstance}, | |
| 10243 {"htmlElementAttribute", TestObjectV8Internal::htmlElementAttributeAttribute
GetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnInstance}, | |
| 10244 {"stringArrayAttribute", TestObjectV8Internal::stringArrayAttributeAttribute
GetterCallback, TestObjectV8Internal::stringArrayAttributeAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati
on::OnInstance}, | |
| 10245 {"testInterfaceEmptyArrayAttribute", TestObjectV8Internal::testInterfaceEmpt
yArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmpty
ArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v
8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::E
xposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10246 {"floatArrayAttribute", TestObjectV8Internal::floatArrayAttributeAttributeGe
tterCallback, TestObjectV8Internal::floatArrayAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnInstance}, | |
| 10247 {"stringOrNullAttribute", TestObjectV8Internal::stringOrNullAttributeAttribu
teGetterCallback, TestObjectV8Internal::stringOrNullAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur
ation::OnInstance}, | |
| 10248 {"longOrNullAttribute", TestObjectV8Internal::longOrNullAttributeAttributeGe
tterCallback, TestObjectV8Internal::longOrNullAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnInstance}, | |
| 10249 {"testInterfaceOrNullAttribute", TestObjectV8Internal::testInterfaceOrNullAt
tributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceOrNullAttribu
teAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnInstance}, | |
| 10250 {"testEnumAttribute", TestObjectV8Internal::testEnumAttributeAttributeGetter
Callback, TestObjectV8Internal::testEnumAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut
e>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIns
tance}, | |
| 10251 {"eventHandlerAttribute", TestObjectV8Internal::eventHandlerAttributeAttribu
teGetterCallback, TestObjectV8Internal::eventHandlerAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur
ation::OnInstance}, | |
| 10252 {"activityLoggingAccessForAllWorldsLongAttribute", TestObjectV8Internal::act
ivityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8
Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration
::OnInstance}, | |
| 10253 {"activityLoggingGetterForAllWorldsLongAttribute", TestObjectV8Internal::act
ivityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8
Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration
::OnInstance}, | |
| 10254 {"activityLoggingSetterForAllWorldsLongAttribute", TestObjectV8Internal::act
ivityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8
Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration
::OnInstance}, | |
| 10255 {"cachedAttributeAnyAttribute", TestObjectV8Internal::cachedAttributeAnyAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::cachedAttributeAnyAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri
pts, V8DOMConfiguration::OnInstance}, | |
| 10256 {"cachedArrayAttribute", TestObjectV8Internal::cachedArrayAttributeAttribute
GetterCallback, TestObjectV8Internal::cachedArrayAttributeAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati
on::OnInstance}, | |
| 10257 {"cachedStringOrNoneAttribute", TestObjectV8Internal::cachedStringOrNoneAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::cachedStringOrNoneAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri
pts, V8DOMConfiguration::OnInstance}, | |
| 10258 {"callWithExecutionContextAnyAttribute", TestObjectV8Internal::callWithExecu
tionContextAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithEx
ecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConf
iguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10259 {"callWithScriptStateAnyAttribute", TestObjectV8Internal::callWithScriptStat
eAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithScriptStateA
nyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::
DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Expo
sedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10260 {"callWithExecutionContextAndScriptStateAnyAttribute", TestObjectV8Internal:
:callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCallback, Test
ObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC
onfiguration::OnInstance}, | |
| 10261 {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectV8Internal::chec
kSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance
}, | |
| 10262 #if ENABLE(CONDITION) | |
| 10263 {"conditionalLongAttribute", TestObjectV8Internal::conditionalLongAttributeA
ttributeGetterCallback, TestObjectV8Internal::conditionalLongAttributeAttributeS
etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast
<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DO
MConfiguration::OnInstance}, | |
| 10264 #endif // ENABLE(CONDITION) | |
| 10265 {"testInterfaceEmptyConstructorAttribute", TestObjectV8Internal::TestObjectC
onstructorGetter, TestObjectV8Internal::TestObjectForceSetAttributeOnThisCallbac
k, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIns
tance}, | |
| 10266 {"testInterfaceEmptyConstructorAttribute", TestObjectV8Internal::testInterfa
ceEmptyConstructorAttributeConstructorGetterCallback, TestObjectV8Internal::Test
ObjectForceSetAttributeOnThisCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8Tes
tInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToA
llScripts, V8DOMConfiguration::OnInstance}, | |
| 10267 {"measureAsFeatureNameTestInterfaceEmptyConstructorAttribute", TestObjectV8I
nternal::measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGe
tterCallback, TestObjectV8Internal::TestObjectForceSetAttributeOnThisCallback, 0
, 0, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), stati
c_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::D
ontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstanc
e}, | |
| 10268 {"customObjectAttribute", TestObjectV8Internal::customObjectAttributeAttribu
teGetterCallback, TestObjectV8Internal::customObjectAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur
ation::OnInstance}, | |
| 10269 {"customGetterLongAttribute", TestObjectV8Internal::customGetterLongAttribut
eAttributeGetterCallback, TestObjectV8Internal::customGetterLongAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance}, | |
| 10270 {"customGetterReadonlyObjectAttribute", TestObjectV8Internal::customGetterRe
adonlyObjectAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Access
Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfig
uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10271 {"customSetterLongAttribute", TestObjectV8Internal::customSetterLongAttribut
eAttributeGetterCallback, TestObjectV8Internal::customSetterLongAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance}, | |
| 10272 #if ENABLE(CONDITION) | |
| 10273 {"customLongAttribute", TestObjectV8Internal::customLongAttributeAttributeGe
tterCallback, TestObjectV8Internal::customLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnInstance}, | |
| 10274 #endif // ENABLE(CONDITION) | |
| 10275 {"customElementsCallbacksReadonlyLongAttribute", TestObjectV8Internal::custo
mElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, stat
ic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::
None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10276 {"deprecatedLongAttribute", TestObjectV8Internal::deprecatedLongAttributeAtt
ributeGetterCallback, TestObjectV8Internal::deprecatedLongAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMCo
nfiguration::OnInstance}, | |
| 10277 {"enforceRangeLongAttribute", TestObjectV8Internal::enforceRangeLongAttribut
eAttributeGetterCallback, TestObjectV8Internal::enforceRangeLongAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance}, | |
| 10278 {"implementedAsLongAttribute", TestObjectV8Internal::implementedAsLongAttrib
uteAttributeGetterCallback, TestObjectV8Internal::implementedAsLongAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnInstance}, | |
| 10279 {"customImplementedAsLongAttribute", TestObjectV8Internal::customImplemented
AsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customImplementedA
sLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v
8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::E
xposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10280 {"customGetterImplementedAsLongAttribute", TestObjectV8Internal::customGette
rImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::custom
GetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10281 {"customSetterImplementedAsLongAttribute", TestObjectV8Internal::customSette
rImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::custom
SetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10282 {"measureAsLongAttribute", TestObjectV8Internal::measureAsLongAttributeAttri
buteGetterCallback, TestObjectV8Internal::measureAsLongAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi
guration::OnInstance}, | |
| 10283 {"notEnumerableLongAttribute", TestObjectV8Internal::notEnumerableLongAttrib
uteAttributeGetterCallback, TestObjectV8Internal::notEnumerableLongAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScr
ipts, V8DOMConfiguration::OnInstance}, | |
| 10284 {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestObjectV8Internal
::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0,
TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttrib
uteGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnInstance}, | |
| 10285 {"activityLoggingAccessPerWorldBindingsLongAttribute", TestObjectV8Internal:
:activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, Test
ObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSet
terCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttr
ibuteAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingA
ccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10286 {"activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", Test
ObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForIsol
atedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Inte
rnal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttribu
teGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessForIsol
atedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstanc
e}, | |
| 10287 {"activityLoggingGetterPerWorldBindingsLongAttribute", TestObjectV8Internal:
:activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback, Test
ObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSet
terCallback, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttr
ibuteAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingG
etterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10288 {"activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", Test
ObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterForIsol
atedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Inte
rnal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttribu
teGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingGetterForIsol
atedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstanc
e}, | |
| 10289 {"location", TestObjectV8Internal::locationAttributeGetterCallback, TestObje
ctV8Internal::locationAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur
ation::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10290 {"locationWithException", TestObjectV8Internal::locationWithExceptionAttribu
teGetterCallback, TestObjectV8Internal::locationWithExceptionAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur
ation::OnInstance}, | |
| 10291 {"locationWithCallWith", TestObjectV8Internal::locationWithCallWithAttribute
GetterCallback, TestObjectV8Internal::locationWithCallWithAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati
on::OnInstance}, | |
| 10292 {"locationByteString", TestObjectV8Internal::locationByteStringAttributeGett
erCallback, TestObjectV8Internal::locationByteStringAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri
bute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On
Instance}, | |
| 10293 {"locationWithPerWorldBindings", TestObjectV8Internal::locationWithPerWorldB
indingsAttributeGetterCallback, TestObjectV8Internal::locationWithPerWorldBindin
gsAttributeSetterCallback, TestObjectV8Internal::locationWithPerWorldBindingsAtt
ributeGetterCallbackForMainWorld, TestObjectV8Internal::locationWithPerWorldBind
ingsAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::D
EFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Expos
edToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10294 {"locationTypeCheckingInterface", TestObjectV8Internal::locationTypeChecking
InterfaceAttributeGetterCallback, TestObjectV8Internal::locationTypeCheckingInte
rfaceAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToA
llScripts, V8DOMConfiguration::OnInstance}, | |
| 10295 {"locationGarbageCollected", TestObjectV8Internal::locationGarbageCollectedA
ttributeGetterCallback, TestObjectV8Internal::locationGarbageCollectedAttributeS
etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast
<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DO
MConfiguration::OnInstance}, | |
| 10296 {"locationWillBeGarbageCollected", TestObjectV8Internal::locationWillBeGarba
geCollectedAttributeGetterCallback, TestObjectV8Internal::locationWillBeGarbageC
ollectedAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed
ToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10297 {"raisesExceptionLongAttribute", TestObjectV8Internal::raisesExceptionLongAt
tributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionLongAttribu
teAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnInstance}, | |
| 10298 {"raisesExceptionGetterLongAttribute", TestObjectV8Internal::raisesException
GetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptio
nGetterLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10299 {"setterRaisesExceptionLongAttribute", TestObjectV8Internal::setterRaisesExc
eptionLongAttributeAttributeGetterCallback, TestObjectV8Internal::setterRaisesEx
ceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10300 {"raisesExceptionTestInterfaceEmptyAttribute", TestObjectV8Internal::raisesE
xceptionTestInterfaceEmptyAttributeAttributeGetterCallback, TestObjectV8Internal
::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance
}, | |
| 10301 {"cachedAttributeRaisesExceptionGetterAnyAttribute", TestObjectV8Internal::c
achedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, TestObje
ctV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCal
lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro
pertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigu
ration::OnInstance}, | |
| 10302 {"reflectTestInterfaceAttribute", TestObjectV8Internal::reflectTestInterface
AttributeAttributeGetterCallback, TestObjectV8Internal::reflectTestInterfaceAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToA
llScripts, V8DOMConfiguration::OnInstance}, | |
| 10303 {"reflectReflectedNameAttributeTestAttribute", TestObjectV8Internal::reflect
ReflectedNameAttributeTestAttributeAttributeGetterCallback, TestObjectV8Internal
::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance
}, | |
| 10304 {"reflectBooleanAttribute", TestObjectV8Internal::reflectBooleanAttributeAtt
ributeGetterCallback, TestObjectV8Internal::reflectBooleanAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMCo
nfiguration::OnInstance}, | |
| 10305 {"reflectLongAttribute", TestObjectV8Internal::reflectLongAttributeAttribute
GetterCallback, TestObjectV8Internal::reflectLongAttributeAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati
on::OnInstance}, | |
| 10306 {"reflectUnsignedShortAttribute", TestObjectV8Internal::reflectUnsignedShort
AttributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedShortAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToA
llScripts, V8DOMConfiguration::OnInstance}, | |
| 10307 {"reflectUnsignedLongAttribute", TestObjectV8Internal::reflectUnsignedLongAt
tributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedLongAttribu
teAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnInstance}, | |
| 10308 {"id", TestObjectV8Internal::idAttributeGetterCallback, TestObjectV8Internal
::idAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT
), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAl
lScripts, V8DOMConfiguration::OnInstance}, | |
| 10309 {"name", TestObjectV8Internal::nameAttributeGetterCallback, TestObjectV8Inte
rnal::nameAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::D
EFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Expos
edToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10310 {"class", TestObjectV8Internal::classAttributeGetterCallback, TestObjectV8In
ternal::classAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8
::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Ex
posedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10311 {"reflectedId", TestObjectV8Internal::reflectedIdAttributeGetterCallback, Te
stObjectV8Internal::reflectedIdAttributeSetterCallback, 0, 0, 0, static_cast<v8:
:AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DO
MConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10312 {"reflectedName", TestObjectV8Internal::reflectedNameAttributeGetterCallback
, TestObjectV8Internal::reflectedNameAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10313 {"reflectedClass", TestObjectV8Internal::reflectedClassAttributeGetterCallba
ck, TestObjectV8Internal::reflectedClassAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10314 {"limitedToOnlyOneAttribute", TestObjectV8Internal::limitedToOnlyOneAttribut
eAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOneAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance}, | |
| 10315 {"limitedToOnlyAttribute", TestObjectV8Internal::limitedToOnlyAttributeAttri
buteGetterCallback, TestObjectV8Internal::limitedToOnlyAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi
guration::OnInstance}, | |
| 10316 {"limitedToOnlyOtherAttribute", TestObjectV8Internal::limitedToOnlyOtherAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOtherAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri
pts, V8DOMConfiguration::OnInstance}, | |
| 10317 {"limitedWithMissingDefaultAttribute", TestObjectV8Internal::limitedWithMiss
ingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithMis
singDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10318 {"limitedWithInvalidMissingDefaultAttribute", TestObjectV8Internal::limitedW
ithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::
limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, stati
c_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::N
one), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10319 {"corsSettingAttribute", TestObjectV8Internal::corsSettingAttributeAttribute
GetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnInstance}, | |
| 10320 {"limitedWithEmptyMissingInvalidAttribute", TestObjectV8Internal::limitedWit
hEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10321 {"replaceableReadonlyLongAttribute", TestObjectV8Internal::replaceableReadon
lyLongAttributeAttributeGetterCallback, TestObjectV8Internal::TestObjectForceSet
AttributeOnThisCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScr
ipts, V8DOMConfiguration::OnInstance}, | |
| 10322 {"locationReplaceable", TestObjectV8Internal::locationReplaceableAttributeGe
tterCallback, TestObjectV8Internal::locationReplaceableAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnInstance}, | |
| 10323 {"setterCallWithActiveWindowAndFirstWindowStringAttribute", TestObjectV8Inte
rnal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCall
back, TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnInstance}, | |
| 10324 {"setterCallWithExecutionContextStringAttribute", TestObjectV8Internal::sett
erCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectV8In
ternal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr
ibute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nInstance}, | |
| 10325 {"treatNullAsEmptyStringStringAttribute", TestObjectV8Internal::treatNullAsE
mptyStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNul
lAsEmptyStringStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::A
ccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMC
onfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10326 {"treatNullAsNullStringStringAttribute", TestObjectV8Internal::treatNullAsNu
llStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullA
sNullStringStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConf
iguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10327 {"treatReturnedNullStringAsNullStringAttribute", TestObjectV8Internal::treat
ReturnedNullStringAsNullStringAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn
stance}, | |
| 10328 {"treatReturnedNullStringAsUndefinedStringAttribute", TestObjectV8Internal::
treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback, TestOb
jectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter
Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConf
iguration::OnInstance}, | |
| 10329 {"cachedTreatReturnedNullStringAsUndefinedStringAttribute", TestObjectV8Inte
rnal::cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCall
back, TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnInstance}, | |
| 10330 {"treatReturnedNullStringAsNullByteStringAttribute", TestObjectV8Internal::t
reatReturnedNullStringAsNullByteStringAttributeAttributeGetterCallback, TestObje
ctV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttributeSetterCal
lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro
pertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigu
ration::OnInstance}, | |
| 10331 {"treatReturnedNullStringAsUndefinedByteStringAttribute", TestObjectV8Intern
al::treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetterCallback
, TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeAtt
ributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stat
ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScript
s, V8DOMConfiguration::OnInstance}, | |
| 10332 {"treatReturnedNullStringAsNullScalarValueStringAttribute", TestObjectV8Inte
rnal::treatReturnedNullStringAsNullScalarValueStringAttributeAttributeGetterCall
back, TestObjectV8Internal::treatReturnedNullStringAsNullScalarValueStringAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnInstance}, | |
| 10333 {"treatReturnedNullStringAsUndefinedScalarValueStringAttribute", TestObjectV
8Internal::treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribute
GetterCallback, TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarVa
lueStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro
l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio
n::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10334 {"typeCheckingInterfaceFloatAttribute", TestObjectV8Internal::typeCheckingIn
terfaceFloatAttributeAttributeGetterCallback, TestObjectV8Internal::typeChecking
InterfaceFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC
ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10335 {"typeCheckingInterfaceTestInterfaceAttribute", TestObjectV8Internal::typeCh
eckingInterfaceTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Intern
al::typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>
(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInsta
nce}, | |
| 10336 {"typeCheckingInterfaceTestInterfaceOrNullAttribute", TestObjectV8Internal::
typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetterCallback, TestOb
jectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetter
Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConf
iguration::OnInstance}, | |
| 10337 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett
erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri
bute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On
Instance}, | |
| 10338 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett
erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri
bute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On
Instance}, | |
| 10339 {"unforgeableLongAttribute", TestObjectV8Internal::unforgeableLongAttributeA
ttributeGetterCallback, TestObjectV8Internal::unforgeableLongAttributeAttributeS
etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING
), static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::Expos
edToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10340 {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttri
buteGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi
guration::OnInstance}, | |
| 10341 {"testInterfaceGarbageCollectedAttribute", TestObjectV8Internal::testInterfa
ceGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testIn
terfaceGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10342 {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testI
nterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn
stance}, | |
| 10343 {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectV8Internal::testI
nterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn
stance}, | |
| 10344 {"testInterfaceWillBeGarbageCollectedOrNullAttribute", TestObjectV8Internal:
:testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback, Test
ObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC
onfiguration::OnInstance}, | |
| 10345 {"readonlyShortAttribute", TestObjectV8Internal::readonlyShortAttributeAttri
buteGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), sta
tic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScrip
ts, V8DOMConfiguration::OnInstance}, | |
| 10346 {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallba
ck, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10347 {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCall
back, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, sta
tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8:
:None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}
, | |
| 10348 {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback
, TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
| 10349 {"attributeImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::attr
ibuteImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback, TestObjectV8In
ternal::attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr
ibute>(v8::None), V8DOMConfiguration::OnlyExposedToPrivateScript, V8DOMConfigura
tion::OnInstance}, | |
| 10350 {"enumForPrivateScript", TestObjectV8Internal::enumForPrivateScriptAttribute
GetterCallback, TestObjectV8Internal::enumForPrivateScriptAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati
on::OnInstance}, | |
| 10351 }; | |
| 10352 | |
| 10353 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] =
{ | |
| 10354 {"exposeJSAccessorsLongAttribute", TestObjectV8Internal::exposeJSAccessorsLo
ngAttributeAttributeGetterCallback, TestObjectV8Internal::exposeJSAccessorsLongA
ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed
ToAllScripts}, | |
| 10355 }; | |
| 10356 | |
| 10357 static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = { | |
| 10358 {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, | |
| 10359 {"dateMethod", TestObjectV8Internal::dateMethodMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, | |
| 10360 {"stringMethod", TestObjectV8Internal::stringMethodMethodCallback, 0, 0, V8D
OMConfiguration::ExposedToAllScripts}, | |
| 10361 {"byteStringMethod", TestObjectV8Internal::byteStringMethodMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10362 {"scalarValueStringMethod", TestObjectV8Internal::scalarValueStringMethodMet
hodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10363 {"readonlyDOMTimeStampMethod", TestObjectV8Internal::readonlyDOMTimeStampMet
hodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10364 {"booleanMethod", TestObjectV8Internal::booleanMethodMethodCallback, 0, 0, V
8DOMConfiguration::ExposedToAllScripts}, | |
| 10365 {"byteMethod", TestObjectV8Internal::byteMethodMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, | |
| 10366 {"doubleMethod", TestObjectV8Internal::doubleMethodMethodCallback, 0, 0, V8D
OMConfiguration::ExposedToAllScripts}, | |
| 10367 {"floatMethod", TestObjectV8Internal::floatMethodMethodCallback, 0, 0, V8DOM
Configuration::ExposedToAllScripts}, | |
| 10368 {"longMethod", TestObjectV8Internal::longMethodMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, | |
| 10369 {"longLongMethod", TestObjectV8Internal::longLongMethodMethodCallback, 0, 0,
V8DOMConfiguration::ExposedToAllScripts}, | |
| 10370 {"octetMethod", TestObjectV8Internal::octetMethodMethodCallback, 0, 0, V8DOM
Configuration::ExposedToAllScripts}, | |
| 10371 {"shortMethod", TestObjectV8Internal::shortMethodMethodCallback, 0, 0, V8DOM
Configuration::ExposedToAllScripts}, | |
| 10372 {"unsignedLongMethod", TestObjectV8Internal::unsignedLongMethodMethodCallbac
k, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10373 {"unsignedLongLongMethod", TestObjectV8Internal::unsignedLongLongMethodMetho
dCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10374 {"unsignedShortMethod", TestObjectV8Internal::unsignedShortMethodMethodCallb
ack, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10375 {"voidMethodDateArg", TestObjectV8Internal::voidMethodDateArgMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10376 {"voidMethodStringArg", TestObjectV8Internal::voidMethodStringArgMethodCallb
ack, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10377 {"voidMethodByteStringArg", TestObjectV8Internal::voidMethodByteStringArgMet
hodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10378 {"voidMethodScalarValueStringArg", TestObjectV8Internal::voidMethodScalarVal
ueStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10379 {"voidMethodDOMTimeStampArg", TestObjectV8Internal::voidMethodDOMTimeStampAr
gMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10380 {"voidMethodBooleanArg", TestObjectV8Internal::voidMethodBooleanArgMethodCal
lback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10381 {"voidMethodByteArg", TestObjectV8Internal::voidMethodByteArgMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10382 {"voidMethodDoubleArg", TestObjectV8Internal::voidMethodDoubleArgMethodCallb
ack, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10383 {"voidMethodFloatArg", TestObjectV8Internal::voidMethodFloatArgMethodCallbac
k, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10384 {"voidMethodLongArg", TestObjectV8Internal::voidMethodLongArgMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10385 {"voidMethodLongLongArg", TestObjectV8Internal::voidMethodLongLongArgMethodC
allback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10386 {"voidMethodOctetArg", TestObjectV8Internal::voidMethodOctetArgMethodCallbac
k, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10387 {"voidMethodShortArg", TestObjectV8Internal::voidMethodShortArgMethodCallbac
k, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10388 {"voidMethodUnsignedLongArg", TestObjectV8Internal::voidMethodUnsignedLongAr
gMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10389 {"voidMethodUnsignedLongLongArg", TestObjectV8Internal::voidMethodUnsignedLo
ngLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10390 {"voidMethodUnsignedShortArg", TestObjectV8Internal::voidMethodUnsignedShort
ArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10391 {"testInterfaceEmptyMethod", TestObjectV8Internal::testInterfaceEmptyMethodM
ethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10392 {"voidMethodTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodTestInte
rfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10393 {"voidMethodLongArgTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodL
ongArgTestInterfaceEmptyArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAl
lScripts}, | |
| 10394 {"voidCallbackFunctionMethod", TestObjectV8Internal::voidCallbackFunctionMet
hodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10395 {"anyCallbackFunctionOptionalAnyArgMethod", TestObjectV8Internal::anyCallbac
kFunctionOptionalAnyArgMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo
AllScripts}, | |
| 10396 {"voidMethodVoidCallbackFunctionArg", TestObjectV8Internal::voidMethodVoidCa
llbackFunctionArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10397 {"voidMethodAnyCallbackFunctionOptionalAnyArg", TestObjectV8Internal::voidMe
thodAnyCallbackFunctionOptionalAnyArgMethodCallback, 0, 1, V8DOMConfiguration::E
xposedToAllScripts}, | |
| 10398 {"compareHowMethod", TestObjectV8Internal::compareHowMethodMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10399 {"anyMethod", TestObjectV8Internal::anyMethodMethodCallback, 0, 0, V8DOMConf
iguration::ExposedToAllScripts}, | |
| 10400 {"voidMethodCompareHowArg", TestObjectV8Internal::voidMethodCompareHowArgMet
hodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10401 {"voidMethodEventTargetArg", TestObjectV8Internal::voidMethodEventTargetArgM
ethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10402 {"voidMethodAnyArg", TestObjectV8Internal::voidMethodAnyArgMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10403 {"voidMethodAttrArg", TestObjectV8Internal::voidMethodAttrArgMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10404 {"voidMethodDocumentArg", TestObjectV8Internal::voidMethodDocumentArgMethodC
allback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10405 {"voidMethodDocumentTypeArg", TestObjectV8Internal::voidMethodDocumentTypeAr
gMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10406 {"voidMethodElementArg", TestObjectV8Internal::voidMethodElementArgMethodCal
lback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10407 {"voidMethodNodeArg", TestObjectV8Internal::voidMethodNodeArgMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10408 {"arrayBufferMethod", TestObjectV8Internal::arrayBufferMethodMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10409 {"arrayBufferViewMethod", TestObjectV8Internal::arrayBufferViewMethodMethodC
allback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10410 {"float32ArrayMethod", TestObjectV8Internal::float32ArrayMethodMethodCallbac
k, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10411 {"int32ArrayMethod", TestObjectV8Internal::int32ArrayMethodMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10412 {"uint8ArrayMethod", TestObjectV8Internal::uint8ArrayMethodMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10413 {"voidMethodArrayBufferArg", TestObjectV8Internal::voidMethodArrayBufferArgM
ethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10414 {"voidMethodArrayBufferOrNullArg", TestObjectV8Internal::voidMethodArrayBuff
erOrNullArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10415 {"voidMethodArrayBufferViewArg", TestObjectV8Internal::voidMethodArrayBuffer
ViewArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10416 {"voidMethodFloat32ArrayArg", TestObjectV8Internal::voidMethodFloat32ArrayAr
gMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10417 {"voidMethodInt32ArrayArg", TestObjectV8Internal::voidMethodInt32ArrayArgMet
hodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10418 {"voidMethodUint8ArrayArg", TestObjectV8Internal::voidMethodUint8ArrayArgMet
hodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10419 {"longArrayMethod", TestObjectV8Internal::longArrayMethodMethodCallback, 0,
0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10420 {"stringArrayMethod", TestObjectV8Internal::stringArrayMethodMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10421 {"testInterfaceEmptyArrayMethod", TestObjectV8Internal::testInterfaceEmptyAr
rayMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10422 {"voidMethodArrayLongArg", TestObjectV8Internal::voidMethodArrayLongArgMetho
dCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10423 {"voidMethodArrayStringArg", TestObjectV8Internal::voidMethodArrayStringArgM
ethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10424 {"voidMethodArrayTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodArr
ayTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScr
ipts}, | |
| 10425 {"longSequenceMethod", TestObjectV8Internal::longSequenceMethodMethodCallbac
k, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10426 {"stringSequenceMethod", TestObjectV8Internal::stringSequenceMethodMethodCal
lback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10427 {"testInterfaceEmptySequenceMethod", TestObjectV8Internal::testInterfaceEmpt
ySequenceMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10428 {"voidMethodSequenceLongArg", TestObjectV8Internal::voidMethodSequenceLongAr
gMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10429 {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStri
ngArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10430 {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
SequenceTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, | |
| 10431 {"nullableLongMethod", TestObjectV8Internal::nullableLongMethodMethodCallbac
k, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10432 {"nullableStringMethod", TestObjectV8Internal::nullableStringMethodMethodCal
lback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10433 {"nullableTestInterfaceMethod", TestObjectV8Internal::nullableTestInterfaceM
ethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10434 {"nullableLongSequenceMethod", TestObjectV8Internal::nullableLongSequenceMet
hodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10435 {"testInterfaceGarbageCollectedOrDOMStringMethod", TestObjectV8Internal::tes
tInterfaceGarbageCollectedOrDOMStringMethodMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, | |
| 10436 {"testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod", TestObjectV8In
ternal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10437 {"longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod", TestObjectV8Inter
nal::longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethodCallback, 0, 0,
V8DOMConfiguration::ExposedToAllScripts}, | |
| 10438 {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTe
stInterfaceEmptyOrNullArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllS
cripts}, | |
| 10439 {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestC
allbackInterfaceArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts
}, | |
| 10440 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMet
hodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0, V8DOMConfiguration::Exp
osedToAllScripts}, | |
| 10441 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMetho
dTestCallbackInterfaceOrNullArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | |
| 10442 {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0,
V8DOMConfiguration::ExposedToAllScripts}, | |
| 10443 {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodC
allback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10444 {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10445 {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10446 {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 3, V
8DOMConfiguration::ExposedToAllScripts}, | |
| 10447 {"promiseMethodWithoutExceptionState", TestObjectV8Internal::promiseMethodWi
thoutExceptionStateMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts
}, | |
| 10448 {"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueM
ethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10449 {"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodC
allback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10450 {"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMet
hodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10451 {"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMet
hodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10452 {"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCal
lback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10453 {"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSeria
lizedScriptValueArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts
}, | |
| 10454 {"voidMethodXPathNSResolverArg", TestObjectV8Internal::voidMethodXPathNSReso
lverArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10455 {"voidMethodDictionarySequenceArg", TestObjectV8Internal::voidMethodDictiona
rySequenceArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10456 {"overloadedPromiseMethod", TestObjectV8Internal::overloadedPromiseMethodMet
hodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10457 {"voidMethodStringArgLongArg", TestObjectV8Internal::voidMethodStringArgLong
ArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10458 {"voidMethodOptionalStringArg", TestObjectV8Internal::voidMethodOptionalStri
ngArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10459 {"voidMethodOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
OptionalTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo
AllScripts}, | |
| 10460 {"voidMethodOptionalLongArg", TestObjectV8Internal::voidMethodOptionalLongAr
gMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10461 {"stringMethodOptionalLongArg", TestObjectV8Internal::stringMethodOptionalLo
ngArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10462 {"testInterfaceEmptyMethodOptionalLongArg", TestObjectV8Internal::testInterf
aceEmptyMethodOptionalLongArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo
AllScripts}, | |
| 10463 {"longMethodOptionalLongArg", TestObjectV8Internal::longMethodOptionalLongAr
gMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10464 {"voidMethodLongArgOptionalLongArg", TestObjectV8Internal::voidMethodLongArg
OptionalLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10465 {"voidMethodLongArgOptionalLongArgOptionalLongArg", TestObjectV8Internal::vo
idMethodLongArgOptionalLongArgOptionalLongArgMethodCallback, 0, 1, V8DOMConfigur
ation::ExposedToAllScripts}, | |
| 10466 {"voidMethodLongArgOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voi
dMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfigurat
ion::ExposedToAllScripts}, | |
| 10467 {"voidMethodTestInterfaceEmptyArgOptionalLongArg", TestObjectV8Internal::voi
dMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback, 0, 1, V8DOMConfigurat
ion::ExposedToAllScripts}, | |
| 10468 {"voidMethodOptionalDictionaryArg", TestObjectV8Internal::voidMethodOptional
DictionaryArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10469 {"voidMethodDefaultByteStringArg", TestObjectV8Internal::voidMethodDefaultBy
teStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10470 {"voidMethodDefaultStringArg", TestObjectV8Internal::voidMethodDefaultString
ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10471 {"voidMethodDefaultIntegerArgs", TestObjectV8Internal::voidMethodDefaultInte
gerArgsMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10472 {"voidMethodDefaultDoubleArg", TestObjectV8Internal::voidMethodDefaultDouble
ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10473 {"voidMethodDefaultTrueBooleanArg", TestObjectV8Internal::voidMethodDefaultT
rueBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10474 {"voidMethodDefaultFalseBooleanArg", TestObjectV8Internal::voidMethodDefault
FalseBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10475 {"voidMethodDefaultNullableByteStringArg", TestObjectV8Internal::voidMethodD
efaultNullableByteStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAl
lScripts}, | |
| 10476 {"voidMethodDefaultNullableStringArg", TestObjectV8Internal::voidMethodDefau
ltNullableStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts
}, | |
| 10477 {"voidMethodDefaultNullableTestInterfaceArg", TestObjectV8Internal::voidMeth
odDefaultNullableTestInterfaceArgMethodCallback, 0, 0, V8DOMConfiguration::Expos
edToAllScripts}, | |
| 10478 {"voidMethodVariadicStringArg", TestObjectV8Internal::voidMethodVariadicStri
ngArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10479 {"voidMethodStringArgVariadicStringArg", TestObjectV8Internal::voidMethodStr
ingArgVariadicStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScr
ipts}, | |
| 10480 {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
VariadicTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo
AllScripts}, | |
| 10481 {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectV
8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCal
lback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10482 {"voidMethodVariadicTestInterfaceGarbageCollectedArg", TestObjectV8Internal:
:voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, | |
| 10483 {"voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", TestObjectV8Int
ernal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10484 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10485 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10486 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10487 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10488 {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10489 {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10490 {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10491 {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10492 {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10493 {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10494 {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorl
dBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsM
ethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10495 {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUns
ignedShortArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10496 {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsi
gnedLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10497 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::vo
idMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, | |
| 10498 {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaul
tUndefinedLongArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10499 {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefa
ultUndefinedStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip
ts}, | |
| 10500 {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRan
geLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10501 {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMeth
odTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Expos
edToAllScripts}, | |
| 10502 {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMetho
dTreatNullAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | |
| 10503 {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestO
bjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringString
ArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10504 {"activityLoggingAccessForAllWorldsMethod", TestObjectV8Internal::activityLo
ggingAccessForAllWorldsMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo
AllScripts}, | |
| 10505 {"callWithExecutionContextVoidMethod", TestObjectV8Internal::callWithExecuti
onContextVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts
}, | |
| 10506 {"callWithScriptStateVoidMethod", TestObjectV8Internal::callWithScriptStateV
oidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10507 {"callWithScriptStateLongMethod", TestObjectV8Internal::callWithScriptStateL
ongMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10508 {"callWithScriptStateExecutionContextVoidMethod", TestObjectV8Internal::call
WithScriptStateExecutionContextVoidMethodMethodCallback, 0, 0, V8DOMConfiguratio
n::ExposedToAllScripts}, | |
| 10509 {"callWithScriptStateScriptArgumentsVoidMethod", TestObjectV8Internal::callW
ithScriptStateScriptArgumentsVoidMethodMethodCallback, 0, 0, V8DOMConfiguration:
:ExposedToAllScripts}, | |
| 10510 {"callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg", TestObjec
tV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMetho
dCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10511 {"callWithActiveWindow", TestObjectV8Internal::callWithActiveWindowMethodCal
lback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10512 {"callWithActiveWindowScriptWindow", TestObjectV8Internal::callWithActiveWin
dowScriptWindowMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10513 {"checkSecurityForNodeVoidMethod", TestObjectV8Internal::checkSecurityForNod
eVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10514 #if ENABLE(CONDITION) | |
| 10515 {"conditionalConditionVoidMethod", TestObjectV8Internal::conditionalConditio
nVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10516 #endif // ENABLE(CONDITION) | |
| 10517 {"customVoidMethod", TestObjectV8Internal::customVoidMethodMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10518 #if ENABLE(CONDITION) | |
| 10519 {"conditionalConditionCustomVoidMethod", TestObjectV8Internal::conditionalCo
nditionCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts}, | |
| 10520 #endif // ENABLE(CONDITION) | |
| 10521 {"customElementCallbacksVoidMethod", TestObjectV8Internal::customElementCall
backsVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10522 {"deprecatedVoidMethod", TestObjectV8Internal::deprecatedVoidMethodMethodCal
lback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10523 {"implementedAsVoidMethod", TestObjectV8Internal::implementedAsVoidMethodMet
hodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10524 {"measureAsVoidMethod", TestObjectV8Internal::measureAsVoidMethodMethodCallb
ack, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10525 {"DeprecateAsOverloadedMethod", TestObjectV8Internal::DeprecateAsOverloadedM
ethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10526 {"DeprecateAsSameValueOverloadedMethod", TestObjectV8Internal::DeprecateAsSa
meValueOverloadedMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts}, | |
| 10527 {"measureAsOverloadedMethod", TestObjectV8Internal::measureAsOverloadedMetho
dMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10528 {"measureAsSameValueOverloadedMethod", TestObjectV8Internal::measureAsSameVa
lueOverloadedMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts
}, | |
| 10529 {"deprecateAsMeasureAsSameValueOverloadedMethod", TestObjectV8Internal::depr
ecateAsMeasureAsSameValueOverloadedMethodMethodCallback, 0, 0, V8DOMConfiguratio
n::ExposedToAllScripts}, | |
| 10530 {"deprecateAsSameValueMeasureAsOverloadedMethod", TestObjectV8Internal::depr
ecateAsSameValueMeasureAsOverloadedMethodMethodCallback, 0, 0, V8DOMConfiguratio
n::ExposedToAllScripts}, | |
| 10531 {"deprecateAsSameValueMeasureAsSameValueOverloadedMethod", TestObjectV8Inter
nal::deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback, 0, 0,
V8DOMConfiguration::ExposedToAllScripts}, | |
| 10532 {"perWorldBindingsVoidMethod", TestObjectV8Internal::perWorldBindingsVoidMet
hodMethodCallback, TestObjectV8Internal::perWorldBindingsVoidMethodMethodCallbac
kForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10533 {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::pe
rWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectV8Interna
l::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1,
V8DOMConfiguration::ExposedToAllScripts}, | |
| 10534 {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectV8Intern
al::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, TestObj
ectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallba
ckForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10535 {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectV8I
nternal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbac
k, TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMet
hodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10536 {"raisesExceptionVoidMethod", TestObjectV8Internal::raisesExceptionVoidMetho
dMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10537 {"raisesExceptionStringMethod", TestObjectV8Internal::raisesExceptionStringM
ethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10538 {"raisesExceptionVoidMethodOptionalLongArg", TestObjectV8Internal::raisesExc
eptionVoidMethodOptionalLongArgMethodCallback, 0, 0, V8DOMConfiguration::Exposed
ToAllScripts}, | |
| 10539 {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectV8Internal::
raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1, V8DOMConf
iguration::ExposedToAllScripts}, | |
| 10540 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectV8In
ternal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10541 {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectV8Internal::raises
ExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::E
xposedToAllScripts}, | |
| 10542 {"callWithExecutionContextRaisesExceptionVoidMethodLongArg", TestObjectV8Int
ernal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10543 {"partiallyRuntimeEnabledOverloadedVoidMethod", TestObjectV8Internal::partia
llyRuntimeEnabledOverloadedVoidMethodMethodCallback, 0, 1, V8DOMConfiguration::E
xposedToAllScripts}, | |
| 10544 {"treatReturnedNullStringAsNullStringMethod", TestObjectV8Internal::treatRet
urnedNullStringAsNullStringMethodMethodCallback, 0, 0, V8DOMConfiguration::Expos
edToAllScripts}, | |
| 10545 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectV8Internal::tre
atReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, | |
| 10546 {"treatReturnedNullStringAsNullByteStringMethod", TestObjectV8Internal::trea
tReturnedNullStringAsNullByteStringMethodMethodCallback, 0, 0, V8DOMConfiguratio
n::ExposedToAllScripts}, | |
| 10547 {"treatReturnedNullStringAsUndefinedByteStringMethod", TestObjectV8Internal:
:treatReturnedNullStringAsUndefinedByteStringMethodMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, | |
| 10548 {"treatReturnedNullStringAsNullScalarValueStringMethod", TestObjectV8Interna
l::treatReturnedNullStringAsNullScalarValueStringMethodMethodCallback, 0, 0, V8D
OMConfiguration::ExposedToAllScripts}, | |
| 10549 {"treatReturnedNullStringAsUndefinedScalarValueStringMethod", TestObjectV8In
ternal::treatReturnedNullStringAsUndefinedScalarValueStringMethodMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10550 {"typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", TestObjectV8Interna
l::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, | |
| 10551 {"typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg", TestObjectV
8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethodCal
lback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10552 {"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", TestObjectV8Internal
::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback, 0, 2, V8DOM
Configuration::ExposedToAllScripts}, | |
| 10553 {"voidMethodTestInterfaceGarbageCollectedSequenceArg", TestObjectV8Internal:
:voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback, 0, 1, V8DOMCo
nfiguration::ExposedToAllScripts}, | |
| 10554 {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::vo
idMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1, V8DOMConfigur
ation::ExposedToAllScripts}, | |
| 10555 {"voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", TestObjectV8Int
ernal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10556 {"voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", TestObjectV8Intern
al::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback, 0, 1, V
8DOMConfiguration::ExposedToAllScripts}, | |
| 10557 {"voidMethodImplementedInPrivateScript", TestObjectV8Internal::voidMethodImp
lementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts}, | |
| 10558 {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodI
mplementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllS
cripts}, | |
| 10559 {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Inter
nal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1,
V8DOMConfiguration::ExposedToAllScripts}, | |
| 10560 {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Int
ernal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10561 {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Interna
l::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, | |
| 10562 {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Int
ernal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0
, 5, V8DOMConfiguration::ExposedToAllScripts}, | |
| 10563 {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodI
mplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, V8DOMConfiguration::Onl
yExposedToPrivateScript}, | |
| 10564 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, | |
| 10565 }; | |
| 10566 | |
| 10567 static void installV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> functio
nTemplate, v8::Isolate* isolate) | |
| 10568 { | |
| 10569 functionTemplate->ReadOnlyPrototype(); | |
| 10570 | |
| 10571 v8::Local<v8::Signature> defaultSignature; | |
| 10572 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::internalFiel
dCount, | |
| 10573 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), | |
| 10574 V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors), | |
| 10575 V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods), | |
| 10576 isolate); | |
| 10577 v8::Local<v8::ObjectTemplate> instanceTemplate ALLOW_UNUSED = functionTempla
te->InstanceTemplate(); | |
| 10578 v8::Local<v8::ObjectTemplate> prototypeTemplate ALLOW_UNUSED = functionTempl
ate->PrototypeTemplate(); | |
| 10579 if (RuntimeEnabledFeatures::featureNameEnabled()) { | |
| 10580 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | |
| 10581 {"runtimeEnabledLongAttribute", TestObjectV8Internal::runtimeEnabledLong
AttributeAttributeGetterCallback, TestObjectV8Internal::runtimeEnabledLongAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnInstance}; | |
| 10582 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); | |
| 10583 } | |
| 10584 #if ENABLE(CONDITION) | |
| 10585 if (RuntimeEnabledFeatures::featureNameEnabled()) { | |
| 10586 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | |
| 10587 {"conditionalRuntimeEnabledLongAttribute", TestObjectV8Internal::conditi
onalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::co
nditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cas
t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None),
V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; | |
| 10588 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); | |
| 10589 } | |
| 10590 #endif // ENABLE(CONDITION) | |
| 10591 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants
[] = { | |
| 10592 {"CONST_VALUE_0", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort
}, | |
| 10593 {"CONST_VALUE_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort
}, | |
| 10594 {"CONST_VALUE_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort
}, | |
| 10595 {"CONST_VALUE_4", 4, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort
}, | |
| 10596 {"CONST_VALUE_8", 8, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort
}, | |
| 10597 {"CONST_VALUE_9", -1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, | |
| 10598 {"CONST_VALUE_10", 0, 0, "my constant string", V8DOMConfiguration::Const
antTypeString}, | |
| 10599 {"CONST_VALUE_11", 0xffffffff, 0, 0, V8DOMConfiguration::ConstantTypeUns
ignedShort}, | |
| 10600 {"CONST_VALUE_12", 0x01, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedS
hort}, | |
| 10601 {"CONST_VALUE_13", 0X20, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedS
hort}, | |
| 10602 {"CONST_VALUE_14", 0x1abc, 0, 0, V8DOMConfiguration::ConstantTypeUnsigne
dShort}, | |
| 10603 {"CONST_VALUE_15", 010, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedSh
ort}, | |
| 10604 {"CONST_VALUE_16", -010, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedS
hort}, | |
| 10605 {"CONST_VALUE_16", -0x1A, 0, 0, V8DOMConfiguration::ConstantTypeUnsigned
Short}, | |
| 10606 {"CONST_VALUE_17", -0X1a, 0, 0, V8DOMConfiguration::ConstantTypeUnsigned
Short}, | |
| 10607 {"CONST_VALUE_18", 0, 0.123, 0, V8DOMConfiguration::ConstantTypeDouble}, | |
| 10608 {"CONST_VALUE_19", 0, 4e9, 0, V8DOMConfiguration::ConstantTypeDouble}, | |
| 10609 {"CONST_VALUE_20", 0, 3.4e5, 0, V8DOMConfiguration::ConstantTypeDouble}, | |
| 10610 {"CONST_VALUE_21", 0, -1.3, 0, V8DOMConfiguration::ConstantTypeDouble}, | |
| 10611 {"CONST_VALUE_22", 0, -4e-9, 0, V8DOMConfiguration::ConstantTypeDouble}, | |
| 10612 {"CONST_VALUE_23", 0, .123, 0, V8DOMConfiguration::ConstantTypeDouble}, | |
| 10613 {"CONST_VALUE_24", 0, 5E+4, 0, V8DOMConfiguration::ConstantTypeDouble}, | |
| 10614 {"CONST_VALUE_25", 0, 1, 0, V8DOMConfiguration::ConstantTypeFloat}, | |
| 10615 {"DEPRECATED_CONSTANT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, | |
| 10616 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, | |
| 10617 }; | |
| 10618 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants), isolate); | |
| 10619 if (RuntimeEnabledFeatures::featureNameEnabled()) { | |
| 10620 static const V8DOMConfiguration::ConstantConfiguration constantConfigura
tion = {"FEATURE_ENABLED_CONST", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}
; | |
| 10621 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate
, &constantConfiguration, 1, isolate); | |
| 10622 } | |
| 10623 COMPILE_ASSERT(0 == TestObject::CONST_VALUE_0, TheValueOfTestObject_CONST_VA
LUE_0DoesntMatchWithImplementation); | |
| 10624 COMPILE_ASSERT(1 == TestObject::CONST_VALUE_1, TheValueOfTestObject_CONST_VA
LUE_1DoesntMatchWithImplementation); | |
| 10625 COMPILE_ASSERT(2 == TestObject::CONST_VALUE_2, TheValueOfTestObject_CONST_VA
LUE_2DoesntMatchWithImplementation); | |
| 10626 COMPILE_ASSERT(4 == TestObject::CONST_VALUE_4, TheValueOfTestObject_CONST_VA
LUE_4DoesntMatchWithImplementation); | |
| 10627 COMPILE_ASSERT(8 == TestObject::CONST_VALUE_8, TheValueOfTestObject_CONST_VA
LUE_8DoesntMatchWithImplementation); | |
| 10628 COMPILE_ASSERT(-1 == TestObject::CONST_VALUE_9, TheValueOfTestObject_CONST_V
ALUE_9DoesntMatchWithImplementation); | |
| 10629 COMPILE_ASSERT(0xffffffff == TestObject::CONST_VALUE_11, TheValueOfTestObjec
t_CONST_VALUE_11DoesntMatchWithImplementation); | |
| 10630 COMPILE_ASSERT(0x01 == TestObject::CONST_VALUE_12, TheValueOfTestObject_CONS
T_VALUE_12DoesntMatchWithImplementation); | |
| 10631 COMPILE_ASSERT(0X20 == TestObject::CONST_VALUE_13, TheValueOfTestObject_CONS
T_VALUE_13DoesntMatchWithImplementation); | |
| 10632 COMPILE_ASSERT(0x1abc == TestObject::CONST_VALUE_14, TheValueOfTestObject_CO
NST_VALUE_14DoesntMatchWithImplementation); | |
| 10633 COMPILE_ASSERT(010 == TestObject::CONST_VALUE_15, TheValueOfTestObject_CONST
_VALUE_15DoesntMatchWithImplementation); | |
| 10634 COMPILE_ASSERT(-010 == TestObject::CONST_VALUE_16, TheValueOfTestObject_CONS
T_VALUE_16DoesntMatchWithImplementation); | |
| 10635 COMPILE_ASSERT(-0x1A == TestObject::CONST_VALUE_16, TheValueOfTestObject_CON
ST_VALUE_16DoesntMatchWithImplementation); | |
| 10636 COMPILE_ASSERT(-0X1a == TestObject::CONST_VALUE_17, TheValueOfTestObject_CON
ST_VALUE_17DoesntMatchWithImplementation); | |
| 10637 COMPILE_ASSERT(1 == TestObject::DEPRECATED_CONSTANT, TheValueOfTestObject_DE
PRECATED_CONSTANTDoesntMatchWithImplementation); | |
| 10638 COMPILE_ASSERT(1 == TestObject::FEATURE_ENABLED_CONST, TheValueOfTestObject_
FEATURE_ENABLED_CONSTDoesntMatchWithImplementation); | |
| 10639 COMPILE_ASSERT(1 == TestObject::CONST_IMPL, TheValueOfTestObject_CONST_IMPLD
oesntMatchWithImplementation); | |
| 10640 static const V8DOMConfiguration::MethodConfiguration staticVoidMethodMethodC
onfiguration = { | |
| 10641 "staticVoidMethod", TestObjectV8Internal::staticVoidMethodMethodCallback
, 0, 0, V8DOMConfiguration::ExposedToAllScripts, | |
| 10642 }; | |
| 10643 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>
(), v8::None, staticVoidMethodMethodConfiguration, isolate); | |
| 10644 static const V8DOMConfiguration::MethodConfiguration overloadedStaticMethodM
ethodConfiguration = { | |
| 10645 "overloadedStaticMethod", TestObjectV8Internal::overloadedStaticMethodMe
thodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts, | |
| 10646 }; | |
| 10647 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>
(), v8::None, overloadedStaticMethodMethodConfiguration, isolate); | |
| 10648 #if ENABLE(CONDITION) | |
| 10649 static const V8DOMConfiguration::MethodConfiguration conditionalConditionSta
ticVoidMethodMethodConfiguration = { | |
| 10650 "conditionalConditionStaticVoidMethod", TestObjectV8Internal::conditiona
lConditionStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll
Scripts, | |
| 10651 }; | |
| 10652 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>
(), v8::None, conditionalConditionStaticVoidMethodMethodConfiguration, isolate); | |
| 10653 #endif // ENABLE(CONDITION) | |
| 10654 static const V8DOMConfiguration::MethodConfiguration doNotCheckSignatureVoid
MethodMethodConfiguration = { | |
| 10655 "doNotCheckSignatureVoidMethod", TestObjectV8Internal::doNotCheckSignatu
reVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, | |
| 10656 }; | |
| 10657 V8DOMConfiguration::installMethod(prototypeTemplate, v8::Local<v8::Signature
>(), v8::None, doNotCheckSignatureVoidMethodMethodConfiguration, isolate); | |
| 10658 static const V8DOMConfiguration::MethodConfiguration notEnumerableVoidMethod
MethodConfiguration = { | |
| 10659 "notEnumerableVoidMethod", TestObjectV8Internal::notEnumerableVoidMethod
MethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, | |
| 10660 }; | |
| 10661 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, stati
c_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), notEnumerableVoidM
ethodMethodConfiguration, isolate); | |
| 10662 if (RuntimeEnabledFeatures::featureNameEnabled()) { | |
| 10663 static const V8DOMConfiguration::MethodConfiguration runtimeEnabledVoidM
ethodMethodConfiguration = { | |
| 10664 "runtimeEnabledVoidMethod", TestObjectV8Internal::runtimeEnabledVoid
MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, | |
| 10665 }; | |
| 10666 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v
8::None, runtimeEnabledVoidMethodMethodConfiguration, isolate); | |
| 10667 } | |
| 10668 if (RuntimeEnabledFeatures::featureNameEnabled()) { | |
| 10669 static const V8DOMConfiguration::MethodConfiguration perWorldBindingsRun
timeEnabledVoidMethodMethodConfiguration = { | |
| 10670 "perWorldBindingsRuntimeEnabledVoidMethod", TestObjectV8Internal::pe
rWorldBindingsRuntimeEnabledVoidMethodMethodCallback, TestObjectV8Internal::perW
orldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, 0, V8DOMConfigur
ation::ExposedToAllScripts, | |
| 10671 }; | |
| 10672 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v
8::None, perWorldBindingsRuntimeEnabledVoidMethodMethodConfiguration, isolate); | |
| 10673 } | |
| 10674 if (RuntimeEnabledFeatures::featureNameEnabled()) { | |
| 10675 static const V8DOMConfiguration::MethodConfiguration runtimeEnabledOverl
oadedVoidMethodMethodConfiguration = { | |
| 10676 "runtimeEnabledOverloadedVoidMethod", TestObjectV8Internal::runtimeE
nabledOverloadedVoidMethodMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAll
Scripts, | |
| 10677 }; | |
| 10678 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v
8::None, runtimeEnabledOverloadedVoidMethodMethodConfiguration, isolate); | |
| 10679 } | |
| 10680 static const V8DOMConfiguration::MethodConfiguration unforgeableVoidMethodMe
thodConfiguration = { | |
| 10681 "unforgeableVoidMethod", TestObjectV8Internal::unforgeableVoidMethodMeth
odCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, | |
| 10682 }; | |
| 10683 V8DOMConfiguration::installMethod(instanceTemplate, defaultSignature, static
_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), unforgeableVoidMeth
odMethodConfiguration, isolate); | |
| 10684 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin
gAttribute"), TestObjectV8Internal::staticStringAttributeAttributeGetterCallback
, TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, v8::Extern
al::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8
::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | |
| 10685 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongA
ttribute"), TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, Te
stObjectV8Internal::staticLongAttributeAttributeSetterCallback, v8::External::Ne
w(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acce
ssorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | |
| 10686 | |
| 10687 // Custom toString template | |
| 10688 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | |
| 10689 } | |
| 10690 | |
| 10691 v8::Handle<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate) | |
| 10692 { | |
| 10693 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestObjectTemplate); | |
| 10694 } | |
| 10695 | |
| 10696 bool V8TestObject::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isola
te) | |
| 10697 { | |
| 10698 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | |
| 10699 } | |
| 10700 | |
| 10701 v8::Handle<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Handle<v8:
:Value> v8Value, v8::Isolate* isolate) | |
| 10702 { | |
| 10703 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | |
| 10704 } | |
| 10705 | |
| 10706 TestObject* V8TestObject::toImplWithTypeCheck(v8::Isolate* isolate, v8::Handle<v
8::Value> value) | |
| 10707 { | |
| 10708 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle
<v8::Object>::Cast(value))->toImpl<TestObject>() : 0; | |
| 10709 } | |
| 10710 | |
| 10711 void V8TestObject::installConditionallyEnabledProperties(v8::Handle<v8::Object>
instanceObject, v8::Isolate* isolate) | |
| 10712 { | |
| 10713 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance
Object->GetPrototype()); | |
| 10714 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | |
| 10715 | |
| 10716 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | |
| 10717 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | |
| 10718 {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnabl
edLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabledL
ongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:
:DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exp
osedToAllScripts, V8DOMConfiguration::OnInstance}; | |
| 10719 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at
tributeConfiguration, isolate); | |
| 10720 } | |
| 10721 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | |
| 10722 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | |
| 10723 {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectV8Internal::p
erContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8
Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback, 0
, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAtt
ribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::
OnInstance}; | |
| 10724 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at
tributeConfiguration, isolate); | |
| 10725 } | |
| 10726 } | |
| 10727 | |
| 10728 void V8TestObject::installConditionallyEnabledMethods(v8::Handle<v8::Object> pro
totypeObject, v8::Isolate* isolate) | |
| 10729 { | |
| 10730 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); | |
| 10731 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | |
| 10732 ASSERT(context); | |
| 10733 | |
| 10734 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | |
| 10735 prototypeObject->Set(v8AtomicString(isolate, "perContextEnabledVoidMetho
d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledV
oidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); | |
| 10736 } | |
| 10737 } | |
| 10738 | |
| 10739 | |
| 10740 void V8TestObject::refObject(ScriptWrappableBase* internalPointer) | |
| 10741 { | |
| 10742 internalPointer->toImpl<TestObject>()->ref(); | |
| 10743 } | |
| 10744 | |
| 10745 void V8TestObject::derefObject(ScriptWrappableBase* internalPointer) | |
| 10746 { | |
| 10747 internalPointer->toImpl<TestObject>()->deref(); | |
| 10748 } | |
| 10749 | |
| 10750 WrapperPersistentNode* V8TestObject::createPersistentHandle(ScriptWrappableBase*
internalPointer) | |
| 10751 { | |
| 10752 ASSERT_NOT_REACHED(); | |
| 10753 return 0; | |
| 10754 } | |
| 10755 | |
| 10756 template<> | |
| 10757 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | |
| 10758 { | |
| 10759 return toV8(impl, creationContext, isolate); | |
| 10760 } | |
| 10761 | |
| 10762 bool V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(Loc
alFrame* frame, TestObject* holderImpl) | |
| 10763 { | |
| 10764 if (!frame) | |
| 10765 return false; | |
| 10766 v8::HandleScope handleScope(toIsolate(frame)); | |
| 10767 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 10768 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 10769 if (context.IsEmpty()) | |
| 10770 return false; | |
| 10771 ScriptState* scriptState = ScriptState::from(context); | |
| 10772 if (!scriptState->executionContext()) | |
| 10773 return false; | |
| 10774 | |
| 10775 ScriptState::Scope scope(scriptState); | |
| 10776 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 10777 | |
| 10778 v8::Handle<v8::Value> *argv = 0; | |
| 10779 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodI
mplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scri
ptState->isolate()); | |
| 10780 v8::TryCatch block; | |
| 10781 PrivateScriptRunner::runDOMMethod(scriptState, "TestObject", "voidMethodImpl
ementedInPrivateScript", holder, 0, argv); | |
| 10782 if (block.HasCaught()) { | |
| 10783 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 10784 block.ReThrow(); | |
| 10785 return false; | |
| 10786 } | |
| 10787 return true; | |
| 10788 } | |
| 10789 | |
| 10790 bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(Lo
calFrame* frame, TestObject* holderImpl, int* result) | |
| 10791 { | |
| 10792 if (!frame) | |
| 10793 return false; | |
| 10794 v8::HandleScope handleScope(toIsolate(frame)); | |
| 10795 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 10796 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 10797 if (context.IsEmpty()) | |
| 10798 return false; | |
| 10799 ScriptState* scriptState = ScriptState::from(context); | |
| 10800 if (!scriptState->executionContext()) | |
| 10801 return false; | |
| 10802 | |
| 10803 ScriptState::Scope scope(scriptState); | |
| 10804 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 10805 | |
| 10806 v8::Handle<v8::Value> *argv = 0; | |
| 10807 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
ImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scr
iptState->isolate()); | |
| 10808 v8::TryCatch block; | |
| 10809 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "shortMethodImplementedInPrivateScript", holder, 0, argv); | |
| 10810 if (block.HasCaught()) { | |
| 10811 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 10812 block.ReThrow(); | |
| 10813 return false; | |
| 10814 } | |
| 10815 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | |
| 10816 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 10817 *result = cppValue; | |
| 10818 return true; | |
| 10819 } | |
| 10820 | |
| 10821 bool V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPriva
teScriptMethod(LocalFrame* frame, TestObject* holderImpl, int value, int* result
) | |
| 10822 { | |
| 10823 if (!frame) | |
| 10824 return false; | |
| 10825 v8::HandleScope handleScope(toIsolate(frame)); | |
| 10826 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 10827 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 10828 if (context.IsEmpty()) | |
| 10829 return false; | |
| 10830 ScriptState* scriptState = ScriptState::from(context); | |
| 10831 if (!scriptState->executionContext()) | |
| 10832 return false; | |
| 10833 | |
| 10834 ScriptState::Scope scope(scriptState); | |
| 10835 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 10836 | |
| 10837 v8::Handle<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); | |
| 10838 v8::Handle<v8::Value> argv[] = { valueHandle }; | |
| 10839 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context
()->Global(), scriptState->isolate()); | |
| 10840 v8::TryCatch block; | |
| 10841 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript", holde
r, 1, argv); | |
| 10842 if (block.HasCaught()) { | |
| 10843 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 10844 block.ReThrow(); | |
| 10845 return false; | |
| 10846 } | |
| 10847 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | |
| 10848 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 10849 *result = cppValue; | |
| 10850 return true; | |
| 10851 } | |
| 10852 | |
| 10853 bool V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPri
vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, String value, String
* result) | |
| 10854 { | |
| 10855 if (!frame) | |
| 10856 return false; | |
| 10857 v8::HandleScope handleScope(toIsolate(frame)); | |
| 10858 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 10859 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 10860 if (context.IsEmpty()) | |
| 10861 return false; | |
| 10862 ScriptState* scriptState = ScriptState::from(context); | |
| 10863 if (!scriptState->executionContext()) | |
| 10864 return false; | |
| 10865 | |
| 10866 ScriptState::Scope scope(scriptState); | |
| 10867 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 10868 | |
| 10869 v8::Handle<v8::Value> valueHandle = v8String(scriptState->isolate(), value); | |
| 10870 v8::Handle<v8::Value> argv[] = { valueHandle }; | |
| 10871 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dWithStringArgumentImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); | |
| 10872 v8::TryCatch block; | |
| 10873 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "stringMethodWithStringArgumentImplementedInPrivateScript", hol
der, 1, argv); | |
| 10874 if (block.HasCaught()) { | |
| 10875 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 10876 block.ReThrow(); | |
| 10877 return false; | |
| 10878 } | |
| 10879 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | |
| 10880 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 10881 *result = cppValue; | |
| 10882 return true; | |
| 10883 } | |
| 10884 | |
| 10885 bool V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPrivate
ScriptMethod(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWillBeRawPtr<N
ode> value, RefPtrWillBeRawPtr<Node>* result) | |
| 10886 { | |
| 10887 if (!frame) | |
| 10888 return false; | |
| 10889 v8::HandleScope handleScope(toIsolate(frame)); | |
| 10890 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 10891 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 10892 if (context.IsEmpty()) | |
| 10893 return false; | |
| 10894 ScriptState* scriptState = ScriptState::from(context); | |
| 10895 if (!scriptState->executionContext()) | |
| 10896 return false; | |
| 10897 | |
| 10898 ScriptState::Scope scope(scriptState); | |
| 10899 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 10900 | |
| 10901 v8::Handle<v8::Value> valueHandle = toV8(value, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 10902 v8::Handle<v8::Value> argv[] = { valueHandle }; | |
| 10903 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context()
->Global(), scriptState->isolate()); | |
| 10904 v8::TryCatch block; | |
| 10905 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder,
1, argv); | |
| 10906 if (block.HasCaught()) { | |
| 10907 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 10908 block.ReThrow(); | |
| 10909 return false; | |
| 10910 } | |
| 10911 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toImplWithTypeCheck(scriptState->i
solate(), v8Value), false); | |
| 10912 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 10913 *result = cppValue; | |
| 10914 return true; | |
| 10915 } | |
| 10916 | |
| 10917 bool V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPri
vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWillBeRawP
tr<Document> document, PassRefPtrWillBeRawPtr<Node> node, int value1, double val
ue2, String string, RefPtrWillBeRawPtr<Node>* result) | |
| 10918 { | |
| 10919 if (!frame) | |
| 10920 return false; | |
| 10921 v8::HandleScope handleScope(toIsolate(frame)); | |
| 10922 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 10923 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 10924 if (context.IsEmpty()) | |
| 10925 return false; | |
| 10926 ScriptState* scriptState = ScriptState::from(context); | |
| 10927 if (!scriptState->executionContext()) | |
| 10928 return false; | |
| 10929 | |
| 10930 ScriptState::Scope scope(scriptState); | |
| 10931 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 10932 | |
| 10933 v8::Handle<v8::Value> documentHandle = toV8(document, scriptState->context()
->Global(), scriptState->isolate()); | |
| 10934 v8::Handle<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global
(), scriptState->isolate()); | |
| 10935 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate()
, value1); | |
| 10936 v8::Handle<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(),
value2); | |
| 10937 v8::Handle<v8::Value> stringHandle = v8String(scriptState->isolate(), string
); | |
| 10938 v8::Handle<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, v
alue2Handle, stringHandle }; | |
| 10939 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); | |
| 10940 v8::TryCatch block; | |
| 10941 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", hol
der, 5, argv); | |
| 10942 if (block.HasCaught()) { | |
| 10943 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 10944 block.ReThrow(); | |
| 10945 return false; | |
| 10946 } | |
| 10947 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toImplWithTypeCheck(scriptState->i
solate(), v8Value), false); | |
| 10948 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 10949 *result = cppValue; | |
| 10950 return true; | |
| 10951 } | |
| 10952 | |
| 10953 bool V8TestObject::PrivateScript::methodForPrivateScriptOnlyMethod(LocalFrame* f
rame, TestObject* holderImpl, int value1, int value2, int* result) | |
| 10954 { | |
| 10955 if (!frame) | |
| 10956 return false; | |
| 10957 v8::HandleScope handleScope(toIsolate(frame)); | |
| 10958 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 10959 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 10960 if (context.IsEmpty()) | |
| 10961 return false; | |
| 10962 ScriptState* scriptState = ScriptState::from(context); | |
| 10963 if (!scriptState->executionContext()) | |
| 10964 return false; | |
| 10965 | |
| 10966 ScriptState::Scope scope(scriptState); | |
| 10967 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 10968 | |
| 10969 v8::Handle<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate()
, value1); | |
| 10970 v8::Handle<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate()
, value2); | |
| 10971 v8::Handle<v8::Value> argv[] = { value1Handle, value2Handle }; | |
| 10972 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); | |
| 10973 v8::TryCatch block; | |
| 10974 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "methodForPrivateScriptOnly", holder, 2, argv); | |
| 10975 if (block.HasCaught()) { | |
| 10976 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 10977 block.ReThrow(); | |
| 10978 return false; | |
| 10979 } | |
| 10980 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | |
| 10981 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 10982 *result = cppValue; | |
| 10983 return true; | |
| 10984 } | |
| 10985 | |
| 10986 bool V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(LocalFra
me* frame, TestObject* holderImpl, int* result) | |
| 10987 { | |
| 10988 if (!frame) | |
| 10989 return false; | |
| 10990 v8::HandleScope handleScope(toIsolate(frame)); | |
| 10991 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 10992 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 10993 if (context.IsEmpty()) | |
| 10994 return false; | |
| 10995 ScriptState* scriptState = ScriptState::from(context); | |
| 10996 if (!scriptState->executionContext()) | |
| 10997 return false; | |
| 10998 | |
| 10999 ScriptState::Scope scope(scriptState); | |
| 11000 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11001 | |
| 11002 ExceptionState exceptionState(ExceptionState::GetterContext, "readonlyShortA
ttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate(
)); | |
| 11003 v8::TryCatch block; | |
| 11004 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "readonlyShortAttribute", holder); | |
| 11005 if (block.HasCaught()) { | |
| 11006 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11007 block.ReThrow(); | |
| 11008 return false; | |
| 11009 } | |
| 11010 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | |
| 11011 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 11012 *result = cppValue; | |
| 11013 return true; | |
| 11014 } | |
| 11015 | |
| 11016 bool V8TestObject::PrivateScript::shortAttributeAttributeGetter(LocalFrame* fram
e, TestObject* holderImpl, int* result) | |
| 11017 { | |
| 11018 if (!frame) | |
| 11019 return false; | |
| 11020 v8::HandleScope handleScope(toIsolate(frame)); | |
| 11021 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 11022 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 11023 if (context.IsEmpty()) | |
| 11024 return false; | |
| 11025 ScriptState* scriptState = ScriptState::from(context); | |
| 11026 if (!scriptState->executionContext()) | |
| 11027 return false; | |
| 11028 | |
| 11029 ScriptState::Scope scope(scriptState); | |
| 11030 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11031 | |
| 11032 ExceptionState exceptionState(ExceptionState::GetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | |
| 11033 v8::TryCatch block; | |
| 11034 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "shortAttribute", holder); | |
| 11035 if (block.HasCaught()) { | |
| 11036 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11037 block.ReThrow(); | |
| 11038 return false; | |
| 11039 } | |
| 11040 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | |
| 11041 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 11042 *result = cppValue; | |
| 11043 return true; | |
| 11044 } | |
| 11045 | |
| 11046 bool V8TestObject::PrivateScript::shortAttributeAttributeSetter(LocalFrame* fram
e, TestObject* holderImpl, int cppValue) | |
| 11047 { | |
| 11048 if (!frame) | |
| 11049 return false; | |
| 11050 v8::HandleScope handleScope(toIsolate(frame)); | |
| 11051 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 11052 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 11053 if (context.IsEmpty()) | |
| 11054 return false; | |
| 11055 ScriptState* scriptState = ScriptState::from(context); | |
| 11056 if (!scriptState->executionContext()) | |
| 11057 return false; | |
| 11058 | |
| 11059 ScriptState::Scope scope(scriptState); | |
| 11060 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11061 | |
| 11062 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | |
| 11063 v8::TryCatch block; | |
| 11064 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "short
Attribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); | |
| 11065 if (block.HasCaught()) { | |
| 11066 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11067 block.ReThrow(); | |
| 11068 return false; | |
| 11069 } | |
| 11070 return true; | |
| 11071 } | |
| 11072 | |
| 11073 bool V8TestObject::PrivateScript::stringAttributeAttributeGetter(LocalFrame* fra
me, TestObject* holderImpl, String* result) | |
| 11074 { | |
| 11075 if (!frame) | |
| 11076 return false; | |
| 11077 v8::HandleScope handleScope(toIsolate(frame)); | |
| 11078 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 11079 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 11080 if (context.IsEmpty()) | |
| 11081 return false; | |
| 11082 ScriptState* scriptState = ScriptState::from(context); | |
| 11083 if (!scriptState->executionContext()) | |
| 11084 return false; | |
| 11085 | |
| 11086 ScriptState::Scope scope(scriptState); | |
| 11087 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11088 | |
| 11089 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | |
| 11090 v8::TryCatch block; | |
| 11091 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "stringAttribute", holder); | |
| 11092 if (block.HasCaught()) { | |
| 11093 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11094 block.ReThrow(); | |
| 11095 return false; | |
| 11096 } | |
| 11097 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | |
| 11098 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 11099 *result = cppValue; | |
| 11100 return true; | |
| 11101 } | |
| 11102 | |
| 11103 bool V8TestObject::PrivateScript::stringAttributeAttributeSetter(LocalFrame* fra
me, TestObject* holderImpl, String cppValue) | |
| 11104 { | |
| 11105 if (!frame) | |
| 11106 return false; | |
| 11107 v8::HandleScope handleScope(toIsolate(frame)); | |
| 11108 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 11109 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 11110 if (context.IsEmpty()) | |
| 11111 return false; | |
| 11112 ScriptState* scriptState = ScriptState::from(context); | |
| 11113 if (!scriptState->executionContext()) | |
| 11114 return false; | |
| 11115 | |
| 11116 ScriptState::Scope scope(scriptState); | |
| 11117 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11118 | |
| 11119 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut
e", "TestObject", scriptState->context()->Global(), scriptState->isolate()); | |
| 11120 v8::TryCatch block; | |
| 11121 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "strin
gAttribute", holder, v8String(scriptState->isolate(), cppValue)); | |
| 11122 if (block.HasCaught()) { | |
| 11123 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11124 block.ReThrow(); | |
| 11125 return false; | |
| 11126 } | |
| 11127 return true; | |
| 11128 } | |
| 11129 | |
| 11130 bool V8TestObject::PrivateScript::nodeAttributeAttributeGetter(LocalFrame* frame
, TestObject* holderImpl, RefPtrWillBeRawPtr<Node>* result) | |
| 11131 { | |
| 11132 if (!frame) | |
| 11133 return false; | |
| 11134 v8::HandleScope handleScope(toIsolate(frame)); | |
| 11135 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 11136 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 11137 if (context.IsEmpty()) | |
| 11138 return false; | |
| 11139 ScriptState* scriptState = ScriptState::from(context); | |
| 11140 if (!scriptState->executionContext()) | |
| 11141 return false; | |
| 11142 | |
| 11143 ScriptState::Scope scope(scriptState); | |
| 11144 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11145 | |
| 11146 ExceptionState exceptionState(ExceptionState::GetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); | |
| 11147 v8::TryCatch block; | |
| 11148 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "nodeAttribute", holder); | |
| 11149 if (block.HasCaught()) { | |
| 11150 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11151 block.ReThrow(); | |
| 11152 return false; | |
| 11153 } | |
| 11154 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toImplWithTypeCheck(scriptState->i
solate(), v8Value), false); | |
| 11155 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 11156 *result = cppValue; | |
| 11157 return true; | |
| 11158 } | |
| 11159 | |
| 11160 bool V8TestObject::PrivateScript::nodeAttributeAttributeSetter(LocalFrame* frame
, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue) | |
| 11161 { | |
| 11162 if (!frame) | |
| 11163 return false; | |
| 11164 v8::HandleScope handleScope(toIsolate(frame)); | |
| 11165 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 11166 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 11167 if (context.IsEmpty()) | |
| 11168 return false; | |
| 11169 ScriptState* scriptState = ScriptState::from(context); | |
| 11170 if (!scriptState->executionContext()) | |
| 11171 return false; | |
| 11172 | |
| 11173 ScriptState::Scope scope(scriptState); | |
| 11174 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11175 | |
| 11176 ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); | |
| 11177 v8::TryCatch block; | |
| 11178 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "nodeA
ttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState-
>isolate())); | |
| 11179 if (block.HasCaught()) { | |
| 11180 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11181 block.ReThrow(); | |
| 11182 return false; | |
| 11183 } | |
| 11184 return true; | |
| 11185 } | |
| 11186 | |
| 11187 bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeGetter(L
ocalFrame* frame, TestObject* holderImpl, String* result) | |
| 11188 { | |
| 11189 if (!frame) | |
| 11190 return false; | |
| 11191 v8::HandleScope handleScope(toIsolate(frame)); | |
| 11192 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 11193 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 11194 if (context.IsEmpty()) | |
| 11195 return false; | |
| 11196 ScriptState* scriptState = ScriptState::from(context); | |
| 11197 if (!scriptState->executionContext()) | |
| 11198 return false; | |
| 11199 | |
| 11200 ScriptState::Scope scope(scriptState); | |
| 11201 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11202 | |
| 11203 ExceptionState exceptionState(ExceptionState::GetterContext, "attributeForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); | |
| 11204 v8::TryCatch block; | |
| 11205 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "attributeForPrivateScriptOnly", holder); | |
| 11206 if (block.HasCaught()) { | |
| 11207 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11208 block.ReThrow(); | |
| 11209 return false; | |
| 11210 } | |
| 11211 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | |
| 11212 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 11213 *result = cppValue; | |
| 11214 return true; | |
| 11215 } | |
| 11216 | |
| 11217 bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeSetter(L
ocalFrame* frame, TestObject* holderImpl, String cppValue) | |
| 11218 { | |
| 11219 if (!frame) | |
| 11220 return false; | |
| 11221 v8::HandleScope handleScope(toIsolate(frame)); | |
| 11222 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 11223 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 11224 if (context.IsEmpty()) | |
| 11225 return false; | |
| 11226 ScriptState* scriptState = ScriptState::from(context); | |
| 11227 if (!scriptState->executionContext()) | |
| 11228 return false; | |
| 11229 | |
| 11230 ScriptState::Scope scope(scriptState); | |
| 11231 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11232 | |
| 11233 ExceptionState exceptionState(ExceptionState::SetterContext, "attributeForPr
ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i
solate()); | |
| 11234 v8::TryCatch block; | |
| 11235 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "attri
buteForPrivateScriptOnly", holder, v8String(scriptState->isolate(), cppValue)); | |
| 11236 if (block.HasCaught()) { | |
| 11237 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11238 block.ReThrow(); | |
| 11239 return false; | |
| 11240 } | |
| 11241 return true; | |
| 11242 } | |
| 11243 | |
| 11244 bool V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(LocalFrame
* frame, TestObject* holderImpl, String* result) | |
| 11245 { | |
| 11246 if (!frame) | |
| 11247 return false; | |
| 11248 v8::HandleScope handleScope(toIsolate(frame)); | |
| 11249 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 11250 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 11251 if (context.IsEmpty()) | |
| 11252 return false; | |
| 11253 ScriptState* scriptState = ScriptState::from(context); | |
| 11254 if (!scriptState->executionContext()) | |
| 11255 return false; | |
| 11256 | |
| 11257 ScriptState::Scope scope(scriptState); | |
| 11258 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11259 | |
| 11260 ExceptionState exceptionState(ExceptionState::GetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | |
| 11261 v8::TryCatch block; | |
| 11262 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "enumForPrivateScript", holder); | |
| 11263 if (block.HasCaught()) { | |
| 11264 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11265 block.ReThrow(); | |
| 11266 return false; | |
| 11267 } | |
| 11268 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | |
| 11269 RELEASE_ASSERT(!exceptionState.hadException()); | |
| 11270 *result = cppValue; | |
| 11271 return true; | |
| 11272 } | |
| 11273 | |
| 11274 bool V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(LocalFrame
* frame, TestObject* holderImpl, String cppValue) | |
| 11275 { | |
| 11276 if (!frame) | |
| 11277 return false; | |
| 11278 v8::HandleScope handleScope(toIsolate(frame)); | |
| 11279 ScriptForbiddenScope::AllowUserAgentScript script; | |
| 11280 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | |
| 11281 if (context.IsEmpty()) | |
| 11282 return false; | |
| 11283 ScriptState* scriptState = ScriptState::from(context); | |
| 11284 if (!scriptState->executionContext()) | |
| 11285 return false; | |
| 11286 | |
| 11287 ScriptState::Scope scope(scriptState); | |
| 11288 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | |
| 11289 | |
| 11290 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | |
| 11291 v8::TryCatch block; | |
| 11292 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF
orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); | |
| 11293 if (block.HasCaught()) { | |
| 11294 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | |
| 11295 block.ReThrow(); | |
| 11296 return false; | |
| 11297 } | |
| 11298 return true; | |
| 11299 } | |
| 11300 | |
| 11301 } // namespace blink | |
| OLD | NEW |