| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
| 6 | 6 |
| 7 #include "config.h" | 7 #include "config.h" |
| 8 #include "V8TestObject.h" | 8 #include "V8TestObject.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // bindings/core/v8/ScriptWrappable.h. | 90 // bindings/core/v8/ScriptWrappable.h. |
| 91 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType
Info; | 91 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType
Info; |
| 92 | 92 |
| 93 namespace TestObjectV8Internal { | 93 namespace TestObjectV8Internal { |
| 94 | 94 |
| 95 template <typename T> void V8_USE(T) { } | 95 template <typename T> void V8_USE(T) { } |
| 96 | 96 |
| 97 static void stringifierAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 97 static void stringifierAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 98 { | 98 { |
| 99 v8::Handle<v8::Object> holder = info.Holder(); | 99 v8::Handle<v8::Object> holder = info.Holder(); |
| 100 TestObject* impl = V8TestObject::toNative(holder); | 100 TestObject* impl = V8TestObject::toImpl(holder); |
| 101 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); | 101 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); |
| 102 } | 102 } |
| 103 | 103 |
| 104 static void stringifierAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 104 static void stringifierAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 105 { | 105 { |
| 106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 107 TestObjectV8Internal::stringifierAttributeAttributeGetter(info); | 107 TestObjectV8Internal::stringifierAttributeAttributeGetter(info); |
| 108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 109 } | 109 } |
| 110 | 110 |
| 111 static void stringifierAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 111 static void stringifierAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 112 { | 112 { |
| 113 v8::Handle<v8::Object> holder = info.Holder(); | 113 v8::Handle<v8::Object> holder = info.Holder(); |
| 114 TestObject* impl = V8TestObject::toNative(holder); | 114 TestObject* impl = V8TestObject::toImpl(holder); |
| 115 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 115 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 116 impl->setStringifierAttribute(cppValue); | 116 impl->setStringifierAttribute(cppValue); |
| 117 } | 117 } |
| 118 | 118 |
| 119 static void stringifierAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 119 static void stringifierAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 120 { | 120 { |
| 121 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 121 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 122 TestObjectV8Internal::stringifierAttributeAttributeSetter(v8Value, info); | 122 TestObjectV8Internal::stringifierAttributeAttributeSetter(v8Value, info); |
| 123 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 123 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 124 } | 124 } |
| 125 | 125 |
| 126 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 126 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 127 { | 127 { |
| 128 v8::Handle<v8::Object> holder = info.Holder(); | 128 v8::Handle<v8::Object> holder = info.Holder(); |
| 129 TestObject* impl = V8TestObject::toNative(holder); | 129 TestObject* impl = V8TestObject::toImpl(holder); |
| 130 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); | 130 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); |
| 131 } | 131 } |
| 132 | 132 |
| 133 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 133 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 134 { | 134 { |
| 135 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 135 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 136 TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info); | 136 TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info); |
| 137 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 137 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 138 } | 138 } |
| 139 | 139 |
| 140 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 140 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 141 { | 141 { |
| 142 v8::Handle<v8::Object> holder = info.Holder(); | 142 v8::Handle<v8::Object> holder = info.Holder(); |
| 143 TestObject* impl = V8TestObject::toNative(holder); | 143 TestObject* impl = V8TestObject::toImpl(holder); |
| 144 RefPtr<TestInterfaceEmpty> cppValue(impl->readonlyTestInterfaceEmptyAttribut
e()); | 144 RefPtr<TestInterfaceEmpty> cppValue(impl->readonlyTestInterfaceEmptyAttribut
e()); |
| 145 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty
>(info.GetReturnValue(), cppValue.get())) | 145 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty
>(info.GetReturnValue(), cppValue.get())) |
| 146 return; | 146 return; |
| 147 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); | 147 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); |
| 148 if (!wrapper.IsEmpty()) { | 148 if (!wrapper.IsEmpty()) { |
| 149 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), wrapper); | 149 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), wrapper); |
| 150 v8SetReturnValue(info, wrapper); | 150 v8SetReturnValue(info, wrapper); |
| 151 } | 151 } |
| 152 } | 152 } |
| 153 | 153 |
| 154 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 154 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 155 { | 155 { |
| 156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 157 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(inf
o); | 157 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(inf
o); |
| 158 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 158 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 159 } | 159 } |
| 160 | 160 |
| 161 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 161 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 162 { | 162 { |
| 163 v8::Handle<v8::Object> holder = info.Holder(); | 163 v8::Handle<v8::Object> holder = info.Holder(); |
| 164 TestObject* impl = V8TestObject::toNative(holder); | 164 TestObject* impl = V8TestObject::toImpl(holder); |
| 165 v8SetReturnValueInt(info, impl->readonlyLongAttribute()); | 165 v8SetReturnValueInt(info, impl->readonlyLongAttribute()); |
| 166 } | 166 } |
| 167 | 167 |
| 168 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 168 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 169 { | 169 { |
| 170 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 170 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 171 TestObjectV8Internal::readonlyLongAttributeAttributeGetter(info); | 171 TestObjectV8Internal::readonlyLongAttributeAttributeGetter(info); |
| 172 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 172 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 173 } | 173 } |
| 174 | 174 |
| 175 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 175 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 176 { | 176 { |
| 177 v8::Handle<v8::Object> holder = info.Holder(); | 177 v8::Handle<v8::Object> holder = info.Holder(); |
| 178 TestObject* impl = V8TestObject::toNative(holder); | 178 TestObject* impl = V8TestObject::toImpl(holder); |
| 179 v8SetReturnValue(info, v8DateOrNaN(impl->dateAttribute(), info.GetIsolate())
); | 179 v8SetReturnValue(info, v8DateOrNaN(impl->dateAttribute(), info.GetIsolate())
); |
| 180 } | 180 } |
| 181 | 181 |
| 182 static void dateAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 182 static void dateAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 183 { | 183 { |
| 184 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 184 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 185 TestObjectV8Internal::dateAttributeAttributeGetter(info); | 185 TestObjectV8Internal::dateAttributeAttributeGetter(info); |
| 186 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 186 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 187 } | 187 } |
| 188 | 188 |
| 189 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 189 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 190 { | 190 { |
| 191 v8::Handle<v8::Object> holder = info.Holder(); | 191 v8::Handle<v8::Object> holder = info.Holder(); |
| 192 TestObject* impl = V8TestObject::toNative(holder); | 192 TestObject* impl = V8TestObject::toImpl(holder); |
| 193 TONATIVE_VOID(double, cppValue, toCoreDate(v8Value)); | 193 TONATIVE_VOID(double, cppValue, toCoreDate(v8Value)); |
| 194 impl->setDateAttribute(cppValue); | 194 impl->setDateAttribute(cppValue); |
| 195 } | 195 } |
| 196 | 196 |
| 197 static void dateAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 197 static void dateAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 198 { | 198 { |
| 199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 200 TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info); | 200 TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info); |
| 201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 202 } | 202 } |
| 203 | 203 |
| 204 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 204 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 205 { | 205 { |
| 206 v8::Handle<v8::Object> holder = info.Holder(); | 206 v8::Handle<v8::Object> holder = info.Holder(); |
| 207 TestObject* impl = V8TestObject::toNative(holder); | 207 TestObject* impl = V8TestObject::toImpl(holder); |
| 208 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); | 208 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); |
| 209 } | 209 } |
| 210 | 210 |
| 211 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 211 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 212 { | 212 { |
| 213 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 213 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 214 TestObjectV8Internal::stringAttributeAttributeGetter(info); | 214 TestObjectV8Internal::stringAttributeAttributeGetter(info); |
| 215 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 215 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 216 } | 216 } |
| 217 | 217 |
| 218 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 218 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 219 { | 219 { |
| 220 v8::Handle<v8::Object> holder = info.Holder(); | 220 v8::Handle<v8::Object> holder = info.Holder(); |
| 221 TestObject* impl = V8TestObject::toNative(holder); | 221 TestObject* impl = V8TestObject::toImpl(holder); |
| 222 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 222 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 223 impl->setStringAttribute(cppValue); | 223 impl->setStringAttribute(cppValue); |
| 224 } | 224 } |
| 225 | 225 |
| 226 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 226 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 227 { | 227 { |
| 228 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 228 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 229 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); | 229 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); |
| 230 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 230 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 231 } | 231 } |
| 232 | 232 |
| 233 static void byteStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 233 static void byteStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 234 { | 234 { |
| 235 v8::Handle<v8::Object> holder = info.Holder(); | 235 v8::Handle<v8::Object> holder = info.Holder(); |
| 236 TestObject* impl = V8TestObject::toNative(holder); | 236 TestObject* impl = V8TestObject::toImpl(holder); |
| 237 v8SetReturnValueString(info, impl->byteStringAttribute(), info.GetIsolate())
; | 237 v8SetReturnValueString(info, impl->byteStringAttribute(), info.GetIsolate())
; |
| 238 } | 238 } |
| 239 | 239 |
| 240 static void byteStringAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 240 static void byteStringAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 241 { | 241 { |
| 242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 243 TestObjectV8Internal::byteStringAttributeAttributeGetter(info); | 243 TestObjectV8Internal::byteStringAttributeAttributeGetter(info); |
| 244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 245 } | 245 } |
| 246 | 246 |
| 247 static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 247 static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 248 { | 248 { |
| 249 v8::Handle<v8::Object> holder = info.Holder(); | 249 v8::Handle<v8::Object> holder = info.Holder(); |
| 250 ExceptionState exceptionState(ExceptionState::SetterContext, "byteStringAttr
ibute", "TestObject", holder, info.GetIsolate()); | 250 ExceptionState exceptionState(ExceptionState::SetterContext, "byteStringAttr
ibute", "TestObject", holder, info.GetIsolate()); |
| 251 TestObject* impl = V8TestObject::toNative(holder); | 251 TestObject* impl = V8TestObject::toImpl(holder); |
| 252 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); | 252 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); |
| 253 impl->setByteStringAttribute(cppValue); | 253 impl->setByteStringAttribute(cppValue); |
| 254 } | 254 } |
| 255 | 255 |
| 256 static void byteStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 256 static void byteStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 257 { | 257 { |
| 258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 259 TestObjectV8Internal::byteStringAttributeAttributeSetter(v8Value, info); | 259 TestObjectV8Internal::byteStringAttributeAttributeSetter(v8Value, info); |
| 260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 261 } | 261 } |
| 262 | 262 |
| 263 static void scalarValueStringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 263 static void scalarValueStringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 264 { | 264 { |
| 265 v8::Handle<v8::Object> holder = info.Holder(); | 265 v8::Handle<v8::Object> holder = info.Holder(); |
| 266 TestObject* impl = V8TestObject::toNative(holder); | 266 TestObject* impl = V8TestObject::toImpl(holder); |
| 267 v8SetReturnValueString(info, impl->scalarValueStringAttribute(), info.GetIso
late()); | 267 v8SetReturnValueString(info, impl->scalarValueStringAttribute(), info.GetIso
late()); |
| 268 } | 268 } |
| 269 | 269 |
| 270 static void scalarValueStringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 270 static void scalarValueStringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 271 { | 271 { |
| 272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 273 TestObjectV8Internal::scalarValueStringAttributeAttributeGetter(info); | 273 TestObjectV8Internal::scalarValueStringAttributeAttributeGetter(info); |
| 274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 275 } | 275 } |
| 276 | 276 |
| 277 static void scalarValueStringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 277 static void scalarValueStringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 278 { | 278 { |
| 279 v8::Handle<v8::Object> holder = info.Holder(); | 279 v8::Handle<v8::Object> holder = info.Holder(); |
| 280 ExceptionState exceptionState(ExceptionState::SetterContext, "scalarValueStr
ingAttribute", "TestObject", holder, info.GetIsolate()); | 280 ExceptionState exceptionState(ExceptionState::SetterContext, "scalarValueStr
ingAttribute", "TestObject", holder, info.GetIsolate()); |
| 281 TestObject* impl = V8TestObject::toNative(holder); | 281 TestObject* impl = V8TestObject::toImpl(holder); |
| 282 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toScalarValueStri
ng(v8Value, exceptionState), exceptionState); | 282 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toScalarValueStri
ng(v8Value, exceptionState), exceptionState); |
| 283 impl->setScalarValueStringAttribute(cppValue); | 283 impl->setScalarValueStringAttribute(cppValue); |
| 284 } | 284 } |
| 285 | 285 |
| 286 static void scalarValueStringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 286 static void scalarValueStringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 287 { | 287 { |
| 288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 289 TestObjectV8Internal::scalarValueStringAttributeAttributeSetter(v8Value, inf
o); | 289 TestObjectV8Internal::scalarValueStringAttributeAttributeSetter(v8Value, inf
o); |
| 290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 291 } | 291 } |
| 292 | 292 |
| 293 static void domTimeStampAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 293 static void domTimeStampAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 294 { | 294 { |
| 295 v8::Handle<v8::Object> holder = info.Holder(); | 295 v8::Handle<v8::Object> holder = info.Holder(); |
| 296 TestObject* impl = V8TestObject::toNative(holder); | 296 TestObject* impl = V8TestObject::toImpl(holder); |
| 297 v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute())); | 297 v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute())); |
| 298 } | 298 } |
| 299 | 299 |
| 300 static void domTimeStampAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 300 static void domTimeStampAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 301 { | 301 { |
| 302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 303 TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info); | 303 TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info); |
| 304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 305 } | 305 } |
| 306 | 306 |
| 307 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 307 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 308 { | 308 { |
| 309 v8::Handle<v8::Object> holder = info.Holder(); | 309 v8::Handle<v8::Object> holder = info.Holder(); |
| 310 ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAt
tribute", "TestObject", holder, info.GetIsolate()); | 310 ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAt
tribute", "TestObject", holder, info.GetIsolate()); |
| 311 TestObject* impl = V8TestObject::toNative(holder); | 311 TestObject* impl = V8TestObject::toImpl(holder); |
| 312 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value,
exceptionState), exceptionState); | 312 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value,
exceptionState), exceptionState); |
| 313 impl->setDomTimeStampAttribute(cppValue); | 313 impl->setDomTimeStampAttribute(cppValue); |
| 314 } | 314 } |
| 315 | 315 |
| 316 static void domTimeStampAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 316 static void domTimeStampAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 317 { | 317 { |
| 318 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 318 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 319 TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info); | 319 TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info); |
| 320 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 320 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 321 } | 321 } |
| 322 | 322 |
| 323 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 323 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 324 { | 324 { |
| 325 v8::Handle<v8::Object> holder = info.Holder(); | 325 v8::Handle<v8::Object> holder = info.Holder(); |
| 326 TestObject* impl = V8TestObject::toNative(holder); | 326 TestObject* impl = V8TestObject::toImpl(holder); |
| 327 v8SetReturnValueBool(info, impl->booleanAttribute()); | 327 v8SetReturnValueBool(info, impl->booleanAttribute()); |
| 328 } | 328 } |
| 329 | 329 |
| 330 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 330 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 331 { | 331 { |
| 332 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 332 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 333 TestObjectV8Internal::booleanAttributeAttributeGetter(info); | 333 TestObjectV8Internal::booleanAttributeAttributeGetter(info); |
| 334 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 334 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 335 } | 335 } |
| 336 | 336 |
| 337 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 337 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 338 { | 338 { |
| 339 v8::Handle<v8::Object> holder = info.Holder(); | 339 v8::Handle<v8::Object> holder = info.Holder(); |
| 340 TestObject* impl = V8TestObject::toNative(holder); | 340 TestObject* impl = V8TestObject::toImpl(holder); |
| 341 TONATIVE_VOID(bool, cppValue, v8Value->BooleanValue()); | 341 TONATIVE_VOID(bool, cppValue, v8Value->BooleanValue()); |
| 342 impl->setBooleanAttribute(cppValue); | 342 impl->setBooleanAttribute(cppValue); |
| 343 } | 343 } |
| 344 | 344 |
| 345 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 345 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 346 { | 346 { |
| 347 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 347 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 348 TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info); | 348 TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info); |
| 349 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 349 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 350 } | 350 } |
| 351 | 351 |
| 352 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 352 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 353 { | 353 { |
| 354 v8::Handle<v8::Object> holder = info.Holder(); | 354 v8::Handle<v8::Object> holder = info.Holder(); |
| 355 TestObject* impl = V8TestObject::toNative(holder); | 355 TestObject* impl = V8TestObject::toImpl(holder); |
| 356 v8SetReturnValueInt(info, impl->byteAttribute()); | 356 v8SetReturnValueInt(info, impl->byteAttribute()); |
| 357 } | 357 } |
| 358 | 358 |
| 359 static void byteAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 359 static void byteAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 360 { | 360 { |
| 361 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 361 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 362 TestObjectV8Internal::byteAttributeAttributeGetter(info); | 362 TestObjectV8Internal::byteAttributeAttributeGetter(info); |
| 363 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 363 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 364 } | 364 } |
| 365 | 365 |
| 366 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 366 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 367 { | 367 { |
| 368 v8::Handle<v8::Object> holder = info.Holder(); | 368 v8::Handle<v8::Object> holder = info.Holder(); |
| 369 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute"
, "TestObject", holder, info.GetIsolate()); | 369 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute"
, "TestObject", holder, info.GetIsolate()); |
| 370 TestObject* impl = V8TestObject::toNative(holder); | 370 TestObject* impl = V8TestObject::toImpl(holder); |
| 371 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt8(v8Value, exceptionState),
exceptionState); | 371 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt8(v8Value, exceptionState),
exceptionState); |
| 372 impl->setByteAttribute(cppValue); | 372 impl->setByteAttribute(cppValue); |
| 373 } | 373 } |
| 374 | 374 |
| 375 static void byteAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 375 static void byteAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 376 { | 376 { |
| 377 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 377 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 378 TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info); | 378 TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info); |
| 379 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 379 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 380 } | 380 } |
| 381 | 381 |
| 382 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 382 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 383 { | 383 { |
| 384 v8::Handle<v8::Object> holder = info.Holder(); | 384 v8::Handle<v8::Object> holder = info.Holder(); |
| 385 TestObject* impl = V8TestObject::toNative(holder); | 385 TestObject* impl = V8TestObject::toImpl(holder); |
| 386 v8SetReturnValue(info, impl->doubleAttribute()); | 386 v8SetReturnValue(info, impl->doubleAttribute()); |
| 387 } | 387 } |
| 388 | 388 |
| 389 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 389 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 390 { | 390 { |
| 391 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 391 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 392 TestObjectV8Internal::doubleAttributeAttributeGetter(info); | 392 TestObjectV8Internal::doubleAttributeAttributeGetter(info); |
| 393 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 393 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 394 } | 394 } |
| 395 | 395 |
| 396 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 396 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 397 { | 397 { |
| 398 v8::Handle<v8::Object> holder = info.Holder(); | 398 v8::Handle<v8::Object> holder = info.Holder(); |
| 399 TestObject* impl = V8TestObject::toNative(holder); | 399 TestObject* impl = V8TestObject::toImpl(holder); |
| 400 TONATIVE_VOID(double, cppValue, static_cast<double>(v8Value->NumberValue()))
; | 400 TONATIVE_VOID(double, cppValue, static_cast<double>(v8Value->NumberValue()))
; |
| 401 impl->setDoubleAttribute(cppValue); | 401 impl->setDoubleAttribute(cppValue); |
| 402 } | 402 } |
| 403 | 403 |
| 404 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 404 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 405 { | 405 { |
| 406 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 406 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 407 TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info); | 407 TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info); |
| 408 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 408 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 409 } | 409 } |
| 410 | 410 |
| 411 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 411 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 412 { | 412 { |
| 413 v8::Handle<v8::Object> holder = info.Holder(); | 413 v8::Handle<v8::Object> holder = info.Holder(); |
| 414 TestObject* impl = V8TestObject::toNative(holder); | 414 TestObject* impl = V8TestObject::toImpl(holder); |
| 415 v8SetReturnValue(info, impl->floatAttribute()); | 415 v8SetReturnValue(info, impl->floatAttribute()); |
| 416 } | 416 } |
| 417 | 417 |
| 418 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 418 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 419 { | 419 { |
| 420 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 420 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 421 TestObjectV8Internal::floatAttributeAttributeGetter(info); | 421 TestObjectV8Internal::floatAttributeAttributeGetter(info); |
| 422 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 422 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 423 } | 423 } |
| 424 | 424 |
| 425 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 425 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 426 { | 426 { |
| 427 v8::Handle<v8::Object> holder = info.Holder(); | 427 v8::Handle<v8::Object> holder = info.Holder(); |
| 428 TestObject* impl = V8TestObject::toNative(holder); | 428 TestObject* impl = V8TestObject::toImpl(holder); |
| 429 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); | 429 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); |
| 430 impl->setFloatAttribute(cppValue); | 430 impl->setFloatAttribute(cppValue); |
| 431 } | 431 } |
| 432 | 432 |
| 433 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 433 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 434 { | 434 { |
| 435 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 435 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 436 TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info); | 436 TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info); |
| 437 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 437 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 438 } | 438 } |
| 439 | 439 |
| 440 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 440 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 441 { | 441 { |
| 442 v8::Handle<v8::Object> holder = info.Holder(); | 442 v8::Handle<v8::Object> holder = info.Holder(); |
| 443 TestObject* impl = V8TestObject::toNative(holder); | 443 TestObject* impl = V8TestObject::toImpl(holder); |
| 444 v8SetReturnValueInt(info, impl->longAttribute()); | 444 v8SetReturnValueInt(info, impl->longAttribute()); |
| 445 } | 445 } |
| 446 | 446 |
| 447 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 447 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 448 { | 448 { |
| 449 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 449 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 450 TestObjectV8Internal::longAttributeAttributeGetter(info); | 450 TestObjectV8Internal::longAttributeAttributeGetter(info); |
| 451 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 451 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 452 } | 452 } |
| 453 | 453 |
| 454 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 454 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 455 { | 455 { |
| 456 v8::Handle<v8::Object> holder = info.Holder(); | 456 v8::Handle<v8::Object> holder = info.Holder(); |
| 457 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute"
, "TestObject", holder, info.GetIsolate()); | 457 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute"
, "TestObject", holder, info.GetIsolate()); |
| 458 TestObject* impl = V8TestObject::toNative(holder); | 458 TestObject* impl = V8TestObject::toImpl(holder); |
| 459 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 459 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 460 impl->setLongAttribute(cppValue); | 460 impl->setLongAttribute(cppValue); |
| 461 } | 461 } |
| 462 | 462 |
| 463 static void longAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 463 static void longAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 464 { | 464 { |
| 465 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 465 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 466 TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info); | 466 TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info); |
| 467 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 467 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 468 } | 468 } |
| 469 | 469 |
| 470 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 470 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 471 { | 471 { |
| 472 v8::Handle<v8::Object> holder = info.Holder(); | 472 v8::Handle<v8::Object> holder = info.Holder(); |
| 473 TestObject* impl = V8TestObject::toNative(holder); | 473 TestObject* impl = V8TestObject::toImpl(holder); |
| 474 v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute())); | 474 v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute())); |
| 475 } | 475 } |
| 476 | 476 |
| 477 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 477 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 478 { | 478 { |
| 479 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 479 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 480 TestObjectV8Internal::longLongAttributeAttributeGetter(info); | 480 TestObjectV8Internal::longLongAttributeAttributeGetter(info); |
| 481 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 481 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 482 } | 482 } |
| 483 | 483 |
| 484 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 484 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 485 { | 485 { |
| 486 v8::Handle<v8::Object> holder = info.Holder(); | 486 v8::Handle<v8::Object> holder = info.Holder(); |
| 487 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttrib
ute", "TestObject", holder, info.GetIsolate()); | 487 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttrib
ute", "TestObject", holder, info.GetIsolate()); |
| 488 TestObject* impl = V8TestObject::toNative(holder); | 488 TestObject* impl = V8TestObject::toImpl(holder); |
| 489 TONATIVE_VOID_EXCEPTIONSTATE(long long, cppValue, toInt64(v8Value, exception
State), exceptionState); | 489 TONATIVE_VOID_EXCEPTIONSTATE(long long, cppValue, toInt64(v8Value, exception
State), exceptionState); |
| 490 impl->setLongLongAttribute(cppValue); | 490 impl->setLongLongAttribute(cppValue); |
| 491 } | 491 } |
| 492 | 492 |
| 493 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 493 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 494 { | 494 { |
| 495 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 495 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 496 TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info); | 496 TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info); |
| 497 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 497 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 498 } | 498 } |
| 499 | 499 |
| 500 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 500 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 501 { | 501 { |
| 502 v8::Handle<v8::Object> holder = info.Holder(); | 502 v8::Handle<v8::Object> holder = info.Holder(); |
| 503 TestObject* impl = V8TestObject::toNative(holder); | 503 TestObject* impl = V8TestObject::toImpl(holder); |
| 504 v8SetReturnValueUnsigned(info, impl->octetAttribute()); | 504 v8SetReturnValueUnsigned(info, impl->octetAttribute()); |
| 505 } | 505 } |
| 506 | 506 |
| 507 static void octetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 507 static void octetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 508 { | 508 { |
| 509 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 509 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 510 TestObjectV8Internal::octetAttributeAttributeGetter(info); | 510 TestObjectV8Internal::octetAttributeAttributeGetter(info); |
| 511 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 511 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 512 } | 512 } |
| 513 | 513 |
| 514 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 514 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 515 { | 515 { |
| 516 v8::Handle<v8::Object> holder = info.Holder(); | 516 v8::Handle<v8::Object> holder = info.Holder(); |
| 517 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute
", "TestObject", holder, info.GetIsolate()); | 517 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute
", "TestObject", holder, info.GetIsolate()); |
| 518 TestObject* impl = V8TestObject::toNative(holder); | 518 TestObject* impl = V8TestObject::toImpl(holder); |
| 519 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt8(v8Value, exceptionS
tate), exceptionState); | 519 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt8(v8Value, exceptionS
tate), exceptionState); |
| 520 impl->setOctetAttribute(cppValue); | 520 impl->setOctetAttribute(cppValue); |
| 521 } | 521 } |
| 522 | 522 |
| 523 static void octetAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 523 static void octetAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 524 { | 524 { |
| 525 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 525 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 526 TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info); | 526 TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info); |
| 527 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 527 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 528 } | 528 } |
| 529 | 529 |
| 530 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 530 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 531 { | 531 { |
| 532 v8::Handle<v8::Object> holder = info.Holder(); | 532 v8::Handle<v8::Object> holder = info.Holder(); |
| 533 TestObject* impl = V8TestObject::toNative(holder); | 533 TestObject* impl = V8TestObject::toImpl(holder); |
| 534 v8SetReturnValueInt(info, impl->shortAttribute()); | 534 v8SetReturnValueInt(info, impl->shortAttribute()); |
| 535 } | 535 } |
| 536 | 536 |
| 537 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 537 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 538 { | 538 { |
| 539 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 539 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 540 TestObjectV8Internal::shortAttributeAttributeGetter(info); | 540 TestObjectV8Internal::shortAttributeAttributeGetter(info); |
| 541 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 541 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 542 } | 542 } |
| 543 | 543 |
| 544 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 544 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 545 { | 545 { |
| 546 v8::Handle<v8::Object> holder = info.Holder(); | 546 v8::Handle<v8::Object> holder = info.Holder(); |
| 547 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); | 547 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); |
| 548 TestObject* impl = V8TestObject::toNative(holder); | 548 TestObject* impl = V8TestObject::toImpl(holder); |
| 549 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionState)
, exceptionState); | 549 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionState)
, exceptionState); |
| 550 impl->setShortAttribute(cppValue); | 550 impl->setShortAttribute(cppValue); |
| 551 } | 551 } |
| 552 | 552 |
| 553 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 553 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 554 { | 554 { |
| 555 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 555 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 556 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); | 556 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); |
| 557 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 557 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 558 } | 558 } |
| 559 | 559 |
| 560 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 560 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 561 { | 561 { |
| 562 v8::Handle<v8::Object> holder = info.Holder(); | 562 v8::Handle<v8::Object> holder = info.Holder(); |
| 563 TestObject* impl = V8TestObject::toNative(holder); | 563 TestObject* impl = V8TestObject::toImpl(holder); |
| 564 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 564 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
| 565 } | 565 } |
| 566 | 566 |
| 567 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 567 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 568 { | 568 { |
| 569 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 569 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 570 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetter(info); | 570 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetter(info); |
| 571 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 571 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 572 } | 572 } |
| 573 | 573 |
| 574 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 574 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 575 { | 575 { |
| 576 v8::Handle<v8::Object> holder = info.Holder(); | 576 v8::Handle<v8::Object> holder = info.Holder(); |
| 577 TestObject* impl = V8TestObject::toNative(holder); | 577 TestObject* impl = V8TestObject::toImpl(holder); |
| 578 TONATIVE_VOID(double, cppValue, static_cast<double>(v8Value->NumberValue()))
; | 578 TONATIVE_VOID(double, cppValue, static_cast<double>(v8Value->NumberValue()))
; |
| 579 impl->setUnrestrictedDoubleAttribute(cppValue); | 579 impl->setUnrestrictedDoubleAttribute(cppValue); |
| 580 } | 580 } |
| 581 | 581 |
| 582 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 582 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 583 { | 583 { |
| 584 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 584 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 585 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, in
fo); | 585 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, in
fo); |
| 586 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 586 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 587 } | 587 } |
| 588 | 588 |
| 589 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 589 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 590 { | 590 { |
| 591 v8::Handle<v8::Object> holder = info.Holder(); | 591 v8::Handle<v8::Object> holder = info.Holder(); |
| 592 TestObject* impl = V8TestObject::toNative(holder); | 592 TestObject* impl = V8TestObject::toImpl(holder); |
| 593 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 593 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
| 594 } | 594 } |
| 595 | 595 |
| 596 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 596 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 597 { | 597 { |
| 598 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 598 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 599 TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetter(info); | 599 TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetter(info); |
| 600 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 600 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 601 } | 601 } |
| 602 | 602 |
| 603 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 603 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 604 { | 604 { |
| 605 v8::Handle<v8::Object> holder = info.Holder(); | 605 v8::Handle<v8::Object> holder = info.Holder(); |
| 606 TestObject* impl = V8TestObject::toNative(holder); | 606 TestObject* impl = V8TestObject::toImpl(holder); |
| 607 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); | 607 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); |
| 608 impl->setUnrestrictedFloatAttribute(cppValue); | 608 impl->setUnrestrictedFloatAttribute(cppValue); |
| 609 } | 609 } |
| 610 | 610 |
| 611 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 611 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 612 { | 612 { |
| 613 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 613 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 614 TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, inf
o); | 614 TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, inf
o); |
| 615 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 615 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 616 } | 616 } |
| 617 | 617 |
| 618 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 618 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 619 { | 619 { |
| 620 v8::Handle<v8::Object> holder = info.Holder(); | 620 v8::Handle<v8::Object> holder = info.Holder(); |
| 621 TestObject* impl = V8TestObject::toNative(holder); | 621 TestObject* impl = V8TestObject::toImpl(holder); |
| 622 v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute()); | 622 v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute()); |
| 623 } | 623 } |
| 624 | 624 |
| 625 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 625 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 626 { | 626 { |
| 627 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 627 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 628 TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info); | 628 TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info); |
| 629 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 629 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 630 } | 630 } |
| 631 | 631 |
| 632 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 632 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 633 { | 633 { |
| 634 v8::Handle<v8::Object> holder = info.Holder(); | 634 v8::Handle<v8::Object> holder = info.Holder(); |
| 635 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAt
tribute", "TestObject", holder, info.GetIsolate()); | 635 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAt
tribute", "TestObject", holder, info.GetIsolate()); |
| 636 TestObject* impl = V8TestObject::toNative(holder); | 636 TestObject* impl = V8TestObject::toImpl(holder); |
| 637 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt32(v8Value, exception
State), exceptionState); | 637 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt32(v8Value, exception
State), exceptionState); |
| 638 impl->setUnsignedLongAttribute(cppValue); | 638 impl->setUnsignedLongAttribute(cppValue); |
| 639 } | 639 } |
| 640 | 640 |
| 641 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 641 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 642 { | 642 { |
| 643 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 643 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 644 TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info); | 644 TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info); |
| 645 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 645 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 646 } | 646 } |
| 647 | 647 |
| 648 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 648 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 649 { | 649 { |
| 650 v8::Handle<v8::Object> holder = info.Holder(); | 650 v8::Handle<v8::Object> holder = info.Holder(); |
| 651 TestObject* impl = V8TestObject::toNative(holder); | 651 TestObject* impl = V8TestObject::toImpl(holder); |
| 652 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()
)); | 652 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()
)); |
| 653 } | 653 } |
| 654 | 654 |
| 655 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 655 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 656 { | 656 { |
| 657 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 657 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 658 TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info); | 658 TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info); |
| 659 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 659 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 660 } | 660 } |
| 661 | 661 |
| 662 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 662 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 663 { | 663 { |
| 664 v8::Handle<v8::Object> holder = info.Holder(); | 664 v8::Handle<v8::Object> holder = info.Holder(); |
| 665 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | 665 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttribute", "TestObject", holder, info.GetIsolate()); |
| 666 TestObject* impl = V8TestObject::toNative(holder); | 666 TestObject* impl = V8TestObject::toImpl(holder); |
| 667 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value,
exceptionState), exceptionState); | 667 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value,
exceptionState), exceptionState); |
| 668 impl->setUnsignedLongLongAttribute(cppValue); | 668 impl->setUnsignedLongLongAttribute(cppValue); |
| 669 } | 669 } |
| 670 | 670 |
| 671 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 671 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 672 { | 672 { |
| 673 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 673 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 674 TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info
); | 674 TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info
); |
| 675 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 675 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 676 } | 676 } |
| 677 | 677 |
| 678 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 678 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 679 { | 679 { |
| 680 v8::Handle<v8::Object> holder = info.Holder(); | 680 v8::Handle<v8::Object> holder = info.Holder(); |
| 681 TestObject* impl = V8TestObject::toNative(holder); | 681 TestObject* impl = V8TestObject::toImpl(holder); |
| 682 v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute()); | 682 v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute()); |
| 683 } | 683 } |
| 684 | 684 |
| 685 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 685 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 686 { | 686 { |
| 687 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 687 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 688 TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info); | 688 TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info); |
| 689 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 689 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 690 } | 690 } |
| 691 | 691 |
| 692 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 692 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 693 { | 693 { |
| 694 v8::Handle<v8::Object> holder = info.Holder(); | 694 v8::Handle<v8::Object> holder = info.Holder(); |
| 695 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttribute", "TestObject", holder, info.GetIsolate()); | 695 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttribute", "TestObject", holder, info.GetIsolate()); |
| 696 TestObject* impl = V8TestObject::toNative(holder); | 696 TestObject* impl = V8TestObject::toImpl(holder); |
| 697 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt16(v8Value, exception
State), exceptionState); | 697 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt16(v8Value, exception
State), exceptionState); |
| 698 impl->setUnsignedShortAttribute(cppValue); | 698 impl->setUnsignedShortAttribute(cppValue); |
| 699 } | 699 } |
| 700 | 700 |
| 701 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 701 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 702 { | 702 { |
| 703 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 703 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 704 TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info); | 704 TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info); |
| 705 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 705 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 706 } | 706 } |
| 707 | 707 |
| 708 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 708 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 709 { | 709 { |
| 710 v8::Handle<v8::Object> holder = info.Holder(); | 710 v8::Handle<v8::Object> holder = info.Holder(); |
| 711 TestObject* impl = V8TestObject::toNative(holder); | 711 TestObject* impl = V8TestObject::toImpl(holder); |
| 712 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyAttribute()),
impl); | 712 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyAttribute()),
impl); |
| 713 } | 713 } |
| 714 | 714 |
| 715 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 715 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 716 { | 716 { |
| 717 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 717 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 718 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetter(info); | 718 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetter(info); |
| 719 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 719 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 720 } | 720 } |
| 721 | 721 |
| 722 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 722 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 723 { | 723 { |
| 724 v8::Handle<v8::Object> holder = info.Holder(); | 724 v8::Handle<v8::Object> holder = info.Holder(); |
| 725 TestObject* impl = V8TestObject::toNative(holder); | 725 TestObject* impl = V8TestObject::toImpl(holder); |
| 726 TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativeW
ithTypeCheck(info.GetIsolate(), v8Value)); | 726 TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toImplWit
hTypeCheck(info.GetIsolate(), v8Value)); |
| 727 impl->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue)); | 727 impl->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue)); |
| 728 } | 728 } |
| 729 | 729 |
| 730 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 730 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 731 { | 731 { |
| 732 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 732 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 733 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, in
fo); | 733 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, in
fo); |
| 734 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 734 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 735 } | 735 } |
| 736 | 736 |
| 737 static void testObjectAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 737 static void testObjectAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 738 { | 738 { |
| 739 v8::Handle<v8::Object> holder = info.Holder(); | 739 v8::Handle<v8::Object> holder = info.Holder(); |
| 740 TestObject* impl = V8TestObject::toNative(holder); | 740 TestObject* impl = V8TestObject::toImpl(holder); |
| 741 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjectAttribute()), impl); | 741 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjectAttribute()), impl); |
| 742 } | 742 } |
| 743 | 743 |
| 744 static void testObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 744 static void testObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 745 { | 745 { |
| 746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 747 TestObjectV8Internal::testObjectAttributeAttributeGetter(info); | 747 TestObjectV8Internal::testObjectAttributeAttributeGetter(info); |
| 748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 749 } | 749 } |
| 750 | 750 |
| 751 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 751 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 752 { | 752 { |
| 753 v8::Handle<v8::Object> holder = info.Holder(); | 753 v8::Handle<v8::Object> holder = info.Holder(); |
| 754 TestObject* impl = V8TestObject::toNative(holder); | 754 TestObject* impl = V8TestObject::toImpl(holder); |
| 755 TONATIVE_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), v8Value)); | 755 TONATIVE_VOID(TestObject*, cppValue, V8TestObject::toImplWithTypeCheck(info.
GetIsolate(), v8Value)); |
| 756 impl->setTestObjectAttribute(WTF::getPtr(cppValue)); | 756 impl->setTestObjectAttribute(WTF::getPtr(cppValue)); |
| 757 } | 757 } |
| 758 | 758 |
| 759 static void testObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 759 static void testObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 760 { | 760 { |
| 761 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 761 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 762 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info); | 762 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info); |
| 763 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 763 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 764 } | 764 } |
| 765 | 765 |
| 766 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 766 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 767 { | 767 { |
| 768 v8::Handle<v8::Object> holder = info.Holder(); | 768 v8::Handle<v8::Object> holder = info.Holder(); |
| 769 TestObject* impl = V8TestObject::toNative(holder); | 769 TestObject* impl = V8TestObject::toImpl(holder); |
| 770 v8SetReturnValue(info, impl->voidCallbackFunctionAttribute().v8Value()); | 770 v8SetReturnValue(info, impl->voidCallbackFunctionAttribute().v8Value()); |
| 771 } | 771 } |
| 772 | 772 |
| 773 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 773 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 774 { | 774 { |
| 775 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 775 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 776 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetter(info); | 776 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetter(info); |
| 777 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 777 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 778 } | 778 } |
| 779 | 779 |
| 780 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | 780 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 781 { | 781 { |
| 782 v8::Handle<v8::Object> holder = info.Holder(); | 782 v8::Handle<v8::Object> holder = info.Holder(); |
| 783 TestObject* impl = V8TestObject::toNative(holder); | 783 TestObject* impl = V8TestObject::toImpl(holder); |
| 784 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | 784 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); |
| 785 impl->setVoidCallbackFunctionAttribute(cppValue); | 785 impl->setVoidCallbackFunctionAttribute(cppValue); |
| 786 } | 786 } |
| 787 | 787 |
| 788 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 788 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 789 { | 789 { |
| 790 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 790 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 791 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetter(v8Value,
info); | 791 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetter(v8Value,
info); |
| 792 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 792 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 793 } | 793 } |
| 794 | 794 |
| 795 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | 795 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 796 { | 796 { |
| 797 v8::Handle<v8::Object> holder = info.Holder(); | 797 v8::Handle<v8::Object> holder = info.Holder(); |
| 798 TestObject* impl = V8TestObject::toNative(holder); | 798 TestObject* impl = V8TestObject::toImpl(holder); |
| 799 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgAttribute().v8
Value()); | 799 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgAttribute().v8
Value()); |
| 800 } | 800 } |
| 801 | 801 |
| 802 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 802 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 803 { | 803 { |
| 804 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 804 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 805 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGet
ter(info); | 805 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGet
ter(info); |
| 806 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 806 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 807 } | 807 } |
| 808 | 808 |
| 809 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 809 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 810 { | 810 { |
| 811 v8::Handle<v8::Object> holder = info.Holder(); | 811 v8::Handle<v8::Object> holder = info.Holder(); |
| 812 TestObject* impl = V8TestObject::toNative(holder); | 812 TestObject* impl = V8TestObject::toImpl(holder); |
| 813 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | 813 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); |
| 814 impl->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue); | 814 impl->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue); |
| 815 } | 815 } |
| 816 | 816 |
| 817 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | 817 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) |
| 818 { | 818 { |
| 819 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 819 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 820 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSet
ter(v8Value, info); | 820 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSet
ter(v8Value, info); |
| 821 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 821 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 822 } | 822 } |
| 823 | 823 |
| 824 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 824 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 825 { | 825 { |
| 826 v8::Handle<v8::Object> holder = info.Holder(); | 826 v8::Handle<v8::Object> holder = info.Holder(); |
| 827 TestObject* impl = V8TestObject::toNative(holder); | 827 TestObject* impl = V8TestObject::toImpl(holder); |
| 828 v8SetReturnValueInt(info, impl->cssAttribute()); | 828 v8SetReturnValueInt(info, impl->cssAttribute()); |
| 829 } | 829 } |
| 830 | 830 |
| 831 static void cssAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 831 static void cssAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 832 { | 832 { |
| 833 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 833 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 834 TestObjectV8Internal::cssAttributeAttributeGetter(info); | 834 TestObjectV8Internal::cssAttributeAttributeGetter(info); |
| 835 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 835 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 836 } | 836 } |
| 837 | 837 |
| 838 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 838 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 839 { | 839 { |
| 840 v8::Handle<v8::Object> holder = info.Holder(); | 840 v8::Handle<v8::Object> holder = info.Holder(); |
| 841 ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute",
"TestObject", holder, info.GetIsolate()); | 841 ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute",
"TestObject", holder, info.GetIsolate()); |
| 842 TestObject* impl = V8TestObject::toNative(holder); | 842 TestObject* impl = V8TestObject::toImpl(holder); |
| 843 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 843 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 844 impl->setCSSAttribute(cppValue); | 844 impl->setCSSAttribute(cppValue); |
| 845 } | 845 } |
| 846 | 846 |
| 847 static void cssAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 847 static void cssAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 848 { | 848 { |
| 849 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 849 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 850 TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info); | 850 TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info); |
| 851 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 851 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 852 } | 852 } |
| 853 | 853 |
| 854 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 854 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 855 { | 855 { |
| 856 v8::Handle<v8::Object> holder = info.Holder(); | 856 v8::Handle<v8::Object> holder = info.Holder(); |
| 857 TestObject* impl = V8TestObject::toNative(holder); | 857 TestObject* impl = V8TestObject::toImpl(holder); |
| 858 v8SetReturnValueInt(info, impl->imeAttribute()); | 858 v8SetReturnValueInt(info, impl->imeAttribute()); |
| 859 } | 859 } |
| 860 | 860 |
| 861 static void imeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 861 static void imeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 862 { | 862 { |
| 863 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 863 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 864 TestObjectV8Internal::imeAttributeAttributeGetter(info); | 864 TestObjectV8Internal::imeAttributeAttributeGetter(info); |
| 865 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 865 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 866 } | 866 } |
| 867 | 867 |
| 868 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 868 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 869 { | 869 { |
| 870 v8::Handle<v8::Object> holder = info.Holder(); | 870 v8::Handle<v8::Object> holder = info.Holder(); |
| 871 ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute",
"TestObject", holder, info.GetIsolate()); | 871 ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute",
"TestObject", holder, info.GetIsolate()); |
| 872 TestObject* impl = V8TestObject::toNative(holder); | 872 TestObject* impl = V8TestObject::toImpl(holder); |
| 873 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 873 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 874 impl->setIMEAttribute(cppValue); | 874 impl->setIMEAttribute(cppValue); |
| 875 } | 875 } |
| 876 | 876 |
| 877 static void imeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 877 static void imeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 878 { | 878 { |
| 879 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 879 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 880 TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info); | 880 TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info); |
| 881 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 881 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 882 } | 882 } |
| 883 | 883 |
| 884 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 884 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 885 { | 885 { |
| 886 v8::Handle<v8::Object> holder = info.Holder(); | 886 v8::Handle<v8::Object> holder = info.Holder(); |
| 887 TestObject* impl = V8TestObject::toNative(holder); | 887 TestObject* impl = V8TestObject::toImpl(holder); |
| 888 v8SetReturnValueInt(info, impl->svgAttribute()); | 888 v8SetReturnValueInt(info, impl->svgAttribute()); |
| 889 } | 889 } |
| 890 | 890 |
| 891 static void svgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 891 static void svgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 892 { | 892 { |
| 893 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 893 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 894 TestObjectV8Internal::svgAttributeAttributeGetter(info); | 894 TestObjectV8Internal::svgAttributeAttributeGetter(info); |
| 895 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 895 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 896 } | 896 } |
| 897 | 897 |
| 898 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 898 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 899 { | 899 { |
| 900 v8::Handle<v8::Object> holder = info.Holder(); | 900 v8::Handle<v8::Object> holder = info.Holder(); |
| 901 ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute",
"TestObject", holder, info.GetIsolate()); | 901 ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute",
"TestObject", holder, info.GetIsolate()); |
| 902 TestObject* impl = V8TestObject::toNative(holder); | 902 TestObject* impl = V8TestObject::toImpl(holder); |
| 903 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 903 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 904 impl->setSVGAttribute(cppValue); | 904 impl->setSVGAttribute(cppValue); |
| 905 } | 905 } |
| 906 | 906 |
| 907 static void svgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 907 static void svgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 908 { | 908 { |
| 909 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 909 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 910 TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info); | 910 TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info); |
| 911 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 911 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 912 } | 912 } |
| 913 | 913 |
| 914 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 914 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 915 { | 915 { |
| 916 v8::Handle<v8::Object> holder = info.Holder(); | 916 v8::Handle<v8::Object> holder = info.Holder(); |
| 917 TestObject* impl = V8TestObject::toNative(holder); | 917 TestObject* impl = V8TestObject::toImpl(holder); |
| 918 v8SetReturnValueInt(info, impl->xmlAttribute()); | 918 v8SetReturnValueInt(info, impl->xmlAttribute()); |
| 919 } | 919 } |
| 920 | 920 |
| 921 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 921 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 922 { | 922 { |
| 923 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 923 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 924 TestObjectV8Internal::xmlAttributeAttributeGetter(info); | 924 TestObjectV8Internal::xmlAttributeAttributeGetter(info); |
| 925 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 925 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 926 } | 926 } |
| 927 | 927 |
| 928 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 928 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 929 { | 929 { |
| 930 v8::Handle<v8::Object> holder = info.Holder(); | 930 v8::Handle<v8::Object> holder = info.Holder(); |
| 931 ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute",
"TestObject", holder, info.GetIsolate()); | 931 ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute",
"TestObject", holder, info.GetIsolate()); |
| 932 TestObject* impl = V8TestObject::toNative(holder); | 932 TestObject* impl = V8TestObject::toImpl(holder); |
| 933 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 933 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 934 impl->setXMLAttribute(cppValue); | 934 impl->setXMLAttribute(cppValue); |
| 935 } | 935 } |
| 936 | 936 |
| 937 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 937 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 938 { | 938 { |
| 939 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 939 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 940 TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info); | 940 TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info); |
| 941 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 941 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 942 } | 942 } |
| 943 | 943 |
| 944 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 944 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 945 { | 945 { |
| 946 v8::Handle<v8::Object> holder = info.Holder(); | 946 v8::Handle<v8::Object> holder = info.Holder(); |
| 947 TestObject* impl = V8TestObject::toNative(holder); | 947 TestObject* impl = V8TestObject::toImpl(holder); |
| 948 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeFilterAttribute()), impl); | 948 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeFilterAttribute()), impl); |
| 949 } | 949 } |
| 950 | 950 |
| 951 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 951 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 952 { | 952 { |
| 953 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 953 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 954 TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info); | 954 TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info); |
| 955 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 955 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 956 } | 956 } |
| 957 | 957 |
| 958 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 958 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 959 { | 959 { |
| 960 v8::Handle<v8::Object> holder = info.Holder(); | 960 v8::Handle<v8::Object> holder = info.Holder(); |
| 961 TestObject* impl = V8TestObject::toNative(holder); | 961 TestObject* impl = V8TestObject::toImpl(holder); |
| 962 TONATIVE_VOID(RefPtrWillBeRawPtr<NodeFilter>, cppValue, toNodeFilter(v8Value
, info.Holder(), ScriptState::current(info.GetIsolate()))); | 962 TONATIVE_VOID(RefPtrWillBeRawPtr<NodeFilter>, cppValue, toNodeFilter(v8Value
, info.Holder(), ScriptState::current(info.GetIsolate()))); |
| 963 impl->setNodeFilterAttribute(WTF::getPtr(cppValue)); | 963 impl->setNodeFilterAttribute(WTF::getPtr(cppValue)); |
| 964 } | 964 } |
| 965 | 965 |
| 966 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 966 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 967 { | 967 { |
| 968 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 968 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 969 TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info); | 969 TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info); |
| 970 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 970 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 971 } | 971 } |
| 972 | 972 |
| 973 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 973 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 974 { | 974 { |
| 975 v8::Handle<v8::Object> holder = info.Holder(); | 975 v8::Handle<v8::Object> holder = info.Holder(); |
| 976 TestObject* impl = V8TestObject::toNative(holder); | 976 TestObject* impl = V8TestObject::toImpl(holder); |
| 977 v8SetReturnValue(info, impl->serializedScriptValueAttribute() ? impl->serial
izedScriptValueAttribute()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.
GetIsolate()))); | 977 v8SetReturnValue(info, impl->serializedScriptValueAttribute() ? impl->serial
izedScriptValueAttribute()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.
GetIsolate()))); |
| 978 } | 978 } |
| 979 | 979 |
| 980 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 980 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 981 { | 981 { |
| 982 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 982 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 983 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); | 983 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); |
| 984 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 984 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 985 } | 985 } |
| 986 | 986 |
| 987 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 987 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 988 { | 988 { |
| 989 v8::Handle<v8::Object> holder = info.Holder(); | 989 v8::Handle<v8::Object> holder = info.Holder(); |
| 990 TestObject* impl = V8TestObject::toNative(holder); | 990 TestObject* impl = V8TestObject::toImpl(holder); |
| 991 TONATIVE_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptValue
::create(v8Value, info.GetIsolate())); | 991 TONATIVE_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptValue
::create(v8Value, info.GetIsolate())); |
| 992 impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue)); | 992 impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue)); |
| 993 } | 993 } |
| 994 | 994 |
| 995 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | 995 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 996 { | 996 { |
| 997 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 997 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 998 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value,
info); | 998 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value,
info); |
| 999 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 999 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 1002 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 1003 { | 1003 { |
| 1004 v8::Handle<v8::Object> holder = info.Holder(); | 1004 v8::Handle<v8::Object> holder = info.Holder(); |
| 1005 TestObject* impl = V8TestObject::toNative(holder); | 1005 TestObject* impl = V8TestObject::toImpl(holder); |
| 1006 v8SetReturnValue(info, impl->anyAttribute().v8Value()); | 1006 v8SetReturnValue(info, impl->anyAttribute().v8Value()); |
| 1007 } | 1007 } |
| 1008 | 1008 |
| 1009 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 1009 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 1010 { | 1010 { |
| 1011 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1011 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1012 TestObjectV8Internal::anyAttributeAttributeGetter(info); | 1012 TestObjectV8Internal::anyAttributeAttributeGetter(info); |
| 1013 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1013 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1014 } | 1014 } |
| 1015 | 1015 |
| 1016 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | 1016 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 1017 { | 1017 { |
| 1018 v8::Handle<v8::Object> holder = info.Holder(); | 1018 v8::Handle<v8::Object> holder = info.Holder(); |
| 1019 TestObject* impl = V8TestObject::toNative(holder); | 1019 TestObject* impl = V8TestObject::toImpl(holder); |
| 1020 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | 1020 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); |
| 1021 impl->setAnyAttribute(cppValue); | 1021 impl->setAnyAttribute(cppValue); |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1024 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1025 { | 1025 { |
| 1026 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1026 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1027 TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info); | 1027 TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info); |
| 1028 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1028 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1029 } | 1029 } |
| 1030 | 1030 |
| 1031 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1031 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 1032 { | 1032 { |
| 1033 v8::Handle<v8::Object> holder = info.Holder(); | 1033 v8::Handle<v8::Object> holder = info.Holder(); |
| 1034 TestObject* impl = V8TestObject::toNative(holder); | 1034 TestObject* impl = V8TestObject::toImpl(holder); |
| 1035 v8SetReturnValue(info, impl->promiseAttribute().v8Value()); | 1035 v8SetReturnValue(info, impl->promiseAttribute().v8Value()); |
| 1036 } | 1036 } |
| 1037 | 1037 |
| 1038 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1038 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1039 { | 1039 { |
| 1040 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1040 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1041 TestObjectV8Internal::promiseAttributeAttributeGetter(info); | 1041 TestObjectV8Internal::promiseAttributeAttributeGetter(info); |
| 1042 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1042 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 1045 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 1046 { | 1046 { |
| 1047 v8::Handle<v8::Object> holder = info.Holder(); | 1047 v8::Handle<v8::Object> holder = info.Holder(); |
| 1048 TestObject* impl = V8TestObject::toNative(holder); | 1048 TestObject* impl = V8TestObject::toImpl(holder); |
| 1049 TONATIVE_VOID(ScriptPromise, cppValue, ScriptPromise::cast(ScriptState::curr
ent(info.GetIsolate()), v8Value)); | 1049 TONATIVE_VOID(ScriptPromise, cppValue, ScriptPromise::cast(ScriptState::curr
ent(info.GetIsolate()), v8Value)); |
| 1050 impl->setPromiseAttribute(cppValue); | 1050 impl->setPromiseAttribute(cppValue); |
| 1051 } | 1051 } |
| 1052 | 1052 |
| 1053 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1053 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1054 { | 1054 { |
| 1055 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1055 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1056 TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info); | 1056 TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info); |
| 1057 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1057 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1058 } | 1058 } |
| 1059 | 1059 |
| 1060 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 1060 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 1061 { | 1061 { |
| 1062 v8::Handle<v8::Object> holder = info.Holder(); | 1062 v8::Handle<v8::Object> holder = info.Holder(); |
| 1063 TestObject* impl = V8TestObject::toNative(holder); | 1063 TestObject* impl = V8TestObject::toImpl(holder); |
| 1064 v8SetReturnValueFast(info, WTF::getPtr(impl->windowAttribute()), impl); | 1064 v8SetReturnValueFast(info, WTF::getPtr(impl->windowAttribute()), impl); |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 static void windowAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1067 static void windowAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1068 { | 1068 { |
| 1069 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1069 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1070 TestObjectV8Internal::windowAttributeAttributeGetter(info); | 1070 TestObjectV8Internal::windowAttributeAttributeGetter(info); |
| 1071 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1071 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1072 } | 1072 } |
| 1073 | 1073 |
| 1074 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 1074 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 1075 { | 1075 { |
| 1076 v8::Handle<v8::Object> holder = info.Holder(); | 1076 v8::Handle<v8::Object> holder = info.Holder(); |
| 1077 TestObject* impl = V8TestObject::toNative(holder); | 1077 TestObject* impl = V8TestObject::toImpl(holder); |
| 1078 TONATIVE_VOID(LocalDOMWindow*, cppValue, toDOMWindow(v8Value, info.GetIsolat
e())); | 1078 TONATIVE_VOID(LocalDOMWindow*, cppValue, toDOMWindow(v8Value, info.GetIsolat
e())); |
| 1079 impl->setWindowAttribute(WTF::getPtr(cppValue)); | 1079 impl->setWindowAttribute(WTF::getPtr(cppValue)); |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 static void windowAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1082 static void windowAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1083 { | 1083 { |
| 1084 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1084 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1085 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info); | 1085 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info); |
| 1086 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1086 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1087 } | 1087 } |
| 1088 | 1088 |
| 1089 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 1089 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 1090 { | 1090 { |
| 1091 v8::Handle<v8::Object> holder = info.Holder(); | 1091 v8::Handle<v8::Object> holder = info.Holder(); |
| 1092 TestObject* impl = V8TestObject::toNative(holder); | 1092 TestObject* impl = V8TestObject::toImpl(holder); |
| 1093 v8SetReturnValueFast(info, WTF::getPtr(impl->documentAttribute()), impl); | 1093 v8SetReturnValueFast(info, WTF::getPtr(impl->documentAttribute()), impl); |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 1096 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1097 { | 1097 { |
| 1098 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1098 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1099 TestObjectV8Internal::documentAttributeAttributeGetter(info); | 1099 TestObjectV8Internal::documentAttributeAttributeGetter(info); |
| 1100 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1100 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 1103 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 1104 { | 1104 { |
| 1105 v8::Handle<v8::Object> holder = info.Holder(); | 1105 v8::Handle<v8::Object> holder = info.Holder(); |
| 1106 TestObject* impl = V8TestObject::toNative(holder); | 1106 TestObject* impl = V8TestObject::toImpl(holder); |
| 1107 TONATIVE_VOID(Document*, cppValue, V8Document::toNativeWithTypeCheck(info.Ge
tIsolate(), v8Value)); | 1107 TONATIVE_VOID(Document*, cppValue, V8Document::toImplWithTypeCheck(info.GetI
solate(), v8Value)); |
| 1108 impl->setDocumentAttribute(WTF::getPtr(cppValue)); | 1108 impl->setDocumentAttribute(WTF::getPtr(cppValue)); |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1111 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1112 { | 1112 { |
| 1113 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1113 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1114 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info); | 1114 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info); |
| 1115 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1115 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 1118 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 1119 { | 1119 { |
| 1120 v8::Handle<v8::Object> holder = info.Holder(); | 1120 v8::Handle<v8::Object> holder = info.Holder(); |
| 1121 TestObject* impl = V8TestObject::toNative(holder); | 1121 TestObject* impl = V8TestObject::toImpl(holder); |
| 1122 v8SetReturnValueFast(info, WTF::getPtr(impl->documentFragmentAttribute()), i
mpl); | 1122 v8SetReturnValueFast(info, WTF::getPtr(impl->documentFragmentAttribute()), i
mpl); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1125 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1126 { | 1126 { |
| 1127 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1127 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1128 TestObjectV8Internal::documentFragmentAttributeAttributeGetter(info); | 1128 TestObjectV8Internal::documentFragmentAttributeAttributeGetter(info); |
| 1129 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1129 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1130 } | 1130 } |
| 1131 | 1131 |
| 1132 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 1132 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 1133 { | 1133 { |
| 1134 v8::Handle<v8::Object> holder = info.Holder(); | 1134 v8::Handle<v8::Object> holder = info.Holder(); |
| 1135 TestObject* impl = V8TestObject::toNative(holder); | 1135 TestObject* impl = V8TestObject::toImpl(holder); |
| 1136 TONATIVE_VOID(DocumentFragment*, cppValue, V8DocumentFragment::toNativeWithT
ypeCheck(info.GetIsolate(), v8Value)); | 1136 TONATIVE_VOID(DocumentFragment*, cppValue, V8DocumentFragment::toImplWithTyp
eCheck(info.GetIsolate(), v8Value)); |
| 1137 impl->setDocumentFragmentAttribute(WTF::getPtr(cppValue)); | 1137 impl->setDocumentFragmentAttribute(WTF::getPtr(cppValue)); |
| 1138 } | 1138 } |
| 1139 | 1139 |
| 1140 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1140 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1141 { | 1141 { |
| 1142 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1142 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1143 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info
); | 1143 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info
); |
| 1144 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1144 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1147 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1148 { | 1148 { |
| 1149 v8::Handle<v8::Object> holder = info.Holder(); | 1149 v8::Handle<v8::Object> holder = info.Holder(); |
| 1150 TestObject* impl = V8TestObject::toNative(holder); | 1150 TestObject* impl = V8TestObject::toImpl(holder); |
| 1151 v8SetReturnValueFast(info, WTF::getPtr(impl->documentTypeAttribute()), impl)
; | 1151 v8SetReturnValueFast(info, WTF::getPtr(impl->documentTypeAttribute()), impl)
; |
| 1152 } | 1152 } |
| 1153 | 1153 |
| 1154 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1154 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1155 { | 1155 { |
| 1156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1157 TestObjectV8Internal::documentTypeAttributeAttributeGetter(info); | 1157 TestObjectV8Internal::documentTypeAttributeAttributeGetter(info); |
| 1158 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1158 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1159 } | 1159 } |
| 1160 | 1160 |
| 1161 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1161 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1162 { | 1162 { |
| 1163 v8::Handle<v8::Object> holder = info.Holder(); | 1163 v8::Handle<v8::Object> holder = info.Holder(); |
| 1164 TestObject* impl = V8TestObject::toNative(holder); | 1164 TestObject* impl = V8TestObject::toImpl(holder); |
| 1165 TONATIVE_VOID(DocumentType*, cppValue, V8DocumentType::toNativeWithTypeCheck
(info.GetIsolate(), v8Value)); | 1165 TONATIVE_VOID(DocumentType*, cppValue, V8DocumentType::toImplWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
| 1166 impl->setDocumentTypeAttribute(WTF::getPtr(cppValue)); | 1166 impl->setDocumentTypeAttribute(WTF::getPtr(cppValue)); |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1169 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1170 { | 1170 { |
| 1171 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1171 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1172 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info); | 1172 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info); |
| 1173 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1173 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1176 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 1177 { | 1177 { |
| 1178 v8::Handle<v8::Object> holder = info.Holder(); | 1178 v8::Handle<v8::Object> holder = info.Holder(); |
| 1179 TestObject* impl = V8TestObject::toNative(holder); | 1179 TestObject* impl = V8TestObject::toImpl(holder); |
| 1180 v8SetReturnValueFast(info, WTF::getPtr(impl->elementAttribute()), impl); | 1180 v8SetReturnValueFast(info, WTF::getPtr(impl->elementAttribute()), impl); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1183 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1184 { | 1184 { |
| 1185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1186 TestObjectV8Internal::elementAttributeAttributeGetter(info); | 1186 TestObjectV8Internal::elementAttributeAttributeGetter(info); |
| 1187 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1187 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 1190 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 1191 { | 1191 { |
| 1192 v8::Handle<v8::Object> holder = info.Holder(); | 1192 v8::Handle<v8::Object> holder = info.Holder(); |
| 1193 TestObject* impl = V8TestObject::toNative(holder); | 1193 TestObject* impl = V8TestObject::toImpl(holder); |
| 1194 TONATIVE_VOID(Element*, cppValue, V8Element::toNativeWithTypeCheck(info.GetI
solate(), v8Value)); | 1194 TONATIVE_VOID(Element*, cppValue, V8Element::toImplWithTypeCheck(info.GetIso
late(), v8Value)); |
| 1195 impl->setElementAttribute(WTF::getPtr(cppValue)); | 1195 impl->setElementAttribute(WTF::getPtr(cppValue)); |
| 1196 } | 1196 } |
| 1197 | 1197 |
| 1198 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1198 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1199 { | 1199 { |
| 1200 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1200 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1201 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info); | 1201 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info); |
| 1202 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1202 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 1205 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 1206 { | 1206 { |
| 1207 v8::Handle<v8::Object> holder = info.Holder(); | 1207 v8::Handle<v8::Object> holder = info.Holder(); |
| 1208 TestObject* impl = V8TestObject::toNative(holder); | 1208 TestObject* impl = V8TestObject::toImpl(holder); |
| 1209 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeAttribute()), impl); | 1209 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeAttribute()), impl); |
| 1210 } | 1210 } |
| 1211 | 1211 |
| 1212 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 1212 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 1213 { | 1213 { |
| 1214 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1214 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1215 TestObjectV8Internal::nodeAttributeAttributeGetter(info); | 1215 TestObjectV8Internal::nodeAttributeAttributeGetter(info); |
| 1216 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1216 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 1219 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 1220 { | 1220 { |
| 1221 v8::Handle<v8::Object> holder = info.Holder(); | 1221 v8::Handle<v8::Object> holder = info.Holder(); |
| 1222 TestObject* impl = V8TestObject::toNative(holder); | 1222 TestObject* impl = V8TestObject::toImpl(holder); |
| 1223 TONATIVE_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsolate
(), v8Value)); | 1223 TONATIVE_VOID(Node*, cppValue, V8Node::toImplWithTypeCheck(info.GetIsolate()
, v8Value)); |
| 1224 impl->setNodeAttribute(WTF::getPtr(cppValue)); | 1224 impl->setNodeAttribute(WTF::getPtr(cppValue)); |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1227 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1228 { | 1228 { |
| 1229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1230 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | 1230 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); |
| 1231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1232 } | 1232 } |
| 1233 | 1233 |
| 1234 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1234 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1235 { | 1235 { |
| 1236 v8::Handle<v8::Object> holder = info.Holder(); | 1236 v8::Handle<v8::Object> holder = info.Holder(); |
| 1237 TestObject* impl = V8TestObject::toNative(holder); | 1237 TestObject* impl = V8TestObject::toImpl(holder); |
| 1238 v8SetReturnValueFast(info, WTF::getPtr(impl->shadowRootAttribute()), impl); | 1238 v8SetReturnValueFast(info, WTF::getPtr(impl->shadowRootAttribute()), impl); |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1241 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1242 { | 1242 { |
| 1243 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1243 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1244 TestObjectV8Internal::shadowRootAttributeAttributeGetter(info); | 1244 TestObjectV8Internal::shadowRootAttributeAttributeGetter(info); |
| 1245 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1245 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1246 } | 1246 } |
| 1247 | 1247 |
| 1248 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1248 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 1249 { | 1249 { |
| 1250 v8::Handle<v8::Object> holder = info.Holder(); | 1250 v8::Handle<v8::Object> holder = info.Holder(); |
| 1251 TestObject* impl = V8TestObject::toNative(holder); | 1251 TestObject* impl = V8TestObject::toImpl(holder); |
| 1252 TONATIVE_VOID(ShadowRoot*, cppValue, V8ShadowRoot::toNativeWithTypeCheck(inf
o.GetIsolate(), v8Value)); | 1252 TONATIVE_VOID(ShadowRoot*, cppValue, V8ShadowRoot::toImplWithTypeCheck(info.
GetIsolate(), v8Value)); |
| 1253 impl->setShadowRootAttribute(WTF::getPtr(cppValue)); | 1253 impl->setShadowRootAttribute(WTF::getPtr(cppValue)); |
| 1254 } | 1254 } |
| 1255 | 1255 |
| 1256 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1256 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1257 { | 1257 { |
| 1258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1259 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info); | 1259 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info); |
| 1260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1261 } | 1261 } |
| 1262 | 1262 |
| 1263 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1263 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 1264 { | 1264 { |
| 1265 v8::Handle<v8::Object> holder = info.Holder(); | 1265 v8::Handle<v8::Object> holder = info.Holder(); |
| 1266 TestObject* impl = V8TestObject::toNative(holder); | 1266 TestObject* impl = V8TestObject::toImpl(holder); |
| 1267 v8SetReturnValueFast(info, WTF::getPtr(impl->arrayBufferAttribute()), impl); | 1267 v8SetReturnValueFast(info, WTF::getPtr(impl->arrayBufferAttribute()), impl); |
| 1268 } | 1268 } |
| 1269 | 1269 |
| 1270 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1270 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1271 { | 1271 { |
| 1272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1273 TestObjectV8Internal::arrayBufferAttributeAttributeGetter(info); | 1273 TestObjectV8Internal::arrayBufferAttributeAttributeGetter(info); |
| 1274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 1277 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 1278 { | 1278 { |
| 1279 v8::Handle<v8::Object> holder = info.Holder(); | 1279 v8::Handle<v8::Object> holder = info.Holder(); |
| 1280 TestObject* impl = V8TestObject::toNative(holder); | 1280 TestObject* impl = V8TestObject::toImpl(holder); |
| 1281 TONATIVE_VOID(ArrayBuffer*, cppValue, v8Value->IsArrayBuffer() ? V8ArrayBuff
er::toNative(v8::Handle<v8::ArrayBuffer>::Cast(v8Value)) : 0); | 1281 TONATIVE_VOID(ArrayBuffer*, cppValue, v8Value->IsArrayBuffer() ? V8ArrayBuff
er::toImpl(v8::Handle<v8::ArrayBuffer>::Cast(v8Value)) : 0); |
| 1282 impl->setArrayBufferAttribute(WTF::getPtr(cppValue)); | 1282 impl->setArrayBufferAttribute(WTF::getPtr(cppValue)); |
| 1283 } | 1283 } |
| 1284 | 1284 |
| 1285 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1285 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1286 { | 1286 { |
| 1287 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1287 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1288 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info); | 1288 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info); |
| 1289 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1289 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1290 } | 1290 } |
| 1291 | 1291 |
| 1292 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1292 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1293 { | 1293 { |
| 1294 v8::Handle<v8::Object> holder = info.Holder(); | 1294 v8::Handle<v8::Object> holder = info.Holder(); |
| 1295 TestObject* impl = V8TestObject::toNative(holder); | 1295 TestObject* impl = V8TestObject::toImpl(holder); |
| 1296 v8SetReturnValueFast(info, WTF::getPtr(impl->float32ArrayAttribute()), impl)
; | 1296 v8SetReturnValueFast(info, WTF::getPtr(impl->float32ArrayAttribute()), impl)
; |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1299 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1300 { | 1300 { |
| 1301 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1301 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1302 TestObjectV8Internal::float32ArrayAttributeAttributeGetter(info); | 1302 TestObjectV8Internal::float32ArrayAttributeAttributeGetter(info); |
| 1303 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1303 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1304 } | 1304 } |
| 1305 | 1305 |
| 1306 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1306 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1307 { | 1307 { |
| 1308 v8::Handle<v8::Object> holder = info.Holder(); | 1308 v8::Handle<v8::Object> holder = info.Holder(); |
| 1309 TestObject* impl = V8TestObject::toNative(holder); | 1309 TestObject* impl = V8TestObject::toImpl(holder); |
| 1310 TONATIVE_VOID(Float32Array*, cppValue, v8Value->IsFloat32Array() ? V8Float32
Array::toNative(v8::Handle<v8::Float32Array>::Cast(v8Value)) : 0); | 1310 TONATIVE_VOID(Float32Array*, cppValue, v8Value->IsFloat32Array() ? V8Float32
Array::toImpl(v8::Handle<v8::Float32Array>::Cast(v8Value)) : 0); |
| 1311 impl->setFloat32ArrayAttribute(WTF::getPtr(cppValue)); | 1311 impl->setFloat32ArrayAttribute(WTF::getPtr(cppValue)); |
| 1312 } | 1312 } |
| 1313 | 1313 |
| 1314 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1314 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1315 { | 1315 { |
| 1316 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1316 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1317 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info); | 1317 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info); |
| 1318 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1318 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1319 } | 1319 } |
| 1320 | 1320 |
| 1321 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1321 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1322 { | 1322 { |
| 1323 v8::Handle<v8::Object> holder = info.Holder(); | 1323 v8::Handle<v8::Object> holder = info.Holder(); |
| 1324 TestObject* impl = V8TestObject::toNative(holder); | 1324 TestObject* impl = V8TestObject::toImpl(holder); |
| 1325 v8SetReturnValueFast(info, WTF::getPtr(impl->uint8ArrayAttribute()), impl); | 1325 v8SetReturnValueFast(info, WTF::getPtr(impl->uint8ArrayAttribute()), impl); |
| 1326 } | 1326 } |
| 1327 | 1327 |
| 1328 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1328 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1329 { | 1329 { |
| 1330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1331 TestObjectV8Internal::uint8ArrayAttributeAttributeGetter(info); | 1331 TestObjectV8Internal::uint8ArrayAttributeAttributeGetter(info); |
| 1332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1333 } | 1333 } |
| 1334 | 1334 |
| 1335 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1335 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 1336 { | 1336 { |
| 1337 v8::Handle<v8::Object> holder = info.Holder(); | 1337 v8::Handle<v8::Object> holder = info.Holder(); |
| 1338 TestObject* impl = V8TestObject::toNative(holder); | 1338 TestObject* impl = V8TestObject::toImpl(holder); |
| 1339 TONATIVE_VOID(Uint8Array*, cppValue, v8Value->IsUint8Array() ? V8Uint8Array:
:toNative(v8::Handle<v8::Uint8Array>::Cast(v8Value)) : 0); | 1339 TONATIVE_VOID(Uint8Array*, cppValue, v8Value->IsUint8Array() ? V8Uint8Array:
:toImpl(v8::Handle<v8::Uint8Array>::Cast(v8Value)) : 0); |
| 1340 impl->setUint8ArrayAttribute(WTF::getPtr(cppValue)); | 1340 impl->setUint8ArrayAttribute(WTF::getPtr(cppValue)); |
| 1341 } | 1341 } |
| 1342 | 1342 |
| 1343 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1343 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1344 { | 1344 { |
| 1345 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1345 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1346 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info); | 1346 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info); |
| 1347 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1347 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1348 } | 1348 } |
| 1349 | 1349 |
| 1350 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 1350 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1351 { | 1351 { |
| 1352 v8::Handle<v8::Object> holder = info.Holder(); | 1352 v8::Handle<v8::Object> holder = info.Holder(); |
| 1353 TestObject* impl = V8TestObject::toNative(holder); | 1353 TestObject* impl = V8TestObject::toImpl(holder); |
| 1354 v8SetReturnValueFast(info, WTF::getPtr(impl->self()), impl); | 1354 v8SetReturnValueFast(info, WTF::getPtr(impl->self()), impl); |
| 1355 } | 1355 } |
| 1356 | 1356 |
| 1357 static void selfAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 1357 static void selfAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 1358 { | 1358 { |
| 1359 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1359 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1360 TestObjectV8Internal::selfAttributeGetter(info); | 1360 TestObjectV8Internal::selfAttributeGetter(info); |
| 1361 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1361 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1362 } | 1362 } |
| 1363 | 1363 |
| 1364 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 1364 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 1365 { | 1365 { |
| 1366 v8::Handle<v8::Object> holder = info.Holder(); | 1366 v8::Handle<v8::Object> holder = info.Holder(); |
| 1367 TestObject* impl = V8TestObject::toNative(holder); | 1367 TestObject* impl = V8TestObject::toImpl(holder); |
| 1368 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetAttribute())
, impl); | 1368 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetAttribute())
, impl); |
| 1369 } | 1369 } |
| 1370 | 1370 |
| 1371 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1371 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1372 { | 1372 { |
| 1373 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1373 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1374 TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetter(info); | 1374 TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetter(info); |
| 1375 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1375 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1376 } | 1376 } |
| 1377 | 1377 |
| 1378 static void readonlyEventTargetOrNullAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 1378 static void readonlyEventTargetOrNullAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
| 1379 { | 1379 { |
| 1380 v8::Handle<v8::Object> holder = info.Holder(); | 1380 v8::Handle<v8::Object> holder = info.Holder(); |
| 1381 TestObject* impl = V8TestObject::toNative(holder); | 1381 TestObject* impl = V8TestObject::toImpl(holder); |
| 1382 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetOrNullAttrib
ute()), impl); | 1382 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetOrNullAttrib
ute()), impl); |
| 1383 } | 1383 } |
| 1384 | 1384 |
| 1385 static void readonlyEventTargetOrNullAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1385 static void readonlyEventTargetOrNullAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1386 { | 1386 { |
| 1387 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1387 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1388 TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetter(info
); | 1388 TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetter(info
); |
| 1389 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1389 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1390 } | 1390 } |
| 1391 | 1391 |
| 1392 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1392 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 1393 { | 1393 { |
| 1394 v8::Handle<v8::Object> holder = info.Holder(); | 1394 v8::Handle<v8::Object> holder = info.Holder(); |
| 1395 TestObject* impl = V8TestObject::toNative(holder); | 1395 TestObject* impl = V8TestObject::toImpl(holder); |
| 1396 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyWindowAttribute()), imp
l); | 1396 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyWindowAttribute()), imp
l); |
| 1397 } | 1397 } |
| 1398 | 1398 |
| 1399 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1399 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1400 { | 1400 { |
| 1401 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1401 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1402 TestObjectV8Internal::readonlyWindowAttributeAttributeGetter(info); | 1402 TestObjectV8Internal::readonlyWindowAttributeAttributeGetter(info); |
| 1403 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1403 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1404 } | 1404 } |
| 1405 | 1405 |
| 1406 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1406 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 1407 { | 1407 { |
| 1408 v8::Handle<v8::Object> holder = info.Holder(); | 1408 v8::Handle<v8::Object> holder = info.Holder(); |
| 1409 TestObject* impl = V8TestObject::toNative(holder); | 1409 TestObject* impl = V8TestObject::toImpl(holder); |
| 1410 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlCollectionAttribute()), imp
l); | 1410 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlCollectionAttribute()), imp
l); |
| 1411 } | 1411 } |
| 1412 | 1412 |
| 1413 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1413 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1414 { | 1414 { |
| 1415 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1415 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1416 TestObjectV8Internal::htmlCollectionAttributeAttributeGetter(info); | 1416 TestObjectV8Internal::htmlCollectionAttributeAttributeGetter(info); |
| 1417 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1417 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1420 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 1421 { | 1421 { |
| 1422 v8::Handle<v8::Object> holder = info.Holder(); | 1422 v8::Handle<v8::Object> holder = info.Holder(); |
| 1423 TestObject* impl = V8TestObject::toNative(holder); | 1423 TestObject* impl = V8TestObject::toImpl(holder); |
| 1424 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlElementAttribute()), impl); | 1424 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlElementAttribute()), impl); |
| 1425 } | 1425 } |
| 1426 | 1426 |
| 1427 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1427 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1428 { | 1428 { |
| 1429 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1429 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1430 TestObjectV8Internal::htmlElementAttributeAttributeGetter(info); | 1430 TestObjectV8Internal::htmlElementAttributeAttributeGetter(info); |
| 1431 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1431 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1434 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 1435 { | 1435 { |
| 1436 v8::Handle<v8::Object> holder = info.Holder(); | 1436 v8::Handle<v8::Object> holder = info.Holder(); |
| 1437 TestObject* impl = V8TestObject::toNative(holder); | 1437 TestObject* impl = V8TestObject::toImpl(holder); |
| 1438 v8SetReturnValue(info, v8Array(impl->stringArrayAttribute(), info.Holder(),
info.GetIsolate())); | 1438 v8SetReturnValue(info, v8Array(impl->stringArrayAttribute(), info.Holder(),
info.GetIsolate())); |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1441 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1442 { | 1442 { |
| 1443 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1443 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1444 TestObjectV8Internal::stringArrayAttributeAttributeGetter(info); | 1444 TestObjectV8Internal::stringArrayAttributeAttributeGetter(info); |
| 1445 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1445 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1446 } | 1446 } |
| 1447 | 1447 |
| 1448 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 1448 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 1449 { | 1449 { |
| 1450 v8::Handle<v8::Object> holder = info.Holder(); | 1450 v8::Handle<v8::Object> holder = info.Holder(); |
| 1451 TestObject* impl = V8TestObject::toNative(holder); | 1451 TestObject* impl = V8TestObject::toImpl(holder); |
| 1452 TONATIVE_VOID(Vector<String>, cppValue, toNativeArray<String>(v8Value, 0, in
fo.GetIsolate())); | 1452 TONATIVE_VOID(Vector<String>, cppValue, toImplArray<String>(v8Value, 0, info
.GetIsolate())); |
| 1453 impl->setStringArrayAttribute(cppValue); | 1453 impl->setStringArrayAttribute(cppValue); |
| 1454 } | 1454 } |
| 1455 | 1455 |
| 1456 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1456 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1457 { | 1457 { |
| 1458 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1458 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1459 TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info); | 1459 TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info); |
| 1460 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1460 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1461 } | 1461 } |
| 1462 | 1462 |
| 1463 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 1463 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 1464 { | 1464 { |
| 1465 v8::Handle<v8::Object> holder = info.Holder(); | 1465 v8::Handle<v8::Object> holder = info.Holder(); |
| 1466 TestObject* impl = V8TestObject::toNative(holder); | 1466 TestObject* impl = V8TestObject::toImpl(holder); |
| 1467 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayAttribute(), inf
o.Holder(), info.GetIsolate())); | 1467 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayAttribute(), inf
o.Holder(), info.GetIsolate())); |
| 1468 } | 1468 } |
| 1469 | 1469 |
| 1470 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1470 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1471 { | 1471 { |
| 1472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1473 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info); | 1473 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info); |
| 1474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1475 } | 1475 } |
| 1476 | 1476 |
| 1477 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 1477 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1478 { | 1478 { |
| 1479 v8::Handle<v8::Object> holder = info.Holder(); | 1479 v8::Handle<v8::Object> holder = info.Holder(); |
| 1480 TestObject* impl = V8TestObject::toNative(holder); | 1480 TestObject* impl = V8TestObject::toImpl(holder); |
| 1481 TONATIVE_VOID(Vector<RefPtr<TestInterfaceEmpty> >, cppValue, (toRefPtrNative
Array<TestInterfaceEmpty, V8TestInterfaceEmpty>(v8Value, 0, info.GetIsolate())))
; | 1481 TONATIVE_VOID(Vector<RefPtr<TestInterfaceEmpty> >, cppValue, (toRefPtrNative
Array<TestInterfaceEmpty, V8TestInterfaceEmpty>(v8Value, 0, info.GetIsolate())))
; |
| 1482 impl->setTestInterfaceEmptyArrayAttribute(cppValue); | 1482 impl->setTestInterfaceEmptyArrayAttribute(cppValue); |
| 1483 } | 1483 } |
| 1484 | 1484 |
| 1485 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 1485 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 1486 { | 1486 { |
| 1487 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1487 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1488 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Valu
e, info); | 1488 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Valu
e, info); |
| 1489 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1489 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1490 } | 1490 } |
| 1491 | 1491 |
| 1492 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1492 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1493 { | 1493 { |
| 1494 v8::Handle<v8::Object> holder = info.Holder(); | 1494 v8::Handle<v8::Object> holder = info.Holder(); |
| 1495 TestObject* impl = V8TestObject::toNative(holder); | 1495 TestObject* impl = V8TestObject::toImpl(holder); |
| 1496 v8SetReturnValue(info, v8Array(impl->floatArrayAttribute(), info.Holder(), i
nfo.GetIsolate())); | 1496 v8SetReturnValue(info, v8Array(impl->floatArrayAttribute(), info.Holder(), i
nfo.GetIsolate())); |
| 1497 } | 1497 } |
| 1498 | 1498 |
| 1499 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1499 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1500 { | 1500 { |
| 1501 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1501 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1502 TestObjectV8Internal::floatArrayAttributeAttributeGetter(info); | 1502 TestObjectV8Internal::floatArrayAttributeAttributeGetter(info); |
| 1503 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1503 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1504 } | 1504 } |
| 1505 | 1505 |
| 1506 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1506 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 1507 { | 1507 { |
| 1508 v8::Handle<v8::Object> holder = info.Holder(); | 1508 v8::Handle<v8::Object> holder = info.Holder(); |
| 1509 TestObject* impl = V8TestObject::toNative(holder); | 1509 TestObject* impl = V8TestObject::toImpl(holder); |
| 1510 TONATIVE_VOID(Vector<float>, cppValue, toNativeArray<float>(v8Value, 0, info
.GetIsolate())); | 1510 TONATIVE_VOID(Vector<float>, cppValue, toImplArray<float>(v8Value, 0, info.G
etIsolate())); |
| 1511 impl->setFloatArrayAttribute(cppValue); | 1511 impl->setFloatArrayAttribute(cppValue); |
| 1512 } | 1512 } |
| 1513 | 1513 |
| 1514 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1514 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1515 { | 1515 { |
| 1516 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1516 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1517 TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info); | 1517 TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info); |
| 1518 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1518 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1519 } | 1519 } |
| 1520 | 1520 |
| 1521 static void stringOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1521 static void stringOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1522 { | 1522 { |
| 1523 v8::Handle<v8::Object> holder = info.Holder(); | 1523 v8::Handle<v8::Object> holder = info.Holder(); |
| 1524 TestObject* impl = V8TestObject::toNative(holder); | 1524 TestObject* impl = V8TestObject::toImpl(holder); |
| 1525 v8SetReturnValueStringOrNull(info, impl->stringOrNullAttribute(), info.GetIs
olate()); | 1525 v8SetReturnValueStringOrNull(info, impl->stringOrNullAttribute(), info.GetIs
olate()); |
| 1526 } | 1526 } |
| 1527 | 1527 |
| 1528 static void stringOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1528 static void stringOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1529 { | 1529 { |
| 1530 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1530 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1531 TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info); | 1531 TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info); |
| 1532 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1532 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1533 } | 1533 } |
| 1534 | 1534 |
| 1535 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1535 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1536 { | 1536 { |
| 1537 v8::Handle<v8::Object> holder = info.Holder(); | 1537 v8::Handle<v8::Object> holder = info.Holder(); |
| 1538 TestObject* impl = V8TestObject::toNative(holder); | 1538 TestObject* impl = V8TestObject::toImpl(holder); |
| 1539 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); | 1539 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); |
| 1540 impl->setStringOrNullAttribute(cppValue); | 1540 impl->setStringOrNullAttribute(cppValue); |
| 1541 } | 1541 } |
| 1542 | 1542 |
| 1543 static void stringOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1543 static void stringOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1544 { | 1544 { |
| 1545 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1545 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1546 TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info); | 1546 TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info); |
| 1547 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1547 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1548 } | 1548 } |
| 1549 | 1549 |
| 1550 static void longOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1550 static void longOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1551 { | 1551 { |
| 1552 v8::Handle<v8::Object> holder = info.Holder(); | 1552 v8::Handle<v8::Object> holder = info.Holder(); |
| 1553 TestObject* impl = V8TestObject::toNative(holder); | 1553 TestObject* impl = V8TestObject::toImpl(holder); |
| 1554 bool isNull = false; | 1554 bool isNull = false; |
| 1555 int cppValue(impl->longOrNullAttribute(isNull)); | 1555 int cppValue(impl->longOrNullAttribute(isNull)); |
| 1556 if (isNull) { | 1556 if (isNull) { |
| 1557 v8SetReturnValueNull(info); | 1557 v8SetReturnValueNull(info); |
| 1558 return; | 1558 return; |
| 1559 } | 1559 } |
| 1560 v8SetReturnValueInt(info, cppValue); | 1560 v8SetReturnValueInt(info, cppValue); |
| 1561 } | 1561 } |
| 1562 | 1562 |
| 1563 static void longOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1563 static void longOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1564 { | 1564 { |
| 1565 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1565 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1566 TestObjectV8Internal::longOrNullAttributeAttributeGetter(info); | 1566 TestObjectV8Internal::longOrNullAttributeAttributeGetter(info); |
| 1567 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1567 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1568 } | 1568 } |
| 1569 | 1569 |
| 1570 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1570 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 1571 { | 1571 { |
| 1572 v8::Handle<v8::Object> holder = info.Holder(); | 1572 v8::Handle<v8::Object> holder = info.Holder(); |
| 1573 ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttr
ibute", "TestObject", holder, info.GetIsolate()); | 1573 ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttr
ibute", "TestObject", holder, info.GetIsolate()); |
| 1574 TestObject* impl = V8TestObject::toNative(holder); | 1574 TestObject* impl = V8TestObject::toImpl(holder); |
| 1575 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 1575 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 1576 impl->setLongOrNullAttribute(cppValue); | 1576 impl->setLongOrNullAttribute(cppValue); |
| 1577 } | 1577 } |
| 1578 | 1578 |
| 1579 static void longOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1579 static void longOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1580 { | 1580 { |
| 1581 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1581 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1582 TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info); | 1582 TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info); |
| 1583 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1583 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1584 } | 1584 } |
| 1585 | 1585 |
| 1586 static void testInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 1586 static void testInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 1587 { | 1587 { |
| 1588 v8::Handle<v8::Object> holder = info.Holder(); | 1588 v8::Handle<v8::Object> holder = info.Holder(); |
| 1589 TestObject* impl = V8TestObject::toNative(holder); | 1589 TestObject* impl = V8TestObject::toImpl(holder); |
| 1590 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceOrNullAttribute())
, impl); | 1590 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceOrNullAttribute())
, impl); |
| 1591 } | 1591 } |
| 1592 | 1592 |
| 1593 static void testInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1593 static void testInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1594 { | 1594 { |
| 1595 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1595 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1596 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetter(info); | 1596 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetter(info); |
| 1597 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1597 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1598 } | 1598 } |
| 1599 | 1599 |
| 1600 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | 1600 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 1601 { | 1601 { |
| 1602 v8::Handle<v8::Object> holder = info.Holder(); | 1602 v8::Handle<v8::Object> holder = info.Holder(); |
| 1603 TestObject* impl = V8TestObject::toNative(holder); | 1603 TestObject* impl = V8TestObject::toImpl(holder); |
| 1604 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); | 1604 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); |
| 1605 impl->setTestInterfaceOrNullAttribute(WTF::getPtr(cppValue)); | 1605 impl->setTestInterfaceOrNullAttribute(WTF::getPtr(cppValue)); |
| 1606 } | 1606 } |
| 1607 | 1607 |
| 1608 static void testInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1608 static void testInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1609 { | 1609 { |
| 1610 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1610 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1611 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, i
nfo); | 1611 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, i
nfo); |
| 1612 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1612 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1613 } | 1613 } |
| 1614 | 1614 |
| 1615 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 1615 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 1616 { | 1616 { |
| 1617 v8::Handle<v8::Object> holder = info.Holder(); | 1617 v8::Handle<v8::Object> holder = info.Holder(); |
| 1618 TestObject* impl = V8TestObject::toNative(holder); | 1618 TestObject* impl = V8TestObject::toImpl(holder); |
| 1619 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); | 1619 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); |
| 1620 } | 1620 } |
| 1621 | 1621 |
| 1622 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 1622 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 1623 { | 1623 { |
| 1624 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1624 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1625 TestObjectV8Internal::testEnumAttributeAttributeGetter(info); | 1625 TestObjectV8Internal::testEnumAttributeAttributeGetter(info); |
| 1626 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1626 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1627 } | 1627 } |
| 1628 | 1628 |
| 1629 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 1629 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 1630 { | 1630 { |
| 1631 v8::Handle<v8::Object> holder = info.Holder(); | 1631 v8::Handle<v8::Object> holder = info.Holder(); |
| 1632 TestObject* impl = V8TestObject::toNative(holder); | 1632 TestObject* impl = V8TestObject::toImpl(holder); |
| 1633 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 1633 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 1634 String string = cppValue; | 1634 String string = cppValue; |
| 1635 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 1635 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
| 1636 return; | 1636 return; |
| 1637 impl->setTestEnumAttribute(cppValue); | 1637 impl->setTestEnumAttribute(cppValue); |
| 1638 } | 1638 } |
| 1639 | 1639 |
| 1640 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1640 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1641 { | 1641 { |
| 1642 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1642 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1691 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1692 { | 1692 { |
| 1693 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1693 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1694 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info); | 1694 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info); |
| 1695 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1695 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1696 } | 1696 } |
| 1697 | 1697 |
| 1698 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1698 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1699 { | 1699 { |
| 1700 v8::Handle<v8::Object> holder = info.Holder(); | 1700 v8::Handle<v8::Object> holder = info.Holder(); |
| 1701 TestObject* impl = V8TestObject::toNative(holder); | 1701 TestObject* impl = V8TestObject::toImpl(holder); |
| 1702 EventListener* cppValue(impl->eventHandlerAttribute()); | 1702 EventListener* cppValue(impl->eventHandlerAttribute()); |
| 1703 v8SetReturnValue(info, cppValue ? v8::Handle<v8::Value>(V8AbstractEventListe
ner::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Handle<v
8::Value>(v8::Null(info.GetIsolate()))); | 1703 v8SetReturnValue(info, cppValue ? v8::Handle<v8::Value>(V8AbstractEventListe
ner::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Handle<v
8::Value>(v8::Null(info.GetIsolate()))); |
| 1704 } | 1704 } |
| 1705 | 1705 |
| 1706 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1706 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1707 { | 1707 { |
| 1708 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1708 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1709 TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info); | 1709 TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info); |
| 1710 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1710 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1711 } | 1711 } |
| 1712 | 1712 |
| 1713 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1713 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1714 { | 1714 { |
| 1715 v8::Handle<v8::Object> holder = info.Holder(); | 1715 v8::Handle<v8::Object> holder = info.Holder(); |
| 1716 TestObject* impl = V8TestObject::toNative(holder); | 1716 TestObject* impl = V8TestObject::toImpl(holder); |
| 1717 moveEventListenerToNewWrapper(holder, impl->eventHandlerAttribute(), v8Value
, V8TestObject::eventListenerCacheIndex, info.GetIsolate()); | 1717 moveEventListenerToNewWrapper(holder, impl->eventHandlerAttribute(), v8Value
, V8TestObject::eventListenerCacheIndex, info.GetIsolate()); |
| 1718 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS
tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)); | 1718 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS
tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)); |
| 1719 } | 1719 } |
| 1720 | 1720 |
| 1721 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1721 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1722 { | 1722 { |
| 1723 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1723 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1724 TestObjectV8Internal::eventHandlerAttributeAttributeSetter(v8Value, info); | 1724 TestObjectV8Internal::eventHandlerAttributeAttributeSetter(v8Value, info); |
| 1725 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1725 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1726 } | 1726 } |
| 1727 | 1727 |
| 1728 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 1728 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1729 { | 1729 { |
| 1730 v8::Handle<v8::Object> holder = info.Holder(); | 1730 v8::Handle<v8::Object> holder = info.Holder(); |
| 1731 TestObject* impl = V8TestObject::toNative(holder); | 1731 TestObject* impl = V8TestObject::toImpl(holder); |
| 1732 v8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribu
te()); | 1732 v8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribu
te()); |
| 1733 } | 1733 } |
| 1734 | 1734 |
| 1735 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1735 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1736 { | 1736 { |
| 1737 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1737 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1738 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 1738 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 1739 V8PerContextData* contextData = scriptState->perContextData(); | 1739 V8PerContextData* contextData = scriptState->perContextData(); |
| 1740 if (contextData && contextData->activityLogger()) | 1740 if (contextData && contextData->activityLogger()) |
| 1741 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute"); | 1741 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute"); |
| 1742 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eGetter(info); | 1742 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eGetter(info); |
| 1743 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1743 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1744 } | 1744 } |
| 1745 | 1745 |
| 1746 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1746 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1747 { | 1747 { |
| 1748 v8::Handle<v8::Object> holder = info.Holder(); | 1748 v8::Handle<v8::Object> holder = info.Holder(); |
| 1749 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 1749 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 1750 TestObject* impl = V8TestObject::toNative(holder); | 1750 TestObject* impl = V8TestObject::toImpl(holder); |
| 1751 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 1751 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 1752 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); | 1752 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | 1755 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) |
| 1756 { | 1756 { |
| 1757 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1757 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1758 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 1758 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 1759 V8PerContextData* contextData = scriptState->perContextData(); | 1759 V8PerContextData* contextData = scriptState->perContextData(); |
| 1760 if (contextData && contextData->activityLogger()) { | 1760 if (contextData && contextData->activityLogger()) { |
| 1761 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute", v8Value); | 1761 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssForAllWorldsLongAttribute", v8Value); |
| 1762 } | 1762 } |
| 1763 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | 1763 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); |
| 1764 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1764 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1765 } | 1765 } |
| 1766 | 1766 |
| 1767 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 1767 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1768 { | 1768 { |
| 1769 v8::Handle<v8::Object> holder = info.Holder(); | 1769 v8::Handle<v8::Object> holder = info.Holder(); |
| 1770 TestObject* impl = V8TestObject::toNative(holder); | 1770 TestObject* impl = V8TestObject::toImpl(holder); |
| 1771 v8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribu
te()); | 1771 v8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribu
te()); |
| 1772 } | 1772 } |
| 1773 | 1773 |
| 1774 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1774 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1775 { | 1775 { |
| 1776 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1776 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1777 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 1777 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 1778 V8PerContextData* contextData = scriptState->perContextData(); | 1778 V8PerContextData* contextData = scriptState->perContextData(); |
| 1779 if (contextData && contextData->activityLogger()) | 1779 if (contextData && contextData->activityLogger()) |
| 1780 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForAllWorldsLongAttribute"); | 1780 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForAllWorldsLongAttribute"); |
| 1781 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eGetter(info); | 1781 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eGetter(info); |
| 1782 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1782 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1783 } | 1783 } |
| 1784 | 1784 |
| 1785 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1785 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1786 { | 1786 { |
| 1787 v8::Handle<v8::Object> holder = info.Holder(); | 1787 v8::Handle<v8::Object> holder = info.Holder(); |
| 1788 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 1788 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 1789 TestObject* impl = V8TestObject::toNative(holder); | 1789 TestObject* impl = V8TestObject::toImpl(holder); |
| 1790 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 1790 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 1791 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); | 1791 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); |
| 1792 } | 1792 } |
| 1793 | 1793 |
| 1794 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | 1794 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) |
| 1795 { | 1795 { |
| 1796 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1796 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1797 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | 1797 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); |
| 1798 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1798 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1799 } | 1799 } |
| 1800 | 1800 |
| 1801 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 1801 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1802 { | 1802 { |
| 1803 v8::Handle<v8::Object> holder = info.Holder(); | 1803 v8::Handle<v8::Object> holder = info.Holder(); |
| 1804 TestObject* impl = V8TestObject::toNative(holder); | 1804 TestObject* impl = V8TestObject::toImpl(holder); |
| 1805 v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribu
te()); | 1805 v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribu
te()); |
| 1806 } | 1806 } |
| 1807 | 1807 |
| 1808 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1808 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1809 { | 1809 { |
| 1810 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1810 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1811 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eGetter(info); | 1811 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eGetter(info); |
| 1812 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1812 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1813 } | 1813 } |
| 1814 | 1814 |
| 1815 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1815 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1816 { | 1816 { |
| 1817 v8::Handle<v8::Object> holder = info.Holder(); | 1817 v8::Handle<v8::Object> holder = info.Holder(); |
| 1818 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 1818 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 1819 TestObject* impl = V8TestObject::toNative(holder); | 1819 TestObject* impl = V8TestObject::toImpl(holder); |
| 1820 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 1820 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 1821 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); | 1821 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); |
| 1822 } | 1822 } |
| 1823 | 1823 |
| 1824 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | 1824 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) |
| 1825 { | 1825 { |
| 1826 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1826 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1827 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 1827 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 1828 V8PerContextData* contextData = scriptState->perContextData(); | 1828 V8PerContextData* contextData = scriptState->perContextData(); |
| 1829 if (contextData && contextData->activityLogger()) { | 1829 if (contextData && contextData->activityLogger()) { |
| 1830 contextData->activityLogger()->logSetter("TestObject.activityLoggingSett
erForAllWorldsLongAttribute", v8Value); | 1830 contextData->activityLogger()->logSetter("TestObject.activityLoggingSett
erForAllWorldsLongAttribute", v8Value); |
| 1831 } | 1831 } |
| 1832 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | 1832 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); |
| 1833 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1833 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1834 } | 1834 } |
| 1835 | 1835 |
| 1836 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1836 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 1837 { | 1837 { |
| 1838 v8::Handle<v8::Object> holder = info.Holder(); | 1838 v8::Handle<v8::Object> holder = info.Holder(); |
| 1839 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedAttributeAnyAttribute"); | 1839 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedAttributeAnyAttribute"); |
| 1840 TestObject* impl = V8TestObject::toNative(holder); | 1840 TestObject* impl = V8TestObject::toImpl(holder); |
| 1841 if (!impl->isValueDirty()) { | 1841 if (!impl->isValueDirty()) { |
| 1842 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | 1842 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); |
| 1843 if (!v8Value.IsEmpty()) { | 1843 if (!v8Value.IsEmpty()) { |
| 1844 v8SetReturnValue(info, v8Value); | 1844 v8SetReturnValue(info, v8Value); |
| 1845 return; | 1845 return; |
| 1846 } | 1846 } |
| 1847 } | 1847 } |
| 1848 ScriptValue cppValue(impl->cachedAttributeAnyAttribute()); | 1848 ScriptValue cppValue(impl->cachedAttributeAnyAttribute()); |
| 1849 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); | 1849 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); |
| 1850 v8SetReturnValue(info, cppValue.v8Value()); | 1850 v8SetReturnValue(info, cppValue.v8Value()); |
| 1851 } | 1851 } |
| 1852 | 1852 |
| 1853 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1853 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1854 { | 1854 { |
| 1855 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1855 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1856 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info); | 1856 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info); |
| 1857 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1857 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1858 } | 1858 } |
| 1859 | 1859 |
| 1860 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 1860 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 1861 { | 1861 { |
| 1862 v8::Handle<v8::Object> holder = info.Holder(); | 1862 v8::Handle<v8::Object> holder = info.Holder(); |
| 1863 TestObject* impl = V8TestObject::toNative(holder); | 1863 TestObject* impl = V8TestObject::toImpl(holder); |
| 1864 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | 1864 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); |
| 1865 impl->setCachedAttributeAnyAttribute(cppValue); | 1865 impl->setCachedAttributeAnyAttribute(cppValue); |
| 1866 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeAnyAttribute")); // Invalidate the cached valu
e. | 1866 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeAnyAttribute")); // Invalidate the cached valu
e. |
| 1867 } | 1867 } |
| 1868 | 1868 |
| 1869 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1869 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1870 { | 1870 { |
| 1871 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1871 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1872 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetter(v8Value, in
fo); | 1872 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetter(v8Value, in
fo); |
| 1873 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1873 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1874 } | 1874 } |
| 1875 | 1875 |
| 1876 static void cachedArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1876 static void cachedArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 1877 { | 1877 { |
| 1878 v8::Handle<v8::Object> holder = info.Holder(); | 1878 v8::Handle<v8::Object> holder = info.Holder(); |
| 1879 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedArrayAttribute"); | 1879 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedArrayAttribute"); |
| 1880 TestObject* impl = V8TestObject::toNative(holder); | 1880 TestObject* impl = V8TestObject::toImpl(holder); |
| 1881 if (!impl->isArrayDirty()) { | 1881 if (!impl->isArrayDirty()) { |
| 1882 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | 1882 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); |
| 1883 if (!v8Value.IsEmpty()) { | 1883 if (!v8Value.IsEmpty()) { |
| 1884 v8SetReturnValue(info, v8Value); | 1884 v8SetReturnValue(info, v8Value); |
| 1885 return; | 1885 return; |
| 1886 } | 1886 } |
| 1887 } | 1887 } |
| 1888 Vector<String> cppValue(impl->cachedArrayAttribute()); | 1888 Vector<String> cppValue(impl->cachedArrayAttribute()); |
| 1889 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Arr
ay(cppValue, info.Holder(), info.GetIsolate())); | 1889 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Arr
ay(cppValue, info.Holder(), info.GetIsolate())); |
| 1890 v8SetReturnValue(info, v8Array(cppValue, info.Holder(), info.GetIsolate())); | 1890 v8SetReturnValue(info, v8Array(cppValue, info.Holder(), info.GetIsolate())); |
| 1891 } | 1891 } |
| 1892 | 1892 |
| 1893 static void cachedArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1893 static void cachedArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 1894 { | 1894 { |
| 1895 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1895 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1896 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info); | 1896 TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info); |
| 1897 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1897 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1898 } | 1898 } |
| 1899 | 1899 |
| 1900 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 1900 static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 1901 { | 1901 { |
| 1902 v8::Handle<v8::Object> holder = info.Holder(); | 1902 v8::Handle<v8::Object> holder = info.Holder(); |
| 1903 TestObject* impl = V8TestObject::toNative(holder); | 1903 TestObject* impl = V8TestObject::toImpl(holder); |
| 1904 TONATIVE_VOID(Vector<String>, cppValue, toNativeArray<String>(v8Value, 0, in
fo.GetIsolate())); | 1904 TONATIVE_VOID(Vector<String>, cppValue, toImplArray<String>(v8Value, 0, info
.GetIsolate())); |
| 1905 impl->setCachedArrayAttribute(cppValue); | 1905 impl->setCachedArrayAttribute(cppValue); |
| 1906 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedArrayAttribute")); // Invalidate the cached value. | 1906 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedArrayAttribute")); // Invalidate the cached value. |
| 1907 } | 1907 } |
| 1908 | 1908 |
| 1909 static void cachedArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1909 static void cachedArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1910 { | 1910 { |
| 1911 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1911 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1912 TestObjectV8Internal::cachedArrayAttributeAttributeSetter(v8Value, info); | 1912 TestObjectV8Internal::cachedArrayAttributeAttributeSetter(v8Value, info); |
| 1913 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1913 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1914 } | 1914 } |
| 1915 | 1915 |
| 1916 static void cachedStringOrNoneAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1916 static void cachedStringOrNoneAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 1917 { | 1917 { |
| 1918 v8::Handle<v8::Object> holder = info.Holder(); | 1918 v8::Handle<v8::Object> holder = info.Holder(); |
| 1919 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedStringOrNoneAttribute"); | 1919 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedStringOrNoneAttribute"); |
| 1920 TestObject* impl = V8TestObject::toNative(holder); | 1920 TestObject* impl = V8TestObject::toImpl(holder); |
| 1921 if (!impl->isStringDirty()) { | 1921 if (!impl->isStringDirty()) { |
| 1922 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | 1922 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); |
| 1923 if (!v8Value.IsEmpty()) { | 1923 if (!v8Value.IsEmpty()) { |
| 1924 v8SetReturnValue(info, v8Value); | 1924 v8SetReturnValue(info, v8Value); |
| 1925 return; | 1925 return; |
| 1926 } | 1926 } |
| 1927 } | 1927 } |
| 1928 String cppValue(impl->cachedStringOrNoneAttribute()); | 1928 String cppValue(impl->cachedStringOrNoneAttribute()); |
| 1929 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8::Handle<v8::Value>(v8::Null(info.GetIsolate())) : v8String(inf
o.GetIsolate(), cppValue)); | 1929 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8::Handle<v8::Value>(v8::Null(info.GetIsolate())) : v8String(inf
o.GetIsolate(), cppValue)); |
| 1930 v8SetReturnValueStringOrNull(info, cppValue, info.GetIsolate()); | 1930 v8SetReturnValueStringOrNull(info, cppValue, info.GetIsolate()); |
| 1931 } | 1931 } |
| 1932 | 1932 |
| 1933 static void cachedStringOrNoneAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1933 static void cachedStringOrNoneAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1934 { | 1934 { |
| 1935 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1935 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1936 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info); | 1936 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info); |
| 1937 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1937 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1938 } | 1938 } |
| 1939 | 1939 |
| 1940 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 1940 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 1941 { | 1941 { |
| 1942 v8::Handle<v8::Object> holder = info.Holder(); | 1942 v8::Handle<v8::Object> holder = info.Holder(); |
| 1943 TestObject* impl = V8TestObject::toNative(holder); | 1943 TestObject* impl = V8TestObject::toImpl(holder); |
| 1944 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); | 1944 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); |
| 1945 impl->setCachedStringOrNoneAttribute(cppValue); | 1945 impl->setCachedStringOrNoneAttribute(cppValue); |
| 1946 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedStringOrNoneAttribute")); // Invalidate the cached valu
e. | 1946 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedStringOrNoneAttribute")); // Invalidate the cached valu
e. |
| 1947 } | 1947 } |
| 1948 | 1948 |
| 1949 static void cachedStringOrNoneAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1949 static void cachedStringOrNoneAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1950 { | 1950 { |
| 1951 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1951 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1952 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetter(v8Value, in
fo); | 1952 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetter(v8Value, in
fo); |
| 1953 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1953 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1954 } | 1954 } |
| 1955 | 1955 |
| 1956 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) | 1956 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 1957 { | 1957 { |
| 1958 v8::Handle<v8::Object> holder = info.Holder(); | 1958 v8::Handle<v8::Object> holder = info.Holder(); |
| 1959 TestObject* impl = V8TestObject::toNative(holder); | 1959 TestObject* impl = V8TestObject::toImpl(holder); |
| 1960 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 1960 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 1961 v8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(executionC
ontext).v8Value()); | 1961 v8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(executionC
ontext).v8Value()); |
| 1962 } | 1962 } |
| 1963 | 1963 |
| 1964 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1964 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1965 { | 1965 { |
| 1966 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1966 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1967 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(in
fo); | 1967 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(in
fo); |
| 1968 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1968 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1969 } | 1969 } |
| 1970 | 1970 |
| 1971 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1971 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1972 { | 1972 { |
| 1973 v8::Handle<v8::Object> holder = info.Holder(); | 1973 v8::Handle<v8::Object> holder = info.Holder(); |
| 1974 TestObject* impl = V8TestObject::toNative(holder); | 1974 TestObject* impl = V8TestObject::toImpl(holder); |
| 1975 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | 1975 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); |
| 1976 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 1976 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 1977 impl->setCallWithExecutionContextAnyAttribute(executionContext, cppValue); | 1977 impl->setCallWithExecutionContextAnyAttribute(executionContext, cppValue); |
| 1978 } | 1978 } |
| 1979 | 1979 |
| 1980 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | 1980 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 1981 { | 1981 { |
| 1982 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1982 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 1983 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(v8
Value, info); | 1983 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(v8
Value, info); |
| 1984 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1984 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1985 } | 1985 } |
| 1986 | 1986 |
| 1987 static void callWithScriptStateAnyAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 1987 static void callWithScriptStateAnyAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 1988 { | 1988 { |
| 1989 v8::Handle<v8::Object> holder = info.Holder(); | 1989 v8::Handle<v8::Object> holder = info.Holder(); |
| 1990 TestObject* impl = V8TestObject::toNative(holder); | 1990 TestObject* impl = V8TestObject::toImpl(holder); |
| 1991 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 1991 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 1992 v8SetReturnValue(info, impl->callWithScriptStateAnyAttribute(scriptState).v8
Value()); | 1992 v8SetReturnValue(info, impl->callWithScriptStateAnyAttribute(scriptState).v8
Value()); |
| 1993 } | 1993 } |
| 1994 | 1994 |
| 1995 static void callWithScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1995 static void callWithScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1996 { | 1996 { |
| 1997 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1997 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 1998 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetter(info); | 1998 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetter(info); |
| 1999 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1999 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2000 } | 2000 } |
| 2001 | 2001 |
| 2002 static void callWithScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 2002 static void callWithScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2003 { | 2003 { |
| 2004 v8::Handle<v8::Object> holder = info.Holder(); | 2004 v8::Handle<v8::Object> holder = info.Holder(); |
| 2005 TestObject* impl = V8TestObject::toNative(holder); | 2005 TestObject* impl = V8TestObject::toImpl(holder); |
| 2006 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | 2006 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); |
| 2007 impl->setCallWithScriptStateAnyAttribute(scriptState, cppValue); | 2007 impl->setCallWithScriptStateAnyAttribute(scriptState, cppValue); |
| 2008 } | 2008 } |
| 2009 | 2009 |
| 2010 static void callWithScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 2010 static void callWithScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 2011 { | 2011 { |
| 2012 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2012 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2013 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetter(v8Value
, info); | 2013 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetter(v8Value
, info); |
| 2014 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2014 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2015 } | 2015 } |
| 2016 | 2016 |
| 2017 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2017 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2018 { | 2018 { |
| 2019 v8::Handle<v8::Object> holder = info.Holder(); | 2019 v8::Handle<v8::Object> holder = info.Holder(); |
| 2020 TestObject* impl = V8TestObject::toNative(holder); | 2020 TestObject* impl = V8TestObject::toImpl(holder); |
| 2021 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 2021 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 2022 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 2022 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 2023 v8SetReturnValue(info, impl->callWithExecutionContextAndScriptStateAnyAttrib
ute(scriptState, executionContext).v8Value()); | 2023 v8SetReturnValue(info, impl->callWithExecutionContextAndScriptStateAnyAttrib
ute(scriptState, executionContext).v8Value()); |
| 2024 } | 2024 } |
| 2025 | 2025 |
| 2026 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2026 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2027 { | 2027 { |
| 2028 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2028 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2029 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteGetter(info); | 2029 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteGetter(info); |
| 2030 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2030 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2031 } | 2031 } |
| 2032 | 2032 |
| 2033 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2033 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2034 { | 2034 { |
| 2035 v8::Handle<v8::Object> holder = info.Holder(); | 2035 v8::Handle<v8::Object> holder = info.Holder(); |
| 2036 TestObject* impl = V8TestObject::toNative(holder); | 2036 TestObject* impl = V8TestObject::toImpl(holder); |
| 2037 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | 2037 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); |
| 2038 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 2038 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 2039 impl->setCallWithExecutionContextAndScriptStateAnyAttribute(scriptState, exe
cutionContext, cppValue); | 2039 impl->setCallWithExecutionContextAndScriptStateAnyAttribute(scriptState, exe
cutionContext, cppValue); |
| 2040 } | 2040 } |
| 2041 | 2041 |
| 2042 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | 2042 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) |
| 2043 { | 2043 { |
| 2044 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2044 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2045 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteSetter(v8Value, info); | 2045 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttr
ibuteSetter(v8Value, info); |
| 2046 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2046 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2047 } | 2047 } |
| 2048 | 2048 |
| 2049 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | 2049 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 2050 { | 2050 { |
| 2051 v8::Handle<v8::Object> holder = info.Holder(); | 2051 v8::Handle<v8::Object> holder = info.Holder(); |
| 2052 TestObject* impl = V8TestObject::toNative(holder); | 2052 TestObject* impl = V8TestObject::toImpl(holder); |
| 2053 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF
orNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); | 2053 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF
orNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); |
| 2054 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check
SecurityForNodeReadonlyDocumentAttribute(), exceptionState)) { | 2054 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check
SecurityForNodeReadonlyDocumentAttribute(), exceptionState)) { |
| 2055 v8SetReturnValueNull(info); | 2055 v8SetReturnValueNull(info); |
| 2056 exceptionState.throwIfNeeded(); | 2056 exceptionState.throwIfNeeded(); |
| 2057 return; | 2057 return; |
| 2058 } | 2058 } |
| 2059 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc
umentAttribute()), impl); | 2059 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc
umentAttribute()), impl); |
| 2060 } | 2060 } |
| 2061 | 2061 |
| 2062 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2062 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2063 { | 2063 { |
| 2064 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2064 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2065 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttribute
Getter(info); | 2065 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttribute
Getter(info); |
| 2066 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2066 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2067 } | 2067 } |
| 2068 | 2068 |
| 2069 #if ENABLE(CONDITION) | 2069 #if ENABLE(CONDITION) |
| 2070 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 2070 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
| 2071 { | 2071 { |
| 2072 v8::Handle<v8::Object> holder = info.Holder(); | 2072 v8::Handle<v8::Object> holder = info.Holder(); |
| 2073 TestObject* impl = V8TestObject::toNative(holder); | 2073 TestObject* impl = V8TestObject::toImpl(holder); |
| 2074 v8SetReturnValueInt(info, impl->conditionalLongAttribute()); | 2074 v8SetReturnValueInt(info, impl->conditionalLongAttribute()); |
| 2075 } | 2075 } |
| 2076 #endif // ENABLE(CONDITION) | 2076 #endif // ENABLE(CONDITION) |
| 2077 | 2077 |
| 2078 #if ENABLE(CONDITION) | 2078 #if ENABLE(CONDITION) |
| 2079 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2079 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2080 { | 2080 { |
| 2081 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2081 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2082 TestObjectV8Internal::conditionalLongAttributeAttributeGetter(info); | 2082 TestObjectV8Internal::conditionalLongAttributeAttributeGetter(info); |
| 2083 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2083 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2084 } | 2084 } |
| 2085 #endif // ENABLE(CONDITION) | 2085 #endif // ENABLE(CONDITION) |
| 2086 | 2086 |
| 2087 #if ENABLE(CONDITION) | 2087 #if ENABLE(CONDITION) |
| 2088 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | 2088 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) |
| 2089 { | 2089 { |
| 2090 v8::Handle<v8::Object> holder = info.Holder(); | 2090 v8::Handle<v8::Object> holder = info.Holder(); |
| 2091 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon
gAttribute", "TestObject", holder, info.GetIsolate()); | 2091 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon
gAttribute", "TestObject", holder, info.GetIsolate()); |
| 2092 TestObject* impl = V8TestObject::toNative(holder); | 2092 TestObject* impl = V8TestObject::toImpl(holder); |
| 2093 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2093 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2094 impl->setConditionalLongAttribute(cppValue); | 2094 impl->setConditionalLongAttribute(cppValue); |
| 2095 } | 2095 } |
| 2096 #endif // ENABLE(CONDITION) | 2096 #endif // ENABLE(CONDITION) |
| 2097 | 2097 |
| 2098 #if ENABLE(CONDITION) | 2098 #if ENABLE(CONDITION) |
| 2099 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2099 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2100 { | 2100 { |
| 2101 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2101 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2102 TestObjectV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info)
; | 2102 TestObjectV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info)
; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2122 { | 2122 { |
| 2123 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2123 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2124 V8TestObject::customGetterLongAttributeAttributeGetterCustom(info); | 2124 V8TestObject::customGetterLongAttributeAttributeGetterCustom(info); |
| 2125 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2125 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2126 } | 2126 } |
| 2127 | 2127 |
| 2128 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 2128 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 2129 { | 2129 { |
| 2130 v8::Handle<v8::Object> holder = info.Holder(); | 2130 v8::Handle<v8::Object> holder = info.Holder(); |
| 2131 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | 2131 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLo
ngAttribute", "TestObject", holder, info.GetIsolate()); |
| 2132 TestObject* impl = V8TestObject::toNative(holder); | 2132 TestObject* impl = V8TestObject::toImpl(holder); |
| 2133 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2133 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2134 impl->setCustomGetterLongAttribute(cppValue); | 2134 impl->setCustomGetterLongAttribute(cppValue); |
| 2135 } | 2135 } |
| 2136 | 2136 |
| 2137 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2137 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2138 { | 2138 { |
| 2139 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2139 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2140 TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info
); | 2140 TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info
); |
| 2141 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2141 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2142 } | 2142 } |
| 2143 | 2143 |
| 2144 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2144 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2145 { | 2145 { |
| 2146 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2146 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2147 V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCustom(info)
; | 2147 V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCustom(info)
; |
| 2148 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2148 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2149 } | 2149 } |
| 2150 | 2150 |
| 2151 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2151 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 2152 { | 2152 { |
| 2153 v8::Handle<v8::Object> holder = info.Holder(); | 2153 v8::Handle<v8::Object> holder = info.Holder(); |
| 2154 TestObject* impl = V8TestObject::toNative(holder); | 2154 TestObject* impl = V8TestObject::toImpl(holder); |
| 2155 v8SetReturnValueInt(info, impl->customSetterLongAttribute()); | 2155 v8SetReturnValueInt(info, impl->customSetterLongAttribute()); |
| 2156 } | 2156 } |
| 2157 | 2157 |
| 2158 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2158 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2159 { | 2159 { |
| 2160 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2160 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2161 TestObjectV8Internal::customSetterLongAttributeAttributeGetter(info); | 2161 TestObjectV8Internal::customSetterLongAttributeAttributeGetter(info); |
| 2162 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2162 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2163 } | 2163 } |
| 2164 | 2164 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2183 { | 2183 { |
| 2184 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2184 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2185 V8TestObject::customLongAttributeAttributeSetterCustom(v8Value, info); | 2185 V8TestObject::customLongAttributeAttributeSetterCustom(v8Value, info); |
| 2186 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2186 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2187 } | 2187 } |
| 2188 #endif // ENABLE(CONDITION) | 2188 #endif // ENABLE(CONDITION) |
| 2189 | 2189 |
| 2190 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 2190 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 2191 { | 2191 { |
| 2192 v8::Handle<v8::Object> holder = info.Holder(); | 2192 v8::Handle<v8::Object> holder = info.Holder(); |
| 2193 TestObject* impl = V8TestObject::toNative(holder); | 2193 TestObject* impl = V8TestObject::toImpl(holder); |
| 2194 v8SetReturnValueInt(info, impl->customElementsCallbacksReadonlyLongAttribute
()); | 2194 v8SetReturnValueInt(info, impl->customElementsCallbacksReadonlyLongAttribute
()); |
| 2195 } | 2195 } |
| 2196 | 2196 |
| 2197 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2197 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2198 { | 2198 { |
| 2199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2200 TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeG
etter(info); | 2200 TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeG
etter(info); |
| 2201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2202 } | 2202 } |
| 2203 | 2203 |
| 2204 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 2204 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 2205 { | 2205 { |
| 2206 v8::Handle<v8::Object> holder = info.Holder(); | 2206 v8::Handle<v8::Object> holder = info.Holder(); |
| 2207 TestObject* impl = V8TestObject::toNative(holder); | 2207 TestObject* impl = V8TestObject::toImpl(holder); |
| 2208 v8SetReturnValueInt(info, impl->deprecatedLongAttribute()); | 2208 v8SetReturnValueInt(info, impl->deprecatedLongAttribute()); |
| 2209 } | 2209 } |
| 2210 | 2210 |
| 2211 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 2211 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2212 { | 2212 { |
| 2213 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2213 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2214 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::LongAttribute); | 2214 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::LongAttribute); |
| 2215 TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info); | 2215 TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info); |
| 2216 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2216 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2217 } | 2217 } |
| 2218 | 2218 |
| 2219 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 2219 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 2220 { | 2220 { |
| 2221 v8::Handle<v8::Object> holder = info.Holder(); | 2221 v8::Handle<v8::Object> holder = info.Holder(); |
| 2222 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLong
Attribute", "TestObject", holder, info.GetIsolate()); | 2222 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLong
Attribute", "TestObject", holder, info.GetIsolate()); |
| 2223 TestObject* impl = V8TestObject::toNative(holder); | 2223 TestObject* impl = V8TestObject::toImpl(holder); |
| 2224 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2224 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2225 impl->setDeprecatedLongAttribute(cppValue); | 2225 impl->setDeprecatedLongAttribute(cppValue); |
| 2226 } | 2226 } |
| 2227 | 2227 |
| 2228 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2228 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2229 { | 2229 { |
| 2230 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2230 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2231 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::LongAttribute); | 2231 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::LongAttribute); |
| 2232 TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info); | 2232 TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info); |
| 2233 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2233 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2234 } | 2234 } |
| 2235 | 2235 |
| 2236 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2236 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 2237 { | 2237 { |
| 2238 v8::Handle<v8::Object> holder = info.Holder(); | 2238 v8::Handle<v8::Object> holder = info.Holder(); |
| 2239 TestObject* impl = V8TestObject::toNative(holder); | 2239 TestObject* impl = V8TestObject::toImpl(holder); |
| 2240 v8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); | 2240 v8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); |
| 2241 } | 2241 } |
| 2242 | 2242 |
| 2243 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2243 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2244 { | 2244 { |
| 2245 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2245 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2246 TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info); | 2246 TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info); |
| 2247 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2247 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2248 } | 2248 } |
| 2249 | 2249 |
| 2250 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 2250 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 2251 { | 2251 { |
| 2252 v8::Handle<v8::Object> holder = info.Holder(); | 2252 v8::Handle<v8::Object> holder = info.Holder(); |
| 2253 ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | 2253 ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLo
ngAttribute", "TestObject", holder, info.GetIsolate()); |
| 2254 TestObject* impl = V8TestObject::toNative(holder); | 2254 TestObject* impl = V8TestObject::toImpl(holder); |
| 2255 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, EnforceRange, e
xceptionState), exceptionState); | 2255 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, EnforceRange, e
xceptionState), exceptionState); |
| 2256 impl->setEnforceRangeLongAttribute(cppValue); | 2256 impl->setEnforceRangeLongAttribute(cppValue); |
| 2257 } | 2257 } |
| 2258 | 2258 |
| 2259 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2259 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2260 { | 2260 { |
| 2261 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2261 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2262 TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info
); | 2262 TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info
); |
| 2263 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2263 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2264 } | 2264 } |
| 2265 | 2265 |
| 2266 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::FunctionCall
backInfo<v8::Value>& info) | 2266 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 2267 { | 2267 { |
| 2268 v8::Handle<v8::Object> holder = info.Holder(); | 2268 v8::Handle<v8::Object> holder = info.Holder(); |
| 2269 TestObject* impl = V8TestObject::toNative(holder); | 2269 TestObject* impl = V8TestObject::toImpl(holder); |
| 2270 v8SetReturnValueInt(info, impl->exposeJSAccessorsLongAttribute()); | 2270 v8SetReturnValueInt(info, impl->exposeJSAccessorsLongAttribute()); |
| 2271 } | 2271 } |
| 2272 | 2272 |
| 2273 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 2273 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 2274 { | 2274 { |
| 2275 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2275 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2276 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(info); | 2276 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(info); |
| 2277 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2277 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2278 } | 2278 } |
| 2279 | 2279 |
| 2280 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 2280 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 2281 { | 2281 { |
| 2282 v8::Handle<v8::Object> holder = info.Holder(); | 2282 v8::Handle<v8::Object> holder = info.Holder(); |
| 2283 ExceptionState exceptionState(ExceptionState::SetterContext, "exposeJSAccess
orsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2283 ExceptionState exceptionState(ExceptionState::SetterContext, "exposeJSAccess
orsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2284 TestObject* impl = V8TestObject::toNative(holder); | 2284 TestObject* impl = V8TestObject::toImpl(holder); |
| 2285 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2285 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2286 impl->setExposeJSAccessorsLongAttribute(cppValue); | 2286 impl->setExposeJSAccessorsLongAttribute(cppValue); |
| 2287 } | 2287 } |
| 2288 | 2288 |
| 2289 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 2289 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 2290 { | 2290 { |
| 2291 v8::Local<v8::Value> v8Value = info[0]; | 2291 v8::Local<v8::Value> v8Value = info[0]; |
| 2292 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2292 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2293 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeSetter(v8Value,
info); | 2293 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeSetter(v8Value,
info); |
| 2294 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2294 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2295 } | 2295 } |
| 2296 | 2296 |
| 2297 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 2297 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 2298 { | 2298 { |
| 2299 v8::Handle<v8::Object> holder = info.Holder(); | 2299 v8::Handle<v8::Object> holder = info.Holder(); |
| 2300 TestObject* impl = V8TestObject::toNative(holder); | 2300 TestObject* impl = V8TestObject::toImpl(holder); |
| 2301 v8SetReturnValueInt(info, impl->implementedAsName()); | 2301 v8SetReturnValueInt(info, impl->implementedAsName()); |
| 2302 } | 2302 } |
| 2303 | 2303 |
| 2304 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2304 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2305 { | 2305 { |
| 2306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2307 TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info); | 2307 TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info); |
| 2308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2309 } | 2309 } |
| 2310 | 2310 |
| 2311 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 2311 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 2312 { | 2312 { |
| 2313 v8::Handle<v8::Object> holder = info.Holder(); | 2313 v8::Handle<v8::Object> holder = info.Holder(); |
| 2314 ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsL
ongAttribute", "TestObject", holder, info.GetIsolate()); | 2314 ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsL
ongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2315 TestObject* impl = V8TestObject::toNative(holder); | 2315 TestObject* impl = V8TestObject::toImpl(holder); |
| 2316 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2316 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2317 impl->setImplementedAsName(cppValue); | 2317 impl->setImplementedAsName(cppValue); |
| 2318 } | 2318 } |
| 2319 | 2319 |
| 2320 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2320 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2321 { | 2321 { |
| 2322 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2322 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2323 TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, inf
o); | 2323 TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, inf
o); |
| 2324 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2324 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2325 } | 2325 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2342 { | 2342 { |
| 2343 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2343 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2344 V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(in
fo); | 2344 V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(in
fo); |
| 2345 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2345 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2346 } | 2346 } |
| 2347 | 2347 |
| 2348 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2348 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2349 { | 2349 { |
| 2350 v8::Handle<v8::Object> holder = info.Holder(); | 2350 v8::Handle<v8::Object> holder = info.Holder(); |
| 2351 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterIm
plementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2351 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterIm
plementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2352 TestObject* impl = V8TestObject::toNative(holder); | 2352 TestObject* impl = V8TestObject::toImpl(holder); |
| 2353 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2353 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2354 impl->setImplementedAsNameWithCustomGetter(cppValue); | 2354 impl->setImplementedAsNameWithCustomGetter(cppValue); |
| 2355 } | 2355 } |
| 2356 | 2356 |
| 2357 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 2357 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
| 2358 { | 2358 { |
| 2359 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2359 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2360 TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(
v8Value, info); | 2360 TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(
v8Value, info); |
| 2361 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2361 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2362 } | 2362 } |
| 2363 | 2363 |
| 2364 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 2364 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 2365 { | 2365 { |
| 2366 v8::Handle<v8::Object> holder = info.Holder(); | 2366 v8::Handle<v8::Object> holder = info.Holder(); |
| 2367 TestObject* impl = V8TestObject::toNative(holder); | 2367 TestObject* impl = V8TestObject::toImpl(holder); |
| 2368 v8SetReturnValueInt(info, impl->implementedAsNameWithCustomGetter()); | 2368 v8SetReturnValueInt(info, impl->implementedAsNameWithCustomGetter()); |
| 2369 } | 2369 } |
| 2370 | 2370 |
| 2371 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2371 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2372 { | 2372 { |
| 2373 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2373 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2374 TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(
info); | 2374 TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(
info); |
| 2375 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2375 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2376 } | 2376 } |
| 2377 | 2377 |
| 2378 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 2378 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
| 2379 { | 2379 { |
| 2380 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2380 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2381 V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCustom(v8
Value, info); | 2381 V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCustom(v8
Value, info); |
| 2382 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2382 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2383 } | 2383 } |
| 2384 | 2384 |
| 2385 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 2385 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 2386 { | 2386 { |
| 2387 v8::Handle<v8::Object> holder = info.Holder(); | 2387 v8::Handle<v8::Object> holder = info.Holder(); |
| 2388 TestObject* impl = V8TestObject::toNative(holder); | 2388 TestObject* impl = V8TestObject::toImpl(holder); |
| 2389 v8SetReturnValueInt(info, impl->measureAsLongAttribute()); | 2389 v8SetReturnValueInt(info, impl->measureAsLongAttribute()); |
| 2390 } | 2390 } |
| 2391 | 2391 |
| 2392 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2392 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2393 { | 2393 { |
| 2394 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2394 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2395 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 2395 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
| 2396 TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info); | 2396 TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info); |
| 2397 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2397 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2398 } | 2398 } |
| 2399 | 2399 |
| 2400 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 2400 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 2401 { | 2401 { |
| 2402 v8::Handle<v8::Object> holder = info.Holder(); | 2402 v8::Handle<v8::Object> holder = info.Holder(); |
| 2403 ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongA
ttribute", "TestObject", holder, info.GetIsolate()); | 2403 ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongA
ttribute", "TestObject", holder, info.GetIsolate()); |
| 2404 TestObject* impl = V8TestObject::toNative(holder); | 2404 TestObject* impl = V8TestObject::toImpl(holder); |
| 2405 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2405 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2406 impl->setMeasureAsLongAttribute(cppValue); | 2406 impl->setMeasureAsLongAttribute(cppValue); |
| 2407 } | 2407 } |
| 2408 | 2408 |
| 2409 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2409 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2410 { | 2410 { |
| 2411 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2411 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2412 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 2412 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
| 2413 TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info); | 2413 TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info); |
| 2414 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2414 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2415 } | 2415 } |
| 2416 | 2416 |
| 2417 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 2417 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 2418 { | 2418 { |
| 2419 v8::Handle<v8::Object> holder = info.Holder(); | 2419 v8::Handle<v8::Object> holder = info.Holder(); |
| 2420 TestObject* impl = V8TestObject::toNative(holder); | 2420 TestObject* impl = V8TestObject::toImpl(holder); |
| 2421 v8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); | 2421 v8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); |
| 2422 } | 2422 } |
| 2423 | 2423 |
| 2424 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2424 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2425 { | 2425 { |
| 2426 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2426 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2427 TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info); | 2427 TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info); |
| 2428 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2428 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2429 } | 2429 } |
| 2430 | 2430 |
| 2431 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 2431 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 2432 { | 2432 { |
| 2433 v8::Handle<v8::Object> holder = info.Holder(); | 2433 v8::Handle<v8::Object> holder = info.Holder(); |
| 2434 ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableL
ongAttribute", "TestObject", holder, info.GetIsolate()); | 2434 ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableL
ongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2435 TestObject* impl = V8TestObject::toNative(holder); | 2435 TestObject* impl = V8TestObject::toImpl(holder); |
| 2436 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2436 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2437 impl->setNotEnumerableLongAttribute(cppValue); | 2437 impl->setNotEnumerableLongAttribute(cppValue); |
| 2438 } | 2438 } |
| 2439 | 2439 |
| 2440 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2440 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2441 { | 2441 { |
| 2442 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2442 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2443 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, inf
o); | 2443 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, inf
o); |
| 2444 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2444 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2445 } | 2445 } |
| 2446 | 2446 |
| 2447 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 2447 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 2448 { | 2448 { |
| 2449 v8::Handle<v8::Object> holder = info.Holder(); | 2449 v8::Handle<v8::Object> holder = info.Holder(); |
| 2450 TestObject* impl = V8TestObject::toNative(holder); | 2450 TestObject* impl = V8TestObject::toImpl(holder); |
| 2451 v8SetReturnValueInt(info, impl->perContextEnabledLongAttribute()); | 2451 v8SetReturnValueInt(info, impl->perContextEnabledLongAttribute()); |
| 2452 } | 2452 } |
| 2453 | 2453 |
| 2454 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2454 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2455 { | 2455 { |
| 2456 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2456 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2457 TestObjectV8Internal::perContextEnabledLongAttributeAttributeGetter(info); | 2457 TestObjectV8Internal::perContextEnabledLongAttributeAttributeGetter(info); |
| 2458 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2458 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2459 } | 2459 } |
| 2460 | 2460 |
| 2461 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 2461 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2462 { | 2462 { |
| 2463 v8::Handle<v8::Object> holder = info.Holder(); | 2463 v8::Handle<v8::Object> holder = info.Holder(); |
| 2464 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledLongAttribute", "TestObject", holder, info.GetIsolate()); | 2464 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2465 TestObject* impl = V8TestObject::toNative(holder); | 2465 TestObject* impl = V8TestObject::toImpl(holder); |
| 2466 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2466 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2467 impl->setPerContextEnabledLongAttribute(cppValue); | 2467 impl->setPerContextEnabledLongAttribute(cppValue); |
| 2468 } | 2468 } |
| 2469 | 2469 |
| 2470 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | 2470 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 2471 { | 2471 { |
| 2472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2473 TestObjectV8Internal::perContextEnabledLongAttributeAttributeSetter(v8Value,
info); | 2473 TestObjectV8Internal::perContextEnabledLongAttributeAttributeSetter(v8Value,
info); |
| 2474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2475 } | 2475 } |
| 2476 | 2476 |
| 2477 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2477 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2478 { | 2478 { |
| 2479 v8::Handle<v8::Object> holder = info.Holder(); | 2479 v8::Handle<v8::Object> holder = info.Holder(); |
| 2480 TestObject* impl = V8TestObject::toNative(holder); | 2480 TestObject* impl = V8TestObject::toImpl(holder); |
| 2481 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | 2481 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); |
| 2482 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty
>(info.GetReturnValue(), cppValue.get())) | 2482 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty
>(info.GetReturnValue(), cppValue.get())) |
| 2483 return; | 2483 return; |
| 2484 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); | 2484 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); |
| 2485 if (!wrapper.IsEmpty()) { | 2485 if (!wrapper.IsEmpty()) { |
| 2486 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); | 2486 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); |
| 2487 v8SetReturnValue(info, wrapper); | 2487 v8SetReturnValue(info, wrapper); |
| 2488 } | 2488 } |
| 2489 } | 2489 } |
| 2490 | 2490 |
| 2491 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2491 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2492 { | 2492 { |
| 2493 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2493 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2494 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetter(info); | 2494 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetter(info); |
| 2495 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2495 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2496 } | 2496 } |
| 2497 | 2497 |
| 2498 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 2498 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2499 { | 2499 { |
| 2500 v8::Handle<v8::Object> holder = info.Holder(); | 2500 v8::Handle<v8::Object> holder = info.Holder(); |
| 2501 TestObject* impl = V8TestObject::toNative(holder); | 2501 TestObject* impl = V8TestObject::toImpl(holder); |
| 2502 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); | 2502 RefPtr<TestInterfaceEmpty> cppValue(impl->perWorldBindingsReadonlyTestInterf
aceEmptyAttribute()); |
| 2503 if (cppValue && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestIn
terfaceEmpty>(info.GetReturnValue(), cppValue.get())) | 2503 if (cppValue && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestIn
terfaceEmpty>(info.GetReturnValue(), cppValue.get())) |
| 2504 return; | 2504 return; |
| 2505 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); | 2505 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); |
| 2506 if (!wrapper.IsEmpty()) { | 2506 if (!wrapper.IsEmpty()) { |
| 2507 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); | 2507 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); |
| 2508 v8SetReturnValue(info, wrapper); | 2508 v8SetReturnValue(info, wrapper); |
| 2509 } | 2509 } |
| 2510 } | 2510 } |
| 2511 | 2511 |
| 2512 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 2512 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 2513 { | 2513 { |
| 2514 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2514 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2515 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetterForMainWorld(info); | 2515 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetterForMainWorld(info); |
| 2516 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2516 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2517 } | 2517 } |
| 2518 | 2518 |
| 2519 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2519 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2520 { | 2520 { |
| 2521 v8::Handle<v8::Object> holder = info.Holder(); | 2521 v8::Handle<v8::Object> holder = info.Holder(); |
| 2522 TestObject* impl = V8TestObject::toNative(holder); | 2522 TestObject* impl = V8TestObject::toImpl(holder); |
| 2523 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); | 2523 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); |
| 2524 } | 2524 } |
| 2525 | 2525 |
| 2526 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2526 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2527 { | 2527 { |
| 2528 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2528 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2529 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2529 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2530 V8PerContextData* contextData = scriptState->perContextData(); | 2530 V8PerContextData* contextData = scriptState->perContextData(); |
| 2531 if (contextData && contextData->activityLogger()) | 2531 if (contextData && contextData->activityLogger()) |
| 2532 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); | 2532 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); |
| 2533 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetter(info); | 2533 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetter(info); |
| 2534 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2534 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2535 } | 2535 } |
| 2536 | 2536 |
| 2537 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2537 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2538 { | 2538 { |
| 2539 v8::Handle<v8::Object> holder = info.Holder(); | 2539 v8::Handle<v8::Object> holder = info.Holder(); |
| 2540 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2540 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2541 TestObject* impl = V8TestObject::toNative(holder); | 2541 TestObject* impl = V8TestObject::toImpl(holder); |
| 2542 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2542 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2543 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | 2543 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
| 2544 } | 2544 } |
| 2545 | 2545 |
| 2546 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | 2546 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) |
| 2547 { | 2547 { |
| 2548 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2548 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2549 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2549 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2550 V8PerContextData* contextData = scriptState->perContextData(); | 2550 V8PerContextData* contextData = scriptState->perContextData(); |
| 2551 if (contextData && contextData->activityLogger()) { | 2551 if (contextData && contextData->activityLogger()) { |
| 2552 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute", v8Value); | 2552 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute", v8Value); |
| 2553 } | 2553 } |
| 2554 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); | 2554 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); |
| 2555 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2555 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2556 } | 2556 } |
| 2557 | 2557 |
| 2558 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 2558 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2559 { | 2559 { |
| 2560 v8::Handle<v8::Object> holder = info.Holder(); | 2560 v8::Handle<v8::Object> holder = info.Holder(); |
| 2561 TestObject* impl = V8TestObject::toNative(holder); | 2561 TestObject* impl = V8TestObject::toImpl(holder); |
| 2562 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); | 2562 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); |
| 2563 } | 2563 } |
| 2564 | 2564 |
| 2565 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 2565 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 2566 { | 2566 { |
| 2567 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2567 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2568 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2568 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2569 V8PerContextData* contextData = scriptState->perContextData(); | 2569 V8PerContextData* contextData = scriptState->perContextData(); |
| 2570 if (contextData && contextData->activityLogger()) | 2570 if (contextData && contextData->activityLogger()) |
| 2571 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); | 2571 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute"); |
| 2572 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); | 2572 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); |
| 2573 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2573 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2574 } | 2574 } |
| 2575 | 2575 |
| 2576 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 2576 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 2577 { | 2577 { |
| 2578 v8::Handle<v8::Object> holder = info.Holder(); | 2578 v8::Handle<v8::Object> holder = info.Holder(); |
| 2579 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2579 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2580 TestObject* impl = V8TestObject::toNative(holder); | 2580 TestObject* impl = V8TestObject::toImpl(holder); |
| 2581 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2581 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2582 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | 2582 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
| 2583 } | 2583 } |
| 2584 | 2584 |
| 2585 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 2585 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 2586 { | 2586 { |
| 2587 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2587 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2588 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2588 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2589 V8PerContextData* contextData = scriptState->perContextData(); | 2589 V8PerContextData* contextData = scriptState->perContextData(); |
| 2590 if (contextData && contextData->activityLogger()) { | 2590 if (contextData && contextData->activityLogger()) { |
| 2591 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute", v8Value); | 2591 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssPerWorldBindingsLongAttribute", v8Value); |
| 2592 } | 2592 } |
| 2593 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); | 2593 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); |
| 2594 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2594 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2595 } | 2595 } |
| 2596 | 2596 |
| 2597 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 2597 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2598 { | 2598 { |
| 2599 v8::Handle<v8::Object> holder = info.Holder(); | 2599 v8::Handle<v8::Object> holder = info.Holder(); |
| 2600 TestObject* impl = V8TestObject::toNative(holder); | 2600 TestObject* impl = V8TestObject::toImpl(holder); |
| 2601 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | 2601 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); |
| 2602 } | 2602 } |
| 2603 | 2603 |
| 2604 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8:
:Value>& info) | 2604 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8:
:Value>& info) |
| 2605 { | 2605 { |
| 2606 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2606 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2607 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2607 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2608 V8PerContextData* contextData = scriptState->perContextData(); | 2608 V8PerContextData* contextData = scriptState->perContextData(); |
| 2609 if (contextData && contextData->activityLogger()) | 2609 if (contextData && contextData->activityLogger()) |
| 2610 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute"); | 2610 contextData->activityLogger()->logGetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute"); |
| 2611 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); | 2611 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); |
| 2612 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2612 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2613 } | 2613 } |
| 2614 | 2614 |
| 2615 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | 2615 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 2616 { | 2616 { |
| 2617 v8::Handle<v8::Object> holder = info.Holder(); | 2617 v8::Handle<v8::Object> holder = info.Holder(); |
| 2618 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 2618 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
| 2619 TestObject* impl = V8TestObject::toNative(holder); | 2619 TestObject* impl = V8TestObject::toImpl(holder); |
| 2620 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2620 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2621 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 2621 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
| 2622 } | 2622 } |
| 2623 | 2623 |
| 2624 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 2624 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
| 2625 { | 2625 { |
| 2626 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2626 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2627 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2627 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2628 V8PerContextData* contextData = scriptState->perContextData(); | 2628 V8PerContextData* contextData = scriptState->perContextData(); |
| 2629 if (contextData && contextData->activityLogger()) { | 2629 if (contextData && contextData->activityLogger()) { |
| 2630 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute", v8Value); | 2630 contextData->activityLogger()->logSetter("TestObject.activityLoggingAcce
ssForIsolatedWorldsPerWorldBindingsLongAttribute", v8Value); |
| 2631 } | 2631 } |
| 2632 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); | 2632 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); |
| 2633 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2633 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2634 } | 2634 } |
| 2635 | 2635 |
| 2636 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 2636 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2637 { | 2637 { |
| 2638 v8::Handle<v8::Object> holder = info.Holder(); | 2638 v8::Handle<v8::Object> holder = info.Holder(); |
| 2639 TestObject* impl = V8TestObject::toNative(holder); | 2639 TestObject* impl = V8TestObject::toImpl(holder); |
| 2640 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | 2640 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); |
| 2641 } | 2641 } |
| 2642 | 2642 |
| 2643 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall
backInfo<v8::Value>& info) | 2643 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall
backInfo<v8::Value>& info) |
| 2644 { | 2644 { |
| 2645 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2645 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2646 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); | 2646 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); |
| 2647 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2647 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2648 } | 2648 } |
| 2649 | 2649 |
| 2650 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | 2650 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
| 2651 { | 2651 { |
| 2652 v8::Handle<v8::Object> holder = info.Holder(); | 2652 v8::Handle<v8::Object> holder = info.Holder(); |
| 2653 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 2653 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
| 2654 TestObject* impl = V8TestObject::toNative(holder); | 2654 TestObject* impl = V8TestObject::toImpl(holder); |
| 2655 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2655 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2656 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 2656 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
| 2657 } | 2657 } |
| 2658 | 2658 |
| 2659 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 2659 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2660 { | 2660 { |
| 2661 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2661 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2662 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); | 2662 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); |
| 2663 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2663 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2664 } | 2664 } |
| 2665 | 2665 |
| 2666 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2666 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2667 { | 2667 { |
| 2668 v8::Handle<v8::Object> holder = info.Holder(); | 2668 v8::Handle<v8::Object> holder = info.Holder(); |
| 2669 TestObject* impl = V8TestObject::toNative(holder); | 2669 TestObject* impl = V8TestObject::toImpl(holder); |
| 2670 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); | 2670 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); |
| 2671 } | 2671 } |
| 2672 | 2672 |
| 2673 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2673 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2674 { | 2674 { |
| 2675 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2675 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2676 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2676 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2677 V8PerContextData* contextData = scriptState->perContextData(); | 2677 V8PerContextData* contextData = scriptState->perContextData(); |
| 2678 if (contextData && contextData->activityLogger()) | 2678 if (contextData && contextData->activityLogger()) |
| 2679 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); | 2679 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); |
| 2680 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetter(info); | 2680 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetter(info); |
| 2681 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2681 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2682 } | 2682 } |
| 2683 | 2683 |
| 2684 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2684 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2685 { | 2685 { |
| 2686 v8::Handle<v8::Object> holder = info.Holder(); | 2686 v8::Handle<v8::Object> holder = info.Holder(); |
| 2687 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2687 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2688 TestObject* impl = V8TestObject::toNative(holder); | 2688 TestObject* impl = V8TestObject::toImpl(holder); |
| 2689 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2689 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2690 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | 2690 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
| 2691 } | 2691 } |
| 2692 | 2692 |
| 2693 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | 2693 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) |
| 2694 { | 2694 { |
| 2695 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2695 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2696 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); | 2696 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); |
| 2697 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2697 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2698 } | 2698 } |
| 2699 | 2699 |
| 2700 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 2700 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2701 { | 2701 { |
| 2702 v8::Handle<v8::Object> holder = info.Holder(); | 2702 v8::Handle<v8::Object> holder = info.Holder(); |
| 2703 TestObject* impl = V8TestObject::toNative(holder); | 2703 TestObject* impl = V8TestObject::toImpl(holder); |
| 2704 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); | 2704 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); |
| 2705 } | 2705 } |
| 2706 | 2706 |
| 2707 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 2707 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 2708 { | 2708 { |
| 2709 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2709 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2710 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2710 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2711 V8PerContextData* contextData = scriptState->perContextData(); | 2711 V8PerContextData* contextData = scriptState->perContextData(); |
| 2712 if (contextData && contextData->activityLogger()) | 2712 if (contextData && contextData->activityLogger()) |
| 2713 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); | 2713 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erPerWorldBindingsLongAttribute"); |
| 2714 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); | 2714 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); |
| 2715 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2715 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2716 } | 2716 } |
| 2717 | 2717 |
| 2718 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 2718 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 2719 { | 2719 { |
| 2720 v8::Handle<v8::Object> holder = info.Holder(); | 2720 v8::Handle<v8::Object> holder = info.Holder(); |
| 2721 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | 2721 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 2722 TestObject* impl = V8TestObject::toNative(holder); | 2722 TestObject* impl = V8TestObject::toImpl(holder); |
| 2723 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2723 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2724 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | 2724 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
| 2725 } | 2725 } |
| 2726 | 2726 |
| 2727 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 2727 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 2728 { | 2728 { |
| 2729 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2729 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2730 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); | 2730 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); |
| 2731 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2731 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2732 } | 2732 } |
| 2733 | 2733 |
| 2734 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 2734 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2735 { | 2735 { |
| 2736 v8::Handle<v8::Object> holder = info.Holder(); | 2736 v8::Handle<v8::Object> holder = info.Holder(); |
| 2737 TestObject* impl = V8TestObject::toNative(holder); | 2737 TestObject* impl = V8TestObject::toImpl(holder); |
| 2738 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | 2738 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); |
| 2739 } | 2739 } |
| 2740 | 2740 |
| 2741 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8:
:Value>& info) | 2741 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8:
:Value>& info) |
| 2742 { | 2742 { |
| 2743 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2743 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2744 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 2744 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 2745 V8PerContextData* contextData = scriptState->perContextData(); | 2745 V8PerContextData* contextData = scriptState->perContextData(); |
| 2746 if (contextData && contextData->activityLogger()) | 2746 if (contextData && contextData->activityLogger()) |
| 2747 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForIsolatedWorldsPerWorldBindingsLongAttribute"); | 2747 contextData->activityLogger()->logGetter("TestObject.activityLoggingGett
erForIsolatedWorldsPerWorldBindingsLongAttribute"); |
| 2748 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); | 2748 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); |
| 2749 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2749 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2750 } | 2750 } |
| 2751 | 2751 |
| 2752 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | 2752 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 2753 { | 2753 { |
| 2754 v8::Handle<v8::Object> holder = info.Holder(); | 2754 v8::Handle<v8::Object> holder = info.Holder(); |
| 2755 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 2755 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
| 2756 TestObject* impl = V8TestObject::toNative(holder); | 2756 TestObject* impl = V8TestObject::toImpl(holder); |
| 2757 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2757 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2758 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 2758 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
| 2759 } | 2759 } |
| 2760 | 2760 |
| 2761 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 2761 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
| 2762 { | 2762 { |
| 2763 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2763 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2764 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); | 2764 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); |
| 2765 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2765 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2766 } | 2766 } |
| 2767 | 2767 |
| 2768 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 2768 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2769 { | 2769 { |
| 2770 v8::Handle<v8::Object> holder = info.Holder(); | 2770 v8::Handle<v8::Object> holder = info.Holder(); |
| 2771 TestObject* impl = V8TestObject::toNative(holder); | 2771 TestObject* impl = V8TestObject::toImpl(holder); |
| 2772 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | 2772 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); |
| 2773 } | 2773 } |
| 2774 | 2774 |
| 2775 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall
backInfo<v8::Value>& info) | 2775 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall
backInfo<v8::Value>& info) |
| 2776 { | 2776 { |
| 2777 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2777 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2778 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); | 2778 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); |
| 2779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2780 } | 2780 } |
| 2781 | 2781 |
| 2782 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | 2782 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
| 2783 { | 2783 { |
| 2784 v8::Handle<v8::Object> holder = info.Holder(); | 2784 v8::Handle<v8::Object> holder = info.Holder(); |
| 2785 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | 2785 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); |
| 2786 TestObject* impl = V8TestObject::toNative(holder); | 2786 TestObject* impl = V8TestObject::toImpl(holder); |
| 2787 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 2787 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 2788 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | 2788 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); |
| 2789 } | 2789 } |
| 2790 | 2790 |
| 2791 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 2791 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2792 { | 2792 { |
| 2793 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2793 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2794 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); | 2794 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); |
| 2795 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2795 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2796 } | 2796 } |
| 2797 | 2797 |
| 2798 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 2798 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
| 2799 { | 2799 { |
| 2800 v8::Handle<v8::Object> holder = info.Holder(); | 2800 v8::Handle<v8::Object> holder = info.Holder(); |
| 2801 TestObject* impl = V8TestObject::toNative(holder); | 2801 TestObject* impl = V8TestObject::toImpl(holder); |
| 2802 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); | 2802 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); |
| 2803 } | 2803 } |
| 2804 | 2804 |
| 2805 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 2805 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 2806 { | 2806 { |
| 2807 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2807 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2808 TestObjectV8Internal::locationAttributeGetter(info); | 2808 TestObjectV8Internal::locationAttributeGetter(info); |
| 2809 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2809 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2810 } | 2810 } |
| 2811 | 2811 |
| 2812 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) | 2812 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
| 2813 { | 2813 { |
| 2814 v8::Handle<v8::Object> holder = info.Holder(); | 2814 v8::Handle<v8::Object> holder = info.Holder(); |
| 2815 TestObject* proxyImpl = V8TestObject::toNative(holder); | 2815 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 2816 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); | 2816 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); |
| 2817 if (!impl) | 2817 if (!impl) |
| 2818 return; | 2818 return; |
| 2819 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 2819 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 2820 impl->setHref(cppValue); | 2820 impl->setHref(cppValue); |
| 2821 } | 2821 } |
| 2822 | 2822 |
| 2823 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2823 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2824 { | 2824 { |
| 2825 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2825 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2826 TestObjectV8Internal::locationAttributeSetter(v8Value, info); | 2826 TestObjectV8Internal::locationAttributeSetter(v8Value, info); |
| 2827 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2827 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2828 } | 2828 } |
| 2829 | 2829 |
| 2830 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 2830 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 2831 { | 2831 { |
| 2832 v8::Handle<v8::Object> holder = info.Holder(); | 2832 v8::Handle<v8::Object> holder = info.Holder(); |
| 2833 TestObject* impl = V8TestObject::toNative(holder); | 2833 TestObject* impl = V8TestObject::toImpl(holder); |
| 2834 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; | 2834 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; |
| 2835 } | 2835 } |
| 2836 | 2836 |
| 2837 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2837 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2838 { | 2838 { |
| 2839 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2839 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2840 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); | 2840 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); |
| 2841 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2841 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2842 } | 2842 } |
| 2843 | 2843 |
| 2844 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 2844 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 2845 { | 2845 { |
| 2846 v8::Handle<v8::Object> holder = info.Holder(); | 2846 v8::Handle<v8::Object> holder = info.Holder(); |
| 2847 ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithEx
ception", "TestObject", holder, info.GetIsolate()); | 2847 ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithEx
ception", "TestObject", holder, info.GetIsolate()); |
| 2848 TestObject* proxyImpl = V8TestObject::toNative(holder); | 2848 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 2849 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithExcep
tion()); | 2849 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithExcep
tion()); |
| 2850 if (!impl) | 2850 if (!impl) |
| 2851 return; | 2851 return; |
| 2852 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 2852 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 2853 impl->setHrefThrows(cppValue, exceptionState); | 2853 impl->setHrefThrows(cppValue, exceptionState); |
| 2854 exceptionState.throwIfNeeded(); | 2854 exceptionState.throwIfNeeded(); |
| 2855 } | 2855 } |
| 2856 | 2856 |
| 2857 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2857 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2858 { | 2858 { |
| 2859 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2859 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2860 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); | 2860 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); |
| 2861 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2861 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2862 } | 2862 } |
| 2863 | 2863 |
| 2864 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 2864 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 2865 { | 2865 { |
| 2866 v8::Handle<v8::Object> holder = info.Holder(); | 2866 v8::Handle<v8::Object> holder = info.Holder(); |
| 2867 TestObject* impl = V8TestObject::toNative(holder); | 2867 TestObject* impl = V8TestObject::toImpl(holder); |
| 2868 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithCallWith()), impl); | 2868 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithCallWith()), impl); |
| 2869 } | 2869 } |
| 2870 | 2870 |
| 2871 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2871 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2872 { | 2872 { |
| 2873 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2873 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2874 TestObjectV8Internal::locationWithCallWithAttributeGetter(info); | 2874 TestObjectV8Internal::locationWithCallWithAttributeGetter(info); |
| 2875 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2875 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2876 } | 2876 } |
| 2877 | 2877 |
| 2878 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 2878 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 2879 { | 2879 { |
| 2880 v8::Handle<v8::Object> holder = info.Holder(); | 2880 v8::Handle<v8::Object> holder = info.Holder(); |
| 2881 TestObject* proxyImpl = V8TestObject::toNative(holder); | 2881 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 2882 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithCallW
ith()); | 2882 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithCallW
ith()); |
| 2883 if (!impl) | 2883 if (!impl) |
| 2884 return; | 2884 return; |
| 2885 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 2885 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 2886 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 2886 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 2887 impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate()), cppValue); | 2887 impl->setHrefCallWith(executionContext, callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate()), cppValue); |
| 2888 } | 2888 } |
| 2889 | 2889 |
| 2890 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2890 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2891 { | 2891 { |
| 2892 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2892 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2893 TestObjectV8Internal::locationWithCallWithAttributeSetter(v8Value, info); | 2893 TestObjectV8Internal::locationWithCallWithAttributeSetter(v8Value, info); |
| 2894 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2894 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2895 } | 2895 } |
| 2896 | 2896 |
| 2897 static void locationByteStringAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 2897 static void locationByteStringAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
| 2898 { | 2898 { |
| 2899 v8::Handle<v8::Object> holder = info.Holder(); | 2899 v8::Handle<v8::Object> holder = info.Holder(); |
| 2900 TestObject* impl = V8TestObject::toNative(holder); | 2900 TestObject* impl = V8TestObject::toImpl(holder); |
| 2901 v8SetReturnValueFast(info, WTF::getPtr(impl->locationByteString()), impl); | 2901 v8SetReturnValueFast(info, WTF::getPtr(impl->locationByteString()), impl); |
| 2902 } | 2902 } |
| 2903 | 2903 |
| 2904 static void locationByteStringAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 2904 static void locationByteStringAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 2905 { | 2905 { |
| 2906 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2906 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2907 TestObjectV8Internal::locationByteStringAttributeGetter(info); | 2907 TestObjectV8Internal::locationByteStringAttributeGetter(info); |
| 2908 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2908 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2909 } | 2909 } |
| 2910 | 2910 |
| 2911 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 2911 static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
| 2912 { | 2912 { |
| 2913 v8::Handle<v8::Object> holder = info.Holder(); | 2913 v8::Handle<v8::Object> holder = info.Holder(); |
| 2914 ExceptionState exceptionState(ExceptionState::SetterContext, "locationByteSt
ring", "TestObject", holder, info.GetIsolate()); | 2914 ExceptionState exceptionState(ExceptionState::SetterContext, "locationByteSt
ring", "TestObject", holder, info.GetIsolate()); |
| 2915 TestObject* proxyImpl = V8TestObject::toNative(holder); | 2915 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 2916 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationByteStrin
g()); | 2916 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationByteStrin
g()); |
| 2917 if (!impl) | 2917 if (!impl) |
| 2918 return; | 2918 return; |
| 2919 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); | 2919 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); |
| 2920 impl->setHrefByteString(cppValue); | 2920 impl->setHrefByteString(cppValue); |
| 2921 } | 2921 } |
| 2922 | 2922 |
| 2923 static void locationByteStringAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2923 static void locationByteStringAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2924 { | 2924 { |
| 2925 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2925 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2926 TestObjectV8Internal::locationByteStringAttributeSetter(v8Value, info); | 2926 TestObjectV8Internal::locationByteStringAttributeSetter(v8Value, info); |
| 2927 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2927 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2928 } | 2928 } |
| 2929 | 2929 |
| 2930 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 2930 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 2931 { | 2931 { |
| 2932 v8::Handle<v8::Object> holder = info.Holder(); | 2932 v8::Handle<v8::Object> holder = info.Holder(); |
| 2933 TestObject* impl = V8TestObject::toNative(holder); | 2933 TestObject* impl = V8TestObject::toImpl(holder); |
| 2934 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithPerWorldBindings())
, impl); | 2934 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithPerWorldBindings())
, impl); |
| 2935 } | 2935 } |
| 2936 | 2936 |
| 2937 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2937 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2938 { | 2938 { |
| 2939 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2939 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2940 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info); | 2940 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info); |
| 2941 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2941 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2942 } | 2942 } |
| 2943 | 2943 |
| 2944 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | 2944 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 2945 { | 2945 { |
| 2946 v8::Handle<v8::Object> holder = info.Holder(); | 2946 v8::Handle<v8::Object> holder = info.Holder(); |
| 2947 TestObject* proxyImpl = V8TestObject::toNative(holder); | 2947 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 2948 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWo
rldBindings()); | 2948 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWo
rldBindings()); |
| 2949 if (!impl) | 2949 if (!impl) |
| 2950 return; | 2950 return; |
| 2951 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 2951 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 2952 impl->setHref(cppValue); | 2952 impl->setHref(cppValue); |
| 2953 } | 2953 } |
| 2954 | 2954 |
| 2955 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2955 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2956 { | 2956 { |
| 2957 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2957 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2958 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetter(v8Value, i
nfo); | 2958 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetter(v8Value, i
nfo); |
| 2959 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2959 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2960 } | 2960 } |
| 2961 | 2961 |
| 2962 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 2962 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 2963 { | 2963 { |
| 2964 v8::Handle<v8::Object> holder = info.Holder(); | 2964 v8::Handle<v8::Object> holder = info.Holder(); |
| 2965 TestObject* impl = V8TestObject::toNative(holder); | 2965 TestObject* impl = V8TestObject::toImpl(holder); |
| 2966 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->locationWithPerWorldBin
dings())); | 2966 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->locationWithPerWorldBin
dings())); |
| 2967 } | 2967 } |
| 2968 | 2968 |
| 2969 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2969 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2970 { | 2970 { |
| 2971 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 2971 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 2972 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorl
d(info); | 2972 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorl
d(info); |
| 2973 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2973 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2974 } | 2974 } |
| 2975 | 2975 |
| 2976 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 2976 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2977 { | 2977 { |
| 2978 v8::Handle<v8::Object> holder = info.Holder(); | 2978 v8::Handle<v8::Object> holder = info.Holder(); |
| 2979 TestObject* proxyImpl = V8TestObject::toNative(holder); | 2979 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 2980 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWo
rldBindings()); | 2980 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWo
rldBindings()); |
| 2981 if (!impl) | 2981 if (!impl) |
| 2982 return; | 2982 return; |
| 2983 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 2983 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 2984 impl->setHref(cppValue); | 2984 impl->setHref(cppValue); |
| 2985 } | 2985 } |
| 2986 | 2986 |
| 2987 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) | 2987 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
| 2988 { | 2988 { |
| 2989 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 2989 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 2990 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorl
d(v8Value, info); | 2990 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorl
d(v8Value, info); |
| 2991 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 2991 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 2992 } | 2992 } |
| 2993 | 2993 |
| 2994 static void locationTypeCheckingInterfaceAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 2994 static void locationTypeCheckingInterfaceAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 2995 { | 2995 { |
| 2996 v8::Handle<v8::Object> holder = info.Holder(); | 2996 v8::Handle<v8::Object> holder = info.Holder(); |
| 2997 TestObject* impl = V8TestObject::toNative(holder); | 2997 TestObject* impl = V8TestObject::toImpl(holder); |
| 2998 v8SetReturnValueFast(info, WTF::getPtr(impl->locationTypeCheckingInterface()
), impl); | 2998 v8SetReturnValueFast(info, WTF::getPtr(impl->locationTypeCheckingInterface()
), impl); |
| 2999 } | 2999 } |
| 3000 | 3000 |
| 3001 static void locationTypeCheckingInterfaceAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3001 static void locationTypeCheckingInterfaceAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3002 { | 3002 { |
| 3003 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3003 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3004 TestObjectV8Internal::locationTypeCheckingInterfaceAttributeGetter(info); | 3004 TestObjectV8Internal::locationTypeCheckingInterfaceAttributeGetter(info); |
| 3005 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3005 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3006 } | 3006 } |
| 3007 | 3007 |
| 3008 static void locationTypeCheckingInterfaceAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | 3008 static void locationTypeCheckingInterfaceAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 3009 { | 3009 { |
| 3010 v8::Handle<v8::Object> holder = info.Holder(); | 3010 v8::Handle<v8::Object> holder = info.Holder(); |
| 3011 TestObject* proxyImpl = V8TestObject::toNative(holder); | 3011 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3012 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationTypeCheck
ingInterface()); | 3012 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationTypeCheck
ingInterface()); |
| 3013 if (!impl) | 3013 if (!impl) |
| 3014 return; | 3014 return; |
| 3015 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3015 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3016 impl->setHref(cppValue); | 3016 impl->setHref(cppValue); |
| 3017 } | 3017 } |
| 3018 | 3018 |
| 3019 static void locationTypeCheckingInterfaceAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 3019 static void locationTypeCheckingInterfaceAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 3020 { | 3020 { |
| 3021 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3021 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3022 TestObjectV8Internal::locationTypeCheckingInterfaceAttributeSetter(v8Value,
info); | 3022 TestObjectV8Internal::locationTypeCheckingInterfaceAttributeSetter(v8Value,
info); |
| 3023 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3023 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3024 } | 3024 } |
| 3025 | 3025 |
| 3026 static void locationGarbageCollectedAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 3026 static void locationGarbageCollectedAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
| 3027 { | 3027 { |
| 3028 v8::Handle<v8::Object> holder = info.Holder(); | 3028 v8::Handle<v8::Object> holder = info.Holder(); |
| 3029 TestObject* impl = V8TestObject::toNative(holder); | 3029 TestObject* impl = V8TestObject::toImpl(holder); |
| 3030 RawPtr<TestInterfaceGarbageCollected> cppValue(impl->locationGarbageCollecte
d()); | 3030 RawPtr<TestInterfaceGarbageCollected> cppValue(impl->locationGarbageCollecte
d()); |
| 3031 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceGarba
geCollected>(info.GetReturnValue(), cppValue.get())) | 3031 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceGarba
geCollected>(info.GetReturnValue(), cppValue.get())) |
| 3032 return; | 3032 return; |
| 3033 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); | 3033 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); |
| 3034 if (!wrapper.IsEmpty()) { | 3034 if (!wrapper.IsEmpty()) { |
| 3035 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationGarbageCollected"), wrapper); | 3035 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationGarbageCollected"), wrapper); |
| 3036 v8SetReturnValue(info, wrapper); | 3036 v8SetReturnValue(info, wrapper); |
| 3037 } | 3037 } |
| 3038 } | 3038 } |
| 3039 | 3039 |
| 3040 static void locationGarbageCollectedAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3040 static void locationGarbageCollectedAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3041 { | 3041 { |
| 3042 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3042 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3043 TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info); | 3043 TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info); |
| 3044 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3044 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3045 } | 3045 } |
| 3046 | 3046 |
| 3047 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | 3047 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) |
| 3048 { | 3048 { |
| 3049 v8::Handle<v8::Object> holder = info.Holder(); | 3049 v8::Handle<v8::Object> holder = info.Holder(); |
| 3050 TestObject* proxyImpl = V8TestObject::toNative(holder); | 3050 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3051 RawPtr<TestInterfaceGarbageCollected> impl = WTF::getPtr(proxyImpl->location
GarbageCollected()); | 3051 RawPtr<TestInterfaceGarbageCollected> impl = WTF::getPtr(proxyImpl->location
GarbageCollected()); |
| 3052 if (!impl) | 3052 if (!impl) |
| 3053 return; | 3053 return; |
| 3054 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); | 3054 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); |
| 3055 impl->setAttr1(WTF::getPtr(cppValue)); | 3055 impl->setAttr1(WTF::getPtr(cppValue)); |
| 3056 } | 3056 } |
| 3057 | 3057 |
| 3058 static void locationGarbageCollectedAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3058 static void locationGarbageCollectedAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3059 { | 3059 { |
| 3060 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3060 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3061 TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info)
; | 3061 TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info)
; |
| 3062 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3062 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3063 } | 3063 } |
| 3064 | 3064 |
| 3065 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 3065 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 3066 { | 3066 { |
| 3067 v8::Handle<v8::Object> holder = info.Holder(); | 3067 v8::Handle<v8::Object> holder = info.Holder(); |
| 3068 TestObject* impl = V8TestObject::toNative(holder); | 3068 TestObject* impl = V8TestObject::toImpl(holder); |
| 3069 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> cppValue(impl->locat
ionWillBeGarbageCollected()); | 3069 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> cppValue(impl->locat
ionWillBeGarbageCollected()); |
| 3070 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceWillB
eGarbageCollected>(info.GetReturnValue(), cppValue.get())) | 3070 if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceWillB
eGarbageCollected>(info.GetReturnValue(), cppValue.get())) |
| 3071 return; | 3071 return; |
| 3072 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); | 3072 v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate
()); |
| 3073 if (!wrapper.IsEmpty()) { | 3073 if (!wrapper.IsEmpty()) { |
| 3074 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationWillBeGarbageCollected"), wrapper); | 3074 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationWillBeGarbageCollected"), wrapper); |
| 3075 v8SetReturnValue(info, wrapper); | 3075 v8SetReturnValue(info, wrapper); |
| 3076 } | 3076 } |
| 3077 } | 3077 } |
| 3078 | 3078 |
| 3079 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3079 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3080 { | 3080 { |
| 3081 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3081 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3082 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetter(info); | 3082 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetter(info); |
| 3083 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3083 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3084 } | 3084 } |
| 3085 | 3085 |
| 3086 static void locationWillBeGarbageCollectedAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | 3086 static void locationWillBeGarbageCollectedAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3087 { | 3087 { |
| 3088 v8::Handle<v8::Object> holder = info.Holder(); | 3088 v8::Handle<v8::Object> holder = info.Holder(); |
| 3089 TestObject* proxyImpl = V8TestObject::toNative(holder); | 3089 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3090 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = WTF::getPtr(p
roxyImpl->locationWillBeGarbageCollected()); | 3090 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = WTF::getPtr(p
roxyImpl->locationWillBeGarbageCollected()); |
| 3091 if (!impl) | 3091 if (!impl) |
| 3092 return; | 3092 return; |
| 3093 TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfac
eWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); | 3093 TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfac
eWillBeGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); |
| 3094 impl->setAttr1(WTF::getPtr(cppValue)); | 3094 impl->setAttr1(WTF::getPtr(cppValue)); |
| 3095 } | 3095 } |
| 3096 | 3096 |
| 3097 static void locationWillBeGarbageCollectedAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | 3097 static void locationWillBeGarbageCollectedAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 3098 { | 3098 { |
| 3099 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3099 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3100 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeSetter(v8Value,
info); | 3100 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeSetter(v8Value,
info); |
| 3101 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3101 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3102 } | 3102 } |
| 3103 | 3103 |
| 3104 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 3104 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 3105 { | 3105 { |
| 3106 v8::Handle<v8::Object> holder = info.Holder(); | 3106 v8::Handle<v8::Object> holder = info.Holder(); |
| 3107 TestObject* impl = V8TestObject::toNative(holder); | 3107 TestObject* impl = V8TestObject::toImpl(holder); |
| 3108 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); | 3108 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3109 int cppValue(impl->raisesExceptionLongAttribute(exceptionState)); | 3109 int cppValue(impl->raisesExceptionLongAttribute(exceptionState)); |
| 3110 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3110 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 3111 return; | 3111 return; |
| 3112 v8SetReturnValueInt(info, cppValue); | 3112 v8SetReturnValueInt(info, cppValue); |
| 3113 } | 3113 } |
| 3114 | 3114 |
| 3115 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3115 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3116 { | 3116 { |
| 3117 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3117 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3118 TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info); | 3118 TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info); |
| 3119 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3119 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3120 } | 3120 } |
| 3121 | 3121 |
| 3122 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | 3122 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 3123 { | 3123 { |
| 3124 v8::Handle<v8::Object> holder = info.Holder(); | 3124 v8::Handle<v8::Object> holder = info.Holder(); |
| 3125 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); | 3125 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3126 TestObject* impl = V8TestObject::toNative(holder); | 3126 TestObject* impl = V8TestObject::toImpl(holder); |
| 3127 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 3127 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 3128 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); | 3128 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); |
| 3129 exceptionState.throwIfNeeded(); | 3129 exceptionState.throwIfNeeded(); |
| 3130 } | 3130 } |
| 3131 | 3131 |
| 3132 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3132 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3133 { | 3133 { |
| 3134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3135 TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, i
nfo); | 3135 TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, i
nfo); |
| 3136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3137 } | 3137 } |
| 3138 | 3138 |
| 3139 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 3139 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
| 3140 { | 3140 { |
| 3141 v8::Handle<v8::Object> holder = info.Holder(); | 3141 v8::Handle<v8::Object> holder = info.Holder(); |
| 3142 TestObject* impl = V8TestObject::toNative(holder); | 3142 TestObject* impl = V8TestObject::toImpl(holder); |
| 3143 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); | 3143 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3144 int cppValue(impl->raisesExceptionGetterLongAttribute(exceptionState)); | 3144 int cppValue(impl->raisesExceptionGetterLongAttribute(exceptionState)); |
| 3145 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3145 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 3146 return; | 3146 return; |
| 3147 v8SetReturnValueInt(info, cppValue); | 3147 v8SetReturnValueInt(info, cppValue); |
| 3148 } | 3148 } |
| 3149 | 3149 |
| 3150 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3150 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3151 { | 3151 { |
| 3152 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3152 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3153 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info
); | 3153 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info
); |
| 3154 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3154 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3155 } | 3155 } |
| 3156 | 3156 |
| 3157 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3157 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3158 { | 3158 { |
| 3159 v8::Handle<v8::Object> holder = info.Holder(); | 3159 v8::Handle<v8::Object> holder = info.Holder(); |
| 3160 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); | 3160 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3161 TestObject* impl = V8TestObject::toNative(holder); | 3161 TestObject* impl = V8TestObject::toImpl(holder); |
| 3162 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 3162 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 3163 impl->setRaisesExceptionGetterLongAttribute(cppValue); | 3163 impl->setRaisesExceptionGetterLongAttribute(cppValue); |
| 3164 } | 3164 } |
| 3165 | 3165 |
| 3166 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | 3166 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 3167 { | 3167 { |
| 3168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3168 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3169 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Va
lue, info); | 3169 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Va
lue, info); |
| 3170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3171 } | 3171 } |
| 3172 | 3172 |
| 3173 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 3173 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
| 3174 { | 3174 { |
| 3175 v8::Handle<v8::Object> holder = info.Holder(); | 3175 v8::Handle<v8::Object> holder = info.Holder(); |
| 3176 TestObject* impl = V8TestObject::toNative(holder); | 3176 TestObject* impl = V8TestObject::toImpl(holder); |
| 3177 v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); | 3177 v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); |
| 3178 } | 3178 } |
| 3179 | 3179 |
| 3180 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3180 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3181 { | 3181 { |
| 3182 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3182 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3183 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info
); | 3183 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info
); |
| 3184 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3184 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3185 } | 3185 } |
| 3186 | 3186 |
| 3187 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3187 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3188 { | 3188 { |
| 3189 v8::Handle<v8::Object> holder = info.Holder(); | 3189 v8::Handle<v8::Object> holder = info.Holder(); |
| 3190 ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesEx
ceptionLongAttribute", "TestObject", holder, info.GetIsolate()); | 3190 ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesEx
ceptionLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3191 TestObject* impl = V8TestObject::toNative(holder); | 3191 TestObject* impl = V8TestObject::toImpl(holder); |
| 3192 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 3192 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 3193 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); | 3193 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); |
| 3194 exceptionState.throwIfNeeded(); | 3194 exceptionState.throwIfNeeded(); |
| 3195 } | 3195 } |
| 3196 | 3196 |
| 3197 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | 3197 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 3198 { | 3198 { |
| 3199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3199 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3200 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Va
lue, info); | 3200 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Va
lue, info); |
| 3201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3201 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3202 } | 3202 } |
| 3203 | 3203 |
| 3204 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | 3204 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 3205 { | 3205 { |
| 3206 v8::Handle<v8::Object> holder = info.Holder(); | 3206 v8::Handle<v8::Object> holder = info.Holder(); |
| 3207 TestObject* impl = V8TestObject::toNative(holder); | 3207 TestObject* impl = V8TestObject::toImpl(holder); |
| 3208 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | 3208 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3209 RefPtr<TestInterfaceEmpty> cppValue(impl->raisesExceptionTestInterfaceEmptyA
ttribute(exceptionState)); | 3209 RefPtr<TestInterfaceEmpty> cppValue(impl->raisesExceptionTestInterfaceEmptyA
ttribute(exceptionState)); |
| 3210 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3210 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 3211 return; | 3211 return; |
| 3212 v8SetReturnValueFast(info, WTF::getPtr(cppValue.release()), impl); | 3212 v8SetReturnValueFast(info, WTF::getPtr(cppValue.release()), impl); |
| 3213 } | 3213 } |
| 3214 | 3214 |
| 3215 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3215 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3216 { | 3216 { |
| 3217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3218 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGet
ter(info); | 3218 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGet
ter(info); |
| 3219 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3219 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3220 } | 3220 } |
| 3221 | 3221 |
| 3222 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3222 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3223 { | 3223 { |
| 3224 v8::Handle<v8::Object> holder = info.Holder(); | 3224 v8::Handle<v8::Object> holder = info.Holder(); |
| 3225 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | 3225 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3226 TestObject* impl = V8TestObject::toNative(holder); | 3226 TestObject* impl = V8TestObject::toImpl(holder); |
| 3227 TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativeW
ithTypeCheck(info.GetIsolate(), v8Value)); | 3227 TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toImplWit
hTypeCheck(info.GetIsolate(), v8Value)); |
| 3228 impl->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), e
xceptionState); | 3228 impl->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), e
xceptionState); |
| 3229 exceptionState.throwIfNeeded(); | 3229 exceptionState.throwIfNeeded(); |
| 3230 } | 3230 } |
| 3231 | 3231 |
| 3232 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | 3232 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) |
| 3233 { | 3233 { |
| 3234 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3234 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3235 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSet
ter(v8Value, info); | 3235 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSet
ter(v8Value, info); |
| 3236 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3236 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3237 } | 3237 } |
| 3238 | 3238 |
| 3239 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 3239 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 3240 { | 3240 { |
| 3241 v8::Handle<v8::Object> holder = info.Holder(); | 3241 v8::Handle<v8::Object> holder = info.Holder(); |
| 3242 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedAttributeRaisesExceptionGetterAnyAttribute"); | 3242 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedAttributeRaisesExceptionGetterAnyAttribute"); |
| 3243 TestObject* impl = V8TestObject::toNative(holder); | 3243 TestObject* impl = V8TestObject::toImpl(holder); |
| 3244 if (!impl->isValueDirty()) { | 3244 if (!impl->isValueDirty()) { |
| 3245 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | 3245 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); |
| 3246 if (!v8Value.IsEmpty()) { | 3246 if (!v8Value.IsEmpty()) { |
| 3247 v8SetReturnValue(info, v8Value); | 3247 v8SetReturnValue(info, v8Value); |
| 3248 return; | 3248 return; |
| 3249 } | 3249 } |
| 3250 } | 3250 } |
| 3251 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | 3251 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3252 ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(
exceptionState)); | 3252 ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(
exceptionState)); |
| 3253 if (UNLIKELY(exceptionState.throwIfNeeded())) | 3253 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 3254 return; | 3254 return; |
| 3255 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); | 3255 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.v8Value()); |
| 3256 v8SetReturnValue(info, cppValue.v8Value()); | 3256 v8SetReturnValue(info, cppValue.v8Value()); |
| 3257 } | 3257 } |
| 3258 | 3258 |
| 3259 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3259 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3260 { | 3260 { |
| 3261 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3261 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3262 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteGetter(info); | 3262 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteGetter(info); |
| 3263 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3263 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3264 } | 3264 } |
| 3265 | 3265 |
| 3266 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3266 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3267 { | 3267 { |
| 3268 v8::Handle<v8::Object> holder = info.Holder(); | 3268 v8::Handle<v8::Object> holder = info.Holder(); |
| 3269 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | 3269 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); |
| 3270 TestObject* impl = V8TestObject::toNative(holder); | 3270 TestObject* impl = V8TestObject::toImpl(holder); |
| 3271 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); | 3271 TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.G
etIsolate()), v8Value)); |
| 3272 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptio
nState); | 3272 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptio
nState); |
| 3273 exceptionState.throwIfNeeded(); | 3273 exceptionState.throwIfNeeded(); |
| 3274 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute")); // Inval
idate the cached value. | 3274 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute")); // Inval
idate the cached value. |
| 3275 } | 3275 } |
| 3276 | 3276 |
| 3277 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb
ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | 3277 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb
ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
| 3278 { | 3278 { |
| 3279 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3279 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3280 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteSetter(v8Value, info); | 3280 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteSetter(v8Value, info); |
| 3281 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3281 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3282 } | 3282 } |
| 3283 | 3283 |
| 3284 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 3284 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 3285 { | 3285 { |
| 3286 v8::Handle<v8::Object> holder = info.Holder(); | 3286 v8::Handle<v8::Object> holder = info.Holder(); |
| 3287 TestObject* impl = V8TestObject::toNative(holder); | 3287 TestObject* impl = V8TestObject::toImpl(holder); |
| 3288 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lecttestinterfaceattributeAttr)), impl); | 3288 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lecttestinterfaceattributeAttr)), impl); |
| 3289 } | 3289 } |
| 3290 | 3290 |
| 3291 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3291 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3292 { | 3292 { |
| 3293 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3293 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3294 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); | 3294 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); |
| 3295 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3295 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3296 } | 3296 } |
| 3297 | 3297 |
| 3298 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | 3298 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 3299 { | 3299 { |
| 3300 v8::Handle<v8::Object> holder = info.Holder(); | 3300 v8::Handle<v8::Object> holder = info.Holder(); |
| 3301 TestObject* impl = V8TestObject::toNative(holder); | 3301 TestObject* impl = V8TestObject::toImpl(holder); |
| 3302 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); | 3302 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); |
| 3303 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3303 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3304 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr
(cppValue)); | 3304 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr
(cppValue)); |
| 3305 } | 3305 } |
| 3306 | 3306 |
| 3307 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 3307 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 3308 { | 3308 { |
| 3309 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3309 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3310 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3310 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3311 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8Value,
info); | 3311 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8Value,
info); |
| 3312 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3312 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3313 } | 3313 } |
| 3314 | 3314 |
| 3315 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | 3315 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 3316 { | 3316 { |
| 3317 v8::Handle<v8::Object> holder = info.Holder(); | 3317 v8::Handle<v8::Object> holder = info.Holder(); |
| 3318 TestObject* impl = V8TestObject::toNative(holder); | 3318 TestObject* impl = V8TestObject::toImpl(holder); |
| 3319 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lectedNameAttributeAttr)), impl); | 3319 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lectedNameAttributeAttr)), impl); |
| 3320 } | 3320 } |
| 3321 | 3321 |
| 3322 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3322 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3323 { | 3323 { |
| 3324 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3324 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3325 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGet
ter(info); | 3325 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGet
ter(info); |
| 3326 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3326 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3327 } | 3327 } |
| 3328 | 3328 |
| 3329 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3329 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3330 { | 3330 { |
| 3331 v8::Handle<v8::Object> holder = info.Holder(); | 3331 v8::Handle<v8::Object> holder = info.Holder(); |
| 3332 TestObject* impl = V8TestObject::toNative(holder); | 3332 TestObject* impl = V8TestObject::toImpl(holder); |
| 3333 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); | 3333 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); |
| 3334 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3334 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3335 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppVal
ue)); | 3335 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppVal
ue)); |
| 3336 } | 3336 } |
| 3337 | 3337 |
| 3338 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | 3338 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) |
| 3339 { | 3339 { |
| 3340 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3340 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3341 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3341 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3342 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSet
ter(v8Value, info); | 3342 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSet
ter(v8Value, info); |
| 3343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3344 } | 3344 } |
| 3345 | 3345 |
| 3346 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 3346 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 3347 { | 3347 { |
| 3348 v8::Handle<v8::Object> holder = info.Holder(); | 3348 v8::Handle<v8::Object> holder = info.Holder(); |
| 3349 TestObject* impl = V8TestObject::toNative(holder); | 3349 TestObject* impl = V8TestObject::toImpl(holder); |
| 3350 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectbooleana
ttributeAttr)); | 3350 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectbooleana
ttributeAttr)); |
| 3351 } | 3351 } |
| 3352 | 3352 |
| 3353 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 3353 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3354 { | 3354 { |
| 3355 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3355 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3356 TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info); | 3356 TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info); |
| 3357 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3357 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3358 } | 3358 } |
| 3359 | 3359 |
| 3360 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 3360 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 3361 { | 3361 { |
| 3362 v8::Handle<v8::Object> holder = info.Holder(); | 3362 v8::Handle<v8::Object> holder = info.Holder(); |
| 3363 TestObject* impl = V8TestObject::toNative(holder); | 3363 TestObject* impl = V8TestObject::toImpl(holder); |
| 3364 TONATIVE_VOID(bool, cppValue, v8Value->BooleanValue()); | 3364 TONATIVE_VOID(bool, cppValue, v8Value->BooleanValue()); |
| 3365 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3365 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3366 impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); | 3366 impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); |
| 3367 } | 3367 } |
| 3368 | 3368 |
| 3369 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3369 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3370 { | 3370 { |
| 3371 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3371 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3372 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3372 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3373 TestObjectV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info); | 3373 TestObjectV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info); |
| 3374 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3374 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3375 } | 3375 } |
| 3376 | 3376 |
| 3377 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 3377 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 3378 { | 3378 { |
| 3379 v8::Handle<v8::Object> holder = info.Holder(); | 3379 v8::Handle<v8::Object> holder = info.Holder(); |
| 3380 TestObject* impl = V8TestObject::toNative(holder); | 3380 TestObject* impl = V8TestObject::toImpl(holder); |
| 3381 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectlonga
ttributeAttr)); | 3381 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectlonga
ttributeAttr)); |
| 3382 } | 3382 } |
| 3383 | 3383 |
| 3384 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 3384 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 3385 { | 3385 { |
| 3386 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3386 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3387 TestObjectV8Internal::reflectLongAttributeAttributeGetter(info); | 3387 TestObjectV8Internal::reflectLongAttributeAttributeGetter(info); |
| 3388 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3388 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3389 } | 3389 } |
| 3390 | 3390 |
| 3391 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 3391 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 3392 { | 3392 { |
| 3393 v8::Handle<v8::Object> holder = info.Holder(); | 3393 v8::Handle<v8::Object> holder = info.Holder(); |
| 3394 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAtt
ribute", "TestObject", holder, info.GetIsolate()); | 3394 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAtt
ribute", "TestObject", holder, info.GetIsolate()); |
| 3395 TestObject* impl = V8TestObject::toNative(holder); | 3395 TestObject* impl = V8TestObject::toImpl(holder); |
| 3396 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 3396 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 3397 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3397 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3398 impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); | 3398 impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); |
| 3399 } | 3399 } |
| 3400 | 3400 |
| 3401 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3401 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3402 { | 3402 { |
| 3403 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3403 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3404 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3404 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3405 TestObjectV8Internal::reflectLongAttributeAttributeSetter(v8Value, info); | 3405 TestObjectV8Internal::reflectLongAttributeAttributeSetter(v8Value, info); |
| 3406 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3406 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3407 } | 3407 } |
| 3408 | 3408 |
| 3409 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 3409 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 3410 { | 3410 { |
| 3411 v8::Handle<v8::Object> holder = info.Holder(); | 3411 v8::Handle<v8::Object> holder = info.Holder(); |
| 3412 TestObject* impl = V8TestObject::toNative(holder); | 3412 TestObject* impl = V8TestObject::toImpl(holder); |
| 3413 v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->fastGetAtt
ribute(HTMLNames::reflectunsignedshortattributeAttr)))); | 3413 v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->fastGetAtt
ribute(HTMLNames::reflectunsignedshortattributeAttr)))); |
| 3414 } | 3414 } |
| 3415 | 3415 |
| 3416 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3416 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3417 { | 3417 { |
| 3418 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3418 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3419 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info); | 3419 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info); |
| 3420 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3420 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3421 } | 3421 } |
| 3422 | 3422 |
| 3423 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | 3423 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 3424 { | 3424 { |
| 3425 v8::Handle<v8::Object> holder = info.Holder(); | 3425 v8::Handle<v8::Object> holder = info.Holder(); |
| 3426 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dShortAttribute", "TestObject", holder, info.GetIsolate()); | 3426 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dShortAttribute", "TestObject", holder, info.GetIsolate()); |
| 3427 TestObject* impl = V8TestObject::toNative(holder); | 3427 TestObject* impl = V8TestObject::toImpl(holder); |
| 3428 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt16(v8Value, exception
State), exceptionState); | 3428 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt16(v8Value, exception
State), exceptionState); |
| 3429 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3429 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3430 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); | 3430 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); |
| 3431 } | 3431 } |
| 3432 | 3432 |
| 3433 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 3433 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 3434 { | 3434 { |
| 3435 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3435 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3436 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3436 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3437 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8Value,
info); | 3437 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8Value,
info); |
| 3438 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3438 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3439 } | 3439 } |
| 3440 | 3440 |
| 3441 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 3441 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 3442 { | 3442 { |
| 3443 v8::Handle<v8::Object> holder = info.Holder(); | 3443 v8::Handle<v8::Object> holder = info.Holder(); |
| 3444 TestObject* impl = V8TestObject::toNative(holder); | 3444 TestObject* impl = V8TestObject::toImpl(holder); |
| 3445 v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->getIntegra
lAttribute(HTMLNames::reflectunsignedlongattributeAttr)))); | 3445 v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->getIntegra
lAttribute(HTMLNames::reflectunsignedlongattributeAttr)))); |
| 3446 } | 3446 } |
| 3447 | 3447 |
| 3448 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3448 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3449 { | 3449 { |
| 3450 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3450 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3451 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info); | 3451 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info); |
| 3452 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3452 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3453 } | 3453 } |
| 3454 | 3454 |
| 3455 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | 3455 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) |
| 3456 { | 3456 { |
| 3457 v8::Handle<v8::Object> holder = info.Holder(); | 3457 v8::Handle<v8::Object> holder = info.Holder(); |
| 3458 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dLongAttribute", "TestObject", holder, info.GetIsolate()); | 3458 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3459 TestObject* impl = V8TestObject::toNative(holder); | 3459 TestObject* impl = V8TestObject::toImpl(holder); |
| 3460 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt32(v8Value, exception
State), exceptionState); | 3460 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt32(v8Value, exception
State), exceptionState); |
| 3461 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3461 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3462 impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAt
tr, cppValue); | 3462 impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAt
tr, cppValue); |
| 3463 } | 3463 } |
| 3464 | 3464 |
| 3465 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3465 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3466 { | 3466 { |
| 3467 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3467 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3468 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3468 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3469 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Value, i
nfo); | 3469 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Value, i
nfo); |
| 3470 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3470 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3471 } | 3471 } |
| 3472 | 3472 |
| 3473 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 3473 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3474 { | 3474 { |
| 3475 v8::Handle<v8::Object> holder = info.Holder(); | 3475 v8::Handle<v8::Object> holder = info.Holder(); |
| 3476 TestObject* impl = V8TestObject::toNative(holder); | 3476 TestObject* impl = V8TestObject::toImpl(holder); |
| 3477 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); | 3477 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); |
| 3478 } | 3478 } |
| 3479 | 3479 |
| 3480 static void idAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyC
allbackInfo<v8::Value>& info) | 3480 static void idAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyC
allbackInfo<v8::Value>& info) |
| 3481 { | 3481 { |
| 3482 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3482 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3483 TestObjectV8Internal::idAttributeGetter(info); | 3483 TestObjectV8Internal::idAttributeGetter(info); |
| 3484 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3484 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3485 } | 3485 } |
| 3486 | 3486 |
| 3487 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCa
llbackInfo<void>& info) | 3487 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCa
llbackInfo<void>& info) |
| 3488 { | 3488 { |
| 3489 v8::Handle<v8::Object> holder = info.Holder(); | 3489 v8::Handle<v8::Object> holder = info.Holder(); |
| 3490 TestObject* impl = V8TestObject::toNative(holder); | 3490 TestObject* impl = V8TestObject::toImpl(holder); |
| 3491 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3491 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3492 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3492 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3493 impl->setAttribute(HTMLNames::idAttr, cppValue); | 3493 impl->setAttribute(HTMLNames::idAttr, cppValue); |
| 3494 } | 3494 } |
| 3495 | 3495 |
| 3496 static void idAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3496 static void idAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3497 { | 3497 { |
| 3498 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3498 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3499 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3499 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3500 TestObjectV8Internal::idAttributeSetter(v8Value, info); | 3500 TestObjectV8Internal::idAttributeSetter(v8Value, info); |
| 3501 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3501 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3502 } | 3502 } |
| 3503 | 3503 |
| 3504 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 3504 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3505 { | 3505 { |
| 3506 v8::Handle<v8::Object> holder = info.Holder(); | 3506 v8::Handle<v8::Object> holder = info.Holder(); |
| 3507 TestObject* impl = V8TestObject::toNative(holder); | 3507 TestObject* impl = V8TestObject::toImpl(holder); |
| 3508 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); | 3508 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); |
| 3509 } | 3509 } |
| 3510 | 3510 |
| 3511 static void nameAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 3511 static void nameAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 3512 { | 3512 { |
| 3513 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3513 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3514 TestObjectV8Internal::nameAttributeGetter(info); | 3514 TestObjectV8Internal::nameAttributeGetter(info); |
| 3515 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3515 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3516 } | 3516 } |
| 3517 | 3517 |
| 3518 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) | 3518 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) |
| 3519 { | 3519 { |
| 3520 v8::Handle<v8::Object> holder = info.Holder(); | 3520 v8::Handle<v8::Object> holder = info.Holder(); |
| 3521 TestObject* impl = V8TestObject::toNative(holder); | 3521 TestObject* impl = V8TestObject::toImpl(holder); |
| 3522 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3522 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3523 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3523 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3524 impl->setAttribute(HTMLNames::nameAttr, cppValue); | 3524 impl->setAttribute(HTMLNames::nameAttr, cppValue); |
| 3525 } | 3525 } |
| 3526 | 3526 |
| 3527 static void nameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3527 static void nameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3528 { | 3528 { |
| 3529 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3529 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3530 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3530 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3531 TestObjectV8Internal::nameAttributeSetter(v8Value, info); | 3531 TestObjectV8Internal::nameAttributeSetter(v8Value, info); |
| 3532 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3532 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3533 } | 3533 } |
| 3534 | 3534 |
| 3535 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) | 3535 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) |
| 3536 { | 3536 { |
| 3537 v8::Handle<v8::Object> holder = info.Holder(); | 3537 v8::Handle<v8::Object> holder = info.Holder(); |
| 3538 TestObject* impl = V8TestObject::toNative(holder); | 3538 TestObject* impl = V8TestObject::toImpl(holder); |
| 3539 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); | 3539 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); |
| 3540 } | 3540 } |
| 3541 | 3541 |
| 3542 static void classAttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 3542 static void classAttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 3543 { | 3543 { |
| 3544 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3544 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3545 TestObjectV8Internal::classAttributeGetter(info); | 3545 TestObjectV8Internal::classAttributeGetter(info); |
| 3546 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3546 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3547 } | 3547 } |
| 3548 | 3548 |
| 3549 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) | 3549 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) |
| 3550 { | 3550 { |
| 3551 v8::Handle<v8::Object> holder = info.Holder(); | 3551 v8::Handle<v8::Object> holder = info.Holder(); |
| 3552 TestObject* impl = V8TestObject::toNative(holder); | 3552 TestObject* impl = V8TestObject::toImpl(holder); |
| 3553 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3553 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3554 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3554 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3555 impl->setAttribute(HTMLNames::classAttr, cppValue); | 3555 impl->setAttribute(HTMLNames::classAttr, cppValue); |
| 3556 } | 3556 } |
| 3557 | 3557 |
| 3558 static void classAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3558 static void classAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3559 { | 3559 { |
| 3560 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3560 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3561 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3561 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3562 TestObjectV8Internal::classAttributeSetter(v8Value, info); | 3562 TestObjectV8Internal::classAttributeSetter(v8Value, info); |
| 3563 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3563 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3564 } | 3564 } |
| 3565 | 3565 |
| 3566 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 3566 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
| 3567 { | 3567 { |
| 3568 v8::Handle<v8::Object> holder = info.Holder(); | 3568 v8::Handle<v8::Object> holder = info.Holder(); |
| 3569 TestObject* impl = V8TestObject::toNative(holder); | 3569 TestObject* impl = V8TestObject::toImpl(holder); |
| 3570 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); | 3570 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); |
| 3571 } | 3571 } |
| 3572 | 3572 |
| 3573 static void reflectedIdAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 3573 static void reflectedIdAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 3574 { | 3574 { |
| 3575 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3575 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3576 TestObjectV8Internal::reflectedIdAttributeGetter(info); | 3576 TestObjectV8Internal::reflectedIdAttributeGetter(info); |
| 3577 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3577 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3578 } | 3578 } |
| 3579 | 3579 |
| 3580 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) | 3580 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
| 3581 { | 3581 { |
| 3582 v8::Handle<v8::Object> holder = info.Holder(); | 3582 v8::Handle<v8::Object> holder = info.Holder(); |
| 3583 TestObject* impl = V8TestObject::toNative(holder); | 3583 TestObject* impl = V8TestObject::toImpl(holder); |
| 3584 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3584 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3585 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3585 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3586 impl->setAttribute(HTMLNames::idAttr, cppValue); | 3586 impl->setAttribute(HTMLNames::idAttr, cppValue); |
| 3587 } | 3587 } |
| 3588 | 3588 |
| 3589 static void reflectedIdAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3589 static void reflectedIdAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3590 { | 3590 { |
| 3591 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3591 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3592 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3592 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3593 TestObjectV8Internal::reflectedIdAttributeSetter(v8Value, info); | 3593 TestObjectV8Internal::reflectedIdAttributeSetter(v8Value, info); |
| 3594 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3594 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3595 } | 3595 } |
| 3596 | 3596 |
| 3597 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 3597 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 3598 { | 3598 { |
| 3599 v8::Handle<v8::Object> holder = info.Holder(); | 3599 v8::Handle<v8::Object> holder = info.Holder(); |
| 3600 TestObject* impl = V8TestObject::toNative(holder); | 3600 TestObject* impl = V8TestObject::toImpl(holder); |
| 3601 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); | 3601 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); |
| 3602 } | 3602 } |
| 3603 | 3603 |
| 3604 static void reflectedNameAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 3604 static void reflectedNameAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 3605 { | 3605 { |
| 3606 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3606 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3607 TestObjectV8Internal::reflectedNameAttributeGetter(info); | 3607 TestObjectV8Internal::reflectedNameAttributeGetter(info); |
| 3608 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3608 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3609 } | 3609 } |
| 3610 | 3610 |
| 3611 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 3611 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 3612 { | 3612 { |
| 3613 v8::Handle<v8::Object> holder = info.Holder(); | 3613 v8::Handle<v8::Object> holder = info.Holder(); |
| 3614 TestObject* impl = V8TestObject::toNative(holder); | 3614 TestObject* impl = V8TestObject::toImpl(holder); |
| 3615 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3615 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3616 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3616 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3617 impl->setAttribute(HTMLNames::nameAttr, cppValue); | 3617 impl->setAttribute(HTMLNames::nameAttr, cppValue); |
| 3618 } | 3618 } |
| 3619 | 3619 |
| 3620 static void reflectedNameAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3620 static void reflectedNameAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3621 { | 3621 { |
| 3622 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3622 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3623 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3623 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3624 TestObjectV8Internal::reflectedNameAttributeSetter(v8Value, info); | 3624 TestObjectV8Internal::reflectedNameAttributeSetter(v8Value, info); |
| 3625 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3625 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3626 } | 3626 } |
| 3627 | 3627 |
| 3628 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 3628 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 3629 { | 3629 { |
| 3630 v8::Handle<v8::Object> holder = info.Holder(); | 3630 v8::Handle<v8::Object> holder = info.Holder(); |
| 3631 TestObject* impl = V8TestObject::toNative(holder); | 3631 TestObject* impl = V8TestObject::toImpl(holder); |
| 3632 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); | 3632 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); |
| 3633 } | 3633 } |
| 3634 | 3634 |
| 3635 static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 3635 static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 3636 { | 3636 { |
| 3637 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3637 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3638 TestObjectV8Internal::reflectedClassAttributeGetter(info); | 3638 TestObjectV8Internal::reflectedClassAttributeGetter(info); |
| 3639 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3639 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3640 } | 3640 } |
| 3641 | 3641 |
| 3642 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 3642 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 3643 { | 3643 { |
| 3644 v8::Handle<v8::Object> holder = info.Holder(); | 3644 v8::Handle<v8::Object> holder = info.Holder(); |
| 3645 TestObject* impl = V8TestObject::toNative(holder); | 3645 TestObject* impl = V8TestObject::toImpl(holder); |
| 3646 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3646 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3647 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3647 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3648 impl->setAttribute(HTMLNames::classAttr, cppValue); | 3648 impl->setAttribute(HTMLNames::classAttr, cppValue); |
| 3649 } | 3649 } |
| 3650 | 3650 |
| 3651 static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3651 static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3652 { | 3652 { |
| 3653 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3653 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3654 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3654 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3655 TestObjectV8Internal::reflectedClassAttributeSetter(v8Value, info); | 3655 TestObjectV8Internal::reflectedClassAttributeSetter(v8Value, info); |
| 3656 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3656 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3657 } | 3657 } |
| 3658 | 3658 |
| 3659 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 3659 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 3660 { | 3660 { |
| 3661 v8::Handle<v8::Object> holder = info.Holder(); | 3661 v8::Handle<v8::Object> holder = info.Holder(); |
| 3662 TestObject* impl = V8TestObject::toNative(holder); | 3662 TestObject* impl = V8TestObject::toImpl(holder); |
| 3663 String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeA
ttr)); | 3663 String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeA
ttr)); |
| 3664 if (cppValue.isEmpty()) { | 3664 if (cppValue.isEmpty()) { |
| 3665 ; | 3665 ; |
| 3666 } else if (equalIgnoringCase(cppValue, "unique")) { | 3666 } else if (equalIgnoringCase(cppValue, "unique")) { |
| 3667 cppValue = "unique"; | 3667 cppValue = "unique"; |
| 3668 } else { | 3668 } else { |
| 3669 cppValue = ""; | 3669 cppValue = ""; |
| 3670 } | 3670 } |
| 3671 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3671 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 3672 } | 3672 } |
| 3673 | 3673 |
| 3674 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3674 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3675 { | 3675 { |
| 3676 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3676 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3677 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); | 3677 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); |
| 3678 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3678 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3679 } | 3679 } |
| 3680 | 3680 |
| 3681 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 3681 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 3682 { | 3682 { |
| 3683 v8::Handle<v8::Object> holder = info.Holder(); | 3683 v8::Handle<v8::Object> holder = info.Holder(); |
| 3684 TestObject* impl = V8TestObject::toNative(holder); | 3684 TestObject* impl = V8TestObject::toImpl(holder); |
| 3685 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3685 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3686 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3686 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3687 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); | 3687 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); |
| 3688 } | 3688 } |
| 3689 | 3689 |
| 3690 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3690 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3691 { | 3691 { |
| 3692 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3692 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3693 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3693 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3694 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(v8Value, info
); | 3694 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(v8Value, info
); |
| 3695 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3695 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3696 } | 3696 } |
| 3697 | 3697 |
| 3698 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 3698 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 3699 { | 3699 { |
| 3700 v8::Handle<v8::Object> holder = info.Holder(); | 3700 v8::Handle<v8::Object> holder = info.Holder(); |
| 3701 TestObject* impl = V8TestObject::toNative(holder); | 3701 TestObject* impl = V8TestObject::toImpl(holder); |
| 3702 String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr
)); | 3702 String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr
)); |
| 3703 if (cppValue.isEmpty()) { | 3703 if (cppValue.isEmpty()) { |
| 3704 ; | 3704 ; |
| 3705 } else if (equalIgnoringCase(cppValue, "Per")) { | 3705 } else if (equalIgnoringCase(cppValue, "Per")) { |
| 3706 cppValue = "Per"; | 3706 cppValue = "Per"; |
| 3707 } else if (equalIgnoringCase(cppValue, "Paal")) { | 3707 } else if (equalIgnoringCase(cppValue, "Paal")) { |
| 3708 cppValue = "Paal"; | 3708 cppValue = "Paal"; |
| 3709 } else if (equalIgnoringCase(cppValue, "Espen")) { | 3709 } else if (equalIgnoringCase(cppValue, "Espen")) { |
| 3710 cppValue = "Espen"; | 3710 cppValue = "Espen"; |
| 3711 } else { | 3711 } else { |
| 3712 cppValue = ""; | 3712 cppValue = ""; |
| 3713 } | 3713 } |
| 3714 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3714 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 3715 } | 3715 } |
| 3716 | 3716 |
| 3717 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 3717 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3718 { | 3718 { |
| 3719 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3719 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3720 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); | 3720 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); |
| 3721 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3721 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3722 } | 3722 } |
| 3723 | 3723 |
| 3724 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 3724 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 3725 { | 3725 { |
| 3726 v8::Handle<v8::Object> holder = info.Holder(); | 3726 v8::Handle<v8::Object> holder = info.Holder(); |
| 3727 TestObject* impl = V8TestObject::toNative(holder); | 3727 TestObject* impl = V8TestObject::toImpl(holder); |
| 3728 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3728 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3729 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3729 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3730 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); | 3730 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); |
| 3731 } | 3731 } |
| 3732 | 3732 |
| 3733 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3733 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3734 { | 3734 { |
| 3735 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3735 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3736 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3736 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3737 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, info); | 3737 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, info); |
| 3738 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3738 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3739 } | 3739 } |
| 3740 | 3740 |
| 3741 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 3741 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 3742 { | 3742 { |
| 3743 v8::Handle<v8::Object> holder = info.Holder(); | 3743 v8::Handle<v8::Object> holder = info.Holder(); |
| 3744 TestObject* impl = V8TestObject::toNative(holder); | 3744 TestObject* impl = V8TestObject::toImpl(holder); |
| 3745 String cppValue(impl->fastGetAttribute(HTMLNames::otherAttr)); | 3745 String cppValue(impl->fastGetAttribute(HTMLNames::otherAttr)); |
| 3746 if (cppValue.isEmpty()) { | 3746 if (cppValue.isEmpty()) { |
| 3747 ; | 3747 ; |
| 3748 } else if (equalIgnoringCase(cppValue, "Value1")) { | 3748 } else if (equalIgnoringCase(cppValue, "Value1")) { |
| 3749 cppValue = "Value1"; | 3749 cppValue = "Value1"; |
| 3750 } else if (equalIgnoringCase(cppValue, "Value2")) { | 3750 } else if (equalIgnoringCase(cppValue, "Value2")) { |
| 3751 cppValue = "Value2"; | 3751 cppValue = "Value2"; |
| 3752 } else { | 3752 } else { |
| 3753 cppValue = ""; | 3753 cppValue = ""; |
| 3754 } | 3754 } |
| 3755 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3755 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 3756 } | 3756 } |
| 3757 | 3757 |
| 3758 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3758 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3759 { | 3759 { |
| 3760 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3760 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3761 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); | 3761 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); |
| 3762 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3762 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3763 } | 3763 } |
| 3764 | 3764 |
| 3765 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 3765 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 3766 { | 3766 { |
| 3767 v8::Handle<v8::Object> holder = info.Holder(); | 3767 v8::Handle<v8::Object> holder = info.Holder(); |
| 3768 TestObject* impl = V8TestObject::toNative(holder); | 3768 TestObject* impl = V8TestObject::toImpl(holder); |
| 3769 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3769 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3770 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3770 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3771 impl->setAttribute(HTMLNames::otherAttr, cppValue); | 3771 impl->setAttribute(HTMLNames::otherAttr, cppValue); |
| 3772 } | 3772 } |
| 3773 | 3773 |
| 3774 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3774 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3775 { | 3775 { |
| 3776 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3776 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3777 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3777 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3778 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Value, in
fo); | 3778 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Value, in
fo); |
| 3779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3780 } | 3780 } |
| 3781 | 3781 |
| 3782 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 3782 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
| 3783 { | 3783 { |
| 3784 v8::Handle<v8::Object> holder = info.Holder(); | 3784 v8::Handle<v8::Object> holder = info.Holder(); |
| 3785 TestObject* impl = V8TestObject::toNative(holder); | 3785 TestObject* impl = V8TestObject::toImpl(holder); |
| 3786 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithmissingdefaulta
ttributeAttr)); | 3786 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithmissingdefaulta
ttributeAttr)); |
| 3787 if (cppValue.isEmpty()) { | 3787 if (cppValue.isEmpty()) { |
| 3788 cppValue = "rsa"; | 3788 cppValue = "rsa"; |
| 3789 } else if (equalIgnoringCase(cppValue, "rsa")) { | 3789 } else if (equalIgnoringCase(cppValue, "rsa")) { |
| 3790 cppValue = "rsa"; | 3790 cppValue = "rsa"; |
| 3791 } else if (equalIgnoringCase(cppValue, "dsa")) { | 3791 } else if (equalIgnoringCase(cppValue, "dsa")) { |
| 3792 cppValue = "dsa"; | 3792 cppValue = "dsa"; |
| 3793 } else { | 3793 } else { |
| 3794 cppValue = ""; | 3794 cppValue = ""; |
| 3795 } | 3795 } |
| 3796 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3796 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 3797 } | 3797 } |
| 3798 | 3798 |
| 3799 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3799 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3800 { | 3800 { |
| 3801 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3801 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3802 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); | 3802 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); |
| 3803 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3803 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3804 } | 3804 } |
| 3805 | 3805 |
| 3806 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3806 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3807 { | 3807 { |
| 3808 v8::Handle<v8::Object> holder = info.Holder(); | 3808 v8::Handle<v8::Object> holder = info.Holder(); |
| 3809 TestObject* impl = V8TestObject::toNative(holder); | 3809 TestObject* impl = V8TestObject::toImpl(holder); |
| 3810 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3810 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3811 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3811 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3812 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal
ue); | 3812 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal
ue); |
| 3813 } | 3813 } |
| 3814 | 3814 |
| 3815 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | 3815 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 3816 { | 3816 { |
| 3817 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3817 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3818 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3818 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3819 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(v8Va
lue, info); | 3819 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(v8Va
lue, info); |
| 3820 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3820 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3821 } | 3821 } |
| 3822 | 3822 |
| 3823 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) | 3823 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 3824 { | 3824 { |
| 3825 v8::Handle<v8::Object> holder = info.Holder(); | 3825 v8::Handle<v8::Object> holder = info.Holder(); |
| 3826 TestObject* impl = V8TestObject::toNative(holder); | 3826 TestObject* impl = V8TestObject::toImpl(holder); |
| 3827 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissingd
efaultattributeAttr)); | 3827 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissingd
efaultattributeAttr)); |
| 3828 if (cppValue.isEmpty()) { | 3828 if (cppValue.isEmpty()) { |
| 3829 cppValue = "auto"; | 3829 cppValue = "auto"; |
| 3830 } else if (equalIgnoringCase(cppValue, "ltr")) { | 3830 } else if (equalIgnoringCase(cppValue, "ltr")) { |
| 3831 cppValue = "ltr"; | 3831 cppValue = "ltr"; |
| 3832 } else if (equalIgnoringCase(cppValue, "rtl")) { | 3832 } else if (equalIgnoringCase(cppValue, "rtl")) { |
| 3833 cppValue = "rtl"; | 3833 cppValue = "rtl"; |
| 3834 } else if (equalIgnoringCase(cppValue, "auto")) { | 3834 } else if (equalIgnoringCase(cppValue, "auto")) { |
| 3835 cppValue = "auto"; | 3835 cppValue = "auto"; |
| 3836 } else { | 3836 } else { |
| 3837 cppValue = "ltr"; | 3837 cppValue = "ltr"; |
| 3838 } | 3838 } |
| 3839 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3839 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 3840 } | 3840 } |
| 3841 | 3841 |
| 3842 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3842 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3843 { | 3843 { |
| 3844 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3844 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3845 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); | 3845 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); |
| 3846 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3846 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3847 } | 3847 } |
| 3848 | 3848 |
| 3849 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3849 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3850 { | 3850 { |
| 3851 v8::Handle<v8::Object> holder = info.Holder(); | 3851 v8::Handle<v8::Object> holder = info.Holder(); |
| 3852 TestObject* impl = V8TestObject::toNative(holder); | 3852 TestObject* impl = V8TestObject::toImpl(holder); |
| 3853 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3853 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3854 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3854 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3855 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); | 3855 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); |
| 3856 } | 3856 } |
| 3857 | 3857 |
| 3858 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) | 3858 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) |
| 3859 { | 3859 { |
| 3860 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3860 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3861 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 3861 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 3862 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(v8Value, info); | 3862 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(v8Value, info); |
| 3863 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3863 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3864 } | 3864 } |
| 3865 | 3865 |
| 3866 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 3866 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 3867 { | 3867 { |
| 3868 v8::Handle<v8::Object> holder = info.Holder(); | 3868 v8::Handle<v8::Object> holder = info.Holder(); |
| 3869 TestObject* impl = V8TestObject::toNative(holder); | 3869 TestObject* impl = V8TestObject::toImpl(holder); |
| 3870 String cppValue(impl->fastGetAttribute(HTMLNames::corssettingattributeAttr))
; | 3870 String cppValue(impl->fastGetAttribute(HTMLNames::corssettingattributeAttr))
; |
| 3871 if (cppValue.isNull()) { | 3871 if (cppValue.isNull()) { |
| 3872 ; | 3872 ; |
| 3873 } else if (cppValue.isEmpty()) { | 3873 } else if (cppValue.isEmpty()) { |
| 3874 cppValue = "anonymous"; | 3874 cppValue = "anonymous"; |
| 3875 } else if (equalIgnoringCase(cppValue, "anonymous")) { | 3875 } else if (equalIgnoringCase(cppValue, "anonymous")) { |
| 3876 cppValue = "anonymous"; | 3876 cppValue = "anonymous"; |
| 3877 } else if (equalIgnoringCase(cppValue, "use-credentials")) { | 3877 } else if (equalIgnoringCase(cppValue, "use-credentials")) { |
| 3878 cppValue = "use-credentials"; | 3878 cppValue = "use-credentials"; |
| 3879 } else { | 3879 } else { |
| 3880 cppValue = "anonymous"; | 3880 cppValue = "anonymous"; |
| 3881 } | 3881 } |
| 3882 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3882 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 3883 } | 3883 } |
| 3884 | 3884 |
| 3885 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 3885 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 3886 { | 3886 { |
| 3887 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3887 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3888 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); | 3888 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); |
| 3889 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3889 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3890 } | 3890 } |
| 3891 | 3891 |
| 3892 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 3892 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 3893 { | 3893 { |
| 3894 v8::Handle<v8::Object> holder = info.Holder(); | 3894 v8::Handle<v8::Object> holder = info.Holder(); |
| 3895 TestObject* impl = V8TestObject::toNative(holder); | 3895 TestObject* impl = V8TestObject::toImpl(holder); |
| 3896 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithemptymissinginv
alidattributeAttr)); | 3896 String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithemptymissinginv
alidattributeAttr)); |
| 3897 if (cppValue.isNull()) { | 3897 if (cppValue.isNull()) { |
| 3898 cppValue = "missing"; | 3898 cppValue = "missing"; |
| 3899 } else if (cppValue.isEmpty()) { | 3899 } else if (cppValue.isEmpty()) { |
| 3900 cppValue = "empty"; | 3900 cppValue = "empty"; |
| 3901 } else if (equalIgnoringCase(cppValue, "empty")) { | 3901 } else if (equalIgnoringCase(cppValue, "empty")) { |
| 3902 cppValue = "empty"; | 3902 cppValue = "empty"; |
| 3903 } else if (equalIgnoringCase(cppValue, "missing")) { | 3903 } else if (equalIgnoringCase(cppValue, "missing")) { |
| 3904 cppValue = "missing"; | 3904 cppValue = "missing"; |
| 3905 } else if (equalIgnoringCase(cppValue, "invalid")) { | 3905 } else if (equalIgnoringCase(cppValue, "invalid")) { |
| 3906 cppValue = "invalid"; | 3906 cppValue = "invalid"; |
| 3907 } else if (equalIgnoringCase(cppValue, "a-normal")) { | 3907 } else if (equalIgnoringCase(cppValue, "a-normal")) { |
| 3908 cppValue = "a-normal"; | 3908 cppValue = "a-normal"; |
| 3909 } else { | 3909 } else { |
| 3910 cppValue = "invalid"; | 3910 cppValue = "invalid"; |
| 3911 } | 3911 } |
| 3912 v8SetReturnValueString(info, cppValue, info.GetIsolate()); | 3912 v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| 3913 } | 3913 } |
| 3914 | 3914 |
| 3915 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3915 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3916 { | 3916 { |
| 3917 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3917 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3918 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); | 3918 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); |
| 3919 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3919 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3920 } | 3920 } |
| 3921 | 3921 |
| 3922 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 3922 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 3923 { | 3923 { |
| 3924 v8::Handle<v8::Object> holder = info.Holder(); | 3924 v8::Handle<v8::Object> holder = info.Holder(); |
| 3925 TestObject* impl = V8TestObject::toNative(holder); | 3925 TestObject* impl = V8TestObject::toImpl(holder); |
| 3926 v8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute()); | 3926 v8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute()); |
| 3927 } | 3927 } |
| 3928 | 3928 |
| 3929 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3929 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3930 { | 3930 { |
| 3931 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3931 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3932 TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info); | 3932 TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info); |
| 3933 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3933 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3934 } | 3934 } |
| 3935 | 3935 |
| 3936 static void locationReplaceableAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 3936 static void locationReplaceableAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 3937 { | 3937 { |
| 3938 v8::Handle<v8::Object> holder = info.Holder(); | 3938 v8::Handle<v8::Object> holder = info.Holder(); |
| 3939 TestObject* impl = V8TestObject::toNative(holder); | 3939 TestObject* impl = V8TestObject::toImpl(holder); |
| 3940 v8SetReturnValueFast(info, WTF::getPtr(impl->locationReplaceable()), impl); | 3940 v8SetReturnValueFast(info, WTF::getPtr(impl->locationReplaceable()), impl); |
| 3941 } | 3941 } |
| 3942 | 3942 |
| 3943 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 3943 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 3944 { | 3944 { |
| 3945 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3945 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3946 TestObjectV8Internal::locationReplaceableAttributeGetter(info); | 3946 TestObjectV8Internal::locationReplaceableAttributeGetter(info); |
| 3947 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3947 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3948 } | 3948 } |
| 3949 | 3949 |
| 3950 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 3950 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 3951 { | 3951 { |
| 3952 v8::Handle<v8::Object> holder = info.Holder(); | 3952 v8::Handle<v8::Object> holder = info.Holder(); |
| 3953 TestObject* proxyImpl = V8TestObject::toNative(holder); | 3953 TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| 3954 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationReplaceab
le()); | 3954 RefPtrWillBeRawPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationReplaceab
le()); |
| 3955 if (!impl) | 3955 if (!impl) |
| 3956 return; | 3956 return; |
| 3957 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 3957 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 3958 impl->setHref(cppValue); | 3958 impl->setHref(cppValue); |
| 3959 } | 3959 } |
| 3960 | 3960 |
| 3961 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3961 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3962 { | 3962 { |
| 3963 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3963 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3964 TestObjectV8Internal::locationReplaceableAttributeSetter(v8Value, info); | 3964 TestObjectV8Internal::locationReplaceableAttributeSetter(v8Value, info); |
| 3965 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3965 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3966 } | 3966 } |
| 3967 | 3967 |
| 3968 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 3968 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 3969 { | 3969 { |
| 3970 v8::Handle<v8::Object> holder = info.Holder(); | 3970 v8::Handle<v8::Object> holder = info.Holder(); |
| 3971 TestObject* impl = V8TestObject::toNative(holder); | 3971 TestObject* impl = V8TestObject::toImpl(holder); |
| 3972 v8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); | 3972 v8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); |
| 3973 } | 3973 } |
| 3974 | 3974 |
| 3975 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3975 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3976 { | 3976 { |
| 3977 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 3977 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 3978 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info); | 3978 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info); |
| 3979 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3979 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3980 } | 3980 } |
| 3981 | 3981 |
| 3982 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 3982 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 3983 { | 3983 { |
| 3984 v8::Handle<v8::Object> holder = info.Holder(); | 3984 v8::Handle<v8::Object> holder = info.Holder(); |
| 3985 ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabled
LongAttribute", "TestObject", holder, info.GetIsolate()); | 3985 ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabled
LongAttribute", "TestObject", holder, info.GetIsolate()); |
| 3986 TestObject* impl = V8TestObject::toNative(holder); | 3986 TestObject* impl = V8TestObject::toImpl(holder); |
| 3987 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 3987 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 3988 impl->setRuntimeEnabledLongAttribute(cppValue); | 3988 impl->setRuntimeEnabledLongAttribute(cppValue); |
| 3989 } | 3989 } |
| 3990 | 3990 |
| 3991 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3991 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3992 { | 3992 { |
| 3993 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 3993 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 3994 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, in
fo); | 3994 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, in
fo); |
| 3995 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 3995 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 3996 } | 3996 } |
| 3997 | 3997 |
| 3998 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 3998 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 3999 { | 3999 { |
| 4000 v8::Handle<v8::Object> holder = info.Holder(); | 4000 v8::Handle<v8::Object> holder = info.Holder(); |
| 4001 TestObject* impl = V8TestObject::toNative(holder); | 4001 TestObject* impl = V8TestObject::toImpl(holder); |
| 4002 v8SetReturnValueInt(info, impl->perContextEnabledRuntimeEnabledLongAttribute
()); | 4002 v8SetReturnValueInt(info, impl->perContextEnabledRuntimeEnabledLongAttribute
()); |
| 4003 } | 4003 } |
| 4004 | 4004 |
| 4005 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4005 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4006 { | 4006 { |
| 4007 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4007 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4008 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeG
etter(info); | 4008 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeG
etter(info); |
| 4009 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4009 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4010 } | 4010 } |
| 4011 | 4011 |
| 4012 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4012 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4013 { | 4013 { |
| 4014 v8::Handle<v8::Object> holder = info.Holder(); | 4014 v8::Handle<v8::Object> holder = info.Holder(); |
| 4015 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | 4015 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 4016 TestObject* impl = V8TestObject::toNative(holder); | 4016 TestObject* impl = V8TestObject::toImpl(holder); |
| 4017 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 4017 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 4018 impl->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue); | 4018 impl->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue); |
| 4019 } | 4019 } |
| 4020 | 4020 |
| 4021 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 4021 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
| 4022 { | 4022 { |
| 4023 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4023 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4024 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeS
etter(v8Value, info); | 4024 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeS
etter(v8Value, info); |
| 4025 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4025 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4026 } | 4026 } |
| 4027 | 4027 |
| 4028 #if ENABLE(CONDITION) | 4028 #if ENABLE(CONDITION) |
| 4029 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 4029 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 4030 { | 4030 { |
| 4031 v8::Handle<v8::Object> holder = info.Holder(); | 4031 v8::Handle<v8::Object> holder = info.Holder(); |
| 4032 TestObject* impl = V8TestObject::toNative(holder); | 4032 TestObject* impl = V8TestObject::toImpl(holder); |
| 4033 v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute()); | 4033 v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute()); |
| 4034 } | 4034 } |
| 4035 #endif // ENABLE(CONDITION) | 4035 #endif // ENABLE(CONDITION) |
| 4036 | 4036 |
| 4037 #if ENABLE(CONDITION) | 4037 #if ENABLE(CONDITION) |
| 4038 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4038 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4039 { | 4039 { |
| 4040 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4040 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4041 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetter(
info); | 4041 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetter(
info); |
| 4042 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4042 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4043 } | 4043 } |
| 4044 #endif // ENABLE(CONDITION) | 4044 #endif // ENABLE(CONDITION) |
| 4045 | 4045 |
| 4046 #if ENABLE(CONDITION) | 4046 #if ENABLE(CONDITION) |
| 4047 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4047 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4048 { | 4048 { |
| 4049 v8::Handle<v8::Object> holder = info.Holder(); | 4049 v8::Handle<v8::Object> holder = info.Holder(); |
| 4050 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalRun
timeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | 4050 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalRun
timeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
| 4051 TestObject* impl = V8TestObject::toNative(holder); | 4051 TestObject* impl = V8TestObject::toImpl(holder); |
| 4052 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 4052 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 4053 impl->setConditionalRuntimeEnabledLongAttribute(cppValue); | 4053 impl->setConditionalRuntimeEnabledLongAttribute(cppValue); |
| 4054 } | 4054 } |
| 4055 #endif // ENABLE(CONDITION) | 4055 #endif // ENABLE(CONDITION) |
| 4056 | 4056 |
| 4057 #if ENABLE(CONDITION) | 4057 #if ENABLE(CONDITION) |
| 4058 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 4058 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
| 4059 { | 4059 { |
| 4060 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4060 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4061 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetter(
v8Value, info); | 4061 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetter(
v8Value, info); |
| 4062 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4062 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4063 } | 4063 } |
| 4064 #endif // ENABLE(CONDITION) | 4064 #endif // ENABLE(CONDITION) |
| 4065 | 4065 |
| 4066 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) | 4066 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4067 { | 4067 { |
| 4068 v8::Handle<v8::Object> holder = info.Holder(); | 4068 v8::Handle<v8::Object> holder = info.Holder(); |
| 4069 TestObject* impl = V8TestObject::toNative(holder); | 4069 TestObject* impl = V8TestObject::toImpl(holder); |
| 4070 v8SetReturnValueString(info, impl->setterCallWithActiveWindowAndFirstWindowS
tringAttribute(), info.GetIsolate()); | 4070 v8SetReturnValueString(info, impl->setterCallWithActiveWindowAndFirstWindowS
tringAttribute(), info.GetIsolate()); |
| 4071 } | 4071 } |
| 4072 | 4072 |
| 4073 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | 4073 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) |
| 4074 { | 4074 { |
| 4075 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4075 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4076 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeGetter(info); | 4076 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeGetter(info); |
| 4077 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4077 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4078 } | 4078 } |
| 4079 | 4079 |
| 4080 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4080 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4081 { | 4081 { |
| 4082 v8::Handle<v8::Object> holder = info.Holder(); | 4082 v8::Handle<v8::Object> holder = info.Holder(); |
| 4083 TestObject* impl = V8TestObject::toNative(holder); | 4083 TestObject* impl = V8TestObject::toImpl(holder); |
| 4084 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4084 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4085 impl->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(callingDOMW
indow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue); | 4085 impl->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(callingDOMW
indow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue); |
| 4086 } | 4086 } |
| 4087 | 4087 |
| 4088 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) | 4088 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) |
| 4089 { | 4089 { |
| 4090 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4090 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4091 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeSetter(v8Value, info); | 4091 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeSetter(v8Value, info); |
| 4092 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4092 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4093 } | 4093 } |
| 4094 | 4094 |
| 4095 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | 4095 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 4096 { | 4096 { |
| 4097 v8::Handle<v8::Object> holder = info.Holder(); | 4097 v8::Handle<v8::Object> holder = info.Holder(); |
| 4098 TestObject* impl = V8TestObject::toNative(holder); | 4098 TestObject* impl = V8TestObject::toImpl(holder); |
| 4099 v8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttri
bute(), info.GetIsolate()); | 4099 v8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttri
bute(), info.GetIsolate()); |
| 4100 } | 4100 } |
| 4101 | 4101 |
| 4102 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4102 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4103 { | 4103 { |
| 4104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4105 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Getter(info); | 4105 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Getter(info); |
| 4106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4107 } | 4107 } |
| 4108 | 4108 |
| 4109 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4109 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4110 { | 4110 { |
| 4111 v8::Handle<v8::Object> holder = info.Holder(); | 4111 v8::Handle<v8::Object> holder = info.Holder(); |
| 4112 TestObject* impl = V8TestObject::toNative(holder); | 4112 TestObject* impl = V8TestObject::toImpl(holder); |
| 4113 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4113 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4114 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 4114 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 4115 impl->setSetterCallWithExecutionContextStringAttribute(executionContext, cpp
Value); | 4115 impl->setSetterCallWithExecutionContextStringAttribute(executionContext, cpp
Value); |
| 4116 } | 4116 } |
| 4117 | 4117 |
| 4118 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) | 4118 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) |
| 4119 { | 4119 { |
| 4120 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4120 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4121 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Setter(v8Value, info); | 4121 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Setter(v8Value, info); |
| 4122 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4122 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4123 } | 4123 } |
| 4124 | 4124 |
| 4125 static void treatNullAsEmptyStringStringAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 4125 static void treatNullAsEmptyStringStringAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 4126 { | 4126 { |
| 4127 v8::Handle<v8::Object> holder = info.Holder(); | 4127 v8::Handle<v8::Object> holder = info.Holder(); |
| 4128 TestObject* impl = V8TestObject::toNative(holder); | 4128 TestObject* impl = V8TestObject::toImpl(holder); |
| 4129 v8SetReturnValueString(info, impl->treatNullAsEmptyStringStringAttribute(),
info.GetIsolate()); | 4129 v8SetReturnValueString(info, impl->treatNullAsEmptyStringStringAttribute(),
info.GetIsolate()); |
| 4130 } | 4130 } |
| 4131 | 4131 |
| 4132 static void treatNullAsEmptyStringStringAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4132 static void treatNullAsEmptyStringStringAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4133 { | 4133 { |
| 4134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4135 TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeGetter(i
nfo); | 4135 TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeGetter(i
nfo); |
| 4136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4137 } | 4137 } |
| 4138 | 4138 |
| 4139 static void treatNullAsEmptyStringStringAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4139 static void treatNullAsEmptyStringStringAttributeAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4140 { | 4140 { |
| 4141 v8::Handle<v8::Object> holder = info.Holder(); | 4141 v8::Handle<v8::Object> holder = info.Holder(); |
| 4142 TestObject* impl = V8TestObject::toNative(holder); | 4142 TestObject* impl = V8TestObject::toImpl(holder); |
| 4143 TOSTRING_VOID(V8StringResource<TreatNullAsEmptyString>, cppValue, v8Value); | 4143 TOSTRING_VOID(V8StringResource<TreatNullAsEmptyString>, cppValue, v8Value); |
| 4144 impl->setTreatNullAsEmptyStringStringAttribute(cppValue); | 4144 impl->setTreatNullAsEmptyStringStringAttribute(cppValue); |
| 4145 } | 4145 } |
| 4146 | 4146 |
| 4147 static void treatNullAsEmptyStringStringAttributeAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) | 4147 static void treatNullAsEmptyStringStringAttributeAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) |
| 4148 { | 4148 { |
| 4149 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4149 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4150 TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeSetter(v
8Value, info); | 4150 TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeSetter(v
8Value, info); |
| 4151 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4151 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4152 } | 4152 } |
| 4153 | 4153 |
| 4154 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) | 4154 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) |
| 4155 { | 4155 { |
| 4156 v8::Handle<v8::Object> holder = info.Holder(); | 4156 v8::Handle<v8::Object> holder = info.Holder(); |
| 4157 TestObject* impl = V8TestObject::toNative(holder); | 4157 TestObject* impl = V8TestObject::toImpl(holder); |
| 4158 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), i
nfo.GetIsolate()); | 4158 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), i
nfo.GetIsolate()); |
| 4159 } | 4159 } |
| 4160 | 4160 |
| 4161 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4161 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4162 { | 4162 { |
| 4163 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4163 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4164 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(in
fo); | 4164 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(in
fo); |
| 4165 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4165 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4166 } | 4166 } |
| 4167 | 4167 |
| 4168 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4168 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4169 { | 4169 { |
| 4170 v8::Handle<v8::Object> holder = info.Holder(); | 4170 v8::Handle<v8::Object> holder = info.Holder(); |
| 4171 TestObject* impl = V8TestObject::toNative(holder); | 4171 TestObject* impl = V8TestObject::toImpl(holder); |
| 4172 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); | 4172 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); |
| 4173 impl->setTreatNullAsNullStringStringAttribute(cppValue); | 4173 impl->setTreatNullAsNullStringStringAttribute(cppValue); |
| 4174 } | 4174 } |
| 4175 | 4175 |
| 4176 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | 4176 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) |
| 4177 { | 4177 { |
| 4178 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4178 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4179 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8
Value, info); | 4179 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8
Value, info); |
| 4180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4181 } | 4181 } |
| 4182 | 4182 |
| 4183 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 4183 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 4184 { | 4184 { |
| 4185 v8::Handle<v8::Object> holder = info.Holder(); | 4185 v8::Handle<v8::Object> holder = info.Holder(); |
| 4186 TestObject* impl = V8TestObject::toNative(holder); | 4186 TestObject* impl = V8TestObject::toImpl(holder); |
| 4187 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Attribute(), info.GetIsolate()); | 4187 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Attribute(), info.GetIsolate()); |
| 4188 } | 4188 } |
| 4189 | 4189 |
| 4190 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4190 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4191 { | 4191 { |
| 4192 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4192 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4193 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeG
etter(info); | 4193 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeG
etter(info); |
| 4194 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4194 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4195 } | 4195 } |
| 4196 | 4196 |
| 4197 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4197 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4198 { | 4198 { |
| 4199 v8::Handle<v8::Object> holder = info.Holder(); | 4199 v8::Handle<v8::Object> holder = info.Holder(); |
| 4200 TestObject* impl = V8TestObject::toNative(holder); | 4200 TestObject* impl = V8TestObject::toImpl(holder); |
| 4201 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4201 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4202 impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue); | 4202 impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue); |
| 4203 } | 4203 } |
| 4204 | 4204 |
| 4205 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 4205 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
| 4206 { | 4206 { |
| 4207 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4207 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4208 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeS
etter(v8Value, info); | 4208 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeS
etter(v8Value, info); |
| 4209 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4209 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4210 } | 4210 } |
| 4211 | 4211 |
| 4212 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) | 4212 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4213 { | 4213 { |
| 4214 v8::Handle<v8::Object> holder = info.Holder(); | 4214 v8::Handle<v8::Object> holder = info.Holder(); |
| 4215 TestObject* impl = V8TestObject::toNative(holder); | 4215 TestObject* impl = V8TestObject::toImpl(holder); |
| 4216 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringAttribute(), info.GetIsolate()); | 4216 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringAttribute(), info.GetIsolate()); |
| 4217 } | 4217 } |
| 4218 | 4218 |
| 4219 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4219 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4220 { | 4220 { |
| 4221 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4221 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4222 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteGetter(info); | 4222 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteGetter(info); |
| 4223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4224 } | 4224 } |
| 4225 | 4225 |
| 4226 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4226 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4227 { | 4227 { |
| 4228 v8::Handle<v8::Object> holder = info.Holder(); | 4228 v8::Handle<v8::Object> holder = info.Holder(); |
| 4229 TestObject* impl = V8TestObject::toNative(holder); | 4229 TestObject* impl = V8TestObject::toImpl(holder); |
| 4230 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4230 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4231 impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); | 4231 impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); |
| 4232 } | 4232 } |
| 4233 | 4233 |
| 4234 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) | 4234 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) |
| 4235 { | 4235 { |
| 4236 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4236 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4237 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteSetter(v8Value, info); | 4237 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteSetter(v8Value, info); |
| 4238 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4238 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4239 } | 4239 } |
| 4240 | 4240 |
| 4241 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) | 4241 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4242 { | 4242 { |
| 4243 v8::Handle<v8::Object> holder = info.Holder(); | 4243 v8::Handle<v8::Object> holder = info.Holder(); |
| 4244 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedTreatReturnedNullStringAsUndefinedStringAttribute"); | 4244 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedTreatReturnedNullStringAsUndefinedStringAttribute"); |
| 4245 TestObject* impl = V8TestObject::toNative(holder); | 4245 TestObject* impl = V8TestObject::toImpl(holder); |
| 4246 if (!impl->isStringDirty()) { | 4246 if (!impl->isStringDirty()) { |
| 4247 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | 4247 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); |
| 4248 if (!v8Value.IsEmpty()) { | 4248 if (!v8Value.IsEmpty()) { |
| 4249 v8SetReturnValue(info, v8Value); | 4249 v8SetReturnValue(info, v8Value); |
| 4250 return; | 4250 return; |
| 4251 } | 4251 } |
| 4252 } | 4252 } |
| 4253 String cppValue(impl->cachedTreatReturnedNullStringAsUndefinedStringAttribut
e()); | 4253 String cppValue(impl->cachedTreatReturnedNullStringAsUndefinedStringAttribut
e()); |
| 4254 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8Undefined() : v8String(info.GetIsolate(), cppValue)); | 4254 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, cppVa
lue.isNull() ? v8Undefined() : v8String(info.GetIsolate(), cppValue)); |
| 4255 v8SetReturnValueStringOrUndefined(info, cppValue, info.GetIsolate()); | 4255 v8SetReturnValueStringOrUndefined(info, cppValue, info.GetIsolate()); |
| 4256 } | 4256 } |
| 4257 | 4257 |
| 4258 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | 4258 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) |
| 4259 { | 4259 { |
| 4260 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4260 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4261 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeGetter(info); | 4261 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeGetter(info); |
| 4262 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4262 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4263 } | 4263 } |
| 4264 | 4264 |
| 4265 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4265 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4266 { | 4266 { |
| 4267 v8::Handle<v8::Object> holder = info.Holder(); | 4267 v8::Handle<v8::Object> holder = info.Holder(); |
| 4268 TestObject* impl = V8TestObject::toNative(holder); | 4268 TestObject* impl = V8TestObject::toImpl(holder); |
| 4269 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4269 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4270 impl->setCachedTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); | 4270 impl->setCachedTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); |
| 4271 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedTreatReturnedNullStringAsUndefinedStringAttribute")); /
/ Invalidate the cached value. | 4271 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedTreatReturnedNullStringAsUndefinedStringAttribute")); /
/ Invalidate the cached value. |
| 4272 } | 4272 } |
| 4273 | 4273 |
| 4274 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) | 4274 static void cachedTreatReturnedNullStringAsUndefinedStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) |
| 4275 { | 4275 { |
| 4276 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4276 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4277 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeSetter(v8Value, info); | 4277 TestObjectV8Internal::cachedTreatReturnedNullStringAsUndefinedStringAttribut
eAttributeSetter(v8Value, info); |
| 4278 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4278 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4279 } | 4279 } |
| 4280 | 4280 |
| 4281 static void treatReturnedNullStringAsNullByteStringAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 4281 static void treatReturnedNullStringAsNullByteStringAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 4282 { | 4282 { |
| 4283 v8::Handle<v8::Object> holder = info.Holder(); | 4283 v8::Handle<v8::Object> holder = info.Holder(); |
| 4284 TestObject* impl = V8TestObject::toNative(holder); | 4284 TestObject* impl = V8TestObject::toImpl(holder); |
| 4285 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullByteSt
ringAttribute(), info.GetIsolate()); | 4285 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullByteSt
ringAttribute(), info.GetIsolate()); |
| 4286 } | 4286 } |
| 4287 | 4287 |
| 4288 static void treatReturnedNullStringAsNullByteStringAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4288 static void treatReturnedNullStringAsNullByteStringAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4289 { | 4289 { |
| 4290 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4290 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4291 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttrib
uteGetter(info); | 4291 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttrib
uteGetter(info); |
| 4292 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4292 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4293 } | 4293 } |
| 4294 | 4294 |
| 4295 static void treatReturnedNullStringAsNullByteStringAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4295 static void treatReturnedNullStringAsNullByteStringAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4296 { | 4296 { |
| 4297 v8::Handle<v8::Object> holder = info.Holder(); | 4297 v8::Handle<v8::Object> holder = info.Holder(); |
| 4298 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsNullByteStringAttribute", "TestObject", holder, info.GetIsolate()); | 4298 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsNullByteStringAttribute", "TestObject", holder, info.GetIsolate()); |
| 4299 TestObject* impl = V8TestObject::toNative(holder); | 4299 TestObject* impl = V8TestObject::toImpl(holder); |
| 4300 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); | 4300 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); |
| 4301 impl->setTreatReturnedNullStringAsNullByteStringAttribute(cppValue); | 4301 impl->setTreatReturnedNullStringAsNullByteStringAttribute(cppValue); |
| 4302 } | 4302 } |
| 4303 | 4303 |
| 4304 static void treatReturnedNullStringAsNullByteStringAttributeAttributeSetterCallb
ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | 4304 static void treatReturnedNullStringAsNullByteStringAttributeAttributeSetterCallb
ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) |
| 4305 { | 4305 { |
| 4306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4307 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttrib
uteSetter(v8Value, info); | 4307 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringAttributeAttrib
uteSetter(v8Value, info); |
| 4308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4309 } | 4309 } |
| 4310 | 4310 |
| 4311 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetter
(const v8::PropertyCallbackInfo<v8::Value>& info) | 4311 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetter
(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4312 { | 4312 { |
| 4313 v8::Handle<v8::Object> holder = info.Holder(); | 4313 v8::Handle<v8::Object> holder = info.Holder(); |
| 4314 TestObject* impl = V8TestObject::toNative(holder); | 4314 TestObject* impl = V8TestObject::toImpl(holder); |
| 4315 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedByteStringAttribute(), info.GetIsolate()); | 4315 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedByteStringAttribute(), info.GetIsolate()); |
| 4316 } | 4316 } |
| 4317 | 4317 |
| 4318 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetter
Callback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4318 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeGetter
Callback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4319 { | 4319 { |
| 4320 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4320 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4321 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeA
ttributeGetter(info); | 4321 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeA
ttributeGetter(info); |
| 4322 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4322 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4323 } | 4323 } |
| 4324 | 4324 |
| 4325 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeSetter
(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4325 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeSetter
(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4326 { | 4326 { |
| 4327 v8::Handle<v8::Object> holder = info.Holder(); | 4327 v8::Handle<v8::Object> holder = info.Holder(); |
| 4328 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsUndefinedByteStringAttribute", "TestObject", holder, info.GetIsolate(
)); | 4328 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsUndefinedByteStringAttribute", "TestObject", holder, info.GetIsolate(
)); |
| 4329 TestObject* impl = V8TestObject::toNative(holder); | 4329 TestObject* impl = V8TestObject::toImpl(holder); |
| 4330 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); | 4330 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toByteString(v8Va
lue, exceptionState), exceptionState); |
| 4331 impl->setTreatReturnedNullStringAsUndefinedByteStringAttribute(cppValue); | 4331 impl->setTreatReturnedNullStringAsUndefinedByteStringAttribute(cppValue); |
| 4332 } | 4332 } |
| 4333 | 4333 |
| 4334 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeSetter
Callback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) | 4334 static void treatReturnedNullStringAsUndefinedByteStringAttributeAttributeSetter
Callback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) |
| 4335 { | 4335 { |
| 4336 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4336 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4337 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeA
ttributeSetter(v8Value, info); | 4337 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringAttributeA
ttributeSetter(v8Value, info); |
| 4338 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4338 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4339 } | 4339 } |
| 4340 | 4340 |
| 4341 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) | 4341 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4342 { | 4342 { |
| 4343 v8::Handle<v8::Object> holder = info.Holder(); | 4343 v8::Handle<v8::Object> holder = info.Holder(); |
| 4344 TestObject* impl = V8TestObject::toNative(holder); | 4344 TestObject* impl = V8TestObject::toImpl(holder); |
| 4345 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullScalar
ValueStringAttribute(), info.GetIsolate()); | 4345 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullScalar
ValueStringAttribute(), info.GetIsolate()); |
| 4346 } | 4346 } |
| 4347 | 4347 |
| 4348 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | 4348 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) |
| 4349 { | 4349 { |
| 4350 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4350 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4351 TestObjectV8Internal::treatReturnedNullStringAsNullScalarValueStringAttribut
eAttributeGetter(info); | 4351 TestObjectV8Internal::treatReturnedNullStringAsNullScalarValueStringAttribut
eAttributeGetter(info); |
| 4352 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4352 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4353 } | 4353 } |
| 4354 | 4354 |
| 4355 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4355 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4356 { | 4356 { |
| 4357 v8::Handle<v8::Object> holder = info.Holder(); | 4357 v8::Handle<v8::Object> holder = info.Holder(); |
| 4358 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsNullScalarValueStringAttribute", "TestObject", holder, info.GetIsolat
e()); | 4358 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsNullScalarValueStringAttribute", "TestObject", holder, info.GetIsolat
e()); |
| 4359 TestObject* impl = V8TestObject::toNative(holder); | 4359 TestObject* impl = V8TestObject::toImpl(holder); |
| 4360 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toScalarValueStri
ng(v8Value, exceptionState), exceptionState); | 4360 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toScalarValueStri
ng(v8Value, exceptionState), exceptionState); |
| 4361 impl->setTreatReturnedNullStringAsNullScalarValueStringAttribute(cppValue); | 4361 impl->setTreatReturnedNullStringAsNullScalarValueStringAttribute(cppValue); |
| 4362 } | 4362 } |
| 4363 | 4363 |
| 4364 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) | 4364 static void treatReturnedNullStringAsNullScalarValueStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) |
| 4365 { | 4365 { |
| 4366 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4366 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4367 TestObjectV8Internal::treatReturnedNullStringAsNullScalarValueStringAttribut
eAttributeSetter(v8Value, info); | 4367 TestObjectV8Internal::treatReturnedNullStringAsNullScalarValueStringAttribut
eAttributeSetter(v8Value, info); |
| 4368 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4368 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4369 } | 4369 } |
| 4370 | 4370 |
| 4371 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 4371 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4372 { | 4372 { |
| 4373 v8::Handle<v8::Object> holder = info.Holder(); | 4373 v8::Handle<v8::Object> holder = info.Holder(); |
| 4374 TestObject* impl = V8TestObject::toNative(holder); | 4374 TestObject* impl = V8TestObject::toImpl(holder); |
| 4375 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedScalarValueStringAttribute(), info.GetIsolate()); | 4375 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedScalarValueStringAttribute(), info.GetIsolate()); |
| 4376 } | 4376 } |
| 4377 | 4377 |
| 4378 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>
& info) | 4378 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>
& info) |
| 4379 { | 4379 { |
| 4380 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4380 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4381 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringAtt
ributeAttributeGetter(info); | 4381 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringAtt
ributeAttributeGetter(info); |
| 4382 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4382 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4383 } | 4383 } |
| 4384 | 4384 |
| 4385 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | 4385 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 4386 { | 4386 { |
| 4387 v8::Handle<v8::Object> holder = info.Holder(); | 4387 v8::Handle<v8::Object> holder = info.Holder(); |
| 4388 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsUndefinedScalarValueStringAttribute", "TestObject", holder, info.GetI
solate()); | 4388 ExceptionState exceptionState(ExceptionState::SetterContext, "treatReturnedN
ullStringAsUndefinedScalarValueStringAttribute", "TestObject", holder, info.GetI
solate()); |
| 4389 TestObject* impl = V8TestObject::toNative(holder); | 4389 TestObject* impl = V8TestObject::toImpl(holder); |
| 4390 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toScalarValueStri
ng(v8Value, exceptionState), exceptionState); | 4390 TONATIVE_VOID_EXCEPTIONSTATE(V8StringResource<>, cppValue, toScalarValueStri
ng(v8Value, exceptionState), exceptionState); |
| 4391 impl->setTreatReturnedNullStringAsUndefinedScalarValueStringAttribute(cppVal
ue); | 4391 impl->setTreatReturnedNullStringAsUndefinedScalarValueStringAttribute(cppVal
ue); |
| 4392 } | 4392 } |
| 4393 | 4393 |
| 4394 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) | 4394 static void treatReturnedNullStringAsUndefinedScalarValueStringAttributeAttribut
eSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
| 4395 { | 4395 { |
| 4396 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4396 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4397 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringAtt
ributeAttributeSetter(v8Value, info); | 4397 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringAtt
ributeAttributeSetter(v8Value, info); |
| 4398 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4398 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4399 } | 4399 } |
| 4400 | 4400 |
| 4401 static void typeCheckingInterfaceFloatAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 4401 static void typeCheckingInterfaceFloatAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 4402 { | 4402 { |
| 4403 v8::Handle<v8::Object> holder = info.Holder(); | 4403 v8::Handle<v8::Object> holder = info.Holder(); |
| 4404 TestObject* impl = V8TestObject::toNative(holder); | 4404 TestObject* impl = V8TestObject::toImpl(holder); |
| 4405 v8SetReturnValue(info, impl->typeCheckingInterfaceFloatAttribute()); | 4405 v8SetReturnValue(info, impl->typeCheckingInterfaceFloatAttribute()); |
| 4406 } | 4406 } |
| 4407 | 4407 |
| 4408 static void typeCheckingInterfaceFloatAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4408 static void typeCheckingInterfaceFloatAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4409 { | 4409 { |
| 4410 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4410 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4411 TestObjectV8Internal::typeCheckingInterfaceFloatAttributeAttributeGetter(inf
o); | 4411 TestObjectV8Internal::typeCheckingInterfaceFloatAttributeAttributeGetter(inf
o); |
| 4412 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4412 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4413 } | 4413 } |
| 4414 | 4414 |
| 4415 static void typeCheckingInterfaceFloatAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4415 static void typeCheckingInterfaceFloatAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4416 { | 4416 { |
| 4417 v8::Handle<v8::Object> holder = info.Holder(); | 4417 v8::Handle<v8::Object> holder = info.Holder(); |
| 4418 TestObject* impl = V8TestObject::toNative(holder); | 4418 TestObject* impl = V8TestObject::toImpl(holder); |
| 4419 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); | 4419 TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())); |
| 4420 impl->setTypeCheckingInterfaceFloatAttribute(cppValue); | 4420 impl->setTypeCheckingInterfaceFloatAttribute(cppValue); |
| 4421 } | 4421 } |
| 4422 | 4422 |
| 4423 static void typeCheckingInterfaceFloatAttributeAttributeSetterCallback(v8::Local
<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>
& info) | 4423 static void typeCheckingInterfaceFloatAttributeAttributeSetterCallback(v8::Local
<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>
& info) |
| 4424 { | 4424 { |
| 4425 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4425 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4426 TestObjectV8Internal::typeCheckingInterfaceFloatAttributeAttributeSetter(v8V
alue, info); | 4426 TestObjectV8Internal::typeCheckingInterfaceFloatAttributeAttributeSetter(v8V
alue, info); |
| 4427 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4427 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4428 } | 4428 } |
| 4429 | 4429 |
| 4430 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) | 4430 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 4431 { | 4431 { |
| 4432 v8::Handle<v8::Object> holder = info.Holder(); | 4432 v8::Handle<v8::Object> holder = info.Holder(); |
| 4433 TestObject* impl = V8TestObject::toNative(holder); | 4433 TestObject* impl = V8TestObject::toImpl(holder); |
| 4434 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceAttribute()), impl); | 4434 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceAttribute()), impl); |
| 4435 } | 4435 } |
| 4436 | 4436 |
| 4437 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4437 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4438 { | 4438 { |
| 4439 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4439 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4440 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGe
tter(info); | 4440 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGe
tter(info); |
| 4441 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4441 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4442 } | 4442 } |
| 4443 | 4443 |
| 4444 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4444 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4445 { | 4445 { |
| 4446 v8::Handle<v8::Object> holder = info.Holder(); | 4446 v8::Handle<v8::Object> holder = info.Holder(); |
| 4447 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); | 4447 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); |
| 4448 if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) { | 4448 if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) { |
| 4449 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 4449 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 4450 exceptionState.throwIfNeeded(); | 4450 exceptionState.throwIfNeeded(); |
| 4451 return; | 4451 return; |
| 4452 } | 4452 } |
| 4453 TestObject* impl = V8TestObject::toNative(holder); | 4453 TestObject* impl = V8TestObject::toImpl(holder); |
| 4454 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); | 4454 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); |
| 4455 impl->setTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppValue)); | 4455 impl->setTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 4456 } | 4456 } |
| 4457 | 4457 |
| 4458 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn
fo<void>& info) | 4458 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn
fo<void>& info) |
| 4459 { | 4459 { |
| 4460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4461 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSe
tter(v8Value, info); | 4461 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSe
tter(v8Value, info); |
| 4462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4463 } | 4463 } |
| 4464 | 4464 |
| 4465 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) | 4465 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4466 { | 4466 { |
| 4467 v8::Handle<v8::Object> holder = info.Holder(); | 4467 v8::Handle<v8::Object> holder = info.Holder(); |
| 4468 TestObject* impl = V8TestObject::toNative(holder); | 4468 TestObject* impl = V8TestObject::toImpl(holder); |
| 4469 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceOrNullAttribute()), impl); | 4469 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf
aceOrNullAttribute()), impl); |
| 4470 } | 4470 } |
| 4471 | 4471 |
| 4472 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4472 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4473 { | 4473 { |
| 4474 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4474 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4475 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri
buteGetter(info); | 4475 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri
buteGetter(info); |
| 4476 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4476 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4477 } | 4477 } |
| 4478 | 4478 |
| 4479 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4479 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4480 { | 4480 { |
| 4481 v8::Handle<v8::Object> holder = info.Holder(); | 4481 v8::Handle<v8::Object> holder = info.Holder(); |
| 4482 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate()); | 4482 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn
terfaceTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate()); |
| 4483 if (!isUndefinedOrNull(v8Value) && !V8TestInterface::hasInstance(v8Value, in
fo.GetIsolate())) { | 4483 if (!isUndefinedOrNull(v8Value) && !V8TestInterface::hasInstance(v8Value, in
fo.GetIsolate())) { |
| 4484 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 4484 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 4485 exceptionState.throwIfNeeded(); | 4485 exceptionState.throwIfNeeded(); |
| 4486 return; | 4486 return; |
| 4487 } | 4487 } |
| 4488 TestObject* impl = V8TestObject::toNative(holder); | 4488 TestObject* impl = V8TestObject::toImpl(holder); |
| 4489 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); | 4489 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); |
| 4490 impl->setTypeCheckingInterfaceTestInterfaceOrNullAttribute(WTF::getPtr(cppVa
lue)); | 4490 impl->setTypeCheckingInterfaceTestInterfaceOrNullAttribute(WTF::getPtr(cppVa
lue)); |
| 4491 } | 4491 } |
| 4492 | 4492 |
| 4493 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) | 4493 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) |
| 4494 { | 4494 { |
| 4495 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4495 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4496 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri
buteSetter(v8Value, info); | 4496 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri
buteSetter(v8Value, info); |
| 4497 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4497 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4498 } | 4498 } |
| 4499 | 4499 |
| 4500 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 4500 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
| 4501 { | 4501 { |
| 4502 v8::Handle<v8::Object> holder = info.Holder(); | 4502 v8::Handle<v8::Object> holder = info.Holder(); |
| 4503 TestObject* impl = V8TestObject::toNative(holder); | 4503 TestObject* impl = V8TestObject::toImpl(holder); |
| 4504 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattri
buteAttr), info.GetIsolate()); | 4504 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattri
buteAttr), info.GetIsolate()); |
| 4505 } | 4505 } |
| 4506 | 4506 |
| 4507 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 4507 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4508 { | 4508 { |
| 4509 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4509 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4510 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); | 4510 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); |
| 4511 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4511 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4512 } | 4512 } |
| 4513 | 4513 |
| 4514 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 4514 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
| 4515 { | 4515 { |
| 4516 v8::Handle<v8::Object> holder = info.Holder(); | 4516 v8::Handle<v8::Object> holder = info.Holder(); |
| 4517 TestObject* impl = V8TestObject::toNative(holder); | 4517 TestObject* impl = V8TestObject::toImpl(holder); |
| 4518 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4518 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4519 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4519 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4520 impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue); | 4520 impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue); |
| 4521 } | 4521 } |
| 4522 | 4522 |
| 4523 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4523 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4524 { | 4524 { |
| 4525 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4525 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4526 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4526 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4527 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); | 4527 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); |
| 4528 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4528 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4529 } | 4529 } |
| 4530 | 4530 |
| 4531 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 4531 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
| 4532 { | 4532 { |
| 4533 v8::Handle<v8::Object> holder = info.Holder(); | 4533 v8::Handle<v8::Object> holder = info.Holder(); |
| 4534 TestObject* impl = V8TestObject::toNative(holder); | 4534 TestObject* impl = V8TestObject::toImpl(holder); |
| 4535 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectUrlAttr
ibuteAttr), info.GetIsolate()); | 4535 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectUrlAttr
ibuteAttr), info.GetIsolate()); |
| 4536 } | 4536 } |
| 4537 | 4537 |
| 4538 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 4538 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4539 { | 4539 { |
| 4540 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4540 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4541 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); | 4541 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); |
| 4542 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4542 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4543 } | 4543 } |
| 4544 | 4544 |
| 4545 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 4545 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
| 4546 { | 4546 { |
| 4547 v8::Handle<v8::Object> holder = info.Holder(); | 4547 v8::Handle<v8::Object> holder = info.Holder(); |
| 4548 TestObject* impl = V8TestObject::toNative(holder); | 4548 TestObject* impl = V8TestObject::toImpl(holder); |
| 4549 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4549 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4550 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4550 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4551 impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue); | 4551 impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue); |
| 4552 } | 4552 } |
| 4553 | 4553 |
| 4554 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4554 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4555 { | 4555 { |
| 4556 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4556 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4557 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 4557 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 4558 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); | 4558 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); |
| 4559 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4559 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4560 } | 4560 } |
| 4561 | 4561 |
| 4562 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 4562 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
| 4563 { | 4563 { |
| 4564 v8::Handle<v8::Object> holder = info.Holder(); | 4564 v8::Handle<v8::Object> holder = info.Holder(); |
| 4565 TestObject* impl = V8TestObject::toNative(holder); | 4565 TestObject* impl = V8TestObject::toImpl(holder); |
| 4566 v8SetReturnValueInt(info, impl->unforgeableLongAttribute()); | 4566 v8SetReturnValueInt(info, impl->unforgeableLongAttribute()); |
| 4567 } | 4567 } |
| 4568 | 4568 |
| 4569 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4569 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4570 { | 4570 { |
| 4571 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4571 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4572 TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info); | 4572 TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info); |
| 4573 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4573 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4574 } | 4574 } |
| 4575 | 4575 |
| 4576 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | 4576 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) |
| 4577 { | 4577 { |
| 4578 v8::Handle<v8::Object> holder = info.Holder(); | 4578 v8::Handle<v8::Object> holder = info.Holder(); |
| 4579 ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLon
gAttribute", "TestObject", holder, info.GetIsolate()); | 4579 ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLon
gAttribute", "TestObject", holder, info.GetIsolate()); |
| 4580 TestObject* impl = V8TestObject::toNative(holder); | 4580 TestObject* impl = V8TestObject::toImpl(holder); |
| 4581 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 4581 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 4582 impl->setUnforgeableLongAttribute(cppValue); | 4582 impl->setUnforgeableLongAttribute(cppValue); |
| 4583 } | 4583 } |
| 4584 | 4584 |
| 4585 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4585 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4586 { | 4586 { |
| 4587 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4587 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4588 TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info)
; | 4588 TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info)
; |
| 4589 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4589 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4590 } | 4590 } |
| 4591 | 4591 |
| 4592 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 4592 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 4593 { | 4593 { |
| 4594 v8::Handle<v8::Object> holder = info.Holder(); | 4594 v8::Handle<v8::Object> holder = info.Holder(); |
| 4595 TestObject* impl = V8TestObject::toNative(holder); | 4595 TestObject* impl = V8TestObject::toImpl(holder); |
| 4596 String cppValue(impl->activityLoggingSetterOnlyLogPreviousValueAttribute()); | 4596 String cppValue(impl->activityLoggingSetterOnlyLogPreviousValueAttribute()); |
| 4597 v8SetReturnValueStringOrNull(info, cppValue, info.GetIsolate()); | 4597 v8SetReturnValueStringOrNull(info, cppValue, info.GetIsolate()); |
| 4598 } | 4598 } |
| 4599 | 4599 |
| 4600 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4600 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4601 { | 4601 { |
| 4602 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4602 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4603 TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttr
ibuteGetter(info); | 4603 TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttr
ibuteGetter(info); |
| 4604 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4604 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4605 } | 4605 } |
| 4606 | 4606 |
| 4607 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4607 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4608 { | 4608 { |
| 4609 v8::Handle<v8::Object> holder = info.Holder(); | 4609 v8::Handle<v8::Object> holder = info.Holder(); |
| 4610 TestObject* impl = V8TestObject::toNative(holder); | 4610 TestObject* impl = V8TestObject::toImpl(holder); |
| 4611 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); | 4611 TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, cppValue, v8Value); |
| 4612 impl->setActivityLoggingSetterOnlyLogPreviousValueAttribute(cppValue); | 4612 impl->setActivityLoggingSetterOnlyLogPreviousValueAttribute(cppValue); |
| 4613 } | 4613 } |
| 4614 | 4614 |
| 4615 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | 4615 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) |
| 4616 { | 4616 { |
| 4617 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4617 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4618 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 4618 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 4619 V8PerContextData* contextData = scriptState->perContextData(); | 4619 V8PerContextData* contextData = scriptState->perContextData(); |
| 4620 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { | 4620 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { |
| 4621 TestObject* impl = V8TestObject::toNative(info.Holder()); | 4621 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 4622 String cppValue(impl->activityLoggingSetterOnlyLogPreviousValueAttribute
()); | 4622 String cppValue(impl->activityLoggingSetterOnlyLogPreviousValueAttribute
()); |
| 4623 v8::Handle<v8::Value> originalValue = cppValue.isNull() ? v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate())) : v8String(info.GetIsolate(), cppValue); | 4623 v8::Handle<v8::Value> originalValue = cppValue.isNull() ? v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate())) : v8String(info.GetIsolate(), cppValue); |
| 4624 contextData->activityLogger()->logSetter("TestObject.activityLoggingSett
erOnlyLogPreviousValueAttribute", v8Value, originalValue); | 4624 contextData->activityLogger()->logSetter("TestObject.activityLoggingSett
erOnlyLogPreviousValueAttribute", v8Value, originalValue); |
| 4625 } | 4625 } |
| 4626 TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttr
ibuteSetter(v8Value, info); | 4626 TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttr
ibuteSetter(v8Value, info); |
| 4627 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4627 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4628 } | 4628 } |
| 4629 | 4629 |
| 4630 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) | 4630 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4631 { | 4631 { |
| 4632 v8::Handle<v8::Object> holder = info.Holder(); | 4632 v8::Handle<v8::Object> holder = info.Holder(); |
| 4633 TestObject* impl = V8TestObject::toNative(holder); | 4633 TestObject* impl = V8TestObject::toImpl(holder); |
| 4634 RefPtr<TestInterfaceEmpty> cppValue(impl->activityLoggingLogPreviousValueInt
erfaceAttribute()); | 4634 RefPtr<TestInterfaceEmpty> cppValue(impl->activityLoggingLogPreviousValueInt
erfaceAttribute()); |
| 4635 v8SetReturnValueFast(info, WTF::getPtr(cppValue.release()), impl); | 4635 v8SetReturnValueFast(info, WTF::getPtr(cppValue.release()), impl); |
| 4636 } | 4636 } |
| 4637 | 4637 |
| 4638 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4638 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4639 { | 4639 { |
| 4640 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4640 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4641 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 4641 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 4642 V8PerContextData* contextData = scriptState->perContextData(); | 4642 V8PerContextData* contextData = scriptState->perContextData(); |
| 4643 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) | 4643 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) |
| 4644 contextData->activityLogger()->logGetter("TestObject.activityLoggingLogP
reviousValueInterfaceAttribute"); | 4644 contextData->activityLogger()->logGetter("TestObject.activityLoggingLogP
reviousValueInterfaceAttribute"); |
| 4645 TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttri
buteGetter(info); | 4645 TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttri
buteGetter(info); |
| 4646 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4646 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4647 } | 4647 } |
| 4648 | 4648 |
| 4649 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4649 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4650 { | 4650 { |
| 4651 v8::Handle<v8::Object> holder = info.Holder(); | 4651 v8::Handle<v8::Object> holder = info.Holder(); |
| 4652 TestObject* impl = V8TestObject::toNative(holder); | 4652 TestObject* impl = V8TestObject::toImpl(holder); |
| 4653 TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativeW
ithTypeCheck(info.GetIsolate(), v8Value)); | 4653 TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toImplWit
hTypeCheck(info.GetIsolate(), v8Value)); |
| 4654 impl->setActivityLoggingLogPreviousValueInterfaceAttribute(WTF::getPtr(cppVa
lue)); | 4654 impl->setActivityLoggingLogPreviousValueInterfaceAttribute(WTF::getPtr(cppVa
lue)); |
| 4655 } | 4655 } |
| 4656 | 4656 |
| 4657 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) | 4657 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) |
| 4658 { | 4658 { |
| 4659 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4659 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4660 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 4660 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 4661 V8PerContextData* contextData = scriptState->perContextData(); | 4661 V8PerContextData* contextData = scriptState->perContextData(); |
| 4662 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { | 4662 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { |
| 4663 TestObject* impl = V8TestObject::toNative(info.Holder()); | 4663 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 4664 RefPtr<TestInterfaceEmpty> cppValue(impl->activityLoggingLogPreviousValu
eInterfaceAttribute()); | 4664 RefPtr<TestInterfaceEmpty> cppValue(impl->activityLoggingLogPreviousValu
eInterfaceAttribute()); |
| 4665 v8::Handle<v8::Value> originalValue = toV8(cppValue, info.Holder(), info
.GetIsolate()); | 4665 v8::Handle<v8::Value> originalValue = toV8(cppValue, info.Holder(), info
.GetIsolate()); |
| 4666 contextData->activityLogger()->logSetter("TestObject.activityLoggingLogP
reviousValueInterfaceAttribute", v8Value, originalValue); | 4666 contextData->activityLogger()->logSetter("TestObject.activityLoggingLogP
reviousValueInterfaceAttribute", v8Value, originalValue); |
| 4667 } | 4667 } |
| 4668 TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttri
buteSetter(v8Value, info); | 4668 TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttri
buteSetter(v8Value, info); |
| 4669 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4669 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4670 } | 4670 } |
| 4671 | 4671 |
| 4672 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 4672 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 4673 { | 4673 { |
| 4674 v8::Handle<v8::Object> holder = info.Holder(); | 4674 v8::Handle<v8::Object> holder = info.Holder(); |
| 4675 TestObject* impl = V8TestObject::toNative(holder); | 4675 TestObject* impl = V8TestObject::toImpl(holder); |
| 4676 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | 4676 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); |
| 4677 } | 4677 } |
| 4678 | 4678 |
| 4679 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 4679 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4680 { | 4680 { |
| 4681 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4681 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4682 TestObjectV8Internal::testInterfaceAttributeAttributeGetter(info); | 4682 TestObjectV8Internal::testInterfaceAttributeAttributeGetter(info); |
| 4683 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4683 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4684 } | 4684 } |
| 4685 | 4685 |
| 4686 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 4686 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 4687 { | 4687 { |
| 4688 v8::Handle<v8::Object> holder = info.Holder(); | 4688 v8::Handle<v8::Object> holder = info.Holder(); |
| 4689 TestObject* impl = V8TestObject::toNative(holder); | 4689 TestObject* impl = V8TestObject::toImpl(holder); |
| 4690 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNat
iveWithTypeCheck(info.GetIsolate(), v8Value)); | 4690 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toImp
lWithTypeCheck(info.GetIsolate(), v8Value)); |
| 4691 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 4691 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 4692 } | 4692 } |
| 4693 | 4693 |
| 4694 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4694 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4695 { | 4695 { |
| 4696 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4696 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4697 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); | 4697 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); |
| 4698 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4698 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4699 } | 4699 } |
| 4700 | 4700 |
| 4701 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 4701 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
| 4702 { | 4702 { |
| 4703 v8::Handle<v8::Object> holder = info.Holder(); | 4703 v8::Handle<v8::Object> holder = info.Holder(); |
| 4704 TestObject* impl = V8TestObject::toNative(holder); | 4704 TestObject* impl = V8TestObject::toImpl(holder); |
| 4705 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedAt
tribute()), impl); | 4705 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedAt
tribute()), impl); |
| 4706 } | 4706 } |
| 4707 | 4707 |
| 4708 static void testInterfaceGarbageCollectedAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4708 static void testInterfaceGarbageCollectedAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4709 { | 4709 { |
| 4710 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4710 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4711 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetter(
info); | 4711 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetter(
info); |
| 4712 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4712 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4713 } | 4713 } |
| 4714 | 4714 |
| 4715 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4715 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4716 { | 4716 { |
| 4717 v8::Handle<v8::Object> holder = info.Holder(); | 4717 v8::Handle<v8::Object> holder = info.Holder(); |
| 4718 TestObject* impl = V8TestObject::toNative(holder); | 4718 TestObject* impl = V8TestObject::toImpl(holder); |
| 4719 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); | 4719 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); |
| 4720 impl->setTestInterfaceGarbageCollectedAttribute(WTF::getPtr(cppValue)); | 4720 impl->setTestInterfaceGarbageCollectedAttribute(WTF::getPtr(cppValue)); |
| 4721 } | 4721 } |
| 4722 | 4722 |
| 4723 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 4723 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
| 4724 { | 4724 { |
| 4725 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4725 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4726 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(
v8Value, info); | 4726 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(
v8Value, info); |
| 4727 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4727 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4728 } | 4728 } |
| 4729 | 4729 |
| 4730 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 4730 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 4731 { | 4731 { |
| 4732 v8::Handle<v8::Object> holder = info.Holder(); | 4732 v8::Handle<v8::Object> holder = info.Holder(); |
| 4733 TestObject* impl = V8TestObject::toNative(holder); | 4733 TestObject* impl = V8TestObject::toImpl(holder); |
| 4734 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedOr
NullAttribute()), impl); | 4734 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedOr
NullAttribute()), impl); |
| 4735 } | 4735 } |
| 4736 | 4736 |
| 4737 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4737 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4738 { | 4738 { |
| 4739 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4739 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4740 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeG
etter(info); | 4740 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeG
etter(info); |
| 4741 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4741 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4742 } | 4742 } |
| 4743 | 4743 |
| 4744 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4744 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4745 { | 4745 { |
| 4746 v8::Handle<v8::Object> holder = info.Holder(); | 4746 v8::Handle<v8::Object> holder = info.Holder(); |
| 4747 TestObject* impl = V8TestObject::toNative(holder); | 4747 TestObject* impl = V8TestObject::toImpl(holder); |
| 4748 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); | 4748 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarba
geCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); |
| 4749 impl->setTestInterfaceGarbageCollectedOrNullAttribute(WTF::getPtr(cppValue))
; | 4749 impl->setTestInterfaceGarbageCollectedOrNullAttribute(WTF::getPtr(cppValue))
; |
| 4750 } | 4750 } |
| 4751 | 4751 |
| 4752 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 4752 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
| 4753 { | 4753 { |
| 4754 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4754 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4755 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeS
etter(v8Value, info); | 4755 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeS
etter(v8Value, info); |
| 4756 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4756 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4757 } | 4757 } |
| 4758 | 4758 |
| 4759 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 4759 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 4760 { | 4760 { |
| 4761 v8::Handle<v8::Object> holder = info.Holder(); | 4761 v8::Handle<v8::Object> holder = info.Holder(); |
| 4762 TestObject* impl = V8TestObject::toNative(holder); | 4762 TestObject* impl = V8TestObject::toImpl(holder); |
| 4763 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedAttribute()), impl); | 4763 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedAttribute()), impl); |
| 4764 } | 4764 } |
| 4765 | 4765 |
| 4766 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4766 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4767 { | 4767 { |
| 4768 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4768 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4769 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeG
etter(info); | 4769 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeG
etter(info); |
| 4770 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4770 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4771 } | 4771 } |
| 4772 | 4772 |
| 4773 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4773 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4774 { | 4774 { |
| 4775 v8::Handle<v8::Object> holder = info.Holder(); | 4775 v8::Handle<v8::Object> holder = info.Holder(); |
| 4776 TestObject* impl = V8TestObject::toNative(holder); | 4776 TestObject* impl = V8TestObject::toImpl(holder); |
| 4777 TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfac
eWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); | 4777 TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfac
eWillBeGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); |
| 4778 impl->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue))
; | 4778 impl->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue))
; |
| 4779 } | 4779 } |
| 4780 | 4780 |
| 4781 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 4781 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
| 4782 { | 4782 { |
| 4783 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4783 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4784 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeS
etter(v8Value, info); | 4784 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeS
etter(v8Value, info); |
| 4785 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4785 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4786 } | 4786 } |
| 4787 | 4787 |
| 4788 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 4788 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 4789 { | 4789 { |
| 4790 v8::Handle<v8::Object> holder = info.Holder(); | 4790 v8::Handle<v8::Object> holder = info.Holder(); |
| 4791 TestObject* impl = V8TestObject::toNative(holder); | 4791 TestObject* impl = V8TestObject::toImpl(holder); |
| 4792 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedOrNullAttribute()), impl); | 4792 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedOrNullAttribute()), impl); |
| 4793 } | 4793 } |
| 4794 | 4794 |
| 4795 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4795 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4796 { | 4796 { |
| 4797 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4797 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4798 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteGetter(info); | 4798 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteGetter(info); |
| 4799 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4799 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4800 } | 4800 } |
| 4801 | 4801 |
| 4802 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4802 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4803 { | 4803 { |
| 4804 v8::Handle<v8::Object> holder = info.Holder(); | 4804 v8::Handle<v8::Object> holder = info.Holder(); |
| 4805 TestObject* impl = V8TestObject::toNative(holder); | 4805 TestObject* impl = V8TestObject::toImpl(holder); |
| 4806 TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfac
eWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); | 4806 TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfac
eWillBeGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value)); |
| 4807 impl->setTestInterfaceWillBeGarbageCollectedOrNullAttribute(WTF::getPtr(cppV
alue)); | 4807 impl->setTestInterfaceWillBeGarbageCollectedOrNullAttribute(WTF::getPtr(cppV
alue)); |
| 4808 } | 4808 } |
| 4809 | 4809 |
| 4810 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | 4810 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) |
| 4811 { | 4811 { |
| 4812 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4812 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4813 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteSetter(v8Value, info); | 4813 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteSetter(v8Value, info); |
| 4814 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4814 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4815 } | 4815 } |
| 4816 | 4816 |
| 4817 static void readonlyShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 4817 static void readonlyShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 4818 { | 4818 { |
| 4819 v8::Handle<v8::Object> holder = info.Holder(); | 4819 v8::Handle<v8::Object> holder = info.Holder(); |
| 4820 TestObject* impl = V8TestObject::toNative(holder); | 4820 TestObject* impl = V8TestObject::toImpl(holder); |
| 4821 int result = 0; | 4821 int result = 0; |
| 4822 if (!V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | 4822 if (!V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 4823 return; | 4823 return; |
| 4824 v8SetReturnValueInt(info, result); | 4824 v8SetReturnValueInt(info, result); |
| 4825 } | 4825 } |
| 4826 | 4826 |
| 4827 static void readonlyShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 4827 static void readonlyShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4828 { | 4828 { |
| 4829 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4829 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4830 TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info); | 4830 TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info); |
| 4831 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4831 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4832 } | 4832 } |
| 4833 | 4833 |
| 4834 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 4834 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 4835 { | 4835 { |
| 4836 v8::Handle<v8::Object> holder = info.Holder(); | 4836 v8::Handle<v8::Object> holder = info.Holder(); |
| 4837 TestObject* impl = V8TestObject::toNative(holder); | 4837 TestObject* impl = V8TestObject::toImpl(holder); |
| 4838 int result = 0; | 4838 int result = 0; |
| 4839 if (!V8TestObject::PrivateScript::shortAttributeAttributeGetter(toFrameIfNot
Detached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | 4839 if (!V8TestObject::PrivateScript::shortAttributeAttributeGetter(toFrameIfNot
Detached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 4840 return; | 4840 return; |
| 4841 v8SetReturnValueInt(info, result); | 4841 v8SetReturnValueInt(info, result); |
| 4842 } | 4842 } |
| 4843 | 4843 |
| 4844 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 4844 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 4845 { | 4845 { |
| 4846 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4846 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4847 TestObjectV8Internal::shortAttributeAttributeGetter(info); | 4847 TestObjectV8Internal::shortAttributeAttributeGetter(info); |
| 4848 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4848 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4849 } | 4849 } |
| 4850 | 4850 |
| 4851 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 4851 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 4852 { | 4852 { |
| 4853 v8::Handle<v8::Object> holder = info.Holder(); | 4853 v8::Handle<v8::Object> holder = info.Holder(); |
| 4854 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); | 4854 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); |
| 4855 TestObject* impl = V8TestObject::toNative(holder); | 4855 TestObject* impl = V8TestObject::toImpl(holder); |
| 4856 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionState)
, exceptionState); | 4856 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionState)
, exceptionState); |
| 4857 V8TestObject::PrivateScript::shortAttributeAttributeSetter(toFrameIfNotDetac
hed(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | 4857 V8TestObject::PrivateScript::shortAttributeAttributeSetter(toFrameIfNotDetac
hed(info.GetIsolate()->GetCurrentContext()), impl, cppValue); |
| 4858 } | 4858 } |
| 4859 | 4859 |
| 4860 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4860 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4861 { | 4861 { |
| 4862 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4862 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4863 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); | 4863 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); |
| 4864 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4864 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4865 } | 4865 } |
| 4866 | 4866 |
| 4867 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 4867 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 4868 { | 4868 { |
| 4869 v8::Handle<v8::Object> holder = info.Holder(); | 4869 v8::Handle<v8::Object> holder = info.Holder(); |
| 4870 TestObject* impl = V8TestObject::toNative(holder); | 4870 TestObject* impl = V8TestObject::toImpl(holder); |
| 4871 String result; | 4871 String result; |
| 4872 if (!V8TestObject::PrivateScript::stringAttributeAttributeGetter(toFrameIfNo
tDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | 4872 if (!V8TestObject::PrivateScript::stringAttributeAttributeGetter(toFrameIfNo
tDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 4873 return; | 4873 return; |
| 4874 v8SetReturnValueString(info, result, info.GetIsolate()); | 4874 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 4875 } | 4875 } |
| 4876 | 4876 |
| 4877 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 4877 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 4878 { | 4878 { |
| 4879 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4879 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4880 TestObjectV8Internal::stringAttributeAttributeGetter(info); | 4880 TestObjectV8Internal::stringAttributeAttributeGetter(info); |
| 4881 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4881 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4882 } | 4882 } |
| 4883 | 4883 |
| 4884 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 4884 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 4885 { | 4885 { |
| 4886 v8::Handle<v8::Object> holder = info.Holder(); | 4886 v8::Handle<v8::Object> holder = info.Holder(); |
| 4887 TestObject* impl = V8TestObject::toNative(holder); | 4887 TestObject* impl = V8TestObject::toImpl(holder); |
| 4888 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4888 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4889 V8TestObject::PrivateScript::stringAttributeAttributeSetter(toFrameIfNotDeta
ched(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | 4889 V8TestObject::PrivateScript::stringAttributeAttributeSetter(toFrameIfNotDeta
ched(info.GetIsolate()->GetCurrentContext()), impl, cppValue); |
| 4890 } | 4890 } |
| 4891 | 4891 |
| 4892 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4892 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4893 { | 4893 { |
| 4894 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4894 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4895 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); | 4895 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); |
| 4896 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4896 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4897 } | 4897 } |
| 4898 | 4898 |
| 4899 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 4899 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) |
| 4900 { | 4900 { |
| 4901 v8::Handle<v8::Object> holder = info.Holder(); | 4901 v8::Handle<v8::Object> holder = info.Holder(); |
| 4902 TestObject* impl = V8TestObject::toNative(holder); | 4902 TestObject* impl = V8TestObject::toImpl(holder); |
| 4903 RefPtrWillBeRawPtr<Node> result = nullptr; | 4903 RefPtrWillBeRawPtr<Node> result = nullptr; |
| 4904 if (!V8TestObject::PrivateScript::nodeAttributeAttributeGetter(toFrameIfNotD
etached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | 4904 if (!V8TestObject::PrivateScript::nodeAttributeAttributeGetter(toFrameIfNotD
etached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 4905 return; | 4905 return; |
| 4906 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); | 4906 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); |
| 4907 } | 4907 } |
| 4908 | 4908 |
| 4909 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 4909 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 4910 { | 4910 { |
| 4911 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4911 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4912 TestObjectV8Internal::nodeAttributeAttributeGetter(info); | 4912 TestObjectV8Internal::nodeAttributeAttributeGetter(info); |
| 4913 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4913 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4914 } | 4914 } |
| 4915 | 4915 |
| 4916 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | 4916 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) |
| 4917 { | 4917 { |
| 4918 v8::Handle<v8::Object> holder = info.Holder(); | 4918 v8::Handle<v8::Object> holder = info.Holder(); |
| 4919 TestObject* impl = V8TestObject::toNative(holder); | 4919 TestObject* impl = V8TestObject::toImpl(holder); |
| 4920 TONATIVE_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsolate
(), v8Value)); | 4920 TONATIVE_VOID(Node*, cppValue, V8Node::toImplWithTypeCheck(info.GetIsolate()
, v8Value)); |
| 4921 V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toFrameIfNotDetach
ed(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | 4921 V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toFrameIfNotDetach
ed(info.GetIsolate()->GetCurrentContext()), impl, cppValue); |
| 4922 } | 4922 } |
| 4923 | 4923 |
| 4924 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4924 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4925 { | 4925 { |
| 4926 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4926 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4927 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | 4927 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); |
| 4928 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4928 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4929 } | 4929 } |
| 4930 | 4930 |
| 4931 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | 4931 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 4932 { | 4932 { |
| 4933 v8::Handle<v8::Object> holder = info.Holder(); | 4933 v8::Handle<v8::Object> holder = info.Holder(); |
| 4934 TestObject* impl = V8TestObject::toNative(holder); | 4934 TestObject* impl = V8TestObject::toImpl(holder); |
| 4935 v8SetReturnValueString(info, impl->attributeImplementedInCPPForPrivateScript
Only(), info.GetIsolate()); | 4935 v8SetReturnValueString(info, impl->attributeImplementedInCPPForPrivateScript
Only(), info.GetIsolate()); |
| 4936 } | 4936 } |
| 4937 | 4937 |
| 4938 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4938 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4939 { | 4939 { |
| 4940 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4940 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4941 TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttribute
Getter(info); | 4941 TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttribute
Getter(info); |
| 4942 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4942 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4943 } | 4943 } |
| 4944 | 4944 |
| 4945 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4945 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4946 { | 4946 { |
| 4947 v8::Handle<v8::Object> holder = info.Holder(); | 4947 v8::Handle<v8::Object> holder = info.Holder(); |
| 4948 TestObject* impl = V8TestObject::toNative(holder); | 4948 TestObject* impl = V8TestObject::toImpl(holder); |
| 4949 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4949 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4950 impl->setAttributeImplementedInCPPForPrivateScriptOnly(cppValue); | 4950 impl->setAttributeImplementedInCPPForPrivateScriptOnly(cppValue); |
| 4951 } | 4951 } |
| 4952 | 4952 |
| 4953 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) | 4953 static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) |
| 4954 { | 4954 { |
| 4955 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4955 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4956 TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttribute
Setter(v8Value, info); | 4956 TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttribute
Setter(v8Value, info); |
| 4957 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4957 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4958 } | 4958 } |
| 4959 | 4959 |
| 4960 static void enumForPrivateScriptAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 4960 static void enumForPrivateScriptAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 4961 { | 4961 { |
| 4962 v8::Handle<v8::Object> holder = info.Holder(); | 4962 v8::Handle<v8::Object> holder = info.Holder(); |
| 4963 TestObject* impl = V8TestObject::toNative(holder); | 4963 TestObject* impl = V8TestObject::toImpl(holder); |
| 4964 String result; | 4964 String result; |
| 4965 if (!V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(toFram
eIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | 4965 if (!V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(toFram
eIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 4966 return; | 4966 return; |
| 4967 v8SetReturnValueString(info, result, info.GetIsolate()); | 4967 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 4968 } | 4968 } |
| 4969 | 4969 |
| 4970 static void enumForPrivateScriptAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 4970 static void enumForPrivateScriptAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 4971 { | 4971 { |
| 4972 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4972 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4973 TestObjectV8Internal::enumForPrivateScriptAttributeGetter(info); | 4973 TestObjectV8Internal::enumForPrivateScriptAttributeGetter(info); |
| 4974 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4974 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4975 } | 4975 } |
| 4976 | 4976 |
| 4977 static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 4977 static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 4978 { | 4978 { |
| 4979 v8::Handle<v8::Object> holder = info.Holder(); | 4979 v8::Handle<v8::Object> holder = info.Holder(); |
| 4980 TestObject* impl = V8TestObject::toNative(holder); | 4980 TestObject* impl = V8TestObject::toImpl(holder); |
| 4981 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 4981 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
| 4982 String string = cppValue; | 4982 String string = cppValue; |
| 4983 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 4983 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
| 4984 return; | 4984 return; |
| 4985 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toFrameIfNo
tDetached(info.GetIsolate()->GetCurrentContext()), impl, cppValue); | 4985 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toFrameIfNo
tDetached(info.GetIsolate()->GetCurrentContext()), impl, cppValue); |
| 4986 } | 4986 } |
| 4987 | 4987 |
| 4988 static void enumForPrivateScriptAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4988 static void enumForPrivateScriptAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4989 { | 4989 { |
| 4990 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4990 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5024 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); | 5024 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); |
| 5025 } | 5025 } |
| 5026 | 5026 |
| 5027 static void TestObjectForceSetAttributeOnThisCallback(v8::Local<v8::String> name
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5027 static void TestObjectForceSetAttributeOnThisCallback(v8::Local<v8::String> name
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 5028 { | 5028 { |
| 5029 TestObjectV8Internal::TestObjectForceSetAttributeOnThis(name, v8Value, info)
; | 5029 TestObjectV8Internal::TestObjectForceSetAttributeOnThis(name, v8Value, info)
; |
| 5030 } | 5030 } |
| 5031 | 5031 |
| 5032 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5032 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5033 { | 5033 { |
| 5034 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5034 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5035 impl->voidMethod(); | 5035 impl->voidMethod(); |
| 5036 } | 5036 } |
| 5037 | 5037 |
| 5038 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5038 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5039 { | 5039 { |
| 5040 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5040 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5041 TestObjectV8Internal::voidMethodMethod(info); | 5041 TestObjectV8Internal::voidMethodMethod(info); |
| 5042 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5042 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5043 } | 5043 } |
| 5044 | 5044 |
| 5045 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 5045 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 5046 { | 5046 { |
| 5047 TestObject::staticVoidMethod(); | 5047 TestObject::staticVoidMethod(); |
| 5048 } | 5048 } |
| 5049 | 5049 |
| 5050 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 5050 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 5051 { | 5051 { |
| 5052 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5052 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5053 TestObjectV8Internal::staticVoidMethodMethod(info); | 5053 TestObjectV8Internal::staticVoidMethodMethod(info); |
| 5054 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5054 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5055 } | 5055 } |
| 5056 | 5056 |
| 5057 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5057 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5058 { | 5058 { |
| 5059 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5059 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5060 v8SetReturnValue(info, v8DateOrNaN(impl->dateMethod(), info.GetIsolate())); | 5060 v8SetReturnValue(info, v8DateOrNaN(impl->dateMethod(), info.GetIsolate())); |
| 5061 } | 5061 } |
| 5062 | 5062 |
| 5063 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5063 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5064 { | 5064 { |
| 5065 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5065 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5066 TestObjectV8Internal::dateMethodMethod(info); | 5066 TestObjectV8Internal::dateMethodMethod(info); |
| 5067 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5067 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5068 } | 5068 } |
| 5069 | 5069 |
| 5070 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5070 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5071 { | 5071 { |
| 5072 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5072 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5073 v8SetReturnValueString(info, impl->stringMethod(), info.GetIsolate()); | 5073 v8SetReturnValueString(info, impl->stringMethod(), info.GetIsolate()); |
| 5074 } | 5074 } |
| 5075 | 5075 |
| 5076 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 5076 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 5077 { | 5077 { |
| 5078 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5078 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5079 TestObjectV8Internal::stringMethodMethod(info); | 5079 TestObjectV8Internal::stringMethodMethod(info); |
| 5080 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5080 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5081 } | 5081 } |
| 5082 | 5082 |
| 5083 static void byteStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 5083 static void byteStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 5084 { | 5084 { |
| 5085 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5085 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5086 v8SetReturnValueString(info, impl->byteStringMethod(), info.GetIsolate()); | 5086 v8SetReturnValueString(info, impl->byteStringMethod(), info.GetIsolate()); |
| 5087 } | 5087 } |
| 5088 | 5088 |
| 5089 static void byteStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 5089 static void byteStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 5090 { | 5090 { |
| 5091 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5091 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5092 TestObjectV8Internal::byteStringMethodMethod(info); | 5092 TestObjectV8Internal::byteStringMethodMethod(info); |
| 5093 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5093 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5094 } | 5094 } |
| 5095 | 5095 |
| 5096 static void scalarValueStringMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 5096 static void scalarValueStringMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 5097 { | 5097 { |
| 5098 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5098 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5099 v8SetReturnValueString(info, impl->scalarValueStringMethod(), info.GetIsolat
e()); | 5099 v8SetReturnValueString(info, impl->scalarValueStringMethod(), info.GetIsolat
e()); |
| 5100 } | 5100 } |
| 5101 | 5101 |
| 5102 static void scalarValueStringMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 5102 static void scalarValueStringMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 5103 { | 5103 { |
| 5104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5105 TestObjectV8Internal::scalarValueStringMethodMethod(info); | 5105 TestObjectV8Internal::scalarValueStringMethodMethod(info); |
| 5106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5107 } | 5107 } |
| 5108 | 5108 |
| 5109 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5109 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 5110 { | 5110 { |
| 5111 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5111 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5112 v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampMethod(
))); | 5112 v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampMethod(
))); |
| 5113 } | 5113 } |
| 5114 | 5114 |
| 5115 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 5115 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 5116 { | 5116 { |
| 5117 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5117 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5118 TestObjectV8Internal::readonlyDOMTimeStampMethodMethod(info); | 5118 TestObjectV8Internal::readonlyDOMTimeStampMethodMethod(info); |
| 5119 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5119 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5120 } | 5120 } |
| 5121 | 5121 |
| 5122 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5122 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5123 { | 5123 { |
| 5124 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5124 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5125 v8SetReturnValueBool(info, impl->booleanMethod()); | 5125 v8SetReturnValueBool(info, impl->booleanMethod()); |
| 5126 } | 5126 } |
| 5127 | 5127 |
| 5128 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | 5128 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 5129 { | 5129 { |
| 5130 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5130 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5131 TestObjectV8Internal::booleanMethodMethod(info); | 5131 TestObjectV8Internal::booleanMethodMethod(info); |
| 5132 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5132 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5133 } | 5133 } |
| 5134 | 5134 |
| 5135 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5135 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5136 { | 5136 { |
| 5137 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5137 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5138 v8SetReturnValueInt(info, impl->byteMethod()); | 5138 v8SetReturnValueInt(info, impl->byteMethod()); |
| 5139 } | 5139 } |
| 5140 | 5140 |
| 5141 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5141 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5142 { | 5142 { |
| 5143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5144 TestObjectV8Internal::byteMethodMethod(info); | 5144 TestObjectV8Internal::byteMethodMethod(info); |
| 5145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5146 } | 5146 } |
| 5147 | 5147 |
| 5148 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5148 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5149 { | 5149 { |
| 5150 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5150 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5151 v8SetReturnValue(info, impl->doubleMethod()); | 5151 v8SetReturnValue(info, impl->doubleMethod()); |
| 5152 } | 5152 } |
| 5153 | 5153 |
| 5154 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 5154 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 5155 { | 5155 { |
| 5156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5156 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5157 TestObjectV8Internal::doubleMethodMethod(info); | 5157 TestObjectV8Internal::doubleMethodMethod(info); |
| 5158 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5158 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5159 } | 5159 } |
| 5160 | 5160 |
| 5161 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5161 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5162 { | 5162 { |
| 5163 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5163 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5164 v8SetReturnValue(info, impl->floatMethod()); | 5164 v8SetReturnValue(info, impl->floatMethod()); |
| 5165 } | 5165 } |
| 5166 | 5166 |
| 5167 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5167 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5168 { | 5168 { |
| 5169 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5169 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5170 TestObjectV8Internal::floatMethodMethod(info); | 5170 TestObjectV8Internal::floatMethodMethod(info); |
| 5171 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5171 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5172 } | 5172 } |
| 5173 | 5173 |
| 5174 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5174 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5175 { | 5175 { |
| 5176 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5176 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5177 v8SetReturnValueInt(info, impl->longMethod()); | 5177 v8SetReturnValueInt(info, impl->longMethod()); |
| 5178 } | 5178 } |
| 5179 | 5179 |
| 5180 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5180 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5181 { | 5181 { |
| 5182 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5182 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5183 TestObjectV8Internal::longMethodMethod(info); | 5183 TestObjectV8Internal::longMethodMethod(info); |
| 5184 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5184 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5185 } | 5185 } |
| 5186 | 5186 |
| 5187 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) | 5187 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 5188 { | 5188 { |
| 5189 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5189 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5190 v8SetReturnValue(info, static_cast<double>(impl->longLongMethod())); | 5190 v8SetReturnValue(info, static_cast<double>(impl->longLongMethod())); |
| 5191 } | 5191 } |
| 5192 | 5192 |
| 5193 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 5193 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 5194 { | 5194 { |
| 5195 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5195 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5196 TestObjectV8Internal::longLongMethodMethod(info); | 5196 TestObjectV8Internal::longLongMethodMethod(info); |
| 5197 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5197 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5198 } | 5198 } |
| 5199 | 5199 |
| 5200 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5200 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5201 { | 5201 { |
| 5202 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5202 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5203 v8SetReturnValueUnsigned(info, impl->octetMethod()); | 5203 v8SetReturnValueUnsigned(info, impl->octetMethod()); |
| 5204 } | 5204 } |
| 5205 | 5205 |
| 5206 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5206 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5207 { | 5207 { |
| 5208 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5208 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5209 TestObjectV8Internal::octetMethodMethod(info); | 5209 TestObjectV8Internal::octetMethodMethod(info); |
| 5210 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5210 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5211 } | 5211 } |
| 5212 | 5212 |
| 5213 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5213 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5214 { | 5214 { |
| 5215 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5215 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5216 v8SetReturnValueInt(info, impl->shortMethod()); | 5216 v8SetReturnValueInt(info, impl->shortMethod()); |
| 5217 } | 5217 } |
| 5218 | 5218 |
| 5219 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5219 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5220 { | 5220 { |
| 5221 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5221 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5222 TestObjectV8Internal::shortMethodMethod(info); | 5222 TestObjectV8Internal::shortMethodMethod(info); |
| 5223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5224 } | 5224 } |
| 5225 | 5225 |
| 5226 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5226 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5227 { | 5227 { |
| 5228 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5228 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5229 v8SetReturnValueUnsigned(info, impl->unsignedLongMethod()); | 5229 v8SetReturnValueUnsigned(info, impl->unsignedLongMethod()); |
| 5230 } | 5230 } |
| 5231 | 5231 |
| 5232 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5232 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 5233 { | 5233 { |
| 5234 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5234 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5235 TestObjectV8Internal::unsignedLongMethodMethod(info); | 5235 TestObjectV8Internal::unsignedLongMethodMethod(info); |
| 5236 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5236 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5237 } | 5237 } |
| 5238 | 5238 |
| 5239 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 5239 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 5240 { | 5240 { |
| 5241 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5241 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5242 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongMethod())); | 5242 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongMethod())); |
| 5243 } | 5243 } |
| 5244 | 5244 |
| 5245 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 5245 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 5246 { | 5246 { |
| 5247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5248 TestObjectV8Internal::unsignedLongLongMethodMethod(info); | 5248 TestObjectV8Internal::unsignedLongLongMethodMethod(info); |
| 5249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5250 } | 5250 } |
| 5251 | 5251 |
| 5252 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5252 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5253 { | 5253 { |
| 5254 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5254 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5255 v8SetReturnValueUnsigned(info, impl->unsignedShortMethod()); | 5255 v8SetReturnValueUnsigned(info, impl->unsignedShortMethod()); |
| 5256 } | 5256 } |
| 5257 | 5257 |
| 5258 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 5258 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 5259 { | 5259 { |
| 5260 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5260 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5261 TestObjectV8Internal::unsignedShortMethodMethod(info); | 5261 TestObjectV8Internal::unsignedShortMethodMethod(info); |
| 5262 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5262 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5263 } | 5263 } |
| 5264 | 5264 |
| 5265 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 5265 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 5266 { | 5266 { |
| 5267 if (UNLIKELY(info.Length() < 1)) { | 5267 if (UNLIKELY(info.Length() < 1)) { |
| 5268 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDateArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI
solate()); | 5268 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDateArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI
solate()); |
| 5269 return; | 5269 return; |
| 5270 } | 5270 } |
| 5271 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5271 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5272 double dateArg; | 5272 double dateArg; |
| 5273 { | 5273 { |
| 5274 v8::TryCatch block; | 5274 v8::TryCatch block; |
| 5275 V8RethrowTryCatchScope rethrow(block); | 5275 V8RethrowTryCatchScope rethrow(block); |
| 5276 TONATIVE_VOID_INTERNAL(dateArg, toCoreDate(info[0])); | 5276 TONATIVE_VOID_INTERNAL(dateArg, toCoreDate(info[0])); |
| 5277 } | 5277 } |
| 5278 impl->voidMethodDateArg(dateArg); | 5278 impl->voidMethodDateArg(dateArg); |
| 5279 } | 5279 } |
| 5280 | 5280 |
| 5281 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5281 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 5282 { | 5282 { |
| 5283 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5283 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5284 TestObjectV8Internal::voidMethodDateArgMethod(info); | 5284 TestObjectV8Internal::voidMethodDateArgMethod(info); |
| 5285 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5285 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5286 } | 5286 } |
| 5287 | 5287 |
| 5288 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5288 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5289 { | 5289 { |
| 5290 if (UNLIKELY(info.Length() < 1)) { | 5290 if (UNLIKELY(info.Length() < 1)) { |
| 5291 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodStringArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Ge
tIsolate()); | 5291 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodStringArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Ge
tIsolate()); |
| 5292 return; | 5292 return; |
| 5293 } | 5293 } |
| 5294 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5294 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5295 V8StringResource<> stringArg; | 5295 V8StringResource<> stringArg; |
| 5296 { | 5296 { |
| 5297 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 5297 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 5298 } | 5298 } |
| 5299 impl->voidMethodStringArg(stringArg); | 5299 impl->voidMethodStringArg(stringArg); |
| 5300 } | 5300 } |
| 5301 | 5301 |
| 5302 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 5302 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 5303 { | 5303 { |
| 5304 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5304 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5305 TestObjectV8Internal::voidMethodStringArgMethod(info); | 5305 TestObjectV8Internal::voidMethodStringArgMethod(info); |
| 5306 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5306 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5307 } | 5307 } |
| 5308 | 5308 |
| 5309 static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 5309 static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 5310 { | 5310 { |
| 5311 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 5311 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5312 if (UNLIKELY(info.Length() < 1)) { | 5312 if (UNLIKELY(info.Length() < 1)) { |
| 5313 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5313 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5314 exceptionState.throwIfNeeded(); | 5314 exceptionState.throwIfNeeded(); |
| 5315 return; | 5315 return; |
| 5316 } | 5316 } |
| 5317 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5317 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5318 V8StringResource<> stringArg; | 5318 V8StringResource<> stringArg; |
| 5319 { | 5319 { |
| 5320 v8::TryCatch block; | 5320 v8::TryCatch block; |
| 5321 V8RethrowTryCatchScope rethrow(block); | 5321 V8RethrowTryCatchScope rethrow(block); |
| 5322 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringArg, toByteString(info[0], e
xceptionState), exceptionState); | 5322 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringArg, toByteString(info[0], e
xceptionState), exceptionState); |
| 5323 } | 5323 } |
| 5324 impl->voidMethodByteStringArg(stringArg); | 5324 impl->voidMethodByteStringArg(stringArg); |
| 5325 } | 5325 } |
| 5326 | 5326 |
| 5327 static void voidMethodByteStringArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 5327 static void voidMethodByteStringArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 5328 { | 5328 { |
| 5329 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5329 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5330 TestObjectV8Internal::voidMethodByteStringArgMethod(info); | 5330 TestObjectV8Internal::voidMethodByteStringArgMethod(info); |
| 5331 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5331 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5332 } | 5332 } |
| 5333 | 5333 |
| 5334 static void voidMethodScalarValueStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 5334 static void voidMethodScalarValueStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 5335 { | 5335 { |
| 5336 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
calarValueStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 5336 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
calarValueStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5337 if (UNLIKELY(info.Length() < 1)) { | 5337 if (UNLIKELY(info.Length() < 1)) { |
| 5338 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5338 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5339 exceptionState.throwIfNeeded(); | 5339 exceptionState.throwIfNeeded(); |
| 5340 return; | 5340 return; |
| 5341 } | 5341 } |
| 5342 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5342 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5343 V8StringResource<> scalarValueStringArg; | 5343 V8StringResource<> scalarValueStringArg; |
| 5344 { | 5344 { |
| 5345 v8::TryCatch block; | 5345 v8::TryCatch block; |
| 5346 V8RethrowTryCatchScope rethrow(block); | 5346 V8RethrowTryCatchScope rethrow(block); |
| 5347 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(scalarValueStringArg, toScalarValu
eString(info[0], exceptionState), exceptionState); | 5347 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(scalarValueStringArg, toScalarValu
eString(info[0], exceptionState), exceptionState); |
| 5348 } | 5348 } |
| 5349 impl->voidMethodScalarValueStringArg(scalarValueStringArg); | 5349 impl->voidMethodScalarValueStringArg(scalarValueStringArg); |
| 5350 } | 5350 } |
| 5351 | 5351 |
| 5352 static void voidMethodScalarValueStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 5352 static void voidMethodScalarValueStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 5353 { | 5353 { |
| 5354 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5354 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5355 TestObjectV8Internal::voidMethodScalarValueStringArgMethod(info); | 5355 TestObjectV8Internal::voidMethodScalarValueStringArgMethod(info); |
| 5356 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5356 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5357 } | 5357 } |
| 5358 | 5358 |
| 5359 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5359 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 5360 { | 5360 { |
| 5361 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
OMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate()); | 5361 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
OMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5362 if (UNLIKELY(info.Length() < 1)) { | 5362 if (UNLIKELY(info.Length() < 1)) { |
| 5363 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5363 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5364 exceptionState.throwIfNeeded(); | 5364 exceptionState.throwIfNeeded(); |
| 5365 return; | 5365 return; |
| 5366 } | 5366 } |
| 5367 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5367 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5368 unsigned long long domTimeStampArg; | 5368 unsigned long long domTimeStampArg; |
| 5369 { | 5369 { |
| 5370 v8::TryCatch block; | 5370 v8::TryCatch block; |
| 5371 V8RethrowTryCatchScope rethrow(block); | 5371 V8RethrowTryCatchScope rethrow(block); |
| 5372 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(domTimeStampArg, toUInt64(info[0],
exceptionState), exceptionState); | 5372 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(domTimeStampArg, toUInt64(info[0],
exceptionState), exceptionState); |
| 5373 } | 5373 } |
| 5374 impl->voidMethodDOMTimeStampArg(domTimeStampArg); | 5374 impl->voidMethodDOMTimeStampArg(domTimeStampArg); |
| 5375 } | 5375 } |
| 5376 | 5376 |
| 5377 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 5377 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 5378 { | 5378 { |
| 5379 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5379 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5380 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info); | 5380 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info); |
| 5381 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5381 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5382 } | 5382 } |
| 5383 | 5383 |
| 5384 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 5384 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 5385 { | 5385 { |
| 5386 if (UNLIKELY(info.Length() < 1)) { | 5386 if (UNLIKELY(info.Length() < 1)) { |
| 5387 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodBooleanArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); | 5387 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodBooleanArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); |
| 5388 return; | 5388 return; |
| 5389 } | 5389 } |
| 5390 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5390 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5391 bool booleanArg; | 5391 bool booleanArg; |
| 5392 { | 5392 { |
| 5393 v8::TryCatch block; | 5393 v8::TryCatch block; |
| 5394 V8RethrowTryCatchScope rethrow(block); | 5394 V8RethrowTryCatchScope rethrow(block); |
| 5395 TONATIVE_VOID_INTERNAL(booleanArg, info[0]->BooleanValue()); | 5395 TONATIVE_VOID_INTERNAL(booleanArg, info[0]->BooleanValue()); |
| 5396 } | 5396 } |
| 5397 impl->voidMethodBooleanArg(booleanArg); | 5397 impl->voidMethodBooleanArg(booleanArg); |
| 5398 } | 5398 } |
| 5399 | 5399 |
| 5400 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 5400 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 5401 { | 5401 { |
| 5402 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5402 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5403 TestObjectV8Internal::voidMethodBooleanArgMethod(info); | 5403 TestObjectV8Internal::voidMethodBooleanArgMethod(info); |
| 5404 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5404 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5405 } | 5405 } |
| 5406 | 5406 |
| 5407 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 5407 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 5408 { | 5408 { |
| 5409 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteArg", "TestObject", info.Holder(), info.GetIsolate()); | 5409 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5410 if (UNLIKELY(info.Length() < 1)) { | 5410 if (UNLIKELY(info.Length() < 1)) { |
| 5411 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5411 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5412 exceptionState.throwIfNeeded(); | 5412 exceptionState.throwIfNeeded(); |
| 5413 return; | 5413 return; |
| 5414 } | 5414 } |
| 5415 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5415 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5416 int byteArg; | 5416 int byteArg; |
| 5417 { | 5417 { |
| 5418 v8::TryCatch block; | 5418 v8::TryCatch block; |
| 5419 V8RethrowTryCatchScope rethrow(block); | 5419 V8RethrowTryCatchScope rethrow(block); |
| 5420 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(byteArg, toInt8(info[0], exception
State), exceptionState); | 5420 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(byteArg, toInt8(info[0], exception
State), exceptionState); |
| 5421 } | 5421 } |
| 5422 impl->voidMethodByteArg(byteArg); | 5422 impl->voidMethodByteArg(byteArg); |
| 5423 } | 5423 } |
| 5424 | 5424 |
| 5425 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5425 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 5426 { | 5426 { |
| 5427 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5427 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5428 TestObjectV8Internal::voidMethodByteArgMethod(info); | 5428 TestObjectV8Internal::voidMethodByteArgMethod(info); |
| 5429 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5429 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5430 } | 5430 } |
| 5431 | 5431 |
| 5432 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5432 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5433 { | 5433 { |
| 5434 if (UNLIKELY(info.Length() < 1)) { | 5434 if (UNLIKELY(info.Length() < 1)) { |
| 5435 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDoubleArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Ge
tIsolate()); | 5435 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDoubleArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Ge
tIsolate()); |
| 5436 return; | 5436 return; |
| 5437 } | 5437 } |
| 5438 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5438 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5439 double doubleArg; | 5439 double doubleArg; |
| 5440 { | 5440 { |
| 5441 v8::TryCatch block; | 5441 v8::TryCatch block; |
| 5442 V8RethrowTryCatchScope rethrow(block); | 5442 V8RethrowTryCatchScope rethrow(block); |
| 5443 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); | 5443 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); |
| 5444 } | 5444 } |
| 5445 impl->voidMethodDoubleArg(doubleArg); | 5445 impl->voidMethodDoubleArg(doubleArg); |
| 5446 } | 5446 } |
| 5447 | 5447 |
| 5448 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 5448 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 5449 { | 5449 { |
| 5450 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5450 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5451 TestObjectV8Internal::voidMethodDoubleArgMethod(info); | 5451 TestObjectV8Internal::voidMethodDoubleArgMethod(info); |
| 5452 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5452 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5453 } | 5453 } |
| 5454 | 5454 |
| 5455 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5455 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5456 { | 5456 { |
| 5457 if (UNLIKELY(info.Length() < 1)) { | 5457 if (UNLIKELY(info.Length() < 1)) { |
| 5458 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodFloatArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Get
Isolate()); | 5458 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodFloatArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Get
Isolate()); |
| 5459 return; | 5459 return; |
| 5460 } | 5460 } |
| 5461 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5461 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5462 float floatArg; | 5462 float floatArg; |
| 5463 { | 5463 { |
| 5464 v8::TryCatch block; | 5464 v8::TryCatch block; |
| 5465 V8RethrowTryCatchScope rethrow(block); | 5465 V8RethrowTryCatchScope rethrow(block); |
| 5466 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue
())); | 5466 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue
())); |
| 5467 } | 5467 } |
| 5468 impl->voidMethodFloatArg(floatArg); | 5468 impl->voidMethodFloatArg(floatArg); |
| 5469 } | 5469 } |
| 5470 | 5470 |
| 5471 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5471 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 5472 { | 5472 { |
| 5473 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5473 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5474 TestObjectV8Internal::voidMethodFloatArgMethod(info); | 5474 TestObjectV8Internal::voidMethodFloatArgMethod(info); |
| 5475 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5475 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5476 } | 5476 } |
| 5477 | 5477 |
| 5478 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 5478 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 5479 { | 5479 { |
| 5480 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArg", "TestObject", info.Holder(), info.GetIsolate()); | 5480 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5481 if (UNLIKELY(info.Length() < 1)) { | 5481 if (UNLIKELY(info.Length() < 1)) { |
| 5482 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5482 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5483 exceptionState.throwIfNeeded(); | 5483 exceptionState.throwIfNeeded(); |
| 5484 return; | 5484 return; |
| 5485 } | 5485 } |
| 5486 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5486 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5487 int longArg; | 5487 int longArg; |
| 5488 { | 5488 { |
| 5489 v8::TryCatch block; | 5489 v8::TryCatch block; |
| 5490 V8RethrowTryCatchScope rethrow(block); | 5490 V8RethrowTryCatchScope rethrow(block); |
| 5491 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 5491 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 5492 } | 5492 } |
| 5493 impl->voidMethodLongArg(longArg); | 5493 impl->voidMethodLongArg(longArg); |
| 5494 } | 5494 } |
| 5495 | 5495 |
| 5496 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5496 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 5497 { | 5497 { |
| 5498 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5498 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5499 TestObjectV8Internal::voidMethodLongArgMethod(info); | 5499 TestObjectV8Internal::voidMethodLongArgMethod(info); |
| 5500 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5500 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5501 } | 5501 } |
| 5502 | 5502 |
| 5503 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 5503 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 5504 { | 5504 { |
| 5505 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 5505 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5506 if (UNLIKELY(info.Length() < 1)) { | 5506 if (UNLIKELY(info.Length() < 1)) { |
| 5507 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5507 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5508 exceptionState.throwIfNeeded(); | 5508 exceptionState.throwIfNeeded(); |
| 5509 return; | 5509 return; |
| 5510 } | 5510 } |
| 5511 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5511 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5512 long long longLongArg; | 5512 long long longLongArg; |
| 5513 { | 5513 { |
| 5514 v8::TryCatch block; | 5514 v8::TryCatch block; |
| 5515 V8RethrowTryCatchScope rethrow(block); | 5515 V8RethrowTryCatchScope rethrow(block); |
| 5516 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longLongArg, toInt64(info[0], exce
ptionState), exceptionState); | 5516 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longLongArg, toInt64(info[0], exce
ptionState), exceptionState); |
| 5517 } | 5517 } |
| 5518 impl->voidMethodLongLongArg(longLongArg); | 5518 impl->voidMethodLongLongArg(longLongArg); |
| 5519 } | 5519 } |
| 5520 | 5520 |
| 5521 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 5521 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 5522 { | 5522 { |
| 5523 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5523 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5524 TestObjectV8Internal::voidMethodLongLongArgMethod(info); | 5524 TestObjectV8Internal::voidMethodLongLongArgMethod(info); |
| 5525 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5525 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5526 } | 5526 } |
| 5527 | 5527 |
| 5528 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5528 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5529 { | 5529 { |
| 5530 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ctetArg", "TestObject", info.Holder(), info.GetIsolate()); | 5530 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ctetArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5531 if (UNLIKELY(info.Length() < 1)) { | 5531 if (UNLIKELY(info.Length() < 1)) { |
| 5532 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5532 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5533 exceptionState.throwIfNeeded(); | 5533 exceptionState.throwIfNeeded(); |
| 5534 return; | 5534 return; |
| 5535 } | 5535 } |
| 5536 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5536 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5537 unsigned octetArg; | 5537 unsigned octetArg; |
| 5538 { | 5538 { |
| 5539 v8::TryCatch block; | 5539 v8::TryCatch block; |
| 5540 V8RethrowTryCatchScope rethrow(block); | 5540 V8RethrowTryCatchScope rethrow(block); |
| 5541 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(octetArg, toUInt8(info[0], excepti
onState), exceptionState); | 5541 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(octetArg, toUInt8(info[0], excepti
onState), exceptionState); |
| 5542 } | 5542 } |
| 5543 impl->voidMethodOctetArg(octetArg); | 5543 impl->voidMethodOctetArg(octetArg); |
| 5544 } | 5544 } |
| 5545 | 5545 |
| 5546 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5546 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 5547 { | 5547 { |
| 5548 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5548 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5549 TestObjectV8Internal::voidMethodOctetArgMethod(info); | 5549 TestObjectV8Internal::voidMethodOctetArgMethod(info); |
| 5550 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5550 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5551 } | 5551 } |
| 5552 | 5552 |
| 5553 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5553 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 5554 { | 5554 { |
| 5555 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
hortArg", "TestObject", info.Holder(), info.GetIsolate()); | 5555 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
hortArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5556 if (UNLIKELY(info.Length() < 1)) { | 5556 if (UNLIKELY(info.Length() < 1)) { |
| 5557 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5557 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5558 exceptionState.throwIfNeeded(); | 5558 exceptionState.throwIfNeeded(); |
| 5559 return; | 5559 return; |
| 5560 } | 5560 } |
| 5561 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5561 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5562 int shortArg; | 5562 int shortArg; |
| 5563 { | 5563 { |
| 5564 v8::TryCatch block; | 5564 v8::TryCatch block; |
| 5565 V8RethrowTryCatchScope rethrow(block); | 5565 V8RethrowTryCatchScope rethrow(block); |
| 5566 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(shortArg, toInt16(info[0], excepti
onState), exceptionState); | 5566 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(shortArg, toInt16(info[0], excepti
onState), exceptionState); |
| 5567 } | 5567 } |
| 5568 impl->voidMethodShortArg(shortArg); | 5568 impl->voidMethodShortArg(shortArg); |
| 5569 } | 5569 } |
| 5570 | 5570 |
| 5571 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5571 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 5572 { | 5572 { |
| 5573 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5573 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5574 TestObjectV8Internal::voidMethodShortArgMethod(info); | 5574 TestObjectV8Internal::voidMethodShortArgMethod(info); |
| 5575 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5575 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5576 } | 5576 } |
| 5577 | 5577 |
| 5578 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5578 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 5579 { | 5579 { |
| 5580 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 5580 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5581 if (UNLIKELY(info.Length() < 1)) { | 5581 if (UNLIKELY(info.Length() < 1)) { |
| 5582 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5582 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5583 exceptionState.throwIfNeeded(); | 5583 exceptionState.throwIfNeeded(); |
| 5584 return; | 5584 return; |
| 5585 } | 5585 } |
| 5586 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5586 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5587 unsigned unsignedLongArg; | 5587 unsigned unsignedLongArg; |
| 5588 { | 5588 { |
| 5589 v8::TryCatch block; | 5589 v8::TryCatch block; |
| 5590 V8RethrowTryCatchScope rethrow(block); | 5590 V8RethrowTryCatchScope rethrow(block); |
| 5591 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedLongArg, toUInt32(info[0],
exceptionState), exceptionState); | 5591 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedLongArg, toUInt32(info[0],
exceptionState), exceptionState); |
| 5592 } | 5592 } |
| 5593 impl->voidMethodUnsignedLongArg(unsignedLongArg); | 5593 impl->voidMethodUnsignedLongArg(unsignedLongArg); |
| 5594 } | 5594 } |
| 5595 | 5595 |
| 5596 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 5596 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 5597 { | 5597 { |
| 5598 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5598 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5599 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info); | 5599 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info); |
| 5600 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5600 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5601 } | 5601 } |
| 5602 | 5602 |
| 5603 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | 5603 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 5604 { | 5604 { |
| 5605 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 5605 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5606 if (UNLIKELY(info.Length() < 1)) { | 5606 if (UNLIKELY(info.Length() < 1)) { |
| 5607 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5607 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5608 exceptionState.throwIfNeeded(); | 5608 exceptionState.throwIfNeeded(); |
| 5609 return; | 5609 return; |
| 5610 } | 5610 } |
| 5611 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5611 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5612 unsigned long long unsignedLongLongArg; | 5612 unsigned long long unsignedLongLongArg; |
| 5613 { | 5613 { |
| 5614 v8::TryCatch block; | 5614 v8::TryCatch block; |
| 5615 V8RethrowTryCatchScope rethrow(block); | 5615 V8RethrowTryCatchScope rethrow(block); |
| 5616 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedLongLongArg, toUInt64(info
[0], exceptionState), exceptionState); | 5616 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedLongLongArg, toUInt64(info
[0], exceptionState), exceptionState); |
| 5617 } | 5617 } |
| 5618 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg); | 5618 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg); |
| 5619 } | 5619 } |
| 5620 | 5620 |
| 5621 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 5621 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 5622 { | 5622 { |
| 5623 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5623 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5624 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info); | 5624 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info); |
| 5625 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5625 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5626 } | 5626 } |
| 5627 | 5627 |
| 5628 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5628 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 5629 { | 5629 { |
| 5630 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); | 5630 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5631 if (UNLIKELY(info.Length() < 1)) { | 5631 if (UNLIKELY(info.Length() < 1)) { |
| 5632 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 5632 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 5633 exceptionState.throwIfNeeded(); | 5633 exceptionState.throwIfNeeded(); |
| 5634 return; | 5634 return; |
| 5635 } | 5635 } |
| 5636 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5636 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5637 unsigned unsignedShortArg; | 5637 unsigned unsignedShortArg; |
| 5638 { | 5638 { |
| 5639 v8::TryCatch block; | 5639 v8::TryCatch block; |
| 5640 V8RethrowTryCatchScope rethrow(block); | 5640 V8RethrowTryCatchScope rethrow(block); |
| 5641 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedShortArg, toUInt16(info[0]
, exceptionState), exceptionState); | 5641 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedShortArg, toUInt16(info[0]
, exceptionState), exceptionState); |
| 5642 } | 5642 } |
| 5643 impl->voidMethodUnsignedShortArg(unsignedShortArg); | 5643 impl->voidMethodUnsignedShortArg(unsignedShortArg); |
| 5644 } | 5644 } |
| 5645 | 5645 |
| 5646 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 5646 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 5647 { | 5647 { |
| 5648 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5648 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5649 TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info); | 5649 TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info); |
| 5650 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5650 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5651 } | 5651 } |
| 5652 | 5652 |
| 5653 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 5653 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 5654 { | 5654 { |
| 5655 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5655 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5656 v8SetReturnValue(info, impl->testInterfaceEmptyMethod()); | 5656 v8SetReturnValue(info, impl->testInterfaceEmptyMethod()); |
| 5657 } | 5657 } |
| 5658 | 5658 |
| 5659 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 5659 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 5660 { | 5660 { |
| 5661 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5661 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5662 TestObjectV8Internal::testInterfaceEmptyMethodMethod(info); | 5662 TestObjectV8Internal::testInterfaceEmptyMethodMethod(info); |
| 5663 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5663 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5664 } | 5664 } |
| 5665 | 5665 |
| 5666 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 5666 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 5667 { | 5667 { |
| 5668 if (UNLIKELY(info.Length() < 1)) { | 5668 if (UNLIKELY(info.Length() < 1)) { |
| 5669 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate
()), info.GetIsolate()); | 5669 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate
()), info.GetIsolate()); |
| 5670 return; | 5670 return; |
| 5671 } | 5671 } |
| 5672 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5672 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5673 TestInterfaceEmpty* testInterfaceEmptyArg; | 5673 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 5674 { | 5674 { |
| 5675 v8::TryCatch block; | 5675 v8::TryCatch block; |
| 5676 V8RethrowTryCatchScope rethrow(block); | 5676 V8RethrowTryCatchScope rethrow(block); |
| 5677 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); | 5677 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); |
| 5678 } | 5678 } |
| 5679 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); | 5679 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
| 5680 } | 5680 } |
| 5681 | 5681 |
| 5682 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 5682 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 5683 { | 5683 { |
| 5684 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5684 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5685 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); | 5685 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); |
| 5686 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5686 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5687 } | 5687 } |
| 5688 | 5688 |
| 5689 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 5689 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 5690 { | 5690 { |
| 5691 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | 5691 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 5692 if (UNLIKELY(info.Length() < 2)) { | 5692 if (UNLIKELY(info.Length() < 2)) { |
| 5693 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 5693 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| 5694 exceptionState.throwIfNeeded(); | 5694 exceptionState.throwIfNeeded(); |
| 5695 return; | 5695 return; |
| 5696 } | 5696 } |
| 5697 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5697 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5698 int longArg; | 5698 int longArg; |
| 5699 TestInterfaceEmpty* testInterfaceEmptyArg; | 5699 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 5700 { | 5700 { |
| 5701 v8::TryCatch block; | 5701 v8::TryCatch block; |
| 5702 V8RethrowTryCatchScope rethrow(block); | 5702 V8RethrowTryCatchScope rethrow(block); |
| 5703 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 5703 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 5704 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[1])); | 5704 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[1])); |
| 5705 } | 5705 } |
| 5706 impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg)
; | 5706 impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg)
; |
| 5707 } | 5707 } |
| 5708 | 5708 |
| 5709 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 5709 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 5710 { | 5710 { |
| 5711 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5711 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5712 TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info); | 5712 TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info); |
| 5713 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5713 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5714 } | 5714 } |
| 5715 | 5715 |
| 5716 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5716 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 5717 { | 5717 { |
| 5718 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5718 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5719 v8SetReturnValue(info, impl->voidCallbackFunctionMethod().v8Value()); | 5719 v8SetReturnValue(info, impl->voidCallbackFunctionMethod().v8Value()); |
| 5720 } | 5720 } |
| 5721 | 5721 |
| 5722 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 5722 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 5723 { | 5723 { |
| 5724 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5724 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5725 TestObjectV8Internal::voidCallbackFunctionMethodMethod(info); | 5725 TestObjectV8Internal::voidCallbackFunctionMethodMethod(info); |
| 5726 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5726 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5727 } | 5727 } |
| 5728 | 5728 |
| 5729 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 5729 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 5730 { | 5730 { |
| 5731 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5731 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5732 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgMethod().v8Val
ue()); | 5732 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgMethod().v8Val
ue()); |
| 5733 } | 5733 } |
| 5734 | 5734 |
| 5735 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 5735 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 5736 { | 5736 { |
| 5737 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5737 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5738 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info); | 5738 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info); |
| 5739 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5739 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5740 } | 5740 } |
| 5741 | 5741 |
| 5742 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 5742 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 5743 { | 5743 { |
| 5744 if (UNLIKELY(info.Length() < 1)) { | 5744 if (UNLIKELY(info.Length() < 1)) { |
| 5745 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodVoidCallbackFunctionArg", "TestObject", 1, info.Length(), info.GetIsola
te()), info.GetIsolate()); | 5745 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodVoidCallbackFunctionArg", "TestObject", 1, info.Length(), info.GetIsola
te()), info.GetIsolate()); |
| 5746 return; | 5746 return; |
| 5747 } | 5747 } |
| 5748 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5748 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5749 ScriptValue voidCallbackFunctionArg; | 5749 ScriptValue voidCallbackFunctionArg; |
| 5750 { | 5750 { |
| 5751 v8::TryCatch block; | 5751 v8::TryCatch block; |
| 5752 V8RethrowTryCatchScope rethrow(block); | 5752 V8RethrowTryCatchScope rethrow(block); |
| 5753 TONATIVE_VOID_INTERNAL(voidCallbackFunctionArg, ScriptValue(ScriptState:
:current(info.GetIsolate()), info[0])); | 5753 TONATIVE_VOID_INTERNAL(voidCallbackFunctionArg, ScriptValue(ScriptState:
:current(info.GetIsolate()), info[0])); |
| 5754 } | 5754 } |
| 5755 impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg); | 5755 impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg); |
| 5756 } | 5756 } |
| 5757 | 5757 |
| 5758 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 5758 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
| 5759 { | 5759 { |
| 5760 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5760 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5761 TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info); | 5761 TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info); |
| 5762 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5762 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5763 } | 5763 } |
| 5764 | 5764 |
| 5765 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::Function
CallbackInfo<v8::Value>& info) | 5765 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::Function
CallbackInfo<v8::Value>& info) |
| 5766 { | 5766 { |
| 5767 if (UNLIKELY(info.Length() < 1)) { | 5767 if (UNLIKELY(info.Length() < 1)) { |
| 5768 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", 1, info.Length(), inf
o.GetIsolate()), info.GetIsolate()); | 5768 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", 1, info.Length(), inf
o.GetIsolate()), info.GetIsolate()); |
| 5769 return; | 5769 return; |
| 5770 } | 5770 } |
| 5771 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5771 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5772 ScriptValue anyCallbackFunctionOptionalAnyArgArg; | 5772 ScriptValue anyCallbackFunctionOptionalAnyArgArg; |
| 5773 { | 5773 { |
| 5774 v8::TryCatch block; | 5774 v8::TryCatch block; |
| 5775 V8RethrowTryCatchScope rethrow(block); | 5775 V8RethrowTryCatchScope rethrow(block); |
| 5776 TONATIVE_VOID_INTERNAL(anyCallbackFunctionOptionalAnyArgArg, ScriptValue
(ScriptState::current(info.GetIsolate()), info[0])); | 5776 TONATIVE_VOID_INTERNAL(anyCallbackFunctionOptionalAnyArgArg, ScriptValue
(ScriptState::current(info.GetIsolate()), info[0])); |
| 5777 } | 5777 } |
| 5778 impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptiona
lAnyArgArg); | 5778 impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptiona
lAnyArgArg); |
| 5779 } | 5779 } |
| 5780 | 5780 |
| 5781 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 5781 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 5782 { | 5782 { |
| 5783 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5783 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5784 TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info
); | 5784 TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info
); |
| 5785 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5785 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5786 } | 5786 } |
| 5787 | 5787 |
| 5788 static void compareHowMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 5788 static void compareHowMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 5789 { | 5789 { |
| 5790 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5790 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5791 v8SetReturnValue(info, impl->compareHowMethod()); | 5791 v8SetReturnValue(info, impl->compareHowMethod()); |
| 5792 } | 5792 } |
| 5793 | 5793 |
| 5794 static void compareHowMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 5794 static void compareHowMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 5795 { | 5795 { |
| 5796 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5796 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5797 TestObjectV8Internal::compareHowMethodMethod(info); | 5797 TestObjectV8Internal::compareHowMethodMethod(info); |
| 5798 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5798 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5799 } | 5799 } |
| 5800 | 5800 |
| 5801 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5801 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 5802 { | 5802 { |
| 5803 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5803 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5804 v8SetReturnValue(info, impl->anyMethod().v8Value()); | 5804 v8SetReturnValue(info, impl->anyMethod().v8Value()); |
| 5805 } | 5805 } |
| 5806 | 5806 |
| 5807 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 5807 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 5808 { | 5808 { |
| 5809 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5809 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5810 TestObjectV8Internal::anyMethodMethod(info); | 5810 TestObjectV8Internal::anyMethodMethod(info); |
| 5811 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5811 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5812 } | 5812 } |
| 5813 | 5813 |
| 5814 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 5814 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 5815 { | 5815 { |
| 5816 if (UNLIKELY(info.Length() < 1)) { | 5816 if (UNLIKELY(info.Length() < 1)) { |
| 5817 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodCompareHowArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | 5817 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodCompareHowArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); |
| 5818 return; | 5818 return; |
| 5819 } | 5819 } |
| 5820 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5820 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5821 Range::CompareHow compareHowArg; | 5821 Range::CompareHow compareHowArg; |
| 5822 { | 5822 { |
| 5823 v8::TryCatch block; | 5823 v8::TryCatch block; |
| 5824 V8RethrowTryCatchScope rethrow(block); | 5824 V8RethrowTryCatchScope rethrow(block); |
| 5825 TONATIVE_VOID_INTERNAL(compareHowArg, static_cast<Range::CompareHow>(inf
o[0]->Int32Value())); | 5825 TONATIVE_VOID_INTERNAL(compareHowArg, static_cast<Range::CompareHow>(inf
o[0]->Int32Value())); |
| 5826 } | 5826 } |
| 5827 impl->voidMethodCompareHowArg(compareHowArg); | 5827 impl->voidMethodCompareHowArg(compareHowArg); |
| 5828 } | 5828 } |
| 5829 | 5829 |
| 5830 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 5830 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 5831 { | 5831 { |
| 5832 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5832 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5833 TestObjectV8Internal::voidMethodCompareHowArgMethod(info); | 5833 TestObjectV8Internal::voidMethodCompareHowArgMethod(info); |
| 5834 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5834 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5835 } | 5835 } |
| 5836 | 5836 |
| 5837 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 5837 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 5838 { | 5838 { |
| 5839 if (UNLIKELY(info.Length() < 1)) { | 5839 if (UNLIKELY(info.Length() < 1)) { |
| 5840 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodEventTargetArg", "TestObject", 1, info.Length(), info.GetIsolate()), in
fo.GetIsolate()); | 5840 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodEventTargetArg", "TestObject", 1, info.Length(), info.GetIsolate()), in
fo.GetIsolate()); |
| 5841 return; | 5841 return; |
| 5842 } | 5842 } |
| 5843 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5843 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5844 EventTarget* eventTargetArg; | 5844 EventTarget* eventTargetArg; |
| 5845 { | 5845 { |
| 5846 v8::TryCatch block; | 5846 v8::TryCatch block; |
| 5847 V8RethrowTryCatchScope rethrow(block); | 5847 V8RethrowTryCatchScope rethrow(block); |
| 5848 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); | 5848 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); |
| 5849 } | 5849 } |
| 5850 impl->voidMethodEventTargetArg(eventTargetArg); | 5850 impl->voidMethodEventTargetArg(eventTargetArg); |
| 5851 } | 5851 } |
| 5852 | 5852 |
| 5853 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 5853 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 5854 { | 5854 { |
| 5855 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5855 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5856 TestObjectV8Internal::voidMethodEventTargetArgMethod(info); | 5856 TestObjectV8Internal::voidMethodEventTargetArgMethod(info); |
| 5857 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5857 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5858 } | 5858 } |
| 5859 | 5859 |
| 5860 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 5860 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 5861 { | 5861 { |
| 5862 if (UNLIKELY(info.Length() < 1)) { | 5862 if (UNLIKELY(info.Length() < 1)) { |
| 5863 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodAnyArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetIs
olate()); | 5863 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodAnyArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetIs
olate()); |
| 5864 return; | 5864 return; |
| 5865 } | 5865 } |
| 5866 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5866 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5867 ScriptValue anyArg; | 5867 ScriptValue anyArg; |
| 5868 { | 5868 { |
| 5869 v8::TryCatch block; | 5869 v8::TryCatch block; |
| 5870 V8RethrowTryCatchScope rethrow(block); | 5870 V8RethrowTryCatchScope rethrow(block); |
| 5871 TONATIVE_VOID_INTERNAL(anyArg, ScriptValue(ScriptState::current(info.Get
Isolate()), info[0])); | 5871 TONATIVE_VOID_INTERNAL(anyArg, ScriptValue(ScriptState::current(info.Get
Isolate()), info[0])); |
| 5872 } | 5872 } |
| 5873 impl->voidMethodAnyArg(anyArg); | 5873 impl->voidMethodAnyArg(anyArg); |
| 5874 } | 5874 } |
| 5875 | 5875 |
| 5876 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 5876 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 5877 { | 5877 { |
| 5878 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5878 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5879 TestObjectV8Internal::voidMethodAnyArgMethod(info); | 5879 TestObjectV8Internal::voidMethodAnyArgMethod(info); |
| 5880 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5880 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5881 } | 5881 } |
| 5882 | 5882 |
| 5883 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 5883 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 5884 { | 5884 { |
| 5885 if (UNLIKELY(info.Length() < 1)) { | 5885 if (UNLIKELY(info.Length() < 1)) { |
| 5886 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodAttrArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI
solate()); | 5886 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodAttrArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI
solate()); |
| 5887 return; | 5887 return; |
| 5888 } | 5888 } |
| 5889 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5889 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5890 Attr* attrArg; | 5890 Attr* attrArg; |
| 5891 { | 5891 { |
| 5892 v8::TryCatch block; | 5892 v8::TryCatch block; |
| 5893 V8RethrowTryCatchScope rethrow(block); | 5893 V8RethrowTryCatchScope rethrow(block); |
| 5894 TONATIVE_VOID_INTERNAL(attrArg, V8Attr::toNativeWithTypeCheck(info.GetIs
olate(), info[0])); | 5894 TONATIVE_VOID_INTERNAL(attrArg, V8Attr::toImplWithTypeCheck(info.GetIsol
ate(), info[0])); |
| 5895 } | 5895 } |
| 5896 impl->voidMethodAttrArg(attrArg); | 5896 impl->voidMethodAttrArg(attrArg); |
| 5897 } | 5897 } |
| 5898 | 5898 |
| 5899 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5899 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 5900 { | 5900 { |
| 5901 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5901 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5902 TestObjectV8Internal::voidMethodAttrArgMethod(info); | 5902 TestObjectV8Internal::voidMethodAttrArgMethod(info); |
| 5903 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5903 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5904 } | 5904 } |
| 5905 | 5905 |
| 5906 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 5906 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 5907 { | 5907 { |
| 5908 if (UNLIKELY(info.Length() < 1)) { | 5908 if (UNLIKELY(info.Length() < 1)) { |
| 5909 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDocumentArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.
GetIsolate()); | 5909 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDocumentArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.
GetIsolate()); |
| 5910 return; | 5910 return; |
| 5911 } | 5911 } |
| 5912 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5912 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5913 Document* documentArg; | 5913 Document* documentArg; |
| 5914 { | 5914 { |
| 5915 v8::TryCatch block; | 5915 v8::TryCatch block; |
| 5916 V8RethrowTryCatchScope rethrow(block); | 5916 V8RethrowTryCatchScope rethrow(block); |
| 5917 TONATIVE_VOID_INTERNAL(documentArg, V8Document::toNativeWithTypeCheck(in
fo.GetIsolate(), info[0])); | 5917 TONATIVE_VOID_INTERNAL(documentArg, V8Document::toImplWithTypeCheck(info
.GetIsolate(), info[0])); |
| 5918 } | 5918 } |
| 5919 impl->voidMethodDocumentArg(documentArg); | 5919 impl->voidMethodDocumentArg(documentArg); |
| 5920 } | 5920 } |
| 5921 | 5921 |
| 5922 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 5922 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 5923 { | 5923 { |
| 5924 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5924 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5925 TestObjectV8Internal::voidMethodDocumentArgMethod(info); | 5925 TestObjectV8Internal::voidMethodDocumentArgMethod(info); |
| 5926 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5926 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5927 } | 5927 } |
| 5928 | 5928 |
| 5929 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5929 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 5930 { | 5930 { |
| 5931 if (UNLIKELY(info.Length() < 1)) { | 5931 if (UNLIKELY(info.Length() < 1)) { |
| 5932 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDocumentTypeArg", "TestObject", 1, info.Length(), info.GetIsolate()), i
nfo.GetIsolate()); | 5932 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDocumentTypeArg", "TestObject", 1, info.Length(), info.GetIsolate()), i
nfo.GetIsolate()); |
| 5933 return; | 5933 return; |
| 5934 } | 5934 } |
| 5935 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5935 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5936 DocumentType* documentTypeArg; | 5936 DocumentType* documentTypeArg; |
| 5937 { | 5937 { |
| 5938 v8::TryCatch block; | 5938 v8::TryCatch block; |
| 5939 V8RethrowTryCatchScope rethrow(block); | 5939 V8RethrowTryCatchScope rethrow(block); |
| 5940 TONATIVE_VOID_INTERNAL(documentTypeArg, V8DocumentType::toNativeWithType
Check(info.GetIsolate(), info[0])); | 5940 TONATIVE_VOID_INTERNAL(documentTypeArg, V8DocumentType::toImplWithTypeCh
eck(info.GetIsolate(), info[0])); |
| 5941 } | 5941 } |
| 5942 impl->voidMethodDocumentTypeArg(documentTypeArg); | 5942 impl->voidMethodDocumentTypeArg(documentTypeArg); |
| 5943 } | 5943 } |
| 5944 | 5944 |
| 5945 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 5945 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 5946 { | 5946 { |
| 5947 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5947 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5948 TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info); | 5948 TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info); |
| 5949 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5949 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5950 } | 5950 } |
| 5951 | 5951 |
| 5952 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 5952 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 5953 { | 5953 { |
| 5954 if (UNLIKELY(info.Length() < 1)) { | 5954 if (UNLIKELY(info.Length() < 1)) { |
| 5955 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodElementArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); | 5955 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodElementArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); |
| 5956 return; | 5956 return; |
| 5957 } | 5957 } |
| 5958 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5958 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5959 Element* elementArg; | 5959 Element* elementArg; |
| 5960 { | 5960 { |
| 5961 v8::TryCatch block; | 5961 v8::TryCatch block; |
| 5962 V8RethrowTryCatchScope rethrow(block); | 5962 V8RethrowTryCatchScope rethrow(block); |
| 5963 TONATIVE_VOID_INTERNAL(elementArg, V8Element::toNativeWithTypeCheck(info
.GetIsolate(), info[0])); | 5963 TONATIVE_VOID_INTERNAL(elementArg, V8Element::toImplWithTypeCheck(info.G
etIsolate(), info[0])); |
| 5964 } | 5964 } |
| 5965 impl->voidMethodElementArg(elementArg); | 5965 impl->voidMethodElementArg(elementArg); |
| 5966 } | 5966 } |
| 5967 | 5967 |
| 5968 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 5968 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 5969 { | 5969 { |
| 5970 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5970 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5971 TestObjectV8Internal::voidMethodElementArgMethod(info); | 5971 TestObjectV8Internal::voidMethodElementArgMethod(info); |
| 5972 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5972 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5973 } | 5973 } |
| 5974 | 5974 |
| 5975 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 5975 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 5976 { | 5976 { |
| 5977 if (UNLIKELY(info.Length() < 1)) { | 5977 if (UNLIKELY(info.Length() < 1)) { |
| 5978 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodNodeArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI
solate()); | 5978 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodNodeArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI
solate()); |
| 5979 return; | 5979 return; |
| 5980 } | 5980 } |
| 5981 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5981 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 5982 Node* nodeArg; | 5982 Node* nodeArg; |
| 5983 { | 5983 { |
| 5984 v8::TryCatch block; | 5984 v8::TryCatch block; |
| 5985 V8RethrowTryCatchScope rethrow(block); | 5985 V8RethrowTryCatchScope rethrow(block); |
| 5986 TONATIVE_VOID_INTERNAL(nodeArg, V8Node::toNativeWithTypeCheck(info.GetIs
olate(), info[0])); | 5986 TONATIVE_VOID_INTERNAL(nodeArg, V8Node::toImplWithTypeCheck(info.GetIsol
ate(), info[0])); |
| 5987 } | 5987 } |
| 5988 impl->voidMethodNodeArg(nodeArg); | 5988 impl->voidMethodNodeArg(nodeArg); |
| 5989 } | 5989 } |
| 5990 | 5990 |
| 5991 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 5991 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 5992 { | 5992 { |
| 5993 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 5993 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 5994 TestObjectV8Internal::voidMethodNodeArgMethod(info); | 5994 TestObjectV8Internal::voidMethodNodeArgMethod(info); |
| 5995 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5995 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 5996 } | 5996 } |
| 5997 | 5997 |
| 5998 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 5998 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 5999 { | 5999 { |
| 6000 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6000 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6001 v8SetReturnValue(info, impl->arrayBufferMethod()); | 6001 v8SetReturnValue(info, impl->arrayBufferMethod()); |
| 6002 } | 6002 } |
| 6003 | 6003 |
| 6004 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 6004 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 6005 { | 6005 { |
| 6006 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6006 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6007 TestObjectV8Internal::arrayBufferMethodMethod(info); | 6007 TestObjectV8Internal::arrayBufferMethodMethod(info); |
| 6008 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6008 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6009 } | 6009 } |
| 6010 | 6010 |
| 6011 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 6011 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 6012 { | 6012 { |
| 6013 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6013 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6014 v8SetReturnValue(info, impl->arrayBufferViewMethod()); | 6014 v8SetReturnValue(info, impl->arrayBufferViewMethod()); |
| 6015 } | 6015 } |
| 6016 | 6016 |
| 6017 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 6017 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 6018 { | 6018 { |
| 6019 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6019 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6020 TestObjectV8Internal::arrayBufferViewMethodMethod(info); | 6020 TestObjectV8Internal::arrayBufferViewMethodMethod(info); |
| 6021 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6021 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6022 } | 6022 } |
| 6023 | 6023 |
| 6024 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 6024 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 6025 { | 6025 { |
| 6026 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6026 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6027 v8SetReturnValue(info, impl->float32ArrayMethod()); | 6027 v8SetReturnValue(info, impl->float32ArrayMethod()); |
| 6028 } | 6028 } |
| 6029 | 6029 |
| 6030 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 6030 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 6031 { | 6031 { |
| 6032 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6032 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6033 TestObjectV8Internal::float32ArrayMethodMethod(info); | 6033 TestObjectV8Internal::float32ArrayMethodMethod(info); |
| 6034 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6034 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6035 } | 6035 } |
| 6036 | 6036 |
| 6037 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 6037 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 6038 { | 6038 { |
| 6039 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6039 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6040 v8SetReturnValue(info, impl->int32ArrayMethod()); | 6040 v8SetReturnValue(info, impl->int32ArrayMethod()); |
| 6041 } | 6041 } |
| 6042 | 6042 |
| 6043 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 6043 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 6044 { | 6044 { |
| 6045 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6045 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6046 TestObjectV8Internal::int32ArrayMethodMethod(info); | 6046 TestObjectV8Internal::int32ArrayMethodMethod(info); |
| 6047 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6047 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6048 } | 6048 } |
| 6049 | 6049 |
| 6050 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 6050 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 6051 { | 6051 { |
| 6052 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6052 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6053 v8SetReturnValue(info, impl->uint8ArrayMethod()); | 6053 v8SetReturnValue(info, impl->uint8ArrayMethod()); |
| 6054 } | 6054 } |
| 6055 | 6055 |
| 6056 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 6056 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 6057 { | 6057 { |
| 6058 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6058 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6059 TestObjectV8Internal::uint8ArrayMethodMethod(info); | 6059 TestObjectV8Internal::uint8ArrayMethodMethod(info); |
| 6060 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6060 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6061 } | 6061 } |
| 6062 | 6062 |
| 6063 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 6063 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 6064 { | 6064 { |
| 6065 if (UNLIKELY(info.Length() < 1)) { | 6065 if (UNLIKELY(info.Length() < 1)) { |
| 6066 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayBufferArg", "TestObject", 1, info.Length(), info.GetIsolate()), in
fo.GetIsolate()); | 6066 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayBufferArg", "TestObject", 1, info.Length(), info.GetIsolate()), in
fo.GetIsolate()); |
| 6067 return; | 6067 return; |
| 6068 } | 6068 } |
| 6069 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6069 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6070 ArrayBuffer* arrayBufferArg; | 6070 ArrayBuffer* arrayBufferArg; |
| 6071 { | 6071 { |
| 6072 v8::TryCatch block; | 6072 v8::TryCatch block; |
| 6073 V8RethrowTryCatchScope rethrow(block); | 6073 V8RethrowTryCatchScope rethrow(block); |
| 6074 TONATIVE_VOID_INTERNAL(arrayBufferArg, info[0]->IsArrayBuffer() ? V8Arra
yBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0); | 6074 TONATIVE_VOID_INTERNAL(arrayBufferArg, info[0]->IsArrayBuffer() ? V8Arra
yBuffer::toImpl(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0); |
| 6075 } | 6075 } |
| 6076 impl->voidMethodArrayBufferArg(arrayBufferArg); | 6076 impl->voidMethodArrayBufferArg(arrayBufferArg); |
| 6077 } | 6077 } |
| 6078 | 6078 |
| 6079 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 6079 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 6080 { | 6080 { |
| 6081 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6081 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6082 TestObjectV8Internal::voidMethodArrayBufferArgMethod(info); | 6082 TestObjectV8Internal::voidMethodArrayBufferArgMethod(info); |
| 6083 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6083 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6084 } | 6084 } |
| 6085 | 6085 |
| 6086 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 6086 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 6087 { | 6087 { |
| 6088 if (UNLIKELY(info.Length() < 1)) { | 6088 if (UNLIKELY(info.Length() < 1)) { |
| 6089 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayBufferOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate(
)), info.GetIsolate()); | 6089 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayBufferOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate(
)), info.GetIsolate()); |
| 6090 return; | 6090 return; |
| 6091 } | 6091 } |
| 6092 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6092 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6093 ArrayBuffer* arrayBufferArg; | 6093 ArrayBuffer* arrayBufferArg; |
| 6094 { | 6094 { |
| 6095 v8::TryCatch block; | 6095 v8::TryCatch block; |
| 6096 V8RethrowTryCatchScope rethrow(block); | 6096 V8RethrowTryCatchScope rethrow(block); |
| 6097 TONATIVE_VOID_INTERNAL(arrayBufferArg, info[0]->IsArrayBuffer() ? V8Arra
yBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0); | 6097 TONATIVE_VOID_INTERNAL(arrayBufferArg, info[0]->IsArrayBuffer() ? V8Arra
yBuffer::toImpl(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0); |
| 6098 } | 6098 } |
| 6099 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg); | 6099 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg); |
| 6100 } | 6100 } |
| 6101 | 6101 |
| 6102 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 6102 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 6103 { | 6103 { |
| 6104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6105 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info); | 6105 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info); |
| 6106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6107 } | 6107 } |
| 6108 | 6108 |
| 6109 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | 6109 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 6110 { | 6110 { |
| 6111 if (UNLIKELY(info.Length() < 1)) { | 6111 if (UNLIKELY(info.Length() < 1)) { |
| 6112 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayBufferViewArg", "TestObject", 1, info.Length(), info.GetIsolate())
, info.GetIsolate()); | 6112 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayBufferViewArg", "TestObject", 1, info.Length(), info.GetIsolate())
, info.GetIsolate()); |
| 6113 return; | 6113 return; |
| 6114 } | 6114 } |
| 6115 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6115 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6116 ArrayBufferView* arrayBufferViewArg; | 6116 ArrayBufferView* arrayBufferViewArg; |
| 6117 { | 6117 { |
| 6118 v8::TryCatch block; | 6118 v8::TryCatch block; |
| 6119 V8RethrowTryCatchScope rethrow(block); | 6119 V8RethrowTryCatchScope rethrow(block); |
| 6120 TONATIVE_VOID_INTERNAL(arrayBufferViewArg, info[0]->IsArrayBufferView()
? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[0])) :
0); | 6120 TONATIVE_VOID_INTERNAL(arrayBufferViewArg, info[0]->IsArrayBufferView()
? V8ArrayBufferView::toImpl(v8::Handle<v8::ArrayBufferView>::Cast(info[0])) : 0)
; |
| 6121 } | 6121 } |
| 6122 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg); | 6122 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg); |
| 6123 } | 6123 } |
| 6124 | 6124 |
| 6125 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 6125 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 6126 { | 6126 { |
| 6127 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6127 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6128 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info); | 6128 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info); |
| 6129 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6129 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6130 } | 6130 } |
| 6131 | 6131 |
| 6132 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 6132 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 6133 { | 6133 { |
| 6134 if (UNLIKELY(info.Length() < 1)) { | 6134 if (UNLIKELY(info.Length() < 1)) { |
| 6135 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodFloat32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), i
nfo.GetIsolate()); | 6135 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodFloat32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), i
nfo.GetIsolate()); |
| 6136 return; | 6136 return; |
| 6137 } | 6137 } |
| 6138 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6138 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6139 Float32Array* float32ArrayArg; | 6139 Float32Array* float32ArrayArg; |
| 6140 { | 6140 { |
| 6141 v8::TryCatch block; | 6141 v8::TryCatch block; |
| 6142 V8RethrowTryCatchScope rethrow(block); | 6142 V8RethrowTryCatchScope rethrow(block); |
| 6143 TONATIVE_VOID_INTERNAL(float32ArrayArg, info[0]->IsFloat32Array() ? V8Fl
oat32Array::toNative(v8::Handle<v8::Float32Array>::Cast(info[0])) : 0); | 6143 TONATIVE_VOID_INTERNAL(float32ArrayArg, info[0]->IsFloat32Array() ? V8Fl
oat32Array::toImpl(v8::Handle<v8::Float32Array>::Cast(info[0])) : 0); |
| 6144 } | 6144 } |
| 6145 impl->voidMethodFloat32ArrayArg(float32ArrayArg); | 6145 impl->voidMethodFloat32ArrayArg(float32ArrayArg); |
| 6146 } | 6146 } |
| 6147 | 6147 |
| 6148 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 6148 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 6149 { | 6149 { |
| 6150 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6150 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6151 TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info); | 6151 TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info); |
| 6152 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6152 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6153 } | 6153 } |
| 6154 | 6154 |
| 6155 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 6155 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 6156 { | 6156 { |
| 6157 if (UNLIKELY(info.Length() < 1)) { | 6157 if (UNLIKELY(info.Length() < 1)) { |
| 6158 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodInt32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | 6158 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodInt32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); |
| 6159 return; | 6159 return; |
| 6160 } | 6160 } |
| 6161 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6161 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6162 Int32Array* int32ArrayArg; | 6162 Int32Array* int32ArrayArg; |
| 6163 { | 6163 { |
| 6164 v8::TryCatch block; | 6164 v8::TryCatch block; |
| 6165 V8RethrowTryCatchScope rethrow(block); | 6165 V8RethrowTryCatchScope rethrow(block); |
| 6166 TONATIVE_VOID_INTERNAL(int32ArrayArg, info[0]->IsInt32Array() ? V8Int32A
rray::toNative(v8::Handle<v8::Int32Array>::Cast(info[0])) : 0); | 6166 TONATIVE_VOID_INTERNAL(int32ArrayArg, info[0]->IsInt32Array() ? V8Int32A
rray::toImpl(v8::Handle<v8::Int32Array>::Cast(info[0])) : 0); |
| 6167 } | 6167 } |
| 6168 impl->voidMethodInt32ArrayArg(int32ArrayArg); | 6168 impl->voidMethodInt32ArrayArg(int32ArrayArg); |
| 6169 } | 6169 } |
| 6170 | 6170 |
| 6171 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 6171 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 6172 { | 6172 { |
| 6173 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6173 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6174 TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info); | 6174 TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info); |
| 6175 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6175 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6176 } | 6176 } |
| 6177 | 6177 |
| 6178 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 6178 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 6179 { | 6179 { |
| 6180 if (UNLIKELY(info.Length() < 1)) { | 6180 if (UNLIKELY(info.Length() < 1)) { |
| 6181 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodUint8ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | 6181 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodUint8ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); |
| 6182 return; | 6182 return; |
| 6183 } | 6183 } |
| 6184 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6184 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6185 Uint8Array* uint8ArrayArg; | 6185 Uint8Array* uint8ArrayArg; |
| 6186 { | 6186 { |
| 6187 v8::TryCatch block; | 6187 v8::TryCatch block; |
| 6188 V8RethrowTryCatchScope rethrow(block); | 6188 V8RethrowTryCatchScope rethrow(block); |
| 6189 TONATIVE_VOID_INTERNAL(uint8ArrayArg, info[0]->IsUint8Array() ? V8Uint8A
rray::toNative(v8::Handle<v8::Uint8Array>::Cast(info[0])) : 0); | 6189 TONATIVE_VOID_INTERNAL(uint8ArrayArg, info[0]->IsUint8Array() ? V8Uint8A
rray::toImpl(v8::Handle<v8::Uint8Array>::Cast(info[0])) : 0); |
| 6190 } | 6190 } |
| 6191 impl->voidMethodUint8ArrayArg(uint8ArrayArg); | 6191 impl->voidMethodUint8ArrayArg(uint8ArrayArg); |
| 6192 } | 6192 } |
| 6193 | 6193 |
| 6194 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 6194 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 6195 { | 6195 { |
| 6196 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6196 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6197 TestObjectV8Internal::voidMethodUint8ArrayArgMethod(info); | 6197 TestObjectV8Internal::voidMethodUint8ArrayArgMethod(info); |
| 6198 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6198 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6199 } | 6199 } |
| 6200 | 6200 |
| 6201 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 6201 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 6202 { | 6202 { |
| 6203 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6203 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6204 v8SetReturnValue(info, v8Array(impl->longArrayMethod(), info.Holder(), info.
GetIsolate())); | 6204 v8SetReturnValue(info, v8Array(impl->longArrayMethod(), info.Holder(), info.
GetIsolate())); |
| 6205 } | 6205 } |
| 6206 | 6206 |
| 6207 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 6207 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 6208 { | 6208 { |
| 6209 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6209 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6210 TestObjectV8Internal::longArrayMethodMethod(info); | 6210 TestObjectV8Internal::longArrayMethodMethod(info); |
| 6211 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6211 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6212 } | 6212 } |
| 6213 | 6213 |
| 6214 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 6214 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 6215 { | 6215 { |
| 6216 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6216 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6217 v8SetReturnValue(info, v8Array(impl->stringArrayMethod(), info.Holder(), inf
o.GetIsolate())); | 6217 v8SetReturnValue(info, v8Array(impl->stringArrayMethod(), info.Holder(), inf
o.GetIsolate())); |
| 6218 } | 6218 } |
| 6219 | 6219 |
| 6220 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 6220 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 6221 { | 6221 { |
| 6222 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6222 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6223 TestObjectV8Internal::stringArrayMethodMethod(info); | 6223 TestObjectV8Internal::stringArrayMethodMethod(info); |
| 6224 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6224 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6225 } | 6225 } |
| 6226 | 6226 |
| 6227 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | 6227 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 6228 { | 6228 { |
| 6229 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6229 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6230 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayMethod(), info.H
older(), info.GetIsolate())); | 6230 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayMethod(), info.H
older(), info.GetIsolate())); |
| 6231 } | 6231 } |
| 6232 | 6232 |
| 6233 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 6233 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 6234 { | 6234 { |
| 6235 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6235 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6236 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info); | 6236 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info); |
| 6237 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6237 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6238 } | 6238 } |
| 6239 | 6239 |
| 6240 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 6240 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 6241 { | 6241 { |
| 6242 if (UNLIKELY(info.Length() < 1)) { | 6242 if (UNLIKELY(info.Length() < 1)) { |
| 6243 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayLongArg", "TestObject", 1, info.Length(), info.GetIsolate()), info
.GetIsolate()); | 6243 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayLongArg", "TestObject", 1, info.Length(), info.GetIsolate()), info
.GetIsolate()); |
| 6244 return; | 6244 return; |
| 6245 } | 6245 } |
| 6246 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6246 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6247 Vector<int> arrayLongArg; | 6247 Vector<int> arrayLongArg; |
| 6248 { | 6248 { |
| 6249 v8::TryCatch block; | 6249 v8::TryCatch block; |
| 6250 V8RethrowTryCatchScope rethrow(block); | 6250 V8RethrowTryCatchScope rethrow(block); |
| 6251 TONATIVE_VOID_INTERNAL(arrayLongArg, toNativeArray<int>(info[0], 1, info
.GetIsolate())); | 6251 TONATIVE_VOID_INTERNAL(arrayLongArg, toImplArray<int>(info[0], 1, info.G
etIsolate())); |
| 6252 } | 6252 } |
| 6253 impl->voidMethodArrayLongArg(arrayLongArg); | 6253 impl->voidMethodArrayLongArg(arrayLongArg); |
| 6254 } | 6254 } |
| 6255 | 6255 |
| 6256 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 6256 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 6257 { | 6257 { |
| 6258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6259 TestObjectV8Internal::voidMethodArrayLongArgMethod(info); | 6259 TestObjectV8Internal::voidMethodArrayLongArgMethod(info); |
| 6260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6261 } | 6261 } |
| 6262 | 6262 |
| 6263 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 6263 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 6264 { | 6264 { |
| 6265 if (UNLIKELY(info.Length() < 1)) { | 6265 if (UNLIKELY(info.Length() < 1)) { |
| 6266 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayStringArg", "TestObject", 1, info.Length(), info.GetIsolate()), in
fo.GetIsolate()); | 6266 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayStringArg", "TestObject", 1, info.Length(), info.GetIsolate()), in
fo.GetIsolate()); |
| 6267 return; | 6267 return; |
| 6268 } | 6268 } |
| 6269 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6269 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6270 Vector<String> arrayStringArg; | 6270 Vector<String> arrayStringArg; |
| 6271 { | 6271 { |
| 6272 v8::TryCatch block; | 6272 v8::TryCatch block; |
| 6273 V8RethrowTryCatchScope rethrow(block); | 6273 V8RethrowTryCatchScope rethrow(block); |
| 6274 TONATIVE_VOID_INTERNAL(arrayStringArg, toNativeArray<String>(info[0], 1,
info.GetIsolate())); | 6274 TONATIVE_VOID_INTERNAL(arrayStringArg, toImplArray<String>(info[0], 1, i
nfo.GetIsolate())); |
| 6275 } | 6275 } |
| 6276 impl->voidMethodArrayStringArg(arrayStringArg); | 6276 impl->voidMethodArrayStringArg(arrayStringArg); |
| 6277 } | 6277 } |
| 6278 | 6278 |
| 6279 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 6279 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 6280 { | 6280 { |
| 6281 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6281 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6282 TestObjectV8Internal::voidMethodArrayStringArgMethod(info); | 6282 TestObjectV8Internal::voidMethodArrayStringArgMethod(info); |
| 6283 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6283 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6284 } | 6284 } |
| 6285 | 6285 |
| 6286 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 6286 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 6287 { | 6287 { |
| 6288 if (UNLIKELY(info.Length() < 1)) { | 6288 if (UNLIKELY(info.Length() < 1)) { |
| 6289 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIs
olate()), info.GetIsolate()); | 6289 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodArrayTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIs
olate()), info.GetIsolate()); |
| 6290 return; | 6290 return; |
| 6291 } | 6291 } |
| 6292 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6292 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6293 Vector<RefPtr<TestInterfaceEmpty> > arrayTestInterfaceEmptyArg; | 6293 Vector<RefPtr<TestInterfaceEmpty> > arrayTestInterfaceEmptyArg; |
| 6294 { | 6294 { |
| 6295 v8::TryCatch block; | 6295 v8::TryCatch block; |
| 6296 V8RethrowTryCatchScope rethrow(block); | 6296 V8RethrowTryCatchScope rethrow(block); |
| 6297 TONATIVE_VOID_INTERNAL(arrayTestInterfaceEmptyArg, (toRefPtrNativeArray<
TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))); | 6297 TONATIVE_VOID_INTERNAL(arrayTestInterfaceEmptyArg, (toRefPtrNativeArray<
TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))); |
| 6298 } | 6298 } |
| 6299 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); | 6299 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); |
| 6300 } | 6300 } |
| 6301 | 6301 |
| 6302 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 6302 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 6303 { | 6303 { |
| 6304 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6304 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6305 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info); | 6305 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info); |
| 6306 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6306 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6307 } | 6307 } |
| 6308 | 6308 |
| 6309 static void longSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 6309 static void longSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 6310 { | 6310 { |
| 6311 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6311 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6312 v8SetReturnValue(info, v8Array(impl->longSequenceMethod(), info.Holder(), in
fo.GetIsolate())); | 6312 v8SetReturnValue(info, v8Array(impl->longSequenceMethod(), info.Holder(), in
fo.GetIsolate())); |
| 6313 } | 6313 } |
| 6314 | 6314 |
| 6315 static void longSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 6315 static void longSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 6316 { | 6316 { |
| 6317 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6317 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6318 TestObjectV8Internal::longSequenceMethodMethod(info); | 6318 TestObjectV8Internal::longSequenceMethodMethod(info); |
| 6319 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6319 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6320 } | 6320 } |
| 6321 | 6321 |
| 6322 static void stringSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 6322 static void stringSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 6323 { | 6323 { |
| 6324 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6324 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6325 v8SetReturnValue(info, v8Array(impl->stringSequenceMethod(), info.Holder(),
info.GetIsolate())); | 6325 v8SetReturnValue(info, v8Array(impl->stringSequenceMethod(), info.Holder(),
info.GetIsolate())); |
| 6326 } | 6326 } |
| 6327 | 6327 |
| 6328 static void stringSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 6328 static void stringSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 6329 { | 6329 { |
| 6330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6331 TestObjectV8Internal::stringSequenceMethodMethod(info); | 6331 TestObjectV8Internal::stringSequenceMethodMethod(info); |
| 6332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6333 } | 6333 } |
| 6334 | 6334 |
| 6335 static void testInterfaceEmptySequenceMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | 6335 static void testInterfaceEmptySequenceMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 6336 { | 6336 { |
| 6337 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6337 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6338 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptySequenceMethod(), inf
o.Holder(), info.GetIsolate())); | 6338 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptySequenceMethod(), inf
o.Holder(), info.GetIsolate())); |
| 6339 } | 6339 } |
| 6340 | 6340 |
| 6341 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 6341 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 6342 { | 6342 { |
| 6343 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6343 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6344 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info); | 6344 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info); |
| 6345 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6345 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6346 } | 6346 } |
| 6347 | 6347 |
| 6348 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 6348 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 6349 { | 6349 { |
| 6350 if (UNLIKELY(info.Length() < 1)) { | 6350 if (UNLIKELY(info.Length() < 1)) { |
| 6351 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodSequenceLongArg", "TestObject", 1, info.Length(), info.GetIsolate()), i
nfo.GetIsolate()); | 6351 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodSequenceLongArg", "TestObject", 1, info.Length(), info.GetIsolate()), i
nfo.GetIsolate()); |
| 6352 return; | 6352 return; |
| 6353 } | 6353 } |
| 6354 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6354 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6355 Vector<int> longSequenceArg; | 6355 Vector<int> longSequenceArg; |
| 6356 { | 6356 { |
| 6357 v8::TryCatch block; | 6357 v8::TryCatch block; |
| 6358 V8RethrowTryCatchScope rethrow(block); | 6358 V8RethrowTryCatchScope rethrow(block); |
| 6359 TONATIVE_VOID_INTERNAL(longSequenceArg, toNativeArray<int>(info[0], 1, i
nfo.GetIsolate())); | 6359 TONATIVE_VOID_INTERNAL(longSequenceArg, toImplArray<int>(info[0], 1, inf
o.GetIsolate())); |
| 6360 } | 6360 } |
| 6361 impl->voidMethodSequenceLongArg(longSequenceArg); | 6361 impl->voidMethodSequenceLongArg(longSequenceArg); |
| 6362 } | 6362 } |
| 6363 | 6363 |
| 6364 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 6364 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 6365 { | 6365 { |
| 6366 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6366 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6367 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info); | 6367 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info); |
| 6368 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6368 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6369 } | 6369 } |
| 6370 | 6370 |
| 6371 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 6371 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 6372 { | 6372 { |
| 6373 if (UNLIKELY(info.Length() < 1)) { | 6373 if (UNLIKELY(info.Length() < 1)) { |
| 6374 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodSequenceStringArg", "TestObject", 1, info.Length(), info.GetIsolate()),
info.GetIsolate()); | 6374 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodSequenceStringArg", "TestObject", 1, info.Length(), info.GetIsolate()),
info.GetIsolate()); |
| 6375 return; | 6375 return; |
| 6376 } | 6376 } |
| 6377 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6377 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6378 Vector<String> stringSequenceArg; | 6378 Vector<String> stringSequenceArg; |
| 6379 { | 6379 { |
| 6380 v8::TryCatch block; | 6380 v8::TryCatch block; |
| 6381 V8RethrowTryCatchScope rethrow(block); | 6381 V8RethrowTryCatchScope rethrow(block); |
| 6382 TONATIVE_VOID_INTERNAL(stringSequenceArg, toNativeArray<String>(info[0],
1, info.GetIsolate())); | 6382 TONATIVE_VOID_INTERNAL(stringSequenceArg, toImplArray<String>(info[0], 1
, info.GetIsolate())); |
| 6383 } | 6383 } |
| 6384 impl->voidMethodSequenceStringArg(stringSequenceArg); | 6384 impl->voidMethodSequenceStringArg(stringSequenceArg); |
| 6385 } | 6385 } |
| 6386 | 6386 |
| 6387 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 6387 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 6388 { | 6388 { |
| 6389 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6389 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6390 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info); | 6390 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info); |
| 6391 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6391 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6392 } | 6392 } |
| 6393 | 6393 |
| 6394 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 6394 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 6395 { | 6395 { |
| 6396 if (UNLIKELY(info.Length() < 1)) { | 6396 if (UNLIKELY(info.Length() < 1)) { |
| 6397 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodSequenceTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.Ge
tIsolate()), info.GetIsolate()); | 6397 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodSequenceTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.Ge
tIsolate()), info.GetIsolate()); |
| 6398 return; | 6398 return; |
| 6399 } | 6399 } |
| 6400 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6400 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6401 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptySequenceArg; | 6401 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptySequenceArg; |
| 6402 { | 6402 { |
| 6403 v8::TryCatch block; | 6403 v8::TryCatch block; |
| 6404 V8RethrowTryCatchScope rethrow(block); | 6404 V8RethrowTryCatchScope rethrow(block); |
| 6405 TONATIVE_VOID_INTERNAL(testInterfaceEmptySequenceArg, (toRefPtrNativeArr
ay<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))); | 6405 TONATIVE_VOID_INTERNAL(testInterfaceEmptySequenceArg, (toRefPtrNativeArr
ay<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))); |
| 6406 } | 6406 } |
| 6407 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg)
; | 6407 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg)
; |
| 6408 } | 6408 } |
| 6409 | 6409 |
| 6410 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 6410 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 6411 { | 6411 { |
| 6412 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6412 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6413 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info); | 6413 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info); |
| 6414 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6414 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6415 } | 6415 } |
| 6416 | 6416 |
| 6417 static void nullableLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 6417 static void nullableLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 6418 { | 6418 { |
| 6419 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6419 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6420 Nullable<int> result = impl->nullableLongMethod(); | 6420 Nullable<int> result = impl->nullableLongMethod(); |
| 6421 if (result.isNull()) | 6421 if (result.isNull()) |
| 6422 v8SetReturnValueNull(info); | 6422 v8SetReturnValueNull(info); |
| 6423 else | 6423 else |
| 6424 v8SetReturnValueInt(info, result.get()); | 6424 v8SetReturnValueInt(info, result.get()); |
| 6425 } | 6425 } |
| 6426 | 6426 |
| 6427 static void nullableLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 6427 static void nullableLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 6428 { | 6428 { |
| 6429 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6429 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6430 TestObjectV8Internal::nullableLongMethodMethod(info); | 6430 TestObjectV8Internal::nullableLongMethodMethod(info); |
| 6431 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6431 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6432 } | 6432 } |
| 6433 | 6433 |
| 6434 static void nullableStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 6434 static void nullableStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 6435 { | 6435 { |
| 6436 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6436 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6437 v8SetReturnValueStringOrNull(info, impl->nullableStringMethod(), info.GetIso
late()); | 6437 v8SetReturnValueStringOrNull(info, impl->nullableStringMethod(), info.GetIso
late()); |
| 6438 } | 6438 } |
| 6439 | 6439 |
| 6440 static void nullableStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 6440 static void nullableStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 6441 { | 6441 { |
| 6442 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6442 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6443 TestObjectV8Internal::nullableStringMethodMethod(info); | 6443 TestObjectV8Internal::nullableStringMethodMethod(info); |
| 6444 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6444 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6445 } | 6445 } |
| 6446 | 6446 |
| 6447 static void nullableTestInterfaceMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 6447 static void nullableTestInterfaceMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 6448 { | 6448 { |
| 6449 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6449 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6450 v8SetReturnValue(info, impl->nullableTestInterfaceMethod()); | 6450 v8SetReturnValue(info, impl->nullableTestInterfaceMethod()); |
| 6451 } | 6451 } |
| 6452 | 6452 |
| 6453 static void nullableTestInterfaceMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 6453 static void nullableTestInterfaceMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 6454 { | 6454 { |
| 6455 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6455 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6456 TestObjectV8Internal::nullableTestInterfaceMethodMethod(info); | 6456 TestObjectV8Internal::nullableTestInterfaceMethodMethod(info); |
| 6457 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6457 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6458 } | 6458 } |
| 6459 | 6459 |
| 6460 static void nullableLongSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 6460 static void nullableLongSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 6461 { | 6461 { |
| 6462 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6462 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6463 Nullable<Vector<int> > result = impl->nullableLongSequenceMethod(); | 6463 Nullable<Vector<int> > result = impl->nullableLongSequenceMethod(); |
| 6464 if (result.isNull()) | 6464 if (result.isNull()) |
| 6465 v8SetReturnValueNull(info); | 6465 v8SetReturnValueNull(info); |
| 6466 else | 6466 else |
| 6467 v8SetReturnValue(info, v8Array(result.get(), info.Holder(), info.GetIsol
ate())); | 6467 v8SetReturnValue(info, v8Array(result.get(), info.Holder(), info.GetIsol
ate())); |
| 6468 } | 6468 } |
| 6469 | 6469 |
| 6470 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 6470 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 6471 { | 6471 { |
| 6472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6473 TestObjectV8Internal::nullableLongSequenceMethodMethod(info); | 6473 TestObjectV8Internal::nullableLongSequenceMethodMethod(info); |
| 6474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6475 } | 6475 } |
| 6476 | 6476 |
| 6477 static void testInterfaceGarbageCollectedOrDOMStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 6477 static void testInterfaceGarbageCollectedOrDOMStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 6478 { | 6478 { |
| 6479 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6479 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6480 RawPtr<TestInterfaceGarbageCollected> result0 = nullptr; | 6480 RawPtr<TestInterfaceGarbageCollected> result0 = nullptr; |
| 6481 String result1; | 6481 String result1; |
| 6482 impl->testInterfaceGarbageCollectedOrDOMStringMethod(result0, result1); | 6482 impl->testInterfaceGarbageCollectedOrDOMStringMethod(result0, result1); |
| 6483 if (result0) { | 6483 if (result0) { |
| 6484 v8SetReturnValue(info, result0.release()); | 6484 v8SetReturnValue(info, result0.release()); |
| 6485 return; | 6485 return; |
| 6486 } | 6486 } |
| 6487 if (!result1.isNull()) { | 6487 if (!result1.isNull()) { |
| 6488 v8SetReturnValueString(info, result1, info.GetIsolate()); | 6488 v8SetReturnValueString(info, result1, info.GetIsolate()); |
| 6489 return; | 6489 return; |
| 6490 } | 6490 } |
| 6491 v8SetReturnValueNull(info); | 6491 v8SetReturnValueNull(info); |
| 6492 } | 6492 } |
| 6493 | 6493 |
| 6494 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 6494 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 6495 { | 6495 { |
| 6496 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6496 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6497 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i
nfo); | 6497 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i
nfo); |
| 6498 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6498 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6499 } | 6499 } |
| 6500 | 6500 |
| 6501 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 6501 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 6502 { | 6502 { |
| 6503 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6503 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6504 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result0 = nullptr; | 6504 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result0 = nullptr; |
| 6505 TestDictionary* result1 = nullptr; | 6505 TestDictionary* result1 = nullptr; |
| 6506 impl->testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(result0, res
ult1); | 6506 impl->testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(result0, res
ult1); |
| 6507 if (result0) { | 6507 if (result0) { |
| 6508 v8SetReturnValue(info, result0.release()); | 6508 v8SetReturnValue(info, result0.release()); |
| 6509 return; | 6509 return; |
| 6510 } | 6510 } |
| 6511 if (result1) { | 6511 if (result1) { |
| 6512 v8SetReturnValue(info, result1); | 6512 v8SetReturnValue(info, result1); |
| 6513 return; | 6513 return; |
| 6514 } | 6514 } |
| 6515 v8SetReturnValueNull(info); | 6515 v8SetReturnValueNull(info); |
| 6516 } | 6516 } |
| 6517 | 6517 |
| 6518 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 6518 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 6519 { | 6519 { |
| 6520 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6520 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6521 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMet
hodMethod(info); | 6521 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMet
hodMethod(info); |
| 6522 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6522 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6523 } | 6523 } |
| 6524 | 6524 |
| 6525 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | 6525 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 6526 { | 6526 { |
| 6527 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6527 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6528 Nullable<Vector<int> > result0; | 6528 Nullable<Vector<int> > result0; |
| 6529 Nullable<Vector<String> > result1; | 6529 Nullable<Vector<String> > result1; |
| 6530 Nullable<double> result2; | 6530 Nullable<double> result2; |
| 6531 impl->longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod(result0, result
1, result2); | 6531 impl->longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod(result0, result
1, result2); |
| 6532 if (result0) { | 6532 if (result0) { |
| 6533 v8SetReturnValue(info, v8Array(result0.get(), info.Holder(), info.GetIso
late())); | 6533 v8SetReturnValue(info, v8Array(result0.get(), info.Holder(), info.GetIso
late())); |
| 6534 return; | 6534 return; |
| 6535 } | 6535 } |
| 6536 if (result1) { | 6536 if (result1) { |
| 6537 v8SetReturnValue(info, v8Array(result1.get(), info.Holder(), info.GetIso
late())); | 6537 v8SetReturnValue(info, v8Array(result1.get(), info.Holder(), info.GetIso
late())); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 6550 TestObjectV8Internal::longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod
Method(info); | 6550 TestObjectV8Internal::longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod
Method(info); |
| 6551 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6551 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6552 } | 6552 } |
| 6553 | 6553 |
| 6554 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 6554 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 6555 { | 6555 { |
| 6556 if (UNLIKELY(info.Length() < 1)) { | 6556 if (UNLIKELY(info.Length() < 1)) { |
| 6557 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetI
solate()), info.GetIsolate()); | 6557 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetI
solate()), info.GetIsolate()); |
| 6558 return; | 6558 return; |
| 6559 } | 6559 } |
| 6560 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6560 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6561 TestInterfaceEmpty* nullableTestInterfaceEmptyArg; | 6561 TestInterfaceEmpty* nullableTestInterfaceEmptyArg; |
| 6562 { | 6562 { |
| 6563 v8::TryCatch block; | 6563 v8::TryCatch block; |
| 6564 V8RethrowTryCatchScope rethrow(block); | 6564 V8RethrowTryCatchScope rethrow(block); |
| 6565 TONATIVE_VOID_INTERNAL(nullableTestInterfaceEmptyArg, V8TestInterfaceEmp
ty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 6565 TONATIVE_VOID_INTERNAL(nullableTestInterfaceEmptyArg, V8TestInterfaceEmp
ty::toImplWithTypeCheck(info.GetIsolate(), info[0])); |
| 6566 } | 6566 } |
| 6567 impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg); | 6567 impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg); |
| 6568 } | 6568 } |
| 6569 | 6569 |
| 6570 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 6570 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 6571 { | 6571 { |
| 6572 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6572 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6573 TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info); | 6573 TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info); |
| 6574 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6574 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6575 } | 6575 } |
| 6576 | 6576 |
| 6577 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 6577 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 6578 { | 6578 { |
| 6579 if (UNLIKELY(info.Length() < 1)) { | 6579 if (UNLIKELY(info.Length() < 1)) { |
| 6580 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Length(), info.GetIsol
ate()), info.GetIsolate()); | 6580 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Length(), info.GetIsol
ate()), info.GetIsolate()); |
| 6581 return; | 6581 return; |
| 6582 } | 6582 } |
| 6583 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6583 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6584 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; | 6584 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; |
| 6585 { | 6585 { |
| 6586 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 6586 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
| 6587 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as pa
rameter 1 is not a function."), info.GetIsolate()); | 6587 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as pa
rameter 1 is not a function."), info.GetIsolate()); |
| 6588 return; | 6588 return; |
| 6589 } | 6589 } |
| 6590 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | 6590 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
| 6591 } | 6591 } |
| 6592 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release())
; | 6592 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release())
; |
| 6593 } | 6593 } |
| 6594 | 6594 |
| 6595 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6595 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 6596 { | 6596 { |
| 6597 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6597 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6598 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); | 6598 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); |
| 6599 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6599 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6600 } | 6600 } |
| 6601 | 6601 |
| 6602 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6602 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 6603 { | 6603 { |
| 6604 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6604 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6605 OwnPtrWillBeRawPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg =
nullptr;; | 6605 OwnPtrWillBeRawPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg =
nullptr;; |
| 6606 { | 6606 { |
| 6607 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | 6607 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { |
| 6608 if (!info[0]->IsFunction()) { | 6608 if (!info[0]->IsFunction()) { |
| 6609 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback pr
ovided as parameter 1 is not a function."), info.GetIsolate()); | 6609 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback pr
ovided as parameter 1 is not a function."), info.GetIsolate()); |
| 6610 return; | 6610 return; |
| 6611 } | 6611 } |
| 6612 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; | 6612 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; |
| 6613 } | 6613 } |
| 6614 } | 6614 } |
| 6615 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa
ceArg.release()); | 6615 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa
ceArg.release()); |
| 6616 } | 6616 } |
| 6617 | 6617 |
| 6618 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 6618 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
| 6619 { | 6619 { |
| 6620 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6620 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6621 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info)
; | 6621 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info)
; |
| 6622 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6622 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6623 } | 6623 } |
| 6624 | 6624 |
| 6625 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 6625 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 6626 { | 6626 { |
| 6627 if (UNLIKELY(info.Length() < 1)) { | 6627 if (UNLIKELY(info.Length() < 1)) { |
| 6628 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, info.Length(), info.G
etIsolate()), info.GetIsolate()); | 6628 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, info.Length(), info.G
etIsolate()), info.GetIsolate()); |
| 6629 return; | 6629 return; |
| 6630 } | 6630 } |
| 6631 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6631 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6632 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; | 6632 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; |
| 6633 { | 6633 { |
| 6634 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull()))
{ | 6634 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull()))
{ |
| 6635 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided
as parameter 1 is not a function."), info.GetIsolate()); | 6635 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided
as parameter 1 is not a function."), info.GetIsolate()); |
| 6636 return; | 6636 return; |
| 6637 } | 6637 } |
| 6638 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI
nterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(i
nfo.GetIsolate())); | 6638 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI
nterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(i
nfo.GetIsolate())); |
| 6639 } | 6639 } |
| 6640 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg.rele
ase()); | 6640 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg.rele
ase()); |
| 6641 } | 6641 } |
| 6642 | 6642 |
| 6643 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 6643 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 6644 { | 6644 { |
| 6645 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6645 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6646 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info); | 6646 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info); |
| 6647 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6647 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6648 } | 6648 } |
| 6649 | 6649 |
| 6650 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) | 6650 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 6651 { | 6651 { |
| 6652 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6652 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6653 v8SetReturnValueString(info, impl->testEnumMethod(), info.GetIsolate()); | 6653 v8SetReturnValueString(info, impl->testEnumMethod(), info.GetIsolate()); |
| 6654 } | 6654 } |
| 6655 | 6655 |
| 6656 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 6656 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 6657 { | 6657 { |
| 6658 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6658 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6659 TestObjectV8Internal::testEnumMethodMethod(info); | 6659 TestObjectV8Internal::testEnumMethodMethod(info); |
| 6660 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6660 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6661 } | 6661 } |
| 6662 | 6662 |
| 6663 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 6663 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 6664 { | 6664 { |
| 6665 if (UNLIKELY(info.Length() < 1)) { | 6665 if (UNLIKELY(info.Length() < 1)) { |
| 6666 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestEnumArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.
GetIsolate()); | 6666 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestEnumArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.
GetIsolate()); |
| 6667 return; | 6667 return; |
| 6668 } | 6668 } |
| 6669 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6669 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6670 V8StringResource<> testEnumTypeArg; | 6670 V8StringResource<> testEnumTypeArg; |
| 6671 { | 6671 { |
| 6672 TOSTRING_VOID_INTERNAL(testEnumTypeArg, info[0]); | 6672 TOSTRING_VOID_INTERNAL(testEnumTypeArg, info[0]); |
| 6673 String string = testEnumTypeArg; | 6673 String string = testEnumTypeArg; |
| 6674 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" |
| string == "EnumValue3")) { | 6674 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" |
| string == "EnumValue3")) { |
| 6675 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestEnumArg", "TestObject", "parameter 1 ('" + string + "') is not a
valid enum value."), info.GetIsolate()); | 6675 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestEnumArg", "TestObject", "parameter 1 ('" + string + "') is not a
valid enum value."), info.GetIsolate()); |
| 6676 return; | 6676 return; |
| 6677 } | 6677 } |
| 6678 } | 6678 } |
| 6679 impl->voidMethodTestEnumArg(testEnumTypeArg); | 6679 impl->voidMethodTestEnumArg(testEnumTypeArg); |
| 6680 } | 6680 } |
| 6681 | 6681 |
| 6682 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 6682 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 6683 { | 6683 { |
| 6684 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6684 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6685 TestObjectV8Internal::voidMethodTestEnumArgMethod(info); | 6685 TestObjectV8Internal::voidMethodTestEnumArgMethod(info); |
| 6686 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6686 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6687 } | 6687 } |
| 6688 | 6688 |
| 6689 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 6689 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 6690 { | 6690 { |
| 6691 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6691 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6692 v8SetReturnValue(info, impl->dictionaryMethod()); | 6692 v8SetReturnValue(info, impl->dictionaryMethod()); |
| 6693 } | 6693 } |
| 6694 | 6694 |
| 6695 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 6695 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 6696 { | 6696 { |
| 6697 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6697 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6698 TestObjectV8Internal::dictionaryMethodMethod(info); | 6698 TestObjectV8Internal::dictionaryMethodMethod(info); |
| 6699 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6699 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6700 } | 6700 } |
| 6701 | 6701 |
| 6702 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 6702 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 6703 { | 6703 { |
| 6704 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6704 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6705 v8SetReturnValue(info, impl->nodeFilterMethod()); | 6705 v8SetReturnValue(info, impl->nodeFilterMethod()); |
| 6706 } | 6706 } |
| 6707 | 6707 |
| 6708 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 6708 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 6709 { | 6709 { |
| 6710 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6710 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6711 TestObjectV8Internal::nodeFilterMethodMethod(info); | 6711 TestObjectV8Internal::nodeFilterMethodMethod(info); |
| 6712 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6712 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6713 } | 6713 } |
| 6714 | 6714 |
| 6715 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 6715 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 6716 { | 6716 { |
| 6717 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth
od", "TestObject", info.Holder(), info.GetIsolate()); | 6717 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth
od", "TestObject", info.Holder(), info.GetIsolate()); |
| 6718 if (UNLIKELY(info.Length() < 3)) { | 6718 if (UNLIKELY(info.Length() < 3)) { |
| 6719 setMinimumArityTypeError(exceptionState, 3, info.Length()); | 6719 setMinimumArityTypeError(exceptionState, 3, info.Length()); |
| 6720 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); | 6720 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); |
| 6721 return; | 6721 return; |
| 6722 } | 6722 } |
| 6723 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6723 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6724 int arg1; | 6724 int arg1; |
| 6725 Dictionary arg2; | 6725 Dictionary arg2; |
| 6726 V8StringResource<> arg3; | 6726 V8StringResource<> arg3; |
| 6727 Vector<String> variadic; | 6727 Vector<String> variadic; |
| 6728 { | 6728 { |
| 6729 v8::TryCatch block; | 6729 v8::TryCatch block; |
| 6730 V8RethrowTryCatchScope rethrow(block); | 6730 V8RethrowTryCatchScope rethrow(block); |
| 6731 TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg1, toInt32(info[0], exc
eptionState), exceptionState, info, ScriptState::current(info.GetIsolate())); | 6731 TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg1, toInt32(info[0], exc
eptionState), exceptionState, info, ScriptState::current(info.GetIsolate())); |
| 6732 TONATIVE_VOID_PROMISE_INTERNAL(arg2, Dictionary(info[1], info.GetIsolate
()), info); | 6732 TONATIVE_VOID_PROMISE_INTERNAL(arg2, Dictionary(info[1], info.GetIsolate
()), info); |
| 6733 if (!arg2.isUndefinedOrNull() && !arg2.isObject()) { | 6733 if (!arg2.isUndefinedOrNull() && !arg2.isObject()) { |
| 6734 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object
."); | 6734 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object
."); |
| 6735 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in
fo.GetIsolate())).v8Value()); | 6735 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in
fo.GetIsolate())).v8Value()); |
| 6736 return; | 6736 return; |
| 6737 } | 6737 } |
| 6738 TOSTRING_VOID_PROMISE_INTERNAL(arg3, info[2], info); | 6738 TOSTRING_VOID_PROMISE_INTERNAL(arg3, info[2], info); |
| 6739 TONATIVE_VOID_PROMISE_INTERNAL(variadic, toNativeArguments<String>(info,
3), info); | 6739 TONATIVE_VOID_PROMISE_INTERNAL(variadic, toImplArguments<String>(info, 3
), info); |
| 6740 } | 6740 } |
| 6741 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val
ue()); | 6741 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val
ue()); |
| 6742 } | 6742 } |
| 6743 | 6743 |
| 6744 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | 6744 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 6745 { | 6745 { |
| 6746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6747 TestObjectV8Internal::promiseMethodMethod(info); | 6747 TestObjectV8Internal::promiseMethodMethod(info); |
| 6748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6749 } | 6749 } |
| 6750 | 6750 |
| 6751 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 6751 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 6752 { | 6752 { |
| 6753 if (UNLIKELY(info.Length() < 1)) { | 6753 if (UNLIKELY(info.Length() < 1)) { |
| 6754 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), creat
eMinimumArityTypeErrorForMethod("promiseMethodWithoutExceptionState", "TestObjec
t", 1, info.Length(), info.GetIsolate()))); | 6754 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), creat
eMinimumArityTypeErrorForMethod("promiseMethodWithoutExceptionState", "TestObjec
t", 1, info.Length(), info.GetIsolate()))); |
| 6755 return; | 6755 return; |
| 6756 } | 6756 } |
| 6757 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6757 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6758 Dictionary arg1; | 6758 Dictionary arg1; |
| 6759 { | 6759 { |
| 6760 v8::TryCatch block; | 6760 v8::TryCatch block; |
| 6761 V8RethrowTryCatchScope rethrow(block); | 6761 V8RethrowTryCatchScope rethrow(block); |
| 6762 TONATIVE_VOID_PROMISE_INTERNAL(arg1, Dictionary(info[0], info.GetIsolate
()), info); | 6762 TONATIVE_VOID_PROMISE_INTERNAL(arg1, Dictionary(info[0], info.GetIsolate
()), info); |
| 6763 if (!arg1.isUndefinedOrNull() && !arg1.isObject()) { | 6763 if (!arg1.isUndefinedOrNull() && !arg1.isObject()) { |
| 6764 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V
8ThrowException::createTypeError(ExceptionMessages::failedToExecute("promiseMeth
odWithoutExceptionState", "TestObject", "parameter 1 ('arg1') is not an object."
), info.GetIsolate()))); | 6764 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V
8ThrowException::createTypeError(ExceptionMessages::failedToExecute("promiseMeth
odWithoutExceptionState", "TestObject", "parameter 1 ('arg1') is not an object."
), info.GetIsolate()))); |
| 6765 return; | 6765 return; |
| 6766 } | 6766 } |
| 6767 } | 6767 } |
| 6768 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu
e()); | 6768 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu
e()); |
| 6769 } | 6769 } |
| 6770 | 6770 |
| 6771 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6771 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 6772 { | 6772 { |
| 6773 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6773 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6774 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); | 6774 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); |
| 6775 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6775 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6776 } | 6776 } |
| 6777 | 6777 |
| 6778 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 6778 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 6779 { | 6779 { |
| 6780 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6780 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6781 v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serialize
dScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIso
late()))); | 6781 v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serialize
dScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIso
late()))); |
| 6782 } | 6782 } |
| 6783 | 6783 |
| 6784 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 6784 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 6785 { | 6785 { |
| 6786 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6786 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6787 TestObjectV8Internal::serializedScriptValueMethodMethod(info); | 6787 TestObjectV8Internal::serializedScriptValueMethodMethod(info); |
| 6788 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6788 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6789 } | 6789 } |
| 6790 | 6790 |
| 6791 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 6791 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 6792 { | 6792 { |
| 6793 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6793 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6794 v8SetReturnValue(info, impl->xPathNSResolverMethod()); | 6794 v8SetReturnValue(info, impl->xPathNSResolverMethod()); |
| 6795 } | 6795 } |
| 6796 | 6796 |
| 6797 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 6797 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 6798 { | 6798 { |
| 6799 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6799 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6800 TestObjectV8Internal::xPathNSResolverMethodMethod(info); | 6800 TestObjectV8Internal::xPathNSResolverMethodMethod(info); |
| 6801 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6801 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6802 } | 6802 } |
| 6803 | 6803 |
| 6804 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 6804 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 6805 { | 6805 { |
| 6806 if (UNLIKELY(info.Length() < 1)) { | 6806 if (UNLIKELY(info.Length() < 1)) { |
| 6807 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDictionaryArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | 6807 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDictionaryArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); |
| 6808 return; | 6808 return; |
| 6809 } | 6809 } |
| 6810 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6810 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6811 Dictionary dictionaryArg; | 6811 Dictionary dictionaryArg; |
| 6812 { | 6812 { |
| 6813 v8::TryCatch block; | 6813 v8::TryCatch block; |
| 6814 V8RethrowTryCatchScope rethrow(block); | 6814 V8RethrowTryCatchScope rethrow(block); |
| 6815 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); | 6815 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); |
| 6816 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | 6816 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { |
| 6817 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not a
n object."), info.GetIsolate()); | 6817 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not a
n object."), info.GetIsolate()); |
| 6818 return; | 6818 return; |
| 6819 } | 6819 } |
| 6820 } | 6820 } |
| 6821 impl->voidMethodDictionaryArg(dictionaryArg); | 6821 impl->voidMethodDictionaryArg(dictionaryArg); |
| 6822 } | 6822 } |
| 6823 | 6823 |
| 6824 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 6824 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 6825 { | 6825 { |
| 6826 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6826 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6827 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); | 6827 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); |
| 6828 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6828 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6829 } | 6829 } |
| 6830 | 6830 |
| 6831 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 6831 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 6832 { | 6832 { |
| 6833 if (UNLIKELY(info.Length() < 1)) { | 6833 if (UNLIKELY(info.Length() < 1)) { |
| 6834 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodNodeFilterArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | 6834 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodNodeFilterArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); |
| 6835 return; | 6835 return; |
| 6836 } | 6836 } |
| 6837 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6837 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6838 RefPtrWillBeRawPtr<NodeFilter> nodeFilterArg; | 6838 RefPtrWillBeRawPtr<NodeFilter> nodeFilterArg; |
| 6839 { | 6839 { |
| 6840 v8::TryCatch block; | 6840 v8::TryCatch block; |
| 6841 V8RethrowTryCatchScope rethrow(block); | 6841 V8RethrowTryCatchScope rethrow(block); |
| 6842 TONATIVE_VOID_INTERNAL(nodeFilterArg, toNodeFilter(info[0], info.Holder(
), ScriptState::current(info.GetIsolate()))); | 6842 TONATIVE_VOID_INTERNAL(nodeFilterArg, toNodeFilter(info[0], info.Holder(
), ScriptState::current(info.GetIsolate()))); |
| 6843 } | 6843 } |
| 6844 impl->voidMethodNodeFilterArg(nodeFilterArg.release()); | 6844 impl->voidMethodNodeFilterArg(nodeFilterArg.release()); |
| 6845 } | 6845 } |
| 6846 | 6846 |
| 6847 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 6847 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 6848 { | 6848 { |
| 6849 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6849 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6850 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info); | 6850 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info); |
| 6851 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6851 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6852 } | 6852 } |
| 6853 | 6853 |
| 6854 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 6854 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 6855 { | 6855 { |
| 6856 if (UNLIKELY(info.Length() < 1)) { | 6856 if (UNLIKELY(info.Length() < 1)) { |
| 6857 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodPromiseArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); | 6857 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodPromiseArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); |
| 6858 return; | 6858 return; |
| 6859 } | 6859 } |
| 6860 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6860 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6861 ScriptPromise promiseArg; | 6861 ScriptPromise promiseArg; |
| 6862 { | 6862 { |
| 6863 v8::TryCatch block; | 6863 v8::TryCatch block; |
| 6864 V8RethrowTryCatchScope rethrow(block); | 6864 V8RethrowTryCatchScope rethrow(block); |
| 6865 TONATIVE_VOID_INTERNAL(promiseArg, ScriptPromise::cast(ScriptState::curr
ent(info.GetIsolate()), info[0])); | 6865 TONATIVE_VOID_INTERNAL(promiseArg, ScriptPromise::cast(ScriptState::curr
ent(info.GetIsolate()), info[0])); |
| 6866 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) { | 6866 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) { |
| 6867 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an obje
ct."), info.GetIsolate()); | 6867 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an obje
ct."), info.GetIsolate()); |
| 6868 return; | 6868 return; |
| 6869 } | 6869 } |
| 6870 } | 6870 } |
| 6871 impl->voidMethodPromiseArg(promiseArg); | 6871 impl->voidMethodPromiseArg(promiseArg); |
| 6872 } | 6872 } |
| 6873 | 6873 |
| 6874 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 6874 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 6875 { | 6875 { |
| 6876 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6876 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6877 TestObjectV8Internal::voidMethodPromiseArgMethod(info); | 6877 TestObjectV8Internal::voidMethodPromiseArgMethod(info); |
| 6878 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6878 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6879 } | 6879 } |
| 6880 | 6880 |
| 6881 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 6881 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 6882 { | 6882 { |
| 6883 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); | 6883 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 6884 if (UNLIKELY(info.Length() < 1)) { | 6884 if (UNLIKELY(info.Length() < 1)) { |
| 6885 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 6885 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 6886 exceptionState.throwIfNeeded(); | 6886 exceptionState.throwIfNeeded(); |
| 6887 return; | 6887 return; |
| 6888 } | 6888 } |
| 6889 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6889 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6890 RefPtr<SerializedScriptValue> serializedScriptValueArg; | 6890 RefPtr<SerializedScriptValue> serializedScriptValueArg; |
| 6891 { | 6891 { |
| 6892 serializedScriptValueArg = SerializedScriptValue::create(info[0], 0, 0,
exceptionState, info.GetIsolate()); | 6892 serializedScriptValueArg = SerializedScriptValue::create(info[0], 0, 0,
exceptionState, info.GetIsolate()); |
| 6893 if (exceptionState.hadException()) { | 6893 if (exceptionState.hadException()) { |
| 6894 exceptionState.throwIfNeeded(); | 6894 exceptionState.throwIfNeeded(); |
| 6895 return; | 6895 return; |
| 6896 } | 6896 } |
| 6897 } | 6897 } |
| 6898 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); | 6898 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); |
| 6899 } | 6899 } |
| 6900 | 6900 |
| 6901 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6901 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 6902 { | 6902 { |
| 6903 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6903 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6904 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); | 6904 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); |
| 6905 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6905 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6906 } | 6906 } |
| 6907 | 6907 |
| 6908 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | 6908 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 6909 { | 6909 { |
| 6910 if (UNLIKELY(info.Length() < 1)) { | 6910 if (UNLIKELY(info.Length() < 1)) { |
| 6911 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodXPathNSResolverArg", "TestObject", 1, info.Length(), info.GetIsolate())
, info.GetIsolate()); | 6911 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodXPathNSResolverArg", "TestObject", 1, info.Length(), info.GetIsolate())
, info.GetIsolate()); |
| 6912 return; | 6912 return; |
| 6913 } | 6913 } |
| 6914 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6914 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6915 RefPtrWillBeRawPtr<XPathNSResolver> xPathNSResolverArg; | 6915 RefPtrWillBeRawPtr<XPathNSResolver> xPathNSResolverArg; |
| 6916 { | 6916 { |
| 6917 v8::TryCatch block; | 6917 v8::TryCatch block; |
| 6918 V8RethrowTryCatchScope rethrow(block); | 6918 V8RethrowTryCatchScope rethrow(block); |
| 6919 TONATIVE_VOID_INTERNAL(xPathNSResolverArg, toXPathNSResolver(info[0], in
fo.GetIsolate())); | 6919 TONATIVE_VOID_INTERNAL(xPathNSResolverArg, toXPathNSResolver(info[0], in
fo.GetIsolate())); |
| 6920 } | 6920 } |
| 6921 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg.release()); | 6921 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg.release()); |
| 6922 } | 6922 } |
| 6923 | 6923 |
| 6924 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 6924 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 6925 { | 6925 { |
| 6926 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6926 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6927 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); | 6927 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); |
| 6928 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6928 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6929 } | 6929 } |
| 6930 | 6930 |
| 6931 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 6931 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 6932 { | 6932 { |
| 6933 if (UNLIKELY(info.Length() < 1)) { | 6933 if (UNLIKELY(info.Length() < 1)) { |
| 6934 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDictionarySequenceArg", "TestObject", 1, info.Length(), info.GetIsolate
()), info.GetIsolate()); | 6934 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDictionarySequenceArg", "TestObject", 1, info.Length(), info.GetIsolate
()), info.GetIsolate()); |
| 6935 return; | 6935 return; |
| 6936 } | 6936 } |
| 6937 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6937 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6938 Vector<Dictionary> dictionarySequenceArg; | 6938 Vector<Dictionary> dictionarySequenceArg; |
| 6939 { | 6939 { |
| 6940 v8::TryCatch block; | 6940 v8::TryCatch block; |
| 6941 V8RethrowTryCatchScope rethrow(block); | 6941 V8RethrowTryCatchScope rethrow(block); |
| 6942 TONATIVE_VOID_INTERNAL(dictionarySequenceArg, toNativeArray<Dictionary>(
info[0], 1, info.GetIsolate())); | 6942 TONATIVE_VOID_INTERNAL(dictionarySequenceArg, toImplArray<Dictionary>(in
fo[0], 1, info.GetIsolate())); |
| 6943 } | 6943 } |
| 6944 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg); | 6944 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg); |
| 6945 } | 6945 } |
| 6946 | 6946 |
| 6947 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 6947 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 6948 { | 6948 { |
| 6949 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6949 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6950 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info); | 6950 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info); |
| 6951 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6951 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6952 } | 6952 } |
| 6953 | 6953 |
| 6954 static void overloadedPromiseMethod1Method(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 6954 static void overloadedPromiseMethod1Method(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 6955 { | 6955 { |
| 6956 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
romiseMethod", "TestObject", info.Holder(), info.GetIsolate()); | 6956 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
romiseMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 6957 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6957 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6958 int arg; | 6958 int arg; |
| 6959 { | 6959 { |
| 6960 v8::TryCatch block; | 6960 v8::TryCatch block; |
| 6961 V8RethrowTryCatchScope rethrow(block); | 6961 V8RethrowTryCatchScope rethrow(block); |
| 6962 TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg, toInt32(info[0], exce
ptionState), exceptionState, info, ScriptState::current(info.GetIsolate())); | 6962 TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg, toInt32(info[0], exce
ptionState), exceptionState, info, ScriptState::current(info.GetIsolate())); |
| 6963 } | 6963 } |
| 6964 v8SetReturnValue(info, impl->overloadedPromiseMethod(arg).v8Value()); | 6964 v8SetReturnValue(info, impl->overloadedPromiseMethod(arg).v8Value()); |
| 6965 } | 6965 } |
| 6966 | 6966 |
| 6967 static void overloadedPromiseMethod2Method(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 6967 static void overloadedPromiseMethod2Method(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 6968 { | 6968 { |
| 6969 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6969 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6970 V8StringResource<> arg; | 6970 V8StringResource<> arg; |
| 6971 { | 6971 { |
| 6972 v8::TryCatch block; | 6972 v8::TryCatch block; |
| 6973 V8RethrowTryCatchScope rethrow(block); | 6973 V8RethrowTryCatchScope rethrow(block); |
| 6974 TOSTRING_VOID_PROMISE_INTERNAL(arg, info[0], info); | 6974 TOSTRING_VOID_PROMISE_INTERNAL(arg, info[0], info); |
| 6975 } | 6975 } |
| 6976 v8SetReturnValue(info, impl->overloadedPromiseMethod(arg).v8Value()); | 6976 v8SetReturnValue(info, impl->overloadedPromiseMethod(arg).v8Value()); |
| 6977 } | 6977 } |
| 6978 | 6978 |
| 6979 static void overloadedPromiseMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 6979 static void overloadedPromiseMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7011 } | 7011 } |
| 7012 | 7012 |
| 7013 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 7013 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 7014 { | 7014 { |
| 7015 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
tringArgLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7015 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
tringArgLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 7016 if (UNLIKELY(info.Length() < 2)) { | 7016 if (UNLIKELY(info.Length() < 2)) { |
| 7017 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 7017 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| 7018 exceptionState.throwIfNeeded(); | 7018 exceptionState.throwIfNeeded(); |
| 7019 return; | 7019 return; |
| 7020 } | 7020 } |
| 7021 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7021 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7022 V8StringResource<> stringArg; | 7022 V8StringResource<> stringArg; |
| 7023 int longArg; | 7023 int longArg; |
| 7024 { | 7024 { |
| 7025 v8::TryCatch block; | 7025 v8::TryCatch block; |
| 7026 V8RethrowTryCatchScope rethrow(block); | 7026 V8RethrowTryCatchScope rethrow(block); |
| 7027 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 7027 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 7028 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | 7028 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); |
| 7029 } | 7029 } |
| 7030 impl->voidMethodStringArgLongArg(stringArg, longArg); | 7030 impl->voidMethodStringArgLongArg(stringArg, longArg); |
| 7031 } | 7031 } |
| 7032 | 7032 |
| 7033 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 7033 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 7034 { | 7034 { |
| 7035 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7035 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7036 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info); | 7036 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info); |
| 7037 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7037 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7038 } | 7038 } |
| 7039 | 7039 |
| 7040 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 7040 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 7041 { | 7041 { |
| 7042 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7042 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7043 V8StringResource<> optionalStringArg; | 7043 V8StringResource<> optionalStringArg; |
| 7044 { | 7044 { |
| 7045 if (UNLIKELY(info.Length() <= 0)) { | 7045 if (UNLIKELY(info.Length() <= 0)) { |
| 7046 impl->voidMethodOptionalStringArg(); | 7046 impl->voidMethodOptionalStringArg(); |
| 7047 return; | 7047 return; |
| 7048 } | 7048 } |
| 7049 TOSTRING_VOID_INTERNAL(optionalStringArg, info[0]); | 7049 TOSTRING_VOID_INTERNAL(optionalStringArg, info[0]); |
| 7050 } | 7050 } |
| 7051 impl->voidMethodOptionalStringArg(optionalStringArg); | 7051 impl->voidMethodOptionalStringArg(optionalStringArg); |
| 7052 } | 7052 } |
| 7053 | 7053 |
| 7054 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 7054 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 7055 { | 7055 { |
| 7056 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7056 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7057 TestObjectV8Internal::voidMethodOptionalStringArgMethod(info); | 7057 TestObjectV8Internal::voidMethodOptionalStringArgMethod(info); |
| 7058 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7058 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7059 } | 7059 } |
| 7060 | 7060 |
| 7061 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 7061 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 7062 { | 7062 { |
| 7063 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7063 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7064 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; | 7064 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; |
| 7065 { | 7065 { |
| 7066 v8::TryCatch block; | 7066 v8::TryCatch block; |
| 7067 V8RethrowTryCatchScope rethrow(block); | 7067 V8RethrowTryCatchScope rethrow(block); |
| 7068 if (UNLIKELY(info.Length() <= 0)) { | 7068 if (UNLIKELY(info.Length() <= 0)) { |
| 7069 impl->voidMethodOptionalTestInterfaceEmptyArg(); | 7069 impl->voidMethodOptionalTestInterfaceEmptyArg(); |
| 7070 return; | 7070 return; |
| 7071 } | 7071 } |
| 7072 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp
ty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 7072 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp
ty::toImplWithTypeCheck(info.GetIsolate(), info[0])); |
| 7073 } | 7073 } |
| 7074 impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg)
; | 7074 impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg)
; |
| 7075 } | 7075 } |
| 7076 | 7076 |
| 7077 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7077 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 7078 { | 7078 { |
| 7079 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7079 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7080 TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info); | 7080 TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info); |
| 7081 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7081 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7082 } | 7082 } |
| 7083 | 7083 |
| 7084 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7084 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 7085 { | 7085 { |
| 7086 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7086 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 7087 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7087 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7088 int optionalLongArg; | 7088 int optionalLongArg; |
| 7089 { | 7089 { |
| 7090 v8::TryCatch block; | 7090 v8::TryCatch block; |
| 7091 V8RethrowTryCatchScope rethrow(block); | 7091 V8RethrowTryCatchScope rethrow(block); |
| 7092 if (UNLIKELY(info.Length() <= 0)) { | 7092 if (UNLIKELY(info.Length() <= 0)) { |
| 7093 impl->voidMethodOptionalLongArg(); | 7093 impl->voidMethodOptionalLongArg(); |
| 7094 return; | 7094 return; |
| 7095 } | 7095 } |
| 7096 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | 7096 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); |
| 7097 } | 7097 } |
| 7098 impl->voidMethodOptionalLongArg(optionalLongArg); | 7098 impl->voidMethodOptionalLongArg(optionalLongArg); |
| 7099 } | 7099 } |
| 7100 | 7100 |
| 7101 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 7101 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 7102 { | 7102 { |
| 7103 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7103 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7104 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info); | 7104 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info); |
| 7105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7106 } | 7106 } |
| 7107 | 7107 |
| 7108 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 7108 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 7109 { | 7109 { |
| 7110 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7110 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 7111 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7111 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7112 int optionalLongArg; | 7112 int optionalLongArg; |
| 7113 { | 7113 { |
| 7114 v8::TryCatch block; | 7114 v8::TryCatch block; |
| 7115 V8RethrowTryCatchScope rethrow(block); | 7115 V8RethrowTryCatchScope rethrow(block); |
| 7116 if (UNLIKELY(info.Length() <= 0)) { | 7116 if (UNLIKELY(info.Length() <= 0)) { |
| 7117 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), in
fo.GetIsolate()); | 7117 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), in
fo.GetIsolate()); |
| 7118 return; | 7118 return; |
| 7119 } | 7119 } |
| 7120 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | 7120 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); |
| 7121 } | 7121 } |
| 7122 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongA
rg), info.GetIsolate()); | 7122 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongA
rg), info.GetIsolate()); |
| 7123 } | 7123 } |
| 7124 | 7124 |
| 7125 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 7125 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 7126 { | 7126 { |
| 7127 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7127 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7128 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info); | 7128 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info); |
| 7129 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7129 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7130 } | 7130 } |
| 7131 | 7131 |
| 7132 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 7132 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 7133 { | 7133 { |
| 7134 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfa
ceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7134 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfa
ceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 7135 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7135 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7136 int optionalLongArg; | 7136 int optionalLongArg; |
| 7137 { | 7137 { |
| 7138 v8::TryCatch block; | 7138 v8::TryCatch block; |
| 7139 V8RethrowTryCatchScope rethrow(block); | 7139 V8RethrowTryCatchScope rethrow(block); |
| 7140 if (UNLIKELY(info.Length() <= 0)) { | 7140 if (UNLIKELY(info.Length() <= 0)) { |
| 7141 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg
()); | 7141 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg
()); |
| 7142 return; | 7142 return; |
| 7143 } | 7143 } |
| 7144 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | 7144 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); |
| 7145 } | 7145 } |
| 7146 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optiona
lLongArg)); | 7146 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optiona
lLongArg)); |
| 7147 } | 7147 } |
| 7148 | 7148 |
| 7149 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7149 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 7150 { | 7150 { |
| 7151 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7151 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7152 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info); | 7152 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info); |
| 7153 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7153 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7154 } | 7154 } |
| 7155 | 7155 |
| 7156 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7156 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 7157 { | 7157 { |
| 7158 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7158 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 7159 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7159 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7160 int optionalLongArg; | 7160 int optionalLongArg; |
| 7161 { | 7161 { |
| 7162 v8::TryCatch block; | 7162 v8::TryCatch block; |
| 7163 V8RethrowTryCatchScope rethrow(block); | 7163 V8RethrowTryCatchScope rethrow(block); |
| 7164 if (UNLIKELY(info.Length() <= 0)) { | 7164 if (UNLIKELY(info.Length() <= 0)) { |
| 7165 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg()); | 7165 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg()); |
| 7166 return; | 7166 return; |
| 7167 } | 7167 } |
| 7168 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | 7168 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); |
| 7169 } | 7169 } |
| 7170 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg)); | 7170 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg)); |
| 7171 } | 7171 } |
| 7172 | 7172 |
| 7173 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 7173 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 7174 { | 7174 { |
| 7175 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7175 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7176 TestObjectV8Internal::longMethodOptionalLongArgMethod(info); | 7176 TestObjectV8Internal::longMethodOptionalLongArgMethod(info); |
| 7177 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7177 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7178 } | 7178 } |
| 7179 | 7179 |
| 7180 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | 7180 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 7181 { | 7181 { |
| 7182 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7182 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 7183 if (UNLIKELY(info.Length() < 1)) { | 7183 if (UNLIKELY(info.Length() < 1)) { |
| 7184 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7184 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 7185 exceptionState.throwIfNeeded(); | 7185 exceptionState.throwIfNeeded(); |
| 7186 return; | 7186 return; |
| 7187 } | 7187 } |
| 7188 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7188 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7189 int longArg; | 7189 int longArg; |
| 7190 int optionalLongArg; | 7190 int optionalLongArg; |
| 7191 { | 7191 { |
| 7192 v8::TryCatch block; | 7192 v8::TryCatch block; |
| 7193 V8RethrowTryCatchScope rethrow(block); | 7193 V8RethrowTryCatchScope rethrow(block); |
| 7194 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7194 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 7195 if (UNLIKELY(info.Length() <= 1)) { | 7195 if (UNLIKELY(info.Length() <= 1)) { |
| 7196 impl->voidMethodLongArgOptionalLongArg(longArg); | 7196 impl->voidMethodLongArgOptionalLongArg(longArg); |
| 7197 return; | 7197 return; |
| 7198 } | 7198 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 7209 } | 7209 } |
| 7210 | 7210 |
| 7211 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7211 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 7212 { | 7212 { |
| 7213 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol
ate()); | 7213 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol
ate()); |
| 7214 if (UNLIKELY(info.Length() < 1)) { | 7214 if (UNLIKELY(info.Length() < 1)) { |
| 7215 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7215 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 7216 exceptionState.throwIfNeeded(); | 7216 exceptionState.throwIfNeeded(); |
| 7217 return; | 7217 return; |
| 7218 } | 7218 } |
| 7219 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7219 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7220 int longArg; | 7220 int longArg; |
| 7221 int optionalLongArg1; | 7221 int optionalLongArg1; |
| 7222 int optionalLongArg2; | 7222 int optionalLongArg2; |
| 7223 { | 7223 { |
| 7224 v8::TryCatch block; | 7224 v8::TryCatch block; |
| 7225 V8RethrowTryCatchScope rethrow(block); | 7225 V8RethrowTryCatchScope rethrow(block); |
| 7226 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7226 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 7227 if (UNLIKELY(info.Length() <= 1)) { | 7227 if (UNLIKELY(info.Length() <= 1)) { |
| 7228 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg); | 7228 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg); |
| 7229 return; | 7229 return; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 7246 } | 7246 } |
| 7247 | 7247 |
| 7248 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 7248 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 7249 { | 7249 { |
| 7250 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola
te()); | 7250 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola
te()); |
| 7251 if (UNLIKELY(info.Length() < 1)) { | 7251 if (UNLIKELY(info.Length() < 1)) { |
| 7252 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7252 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 7253 exceptionState.throwIfNeeded(); | 7253 exceptionState.throwIfNeeded(); |
| 7254 return; | 7254 return; |
| 7255 } | 7255 } |
| 7256 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7256 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7257 int longArg; | 7257 int longArg; |
| 7258 TestInterfaceEmpty* optionalTestInterfaceEmpty; | 7258 TestInterfaceEmpty* optionalTestInterfaceEmpty; |
| 7259 { | 7259 { |
| 7260 v8::TryCatch block; | 7260 v8::TryCatch block; |
| 7261 V8RethrowTryCatchScope rethrow(block); | 7261 V8RethrowTryCatchScope rethrow(block); |
| 7262 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7262 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 7263 if (UNLIKELY(info.Length() <= 1)) { | 7263 if (UNLIKELY(info.Length() <= 1)) { |
| 7264 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); | 7264 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); |
| 7265 return; | 7265 return; |
| 7266 } | 7266 } |
| 7267 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty:
:toNativeWithTypeCheck(info.GetIsolate(), info[1])); | 7267 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty:
:toImplWithTypeCheck(info.GetIsolate(), info[1])); |
| 7268 } | 7268 } |
| 7269 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn
terfaceEmpty); | 7269 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn
terfaceEmpty); |
| 7270 } | 7270 } |
| 7271 | 7271 |
| 7272 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 7272 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 7273 { | 7273 { |
| 7274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7275 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i
nfo); | 7275 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i
nfo); |
| 7276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7277 } | 7277 } |
| 7278 | 7278 |
| 7279 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 7279 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 7280 { | 7280 { |
| 7281 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola
te()); | 7281 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola
te()); |
| 7282 if (UNLIKELY(info.Length() < 1)) { | 7282 if (UNLIKELY(info.Length() < 1)) { |
| 7283 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7283 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 7284 exceptionState.throwIfNeeded(); | 7284 exceptionState.throwIfNeeded(); |
| 7285 return; | 7285 return; |
| 7286 } | 7286 } |
| 7287 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7287 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7288 TestInterfaceEmpty* optionalTestInterfaceEmpty; | 7288 TestInterfaceEmpty* optionalTestInterfaceEmpty; |
| 7289 int longArg; | 7289 int longArg; |
| 7290 { | 7290 { |
| 7291 v8::TryCatch block; | 7291 v8::TryCatch block; |
| 7292 V8RethrowTryCatchScope rethrow(block); | 7292 V8RethrowTryCatchScope rethrow(block); |
| 7293 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty:
:toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 7293 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty:
:toImplWithTypeCheck(info.GetIsolate(), info[0])); |
| 7294 if (UNLIKELY(info.Length() <= 1)) { | 7294 if (UNLIKELY(info.Length() <= 1)) { |
| 7295 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInt
erfaceEmpty); | 7295 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInt
erfaceEmpty); |
| 7296 return; | 7296 return; |
| 7297 } | 7297 } |
| 7298 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | 7298 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); |
| 7299 } | 7299 } |
| 7300 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm
pty, longArg); | 7300 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm
pty, longArg); |
| 7301 } | 7301 } |
| 7302 | 7302 |
| 7303 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 7303 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 7304 { | 7304 { |
| 7305 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7305 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7306 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i
nfo); | 7306 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i
nfo); |
| 7307 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7307 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7308 } | 7308 } |
| 7309 | 7309 |
| 7310 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 7310 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 7311 { | 7311 { |
| 7312 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7312 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7313 Dictionary optionalDictionaryArg; | 7313 Dictionary optionalDictionaryArg; |
| 7314 { | 7314 { |
| 7315 v8::TryCatch block; | 7315 v8::TryCatch block; |
| 7316 V8RethrowTryCatchScope rethrow(block); | 7316 V8RethrowTryCatchScope rethrow(block); |
| 7317 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[0], info.G
etIsolate())); | 7317 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[0], info.G
etIsolate())); |
| 7318 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg
.isObject()) { | 7318 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg
.isObject()) { |
| 7319 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictiona
ryArg') is not an object."), info.GetIsolate()); | 7319 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictiona
ryArg') is not an object."), info.GetIsolate()); |
| 7320 return; | 7320 return; |
| 7321 } | 7321 } |
| 7322 } | 7322 } |
| 7323 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); | 7323 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); |
| 7324 } | 7324 } |
| 7325 | 7325 |
| 7326 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 7326 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 7327 { | 7327 { |
| 7328 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7328 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7329 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); | 7329 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); |
| 7330 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7330 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7331 } | 7331 } |
| 7332 | 7332 |
| 7333 static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 7333 static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 7334 { | 7334 { |
| 7335 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 7335 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 7336 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7336 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7337 V8StringResource<> defaultByteStringArg; | 7337 V8StringResource<> defaultByteStringArg; |
| 7338 { | 7338 { |
| 7339 v8::TryCatch block; | 7339 v8::TryCatch block; |
| 7340 V8RethrowTryCatchScope rethrow(block); | 7340 V8RethrowTryCatchScope rethrow(block); |
| 7341 if (!info[0]->IsUndefined()) { | 7341 if (!info[0]->IsUndefined()) { |
| 7342 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultByteStringArg, toByteSt
ring(info[0], exceptionState), exceptionState); | 7342 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultByteStringArg, toByteSt
ring(info[0], exceptionState), exceptionState); |
| 7343 } else { | 7343 } else { |
| 7344 defaultByteStringArg = String("foo"); | 7344 defaultByteStringArg = String("foo"); |
| 7345 } | 7345 } |
| 7346 } | 7346 } |
| 7347 impl->voidMethodDefaultByteStringArg(defaultByteStringArg); | 7347 impl->voidMethodDefaultByteStringArg(defaultByteStringArg); |
| 7348 } | 7348 } |
| 7349 | 7349 |
| 7350 static void voidMethodDefaultByteStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 7350 static void voidMethodDefaultByteStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 7351 { | 7351 { |
| 7352 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7352 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7353 TestObjectV8Internal::voidMethodDefaultByteStringArgMethod(info); | 7353 TestObjectV8Internal::voidMethodDefaultByteStringArgMethod(info); |
| 7354 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7354 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7355 } | 7355 } |
| 7356 | 7356 |
| 7357 static void voidMethodDefaultStringArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 7357 static void voidMethodDefaultStringArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 7358 { | 7358 { |
| 7359 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7359 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7360 V8StringResource<> defaultStringArg; | 7360 V8StringResource<> defaultStringArg; |
| 7361 { | 7361 { |
| 7362 if (!info[0]->IsUndefined()) { | 7362 if (!info[0]->IsUndefined()) { |
| 7363 TOSTRING_VOID_INTERNAL(defaultStringArg, info[0]); | 7363 TOSTRING_VOID_INTERNAL(defaultStringArg, info[0]); |
| 7364 } else { | 7364 } else { |
| 7365 defaultStringArg = String("foo"); | 7365 defaultStringArg = String("foo"); |
| 7366 } | 7366 } |
| 7367 } | 7367 } |
| 7368 impl->voidMethodDefaultStringArg(defaultStringArg); | 7368 impl->voidMethodDefaultStringArg(defaultStringArg); |
| 7369 } | 7369 } |
| 7370 | 7370 |
| 7371 static void voidMethodDefaultStringArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 7371 static void voidMethodDefaultStringArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 7372 { | 7372 { |
| 7373 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7373 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7374 TestObjectV8Internal::voidMethodDefaultStringArgMethod(info); | 7374 TestObjectV8Internal::voidMethodDefaultStringArgMethod(info); |
| 7375 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7375 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7376 } | 7376 } |
| 7377 | 7377 |
| 7378 static void voidMethodDefaultIntegerArgsMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | 7378 static void voidMethodDefaultIntegerArgsMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 7379 { | 7379 { |
| 7380 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultIntegerArgs", "TestObject", info.Holder(), info.GetIsolate()); | 7380 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultIntegerArgs", "TestObject", info.Holder(), info.GetIsolate()); |
| 7381 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7381 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7382 int defaultLongArg; | 7382 int defaultLongArg; |
| 7383 long long defaultLongLongArg; | 7383 long long defaultLongLongArg; |
| 7384 unsigned defaultUnsignedArg; | 7384 unsigned defaultUnsignedArg; |
| 7385 { | 7385 { |
| 7386 v8::TryCatch block; | 7386 v8::TryCatch block; |
| 7387 V8RethrowTryCatchScope rethrow(block); | 7387 V8RethrowTryCatchScope rethrow(block); |
| 7388 if (!info[0]->IsUndefined()) { | 7388 if (!info[0]->IsUndefined()) { |
| 7389 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultLongArg, toInt32(info[0
], exceptionState), exceptionState); | 7389 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultLongArg, toInt32(info[0
], exceptionState), exceptionState); |
| 7390 } else { | 7390 } else { |
| 7391 defaultLongArg = 10; | 7391 defaultLongArg = 10; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 7406 | 7406 |
| 7407 static void voidMethodDefaultIntegerArgsMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 7407 static void voidMethodDefaultIntegerArgsMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 7408 { | 7408 { |
| 7409 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7409 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7410 TestObjectV8Internal::voidMethodDefaultIntegerArgsMethod(info); | 7410 TestObjectV8Internal::voidMethodDefaultIntegerArgsMethod(info); |
| 7411 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7411 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7412 } | 7412 } |
| 7413 | 7413 |
| 7414 static void voidMethodDefaultDoubleArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 7414 static void voidMethodDefaultDoubleArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 7415 { | 7415 { |
| 7416 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7416 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7417 double defaultDoubleArg; | 7417 double defaultDoubleArg; |
| 7418 { | 7418 { |
| 7419 v8::TryCatch block; | 7419 v8::TryCatch block; |
| 7420 V8RethrowTryCatchScope rethrow(block); | 7420 V8RethrowTryCatchScope rethrow(block); |
| 7421 if (!info[0]->IsUndefined()) { | 7421 if (!info[0]->IsUndefined()) { |
| 7422 TONATIVE_VOID_INTERNAL(defaultDoubleArg, static_cast<double>(info[0]
->NumberValue())); | 7422 TONATIVE_VOID_INTERNAL(defaultDoubleArg, static_cast<double>(info[0]
->NumberValue())); |
| 7423 } else { | 7423 } else { |
| 7424 defaultDoubleArg = 0.5; | 7424 defaultDoubleArg = 0.5; |
| 7425 } | 7425 } |
| 7426 } | 7426 } |
| 7427 impl->voidMethodDefaultDoubleArg(defaultDoubleArg); | 7427 impl->voidMethodDefaultDoubleArg(defaultDoubleArg); |
| 7428 } | 7428 } |
| 7429 | 7429 |
| 7430 static void voidMethodDefaultDoubleArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 7430 static void voidMethodDefaultDoubleArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 7431 { | 7431 { |
| 7432 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7432 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7433 TestObjectV8Internal::voidMethodDefaultDoubleArgMethod(info); | 7433 TestObjectV8Internal::voidMethodDefaultDoubleArgMethod(info); |
| 7434 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7434 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7435 } | 7435 } |
| 7436 | 7436 |
| 7437 static void voidMethodDefaultTrueBooleanArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 7437 static void voidMethodDefaultTrueBooleanArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 7438 { | 7438 { |
| 7439 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7439 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7440 bool defaultBooleanArg; | 7440 bool defaultBooleanArg; |
| 7441 { | 7441 { |
| 7442 v8::TryCatch block; | 7442 v8::TryCatch block; |
| 7443 V8RethrowTryCatchScope rethrow(block); | 7443 V8RethrowTryCatchScope rethrow(block); |
| 7444 if (!info[0]->IsUndefined()) { | 7444 if (!info[0]->IsUndefined()) { |
| 7445 TONATIVE_VOID_INTERNAL(defaultBooleanArg, info[0]->BooleanValue()); | 7445 TONATIVE_VOID_INTERNAL(defaultBooleanArg, info[0]->BooleanValue()); |
| 7446 } else { | 7446 } else { |
| 7447 defaultBooleanArg = true; | 7447 defaultBooleanArg = true; |
| 7448 } | 7448 } |
| 7449 } | 7449 } |
| 7450 impl->voidMethodDefaultTrueBooleanArg(defaultBooleanArg); | 7450 impl->voidMethodDefaultTrueBooleanArg(defaultBooleanArg); |
| 7451 } | 7451 } |
| 7452 | 7452 |
| 7453 static void voidMethodDefaultTrueBooleanArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 7453 static void voidMethodDefaultTrueBooleanArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 7454 { | 7454 { |
| 7455 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7455 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7456 TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethod(info); | 7456 TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethod(info); |
| 7457 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7457 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7458 } | 7458 } |
| 7459 | 7459 |
| 7460 static void voidMethodDefaultFalseBooleanArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | 7460 static void voidMethodDefaultFalseBooleanArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 7461 { | 7461 { |
| 7462 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7462 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7463 bool defaultBooleanArg; | 7463 bool defaultBooleanArg; |
| 7464 { | 7464 { |
| 7465 v8::TryCatch block; | 7465 v8::TryCatch block; |
| 7466 V8RethrowTryCatchScope rethrow(block); | 7466 V8RethrowTryCatchScope rethrow(block); |
| 7467 if (!info[0]->IsUndefined()) { | 7467 if (!info[0]->IsUndefined()) { |
| 7468 TONATIVE_VOID_INTERNAL(defaultBooleanArg, info[0]->BooleanValue()); | 7468 TONATIVE_VOID_INTERNAL(defaultBooleanArg, info[0]->BooleanValue()); |
| 7469 } else { | 7469 } else { |
| 7470 defaultBooleanArg = false; | 7470 defaultBooleanArg = false; |
| 7471 } | 7471 } |
| 7472 } | 7472 } |
| 7473 impl->voidMethodDefaultFalseBooleanArg(defaultBooleanArg); | 7473 impl->voidMethodDefaultFalseBooleanArg(defaultBooleanArg); |
| 7474 } | 7474 } |
| 7475 | 7475 |
| 7476 static void voidMethodDefaultFalseBooleanArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 7476 static void voidMethodDefaultFalseBooleanArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 7477 { | 7477 { |
| 7478 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7478 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7479 TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethod(info); | 7479 TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethod(info); |
| 7480 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7480 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7481 } | 7481 } |
| 7482 | 7482 |
| 7483 static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 7483 static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 7484 { | 7484 { |
| 7485 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultNullableByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); | 7485 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultNullableByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 7486 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7486 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7487 V8StringResource<TreatNullAsNullString> defaultStringArg; | 7487 V8StringResource<TreatNullAsNullString> defaultStringArg; |
| 7488 { | 7488 { |
| 7489 v8::TryCatch block; | 7489 v8::TryCatch block; |
| 7490 V8RethrowTryCatchScope rethrow(block); | 7490 V8RethrowTryCatchScope rethrow(block); |
| 7491 if (!info[0]->IsUndefined()) { | 7491 if (!info[0]->IsUndefined()) { |
| 7492 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultStringArg, toByteString
(info[0], exceptionState), exceptionState); | 7492 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultStringArg, toByteString
(info[0], exceptionState), exceptionState); |
| 7493 } else { | 7493 } else { |
| 7494 defaultStringArg = nullptr; | 7494 defaultStringArg = nullptr; |
| 7495 } | 7495 } |
| 7496 } | 7496 } |
| 7497 impl->voidMethodDefaultNullableByteStringArg(defaultStringArg); | 7497 impl->voidMethodDefaultNullableByteStringArg(defaultStringArg); |
| 7498 } | 7498 } |
| 7499 | 7499 |
| 7500 static void voidMethodDefaultNullableByteStringArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 7500 static void voidMethodDefaultNullableByteStringArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 7501 { | 7501 { |
| 7502 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7502 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7503 TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethod(info); | 7503 TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethod(info); |
| 7504 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7504 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7505 } | 7505 } |
| 7506 | 7506 |
| 7507 static void voidMethodDefaultNullableStringArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 7507 static void voidMethodDefaultNullableStringArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 7508 { | 7508 { |
| 7509 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7509 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7510 V8StringResource<TreatNullAsNullString> defaultStringArg; | 7510 V8StringResource<TreatNullAsNullString> defaultStringArg; |
| 7511 { | 7511 { |
| 7512 if (!info[0]->IsUndefined()) { | 7512 if (!info[0]->IsUndefined()) { |
| 7513 TOSTRING_VOID_INTERNAL(defaultStringArg, info[0]); | 7513 TOSTRING_VOID_INTERNAL(defaultStringArg, info[0]); |
| 7514 } else { | 7514 } else { |
| 7515 defaultStringArg = nullptr; | 7515 defaultStringArg = nullptr; |
| 7516 } | 7516 } |
| 7517 } | 7517 } |
| 7518 impl->voidMethodDefaultNullableStringArg(defaultStringArg); | 7518 impl->voidMethodDefaultNullableStringArg(defaultStringArg); |
| 7519 } | 7519 } |
| 7520 | 7520 |
| 7521 static void voidMethodDefaultNullableStringArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 7521 static void voidMethodDefaultNullableStringArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 7522 { | 7522 { |
| 7523 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7523 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7524 TestObjectV8Internal::voidMethodDefaultNullableStringArgMethod(info); | 7524 TestObjectV8Internal::voidMethodDefaultNullableStringArgMethod(info); |
| 7525 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7525 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7526 } | 7526 } |
| 7527 | 7527 |
| 7528 static void voidMethodDefaultNullableTestInterfaceArgMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 7528 static void voidMethodDefaultNullableTestInterfaceArgMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
| 7529 { | 7529 { |
| 7530 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7530 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7531 TestInterfaceImplementation* defaultTestInterfaceArg; | 7531 TestInterfaceImplementation* defaultTestInterfaceArg; |
| 7532 { | 7532 { |
| 7533 v8::TryCatch block; | 7533 v8::TryCatch block; |
| 7534 V8RethrowTryCatchScope rethrow(block); | 7534 V8RethrowTryCatchScope rethrow(block); |
| 7535 if (!info[0]->IsUndefined()) { | 7535 if (!info[0]->IsUndefined()) { |
| 7536 TONATIVE_VOID_INTERNAL(defaultTestInterfaceArg, V8TestInterface::toN
ativeWithTypeCheck(info.GetIsolate(), info[0])); | 7536 TONATIVE_VOID_INTERNAL(defaultTestInterfaceArg, V8TestInterface::toI
mplWithTypeCheck(info.GetIsolate(), info[0])); |
| 7537 } else { | 7537 } else { |
| 7538 defaultTestInterfaceArg = nullptr; | 7538 defaultTestInterfaceArg = nullptr; |
| 7539 } | 7539 } |
| 7540 } | 7540 } |
| 7541 impl->voidMethodDefaultNullableTestInterfaceArg(defaultTestInterfaceArg); | 7541 impl->voidMethodDefaultNullableTestInterfaceArg(defaultTestInterfaceArg); |
| 7542 } | 7542 } |
| 7543 | 7543 |
| 7544 static void voidMethodDefaultNullableTestInterfaceArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 7544 static void voidMethodDefaultNullableTestInterfaceArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
| 7545 { | 7545 { |
| 7546 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7546 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7547 TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethod(info); | 7547 TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethod(info); |
| 7548 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7548 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7549 } | 7549 } |
| 7550 | 7550 |
| 7551 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 7551 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 7552 { | 7552 { |
| 7553 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7553 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7554 Vector<String> variadicStringArgs; | 7554 Vector<String> variadicStringArgs; |
| 7555 { | 7555 { |
| 7556 v8::TryCatch block; | 7556 v8::TryCatch block; |
| 7557 V8RethrowTryCatchScope rethrow(block); | 7557 V8RethrowTryCatchScope rethrow(block); |
| 7558 TONATIVE_VOID_INTERNAL(variadicStringArgs, toNativeArguments<String>(inf
o, 0)); | 7558 TONATIVE_VOID_INTERNAL(variadicStringArgs, toImplArguments<String>(info,
0)); |
| 7559 } | 7559 } |
| 7560 impl->voidMethodVariadicStringArg(variadicStringArgs); | 7560 impl->voidMethodVariadicStringArg(variadicStringArgs); |
| 7561 } | 7561 } |
| 7562 | 7562 |
| 7563 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 7563 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 7564 { | 7564 { |
| 7565 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7565 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7566 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info); | 7566 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info); |
| 7567 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7567 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7568 } | 7568 } |
| 7569 | 7569 |
| 7570 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 7570 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 7571 { | 7571 { |
| 7572 if (UNLIKELY(info.Length() < 1)) { | 7572 if (UNLIKELY(info.Length() < 1)) { |
| 7573 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodStringArgVariadicStringArg", "TestObject", 1, info.Length(), info.GetIs
olate()), info.GetIsolate()); | 7573 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodStringArgVariadicStringArg", "TestObject", 1, info.Length(), info.GetIs
olate()), info.GetIsolate()); |
| 7574 return; | 7574 return; |
| 7575 } | 7575 } |
| 7576 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7576 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7577 V8StringResource<> stringArg; | 7577 V8StringResource<> stringArg; |
| 7578 Vector<String> variadicStringArgs; | 7578 Vector<String> variadicStringArgs; |
| 7579 { | 7579 { |
| 7580 v8::TryCatch block; | 7580 v8::TryCatch block; |
| 7581 V8RethrowTryCatchScope rethrow(block); | 7581 V8RethrowTryCatchScope rethrow(block); |
| 7582 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 7582 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 7583 TONATIVE_VOID_INTERNAL(variadicStringArgs, toNativeArguments<String>(inf
o, 1)); | 7583 TONATIVE_VOID_INTERNAL(variadicStringArgs, toImplArguments<String>(info,
1)); |
| 7584 } | 7584 } |
| 7585 impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs); | 7585 impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs); |
| 7586 } | 7586 } |
| 7587 | 7587 |
| 7588 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 7588 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 7589 { | 7589 { |
| 7590 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7590 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7591 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info); | 7591 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info); |
| 7592 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7592 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7593 } | 7593 } |
| 7594 | 7594 |
| 7595 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 7595 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 7596 { | 7596 { |
| 7597 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7597 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7598 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; | 7598 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; |
| 7599 { | 7599 { |
| 7600 for (int i = 0; i < info.Length(); ++i) { | 7600 for (int i = 0; i < info.Length(); ++i) { |
| 7601 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 7601 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
| 7602 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodVariadicTestInterfaceEmptyArg", "TestObject", "parameter 1 is not
of type 'TestInterfaceEmpty'."), info.GetIsolate()); | 7602 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodVariadicTestInterfaceEmptyArg", "TestObject", "parameter 1 is not
of type 'TestInterfaceEmpty'."), info.GetIsolate()); |
| 7603 return; | 7603 return; |
| 7604 } | 7604 } |
| 7605 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative
(v8::Handle<v8::Object>::Cast(info[i]))); | 7605 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Handle<v8::Object>::Cast(info[i]))); |
| 7606 } | 7606 } |
| 7607 } | 7607 } |
| 7608 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs
); | 7608 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs
); |
| 7609 } | 7609 } |
| 7610 | 7610 |
| 7611 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7611 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 7612 { | 7612 { |
| 7613 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7613 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7614 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); | 7614 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); |
| 7615 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7615 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7616 } | 7616 } |
| 7617 | 7617 |
| 7618 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 7618 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 7619 { | 7619 { |
| 7620 if (UNLIKELY(info.Length() < 1)) { | 7620 if (UNLIKELY(info.Length() < 1)) { |
| 7621 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", 1, i
nfo.Length(), info.GetIsolate()), info.GetIsolate()); | 7621 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", 1, i
nfo.Length(), info.GetIsolate()), info.GetIsolate()); |
| 7622 return; | 7622 return; |
| 7623 } | 7623 } |
| 7624 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7624 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7625 TestInterfaceEmpty* testInterfaceEmptyArg; | 7625 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 7626 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; | 7626 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; |
| 7627 { | 7627 { |
| 7628 v8::TryCatch block; | 7628 v8::TryCatch block; |
| 7629 V8RethrowTryCatchScope rethrow(block); | 7629 V8RethrowTryCatchScope rethrow(block); |
| 7630 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); | 7630 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); |
| 7631 for (int i = 1; i < info.Length(); ++i) { | 7631 for (int i = 1; i < info.Length(); ++i) { |
| 7632 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 7632 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
| 7633 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject"
, "parameter 2 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); | 7633 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject"
, "parameter 2 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); |
| 7634 return; | 7634 return; |
| 7635 } | 7635 } |
| 7636 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative
(v8::Handle<v8::Object>::Cast(info[i]))); | 7636 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v
8::Handle<v8::Object>::Cast(info[i]))); |
| 7637 } | 7637 } |
| 7638 } | 7638 } |
| 7639 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter
faceEmptyArg, variadicTestInterfaceEmptyArgs); | 7639 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter
faceEmptyArg, variadicTestInterfaceEmptyArgs); |
| 7640 } | 7640 } |
| 7641 | 7641 |
| 7642 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) | 7642 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 7643 { | 7643 { |
| 7644 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7644 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7645 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEm
ptyArgMethod(info); | 7645 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEm
ptyArgMethod(info); |
| 7646 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7646 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7647 } | 7647 } |
| 7648 | 7648 |
| 7649 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) | 7649 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) |
| 7650 { | 7650 { |
| 7651 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7651 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7652 HeapVector<Member<TestInterfaceGarbageCollected> > variadicTestInterfaceGarb
ageCollectedArg; | 7652 HeapVector<Member<TestInterfaceGarbageCollected> > variadicTestInterfaceGarb
ageCollectedArg; |
| 7653 { | 7653 { |
| 7654 for (int i = 0; i < info.Length(); ++i) { | 7654 for (int i = 0; i < info.Length(); ++i) { |
| 7655 if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetI
solate())) { | 7655 if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetI
solate())) { |
| 7656 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodVariadicTestInterfaceGarbageCollectedArg", "TestObject", "paramet
er 1 is not of type 'TestInterfaceGarbageCollected'."), info.GetIsolate()); | 7656 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodVariadicTestInterfaceGarbageCollectedArg", "TestObject", "paramet
er 1 is not of type 'TestInterfaceGarbageCollected'."), info.GetIsolate()); |
| 7657 return; | 7657 return; |
| 7658 } | 7658 } |
| 7659 variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarba
geCollected::toNative(v8::Handle<v8::Object>::Cast(info[i]))); | 7659 variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarba
geCollected::toImpl(v8::Handle<v8::Object>::Cast(info[i]))); |
| 7660 } | 7660 } |
| 7661 } | 7661 } |
| 7662 impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfa
ceGarbageCollectedArg); | 7662 impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfa
ceGarbageCollectedArg); |
| 7663 } | 7663 } |
| 7664 | 7664 |
| 7665 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 7665 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
| 7666 { | 7666 { |
| 7667 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7667 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7668 TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMeth
od(info); | 7668 TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMeth
od(info); |
| 7669 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7669 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7670 } | 7670 } |
| 7671 | 7671 |
| 7672 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 7672 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 7673 { | 7673 { |
| 7674 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7674 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7675 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > v
ariadicTestInterfaceWillBeGarbageCollectedArg; | 7675 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > v
ariadicTestInterfaceWillBeGarbageCollectedArg; |
| 7676 { | 7676 { |
| 7677 for (int i = 0; i < info.Length(); ++i) { | 7677 for (int i = 0; i < info.Length(); ++i) { |
| 7678 if (!V8TestInterfaceWillBeGarbageCollected::hasInstance(info[i], inf
o.GetIsolate())) { | 7678 if (!V8TestInterfaceWillBeGarbageCollected::hasInstance(info[i], inf
o.GetIsolate())) { |
| 7679 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", "TestObject", "p
arameter 1 is not of type 'TestInterfaceWillBeGarbageCollected'."), info.GetIsol
ate()); | 7679 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", "TestObject", "p
arameter 1 is not of type 'TestInterfaceWillBeGarbageCollected'."), info.GetIsol
ate()); |
| 7680 return; | 7680 return; |
| 7681 } | 7681 } |
| 7682 variadicTestInterfaceWillBeGarbageCollectedArg.append(V8TestInterfac
eWillBeGarbageCollected::toNative(v8::Handle<v8::Object>::Cast(info[i]))); | 7682 variadicTestInterfaceWillBeGarbageCollectedArg.append(V8TestInterfac
eWillBeGarbageCollected::toImpl(v8::Handle<v8::Object>::Cast(info[i]))); |
| 7683 } | 7683 } |
| 7684 } | 7684 } |
| 7685 impl->voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(variadicTestI
nterfaceWillBeGarbageCollectedArg); | 7685 impl->voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(variadicTestI
nterfaceWillBeGarbageCollectedArg); |
| 7686 } | 7686 } |
| 7687 | 7687 |
| 7688 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 7688 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 7689 { | 7689 { |
| 7690 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7690 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7691 TestObjectV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedA
rgMethod(info); | 7691 TestObjectV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedA
rgMethod(info); |
| 7692 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7692 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7693 } | 7693 } |
| 7694 | 7694 |
| 7695 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7695 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7696 { | 7696 { |
| 7697 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | 7697 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); |
| 7698 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7698 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7699 int longArg; | 7699 int longArg; |
| 7700 { | 7700 { |
| 7701 v8::TryCatch block; | 7701 v8::TryCatch block; |
| 7702 V8RethrowTryCatchScope rethrow(block); | 7702 V8RethrowTryCatchScope rethrow(block); |
| 7703 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7703 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 7704 } | 7704 } |
| 7705 impl->overloadedMethodA(longArg); | 7705 impl->overloadedMethodA(longArg); |
| 7706 } | 7706 } |
| 7707 | 7707 |
| 7708 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7708 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7709 { | 7709 { |
| 7710 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | 7710 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); |
| 7711 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7711 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7712 int longArg1; | 7712 int longArg1; |
| 7713 int longArg2; | 7713 int longArg2; |
| 7714 { | 7714 { |
| 7715 v8::TryCatch block; | 7715 v8::TryCatch block; |
| 7716 V8RethrowTryCatchScope rethrow(block); | 7716 V8RethrowTryCatchScope rethrow(block); |
| 7717 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg1, toInt32(info[0], excepti
onState), exceptionState); | 7717 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg1, toInt32(info[0], excepti
onState), exceptionState); |
| 7718 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg2, toInt32(info[1], excepti
onState), exceptionState); | 7718 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg2, toInt32(info[1], excepti
onState), exceptionState); |
| 7719 } | 7719 } |
| 7720 impl->overloadedMethodA(longArg1, longArg2); | 7720 impl->overloadedMethodA(longArg1, longArg2); |
| 7721 } | 7721 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 7748 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7748 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 7749 { | 7749 { |
| 7750 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7750 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7751 TestObjectV8Internal::overloadedMethodAMethod(info); | 7751 TestObjectV8Internal::overloadedMethodAMethod(info); |
| 7752 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7752 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7753 } | 7753 } |
| 7754 | 7754 |
| 7755 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7755 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7756 { | 7756 { |
| 7757 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | 7757 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); |
| 7758 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7758 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7759 int longArg; | 7759 int longArg; |
| 7760 { | 7760 { |
| 7761 v8::TryCatch block; | 7761 v8::TryCatch block; |
| 7762 V8RethrowTryCatchScope rethrow(block); | 7762 V8RethrowTryCatchScope rethrow(block); |
| 7763 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7763 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 7764 } | 7764 } |
| 7765 impl->overloadedMethodB(longArg); | 7765 impl->overloadedMethodB(longArg); |
| 7766 } | 7766 } |
| 7767 | 7767 |
| 7768 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7768 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7769 { | 7769 { |
| 7770 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | 7770 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); |
| 7771 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7771 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7772 V8StringResource<> stringArg; | 7772 V8StringResource<> stringArg; |
| 7773 int longArg; | 7773 int longArg; |
| 7774 { | 7774 { |
| 7775 v8::TryCatch block; | 7775 v8::TryCatch block; |
| 7776 V8RethrowTryCatchScope rethrow(block); | 7776 V8RethrowTryCatchScope rethrow(block); |
| 7777 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 7777 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 7778 if (UNLIKELY(info.Length() <= 1)) { | 7778 if (UNLIKELY(info.Length() <= 1)) { |
| 7779 impl->overloadedMethodB(stringArg); | 7779 impl->overloadedMethodB(stringArg); |
| 7780 return; | 7780 return; |
| 7781 } | 7781 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7820 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7820 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 7821 { | 7821 { |
| 7822 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7822 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7823 TestObjectV8Internal::overloadedMethodBMethod(info); | 7823 TestObjectV8Internal::overloadedMethodBMethod(info); |
| 7824 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7824 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7825 } | 7825 } |
| 7826 | 7826 |
| 7827 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7827 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7828 { | 7828 { |
| 7829 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); | 7829 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); |
| 7830 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7830 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7831 int longArg; | 7831 int longArg; |
| 7832 { | 7832 { |
| 7833 v8::TryCatch block; | 7833 v8::TryCatch block; |
| 7834 V8RethrowTryCatchScope rethrow(block); | 7834 V8RethrowTryCatchScope rethrow(block); |
| 7835 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7835 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 7836 } | 7836 } |
| 7837 impl->overloadedMethodC(longArg); | 7837 impl->overloadedMethodC(longArg); |
| 7838 } | 7838 } |
| 7839 | 7839 |
| 7840 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7840 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7841 { | 7841 { |
| 7842 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7842 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7843 TestInterfaceEmpty* testInterfaceEmptyArg; | 7843 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 7844 { | 7844 { |
| 7845 v8::TryCatch block; | 7845 v8::TryCatch block; |
| 7846 V8RethrowTryCatchScope rethrow(block); | 7846 V8RethrowTryCatchScope rethrow(block); |
| 7847 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); | 7847 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); |
| 7848 } | 7848 } |
| 7849 impl->overloadedMethodC(testInterfaceEmptyArg); | 7849 impl->overloadedMethodC(testInterfaceEmptyArg); |
| 7850 } | 7850 } |
| 7851 | 7851 |
| 7852 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 7852 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 7853 { | 7853 { |
| 7854 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); | 7854 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); |
| 7855 switch (std::min(1, info.Length())) { | 7855 switch (std::min(1, info.Length())) { |
| 7856 case 1: | 7856 case 1: |
| 7857 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { | 7857 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 7875 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7875 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 7876 { | 7876 { |
| 7877 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7877 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7878 TestObjectV8Internal::overloadedMethodCMethod(info); | 7878 TestObjectV8Internal::overloadedMethodCMethod(info); |
| 7879 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7879 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7880 } | 7880 } |
| 7881 | 7881 |
| 7882 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7882 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7883 { | 7883 { |
| 7884 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); | 7884 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); |
| 7885 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7885 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7886 int longArg; | 7886 int longArg; |
| 7887 { | 7887 { |
| 7888 v8::TryCatch block; | 7888 v8::TryCatch block; |
| 7889 V8RethrowTryCatchScope rethrow(block); | 7889 V8RethrowTryCatchScope rethrow(block); |
| 7890 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7890 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 7891 } | 7891 } |
| 7892 impl->overloadedMethodD(longArg); | 7892 impl->overloadedMethodD(longArg); |
| 7893 } | 7893 } |
| 7894 | 7894 |
| 7895 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7895 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7896 { | 7896 { |
| 7897 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7897 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7898 Vector<int> longArrayArg; | 7898 Vector<int> longArrayArg; |
| 7899 { | 7899 { |
| 7900 v8::TryCatch block; | 7900 v8::TryCatch block; |
| 7901 V8RethrowTryCatchScope rethrow(block); | 7901 V8RethrowTryCatchScope rethrow(block); |
| 7902 TONATIVE_VOID_INTERNAL(longArrayArg, toNativeArray<int>(info[0], 1, info
.GetIsolate())); | 7902 TONATIVE_VOID_INTERNAL(longArrayArg, toImplArray<int>(info[0], 1, info.G
etIsolate())); |
| 7903 } | 7903 } |
| 7904 impl->overloadedMethodD(longArrayArg); | 7904 impl->overloadedMethodD(longArrayArg); |
| 7905 } | 7905 } |
| 7906 | 7906 |
| 7907 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 7907 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 7908 { | 7908 { |
| 7909 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); | 7909 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); |
| 7910 switch (std::min(1, info.Length())) { | 7910 switch (std::min(1, info.Length())) { |
| 7911 case 1: | 7911 case 1: |
| 7912 if (info[0]->IsArray()) { | 7912 if (info[0]->IsArray()) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 7930 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7930 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 7931 { | 7931 { |
| 7932 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7932 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7933 TestObjectV8Internal::overloadedMethodDMethod(info); | 7933 TestObjectV8Internal::overloadedMethodDMethod(info); |
| 7934 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7934 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7935 } | 7935 } |
| 7936 | 7936 |
| 7937 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7937 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7938 { | 7938 { |
| 7939 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObject", info.Holder(), info.GetIsolate()); | 7939 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObject", info.Holder(), info.GetIsolate()); |
| 7940 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7940 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7941 int longArg; | 7941 int longArg; |
| 7942 { | 7942 { |
| 7943 v8::TryCatch block; | 7943 v8::TryCatch block; |
| 7944 V8RethrowTryCatchScope rethrow(block); | 7944 V8RethrowTryCatchScope rethrow(block); |
| 7945 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7945 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 7946 } | 7946 } |
| 7947 impl->overloadedMethodE(longArg); | 7947 impl->overloadedMethodE(longArg); |
| 7948 } | 7948 } |
| 7949 | 7949 |
| 7950 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7950 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7951 { | 7951 { |
| 7952 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7952 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7953 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; | 7953 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; |
| 7954 { | 7954 { |
| 7955 v8::TryCatch block; | 7955 v8::TryCatch block; |
| 7956 V8RethrowTryCatchScope rethrow(block); | 7956 V8RethrowTryCatchScope rethrow(block); |
| 7957 TONATIVE_VOID_INTERNAL(testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty
::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 7957 TONATIVE_VOID_INTERNAL(testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty
::toImplWithTypeCheck(info.GetIsolate(), info[0])); |
| 7958 } | 7958 } |
| 7959 impl->overloadedMethodE(testInterfaceEmptyOrNullArg); | 7959 impl->overloadedMethodE(testInterfaceEmptyOrNullArg); |
| 7960 } | 7960 } |
| 7961 | 7961 |
| 7962 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 7962 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 7963 { | 7963 { |
| 7964 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObject", info.Holder(), info.GetIsolate()); | 7964 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObject", info.Holder(), info.GetIsolate()); |
| 7965 switch (std::min(1, info.Length())) { | 7965 switch (std::min(1, info.Length())) { |
| 7966 case 1: | 7966 case 1: |
| 7967 if (isUndefinedOrNull(info[0])) { | 7967 if (isUndefinedOrNull(info[0])) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 7988 | 7988 |
| 7989 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7989 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 7990 { | 7990 { |
| 7991 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7991 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7992 TestObjectV8Internal::overloadedMethodEMethod(info); | 7992 TestObjectV8Internal::overloadedMethodEMethod(info); |
| 7993 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7993 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7994 } | 7994 } |
| 7995 | 7995 |
| 7996 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7996 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 7997 { | 7997 { |
| 7998 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7998 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7999 V8StringResource<> stringArg; | 7999 V8StringResource<> stringArg; |
| 8000 { | 8000 { |
| 8001 if (UNLIKELY(info.Length() <= 0)) { | 8001 if (UNLIKELY(info.Length() <= 0)) { |
| 8002 impl->overloadedMethodF(); | 8002 impl->overloadedMethodF(); |
| 8003 return; | 8003 return; |
| 8004 } | 8004 } |
| 8005 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 8005 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 8006 } | 8006 } |
| 8007 impl->overloadedMethodF(stringArg); | 8007 impl->overloadedMethodF(stringArg); |
| 8008 } | 8008 } |
| 8009 | 8009 |
| 8010 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8010 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8011 { | 8011 { |
| 8012 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8012 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8013 double doubleArg; | 8013 double doubleArg; |
| 8014 { | 8014 { |
| 8015 v8::TryCatch block; | 8015 v8::TryCatch block; |
| 8016 V8RethrowTryCatchScope rethrow(block); | 8016 V8RethrowTryCatchScope rethrow(block); |
| 8017 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); | 8017 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); |
| 8018 } | 8018 } |
| 8019 impl->overloadedMethodF(doubleArg); | 8019 impl->overloadedMethodF(doubleArg); |
| 8020 } | 8020 } |
| 8021 | 8021 |
| 8022 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 8022 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8059 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8059 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 8060 { | 8060 { |
| 8061 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8061 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8062 TestObjectV8Internal::overloadedMethodFMethod(info); | 8062 TestObjectV8Internal::overloadedMethodFMethod(info); |
| 8063 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8063 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8064 } | 8064 } |
| 8065 | 8065 |
| 8066 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8066 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8067 { | 8067 { |
| 8068 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodG", "TestObject", info.Holder(), info.GetIsolate()); | 8068 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodG", "TestObject", info.Holder(), info.GetIsolate()); |
| 8069 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8069 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8070 int longArg; | 8070 int longArg; |
| 8071 { | 8071 { |
| 8072 v8::TryCatch block; | 8072 v8::TryCatch block; |
| 8073 V8RethrowTryCatchScope rethrow(block); | 8073 V8RethrowTryCatchScope rethrow(block); |
| 8074 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 8074 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 8075 } | 8075 } |
| 8076 impl->overloadedMethodG(longArg); | 8076 impl->overloadedMethodG(longArg); |
| 8077 } | 8077 } |
| 8078 | 8078 |
| 8079 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8079 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8080 { | 8080 { |
| 8081 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8081 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8082 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; | 8082 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; |
| 8083 { | 8083 { |
| 8084 v8::TryCatch block; | 8084 v8::TryCatch block; |
| 8085 V8RethrowTryCatchScope rethrow(block); | 8085 V8RethrowTryCatchScope rethrow(block); |
| 8086 if (!info[0]->IsUndefined()) { | 8086 if (!info[0]->IsUndefined()) { |
| 8087 TONATIVE_VOID_INTERNAL(testInterfaceEmptyOrNullArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 8087 TONATIVE_VOID_INTERNAL(testInterfaceEmptyOrNullArg, V8TestInterfaceE
mpty::toImplWithTypeCheck(info.GetIsolate(), info[0])); |
| 8088 } else { | 8088 } else { |
| 8089 testInterfaceEmptyOrNullArg = nullptr; | 8089 testInterfaceEmptyOrNullArg = nullptr; |
| 8090 } | 8090 } |
| 8091 } | 8091 } |
| 8092 impl->overloadedMethodG(testInterfaceEmptyOrNullArg); | 8092 impl->overloadedMethodG(testInterfaceEmptyOrNullArg); |
| 8093 } | 8093 } |
| 8094 | 8094 |
| 8095 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 8095 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 8096 { | 8096 { |
| 8097 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodG", "TestObject", info.Holder(), info.GetIsolate()); | 8097 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodG", "TestObject", info.Holder(), info.GetIsolate()); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8131 | 8131 |
| 8132 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8132 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 8133 { | 8133 { |
| 8134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8135 TestObjectV8Internal::overloadedMethodGMethod(info); | 8135 TestObjectV8Internal::overloadedMethodGMethod(info); |
| 8136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8137 } | 8137 } |
| 8138 | 8138 |
| 8139 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8139 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8140 { | 8140 { |
| 8141 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8141 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8142 TestInterfaceImplementation* testInterfaceArg; | 8142 TestInterfaceImplementation* testInterfaceArg; |
| 8143 { | 8143 { |
| 8144 v8::TryCatch block; | 8144 v8::TryCatch block; |
| 8145 V8RethrowTryCatchScope rethrow(block); | 8145 V8RethrowTryCatchScope rethrow(block); |
| 8146 TONATIVE_VOID_INTERNAL(testInterfaceArg, V8TestInterface::toNativeWithTy
peCheck(info.GetIsolate(), info[0])); | 8146 TONATIVE_VOID_INTERNAL(testInterfaceArg, V8TestInterface::toImplWithType
Check(info.GetIsolate(), info[0])); |
| 8147 } | 8147 } |
| 8148 impl->overloadedMethodH(testInterfaceArg); | 8148 impl->overloadedMethodH(testInterfaceArg); |
| 8149 } | 8149 } |
| 8150 | 8150 |
| 8151 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8151 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8152 { | 8152 { |
| 8153 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8153 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8154 TestInterfaceEmpty* testInterfaceEmptyArg; | 8154 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 8155 { | 8155 { |
| 8156 v8::TryCatch block; | 8156 v8::TryCatch block; |
| 8157 V8RethrowTryCatchScope rethrow(block); | 8157 V8RethrowTryCatchScope rethrow(block); |
| 8158 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); | 8158 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); |
| 8159 } | 8159 } |
| 8160 impl->overloadedMethodH(testInterfaceEmptyArg); | 8160 impl->overloadedMethodH(testInterfaceEmptyArg); |
| 8161 } | 8161 } |
| 8162 | 8162 |
| 8163 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 8163 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 8164 { | 8164 { |
| 8165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodH", "TestObject", info.Holder(), info.GetIsolate()); | 8165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodH", "TestObject", info.Holder(), info.GetIsolate()); |
| 8166 switch (std::min(1, info.Length())) { | 8166 switch (std::min(1, info.Length())) { |
| 8167 case 1: | 8167 case 1: |
| 8168 if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) { | 8168 if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 8185 | 8185 |
| 8186 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8186 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 8187 { | 8187 { |
| 8188 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8188 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8189 TestObjectV8Internal::overloadedMethodHMethod(info); | 8189 TestObjectV8Internal::overloadedMethodHMethod(info); |
| 8190 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8190 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8191 } | 8191 } |
| 8192 | 8192 |
| 8193 static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8193 static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8194 { | 8194 { |
| 8195 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8195 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8196 V8StringResource<> stringArg; | 8196 V8StringResource<> stringArg; |
| 8197 { | 8197 { |
| 8198 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 8198 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 8199 } | 8199 } |
| 8200 impl->overloadedMethodI(stringArg); | 8200 impl->overloadedMethodI(stringArg); |
| 8201 } | 8201 } |
| 8202 | 8202 |
| 8203 static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8203 static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8204 { | 8204 { |
| 8205 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8205 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8206 double doubleArg; | 8206 double doubleArg; |
| 8207 { | 8207 { |
| 8208 v8::TryCatch block; | 8208 v8::TryCatch block; |
| 8209 V8RethrowTryCatchScope rethrow(block); | 8209 V8RethrowTryCatchScope rethrow(block); |
| 8210 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); | 8210 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); |
| 8211 } | 8211 } |
| 8212 impl->overloadedMethodI(doubleArg); | 8212 impl->overloadedMethodI(doubleArg); |
| 8213 } | 8213 } |
| 8214 | 8214 |
| 8215 static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 8215 static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 8241 | 8241 |
| 8242 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8242 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 8243 { | 8243 { |
| 8244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8245 TestObjectV8Internal::overloadedMethodIMethod(info); | 8245 TestObjectV8Internal::overloadedMethodIMethod(info); |
| 8246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8247 } | 8247 } |
| 8248 | 8248 |
| 8249 static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8249 static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8250 { | 8250 { |
| 8251 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8251 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8252 V8StringResource<> stringArg; | 8252 V8StringResource<> stringArg; |
| 8253 { | 8253 { |
| 8254 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 8254 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 8255 } | 8255 } |
| 8256 impl->overloadedMethodJ(stringArg); | 8256 impl->overloadedMethodJ(stringArg); |
| 8257 } | 8257 } |
| 8258 | 8258 |
| 8259 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8259 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8260 { | 8260 { |
| 8261 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8261 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8262 TestDictionary* testDictionaryArg; | 8262 TestDictionary* testDictionaryArg; |
| 8263 { | 8263 { |
| 8264 v8::TryCatch block; | 8264 v8::TryCatch block; |
| 8265 V8RethrowTryCatchScope rethrow(block); | 8265 V8RethrowTryCatchScope rethrow(block); |
| 8266 if (!info[0]->IsUndefined()) { | 8266 if (!info[0]->IsUndefined()) { |
| 8267 TONATIVE_VOID_INTERNAL(testDictionaryArg, V8TestDictionary::toNative
(info.GetIsolate(), info[0])); | 8267 TONATIVE_VOID_INTERNAL(testDictionaryArg, V8TestDictionary::toImpl(i
nfo.GetIsolate(), info[0])); |
| 8268 } else { | 8268 } else { |
| 8269 testDictionaryArg = TestDictionary::create(); | 8269 testDictionaryArg = TestDictionary::create(); |
| 8270 } | 8270 } |
| 8271 } | 8271 } |
| 8272 impl->overloadedMethodJ(testDictionaryArg); | 8272 impl->overloadedMethodJ(testDictionaryArg); |
| 8273 } | 8273 } |
| 8274 | 8274 |
| 8275 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 8275 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 8276 { | 8276 { |
| 8277 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodJ", "TestObject", info.Holder(), info.GetIsolate()); | 8277 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodJ", "TestObject", info.Holder(), info.GetIsolate()); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 8297 | 8297 |
| 8298 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8298 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 8299 { | 8299 { |
| 8300 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8300 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8301 TestObjectV8Internal::overloadedMethodJMethod(info); | 8301 TestObjectV8Internal::overloadedMethodJMethod(info); |
| 8302 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8302 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8303 } | 8303 } |
| 8304 | 8304 |
| 8305 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 8305 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 8306 { | 8306 { |
| 8307 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8307 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8308 impl->overloadedPerWorldBindingsMethod(); | 8308 impl->overloadedPerWorldBindingsMethod(); |
| 8309 } | 8309 } |
| 8310 | 8310 |
| 8311 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::Functi
onCallbackInfo<v8::Value>& info) | 8311 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 8312 { | 8312 { |
| 8313 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8313 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8314 impl->overloadedPerWorldBindingsMethod(); | 8314 impl->overloadedPerWorldBindingsMethod(); |
| 8315 } | 8315 } |
| 8316 | 8316 |
| 8317 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 8317 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 8318 { | 8318 { |
| 8319 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8319 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 8320 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8320 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8321 int longArg; | 8321 int longArg; |
| 8322 { | 8322 { |
| 8323 v8::TryCatch block; | 8323 v8::TryCatch block; |
| 8324 V8RethrowTryCatchScope rethrow(block); | 8324 V8RethrowTryCatchScope rethrow(block); |
| 8325 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 8325 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 8326 } | 8326 } |
| 8327 impl->overloadedPerWorldBindingsMethod(longArg); | 8327 impl->overloadedPerWorldBindingsMethod(longArg); |
| 8328 } | 8328 } |
| 8329 | 8329 |
| 8330 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | 8330 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 8355 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 8355 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 8356 { | 8356 { |
| 8357 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8357 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8358 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info); | 8358 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info); |
| 8359 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8359 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8360 } | 8360 } |
| 8361 | 8361 |
| 8362 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::Functi
onCallbackInfo<v8::Value>& info) | 8362 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 8363 { | 8363 { |
| 8364 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8364 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 8365 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8365 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8366 int longArg; | 8366 int longArg; |
| 8367 { | 8367 { |
| 8368 v8::TryCatch block; | 8368 v8::TryCatch block; |
| 8369 V8RethrowTryCatchScope rethrow(block); | 8369 V8RethrowTryCatchScope rethrow(block); |
| 8370 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 8370 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 8371 } | 8371 } |
| 8372 impl->overloadedPerWorldBindingsMethod(longArg); | 8372 impl->overloadedPerWorldBindingsMethod(longArg); |
| 8373 } | 8373 } |
| 8374 | 8374 |
| 8375 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio
nCallbackInfo<v8::Value>& info) | 8375 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8463 } | 8463 } |
| 8464 | 8464 |
| 8465 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 8465 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 8466 { | 8466 { |
| 8467 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); | 8467 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 8468 if (UNLIKELY(info.Length() < 1)) { | 8468 if (UNLIKELY(info.Length() < 1)) { |
| 8469 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 8469 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 8470 exceptionState.throwIfNeeded(); | 8470 exceptionState.throwIfNeeded(); |
| 8471 return; | 8471 return; |
| 8472 } | 8472 } |
| 8473 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8473 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8474 unsigned clampUnsignedShortArg = 0; | 8474 unsigned clampUnsignedShortArg = 0; |
| 8475 { | 8475 { |
| 8476 v8::TryCatch block; | 8476 v8::TryCatch block; |
| 8477 V8RethrowTryCatchScope rethrow(block); | 8477 V8RethrowTryCatchScope rethrow(block); |
| 8478 double clampUnsignedShortArgNativeValue; | 8478 double clampUnsignedShortArgNativeValue; |
| 8479 TONATIVE_VOID_INTERNAL(clampUnsignedShortArgNativeValue, info[0]->Number
Value()); | 8479 TONATIVE_VOID_INTERNAL(clampUnsignedShortArgNativeValue, info[0]->Number
Value()); |
| 8480 if (!std::isnan(clampUnsignedShortArgNativeValue)) | 8480 if (!std::isnan(clampUnsignedShortArgNativeValue)) |
| 8481 clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortAr
gNativeValue); | 8481 clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortAr
gNativeValue); |
| 8482 } | 8482 } |
| 8483 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); | 8483 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); |
| 8484 } | 8484 } |
| 8485 | 8485 |
| 8486 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 8486 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 8487 { | 8487 { |
| 8488 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8488 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8489 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info); | 8489 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info); |
| 8490 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8490 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8491 } | 8491 } |
| 8492 | 8492 |
| 8493 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 8493 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 8494 { | 8494 { |
| 8495 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 8495 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 8496 if (UNLIKELY(info.Length() < 1)) { | 8496 if (UNLIKELY(info.Length() < 1)) { |
| 8497 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 8497 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 8498 exceptionState.throwIfNeeded(); | 8498 exceptionState.throwIfNeeded(); |
| 8499 return; | 8499 return; |
| 8500 } | 8500 } |
| 8501 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8501 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8502 unsigned clampUnsignedLongArg = 0; | 8502 unsigned clampUnsignedLongArg = 0; |
| 8503 { | 8503 { |
| 8504 v8::TryCatch block; | 8504 v8::TryCatch block; |
| 8505 V8RethrowTryCatchScope rethrow(block); | 8505 V8RethrowTryCatchScope rethrow(block); |
| 8506 double clampUnsignedLongArgNativeValue; | 8506 double clampUnsignedLongArgNativeValue; |
| 8507 TONATIVE_VOID_INTERNAL(clampUnsignedLongArgNativeValue, info[0]->NumberV
alue()); | 8507 TONATIVE_VOID_INTERNAL(clampUnsignedLongArgNativeValue, info[0]->NumberV
alue()); |
| 8508 if (!std::isnan(clampUnsignedLongArgNativeValue)) | 8508 if (!std::isnan(clampUnsignedLongArgNativeValue)) |
| 8509 clampUnsignedLongArg = clampTo<unsigned long>(clampUnsignedLongArgNa
tiveValue); | 8509 clampUnsignedLongArg = clampTo<unsigned long>(clampUnsignedLongArgNa
tiveValue); |
| 8510 } | 8510 } |
| 8511 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); | 8511 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); |
| 8512 } | 8512 } |
| 8513 | 8513 |
| 8514 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 8514 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 8515 { | 8515 { |
| 8516 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8516 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8517 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info); | 8517 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info); |
| 8518 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8518 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8519 } | 8519 } |
| 8520 | 8520 |
| 8521 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | 8521 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 8522 { | 8522 { |
| 8523 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8523 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8524 TestInterfaceEmpty* defaultUndefinedTestInterfaceEmptyArg; | 8524 TestInterfaceEmpty* defaultUndefinedTestInterfaceEmptyArg; |
| 8525 { | 8525 { |
| 8526 v8::TryCatch block; | 8526 v8::TryCatch block; |
| 8527 V8RethrowTryCatchScope rethrow(block); | 8527 V8RethrowTryCatchScope rethrow(block); |
| 8528 TONATIVE_VOID_INTERNAL(defaultUndefinedTestInterfaceEmptyArg, V8TestInte
rfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 8528 TONATIVE_VOID_INTERNAL(defaultUndefinedTestInterfaceEmptyArg, V8TestInte
rfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0])); |
| 8529 } | 8529 } |
| 8530 impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestIn
terfaceEmptyArg); | 8530 impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestIn
terfaceEmptyArg); |
| 8531 } | 8531 } |
| 8532 | 8532 |
| 8533 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 8533 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 8534 { | 8534 { |
| 8535 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8535 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8536 TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(
info); | 8536 TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(
info); |
| 8537 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8537 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8538 } | 8538 } |
| 8539 | 8539 |
| 8540 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 8540 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 8541 { | 8541 { |
| 8542 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultUndefinedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 8542 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultUndefinedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 8543 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8543 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8544 int defaultUndefinedLongArg; | 8544 int defaultUndefinedLongArg; |
| 8545 { | 8545 { |
| 8546 v8::TryCatch block; | 8546 v8::TryCatch block; |
| 8547 V8RethrowTryCatchScope rethrow(block); | 8547 V8RethrowTryCatchScope rethrow(block); |
| 8548 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedLongArg, toInt32(i
nfo[0], exceptionState), exceptionState); | 8548 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedLongArg, toInt32(i
nfo[0], exceptionState), exceptionState); |
| 8549 } | 8549 } |
| 8550 impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); | 8550 impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); |
| 8551 } | 8551 } |
| 8552 | 8552 |
| 8553 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 8553 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
| 8554 { | 8554 { |
| 8555 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8555 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8556 TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info); | 8556 TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info); |
| 8557 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8557 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8558 } | 8558 } |
| 8559 | 8559 |
| 8560 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 8560 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
| 8561 { | 8561 { |
| 8562 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8562 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8563 V8StringResource<> defaultUndefinedStringArg; | 8563 V8StringResource<> defaultUndefinedStringArg; |
| 8564 { | 8564 { |
| 8565 TOSTRING_VOID_INTERNAL(defaultUndefinedStringArg, info[0]); | 8565 TOSTRING_VOID_INTERNAL(defaultUndefinedStringArg, info[0]); |
| 8566 } | 8566 } |
| 8567 impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg); | 8567 impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg); |
| 8568 } | 8568 } |
| 8569 | 8569 |
| 8570 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 8570 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
| 8571 { | 8571 { |
| 8572 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8572 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8573 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info); | 8573 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info); |
| 8574 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8574 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8575 } | 8575 } |
| 8576 | 8576 |
| 8577 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | 8577 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 8578 { | 8578 { |
| 8579 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE
nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 8579 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE
nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 8580 if (UNLIKELY(info.Length() < 1)) { | 8580 if (UNLIKELY(info.Length() < 1)) { |
| 8581 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 8581 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 8582 exceptionState.throwIfNeeded(); | 8582 exceptionState.throwIfNeeded(); |
| 8583 return; | 8583 return; |
| 8584 } | 8584 } |
| 8585 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8585 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8586 int enforceRangeLongArg; | 8586 int enforceRangeLongArg; |
| 8587 { | 8587 { |
| 8588 v8::TryCatch block; | 8588 v8::TryCatch block; |
| 8589 V8RethrowTryCatchScope rethrow(block); | 8589 V8RethrowTryCatchScope rethrow(block); |
| 8590 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(enforceRangeLongArg, toInt32(info[
0], EnforceRange, exceptionState), exceptionState); | 8590 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(enforceRangeLongArg, toInt32(info[
0], EnforceRange, exceptionState), exceptionState); |
| 8591 } | 8591 } |
| 8592 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg); | 8592 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg); |
| 8593 } | 8593 } |
| 8594 | 8594 |
| 8595 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 8595 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 8596 { | 8596 { |
| 8597 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8597 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8598 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info); | 8598 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info); |
| 8599 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8599 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8600 } | 8600 } |
| 8601 | 8601 |
| 8602 static void voidMethodTreatNullAsEmptyStringStringArgMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 8602 static void voidMethodTreatNullAsEmptyStringStringArgMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
| 8603 { | 8603 { |
| 8604 if (UNLIKELY(info.Length() < 1)) { | 8604 if (UNLIKELY(info.Length() < 1)) { |
| 8605 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTreatNullAsEmptyStringStringArg", "TestObject", 1, info.Length(), info.
GetIsolate()), info.GetIsolate()); | 8605 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTreatNullAsEmptyStringStringArg", "TestObject", 1, info.Length(), info.
GetIsolate()), info.GetIsolate()); |
| 8606 return; | 8606 return; |
| 8607 } | 8607 } |
| 8608 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8608 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8609 V8StringResource<TreatNullAsEmptyString> treatNullAsEmptyStringStringArg; | 8609 V8StringResource<TreatNullAsEmptyString> treatNullAsEmptyStringStringArg; |
| 8610 { | 8610 { |
| 8611 TOSTRING_VOID_INTERNAL(treatNullAsEmptyStringStringArg, info[0]); | 8611 TOSTRING_VOID_INTERNAL(treatNullAsEmptyStringStringArg, info[0]); |
| 8612 } | 8612 } |
| 8613 impl->voidMethodTreatNullAsEmptyStringStringArg(treatNullAsEmptyStringString
Arg); | 8613 impl->voidMethodTreatNullAsEmptyStringStringArg(treatNullAsEmptyStringString
Arg); |
| 8614 } | 8614 } |
| 8615 | 8615 |
| 8616 static void voidMethodTreatNullAsEmptyStringStringArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 8616 static void voidMethodTreatNullAsEmptyStringStringArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
| 8617 { | 8617 { |
| 8618 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8618 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8619 TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethod(info); | 8619 TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethod(info); |
| 8620 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8620 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8621 } | 8621 } |
| 8622 | 8622 |
| 8623 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 8623 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 8624 { | 8624 { |
| 8625 if (UNLIKELY(info.Length() < 1)) { | 8625 if (UNLIKELY(info.Length() < 1)) { |
| 8626 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTreatNullAsNullStringStringArg", "TestObject", 1, info.Length(), info.G
etIsolate()), info.GetIsolate()); | 8626 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTreatNullAsNullStringStringArg", "TestObject", 1, info.Length(), info.G
etIsolate()), info.GetIsolate()); |
| 8627 return; | 8627 return; |
| 8628 } | 8628 } |
| 8629 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8629 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8630 V8StringResource<TreatNullAsNullString> treatNullAsNullStringStringArg; | 8630 V8StringResource<TreatNullAsNullString> treatNullAsNullStringStringArg; |
| 8631 { | 8631 { |
| 8632 TOSTRING_VOID_INTERNAL(treatNullAsNullStringStringArg, info[0]); | 8632 TOSTRING_VOID_INTERNAL(treatNullAsNullStringStringArg, info[0]); |
| 8633 } | 8633 } |
| 8634 impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringAr
g); | 8634 impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringAr
g); |
| 8635 } | 8635 } |
| 8636 | 8636 |
| 8637 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 8637 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 8638 { | 8638 { |
| 8639 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8639 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8640 TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info); | 8640 TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info); |
| 8641 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8641 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8642 } | 8642 } |
| 8643 | 8643 |
| 8644 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe
thod(const v8::FunctionCallbackInfo<v8::Value>& info) | 8644 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe
thod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 8645 { | 8645 { |
| 8646 if (UNLIKELY(info.Length() < 1)) { | 8646 if (UNLIKELY(info.Length() < 1)) { |
| 8647 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", "TestObject"
, 1, info.Length(), info.GetIsolate()), info.GetIsolate()); | 8647 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", "TestObject"
, 1, info.Length(), info.GetIsolate()), info.GetIsolate()); |
| 8648 return; | 8648 return; |
| 8649 } | 8649 } |
| 8650 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8650 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8651 V8StringResource<TreatNullAndUndefinedAsNullString> treatNullAsNullStringStr
ingArg; | 8651 V8StringResource<TreatNullAndUndefinedAsNullString> treatNullAsNullStringStr
ingArg; |
| 8652 { | 8652 { |
| 8653 TOSTRING_VOID_INTERNAL(treatNullAsNullStringStringArg, info[0]); | 8653 TOSTRING_VOID_INTERNAL(treatNullAsNullStringStringArg, info[0]); |
| 8654 } | 8654 } |
| 8655 impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(tre
atNullAsNullStringStringArg); | 8655 impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(tre
atNullAsNullStringStringArg); |
| 8656 } | 8656 } |
| 8657 | 8657 |
| 8658 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe
thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 8658 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe
thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 8659 { | 8659 { |
| 8660 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8660 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8661 TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStr
ingStringArgMethod(info); | 8661 TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStr
ingStringArgMethod(info); |
| 8662 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8662 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8663 } | 8663 } |
| 8664 | 8664 |
| 8665 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 8665 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 8666 { | 8666 { |
| 8667 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8667 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8668 impl->activityLoggingAccessForAllWorldsMethod(); | 8668 impl->activityLoggingAccessForAllWorldsMethod(); |
| 8669 } | 8669 } |
| 8670 | 8670 |
| 8671 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 8671 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 8672 { | 8672 { |
| 8673 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8673 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8674 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 8674 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 8675 V8PerContextData* contextData = scriptState->perContextData(); | 8675 V8PerContextData* contextData = scriptState->perContextData(); |
| 8676 if (contextData && contextData->activityLogger()) { | 8676 if (contextData && contextData->activityLogger()) { |
| 8677 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 8677 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0); |
| 8678 contextData->activityLogger()->logMethod("TestObject.activityLoggingAcce
ssForAllWorldsMethod", info.Length(), loggerArgs.data()); | 8678 contextData->activityLogger()->logMethod("TestObject.activityLoggingAcce
ssForAllWorldsMethod", info.Length(), loggerArgs.data()); |
| 8679 } | 8679 } |
| 8680 TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info); | 8680 TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info); |
| 8681 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8681 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8682 } | 8682 } |
| 8683 | 8683 |
| 8684 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 8684 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 8685 { | 8685 { |
| 8686 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8686 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8687 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 8687 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 8688 impl->callWithExecutionContextVoidMethod(executionContext); | 8688 impl->callWithExecutionContextVoidMethod(executionContext); |
| 8689 } | 8689 } |
| 8690 | 8690 |
| 8691 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 8691 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 8692 { | 8692 { |
| 8693 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8693 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8694 TestObjectV8Internal::callWithExecutionContextVoidMethodMethod(info); | 8694 TestObjectV8Internal::callWithExecutionContextVoidMethodMethod(info); |
| 8695 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8695 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8696 } | 8696 } |
| 8697 | 8697 |
| 8698 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | 8698 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 8699 { | 8699 { |
| 8700 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8700 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8701 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 8701 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 8702 impl->callWithScriptStateVoidMethod(scriptState); | 8702 impl->callWithScriptStateVoidMethod(scriptState); |
| 8703 } | 8703 } |
| 8704 | 8704 |
| 8705 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 8705 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 8706 { | 8706 { |
| 8707 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8707 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8708 TestObjectV8Internal::callWithScriptStateVoidMethodMethod(info); | 8708 TestObjectV8Internal::callWithScriptStateVoidMethodMethod(info); |
| 8709 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8709 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8710 } | 8710 } |
| 8711 | 8711 |
| 8712 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | 8712 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 8713 { | 8713 { |
| 8714 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8714 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8715 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 8715 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 8716 int result = impl->callWithScriptStateLongMethod(scriptState); | 8716 int result = impl->callWithScriptStateLongMethod(scriptState); |
| 8717 v8SetReturnValueInt(info, result); | 8717 v8SetReturnValueInt(info, result); |
| 8718 } | 8718 } |
| 8719 | 8719 |
| 8720 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 8720 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 8721 { | 8721 { |
| 8722 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8722 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8723 TestObjectV8Internal::callWithScriptStateLongMethodMethod(info); | 8723 TestObjectV8Internal::callWithScriptStateLongMethodMethod(info); |
| 8724 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8724 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8725 } | 8725 } |
| 8726 | 8726 |
| 8727 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | 8727 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 8728 { | 8728 { |
| 8729 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8729 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8730 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 8730 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 8731 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 8731 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 8732 impl->callWithScriptStateExecutionContextVoidMethod(scriptState, executionCo
ntext); | 8732 impl->callWithScriptStateExecutionContextVoidMethod(scriptState, executionCo
ntext); |
| 8733 } | 8733 } |
| 8734 | 8734 |
| 8735 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 8735 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) |
| 8736 { | 8736 { |
| 8737 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8737 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8738 TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(in
fo); | 8738 TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(in
fo); |
| 8739 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8739 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8740 } | 8740 } |
| 8741 | 8741 |
| 8742 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) | 8742 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 8743 { | 8743 { |
| 8744 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8744 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8745 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 8745 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 8746 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArguments(sc
riptState, info, 0)); | 8746 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArguments(sc
riptState, info, 0)); |
| 8747 impl->callWithScriptStateScriptArgumentsVoidMethod(scriptState, scriptArgume
nts.release()); | 8747 impl->callWithScriptStateScriptArgumentsVoidMethod(scriptState, scriptArgume
nts.release()); |
| 8748 } | 8748 } |
| 8749 | 8749 |
| 8750 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 8750 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 8751 { | 8751 { |
| 8752 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8752 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8753 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(inf
o); | 8753 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(inf
o); |
| 8754 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8754 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8755 } | 8755 } |
| 8756 | 8756 |
| 8757 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
(const v8::FunctionCallbackInfo<v8::Value>& info) | 8757 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 8758 { | 8758 { |
| 8759 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8759 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8760 bool optionalBooleanArg; | 8760 bool optionalBooleanArg; |
| 8761 { | 8761 { |
| 8762 v8::TryCatch block; | 8762 v8::TryCatch block; |
| 8763 V8RethrowTryCatchScope rethrow(block); | 8763 V8RethrowTryCatchScope rethrow(block); |
| 8764 if (UNLIKELY(info.Length() <= 0)) { | 8764 if (UNLIKELY(info.Length() <= 0)) { |
| 8765 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 8765 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 8766 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArgu
ments(scriptState, info, 1)); | 8766 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArgu
ments(scriptState, info, 1)); |
| 8767 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg
(scriptState, scriptArguments.release()); | 8767 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg
(scriptState, scriptArguments.release()); |
| 8768 return; | 8768 return; |
| 8769 } | 8769 } |
| 8770 TONATIVE_VOID_INTERNAL(optionalBooleanArg, info[0]->BooleanValue()); | 8770 TONATIVE_VOID_INTERNAL(optionalBooleanArg, info[0]->BooleanValue()); |
| 8771 } | 8771 } |
| 8772 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 8772 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 8773 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArguments(sc
riptState, info, 1)); | 8773 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArguments(sc
riptState, info, 1)); |
| 8774 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS
tate, scriptArguments.release(), optionalBooleanArg); | 8774 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS
tate, scriptArguments.release(), optionalBooleanArg); |
| 8775 } | 8775 } |
| 8776 | 8776 |
| 8777 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
Callback(const v8::FunctionCallbackInfo<v8::Value>& info) | 8777 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
Callback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 8778 { | 8778 { |
| 8779 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8779 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8780 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo
oleanArgMethod(info); | 8780 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo
oleanArgMethod(info); |
| 8781 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8781 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8782 } | 8782 } |
| 8783 | 8783 |
| 8784 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 8784 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 8785 { | 8785 { |
| 8786 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8786 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8787 impl->callWithActiveWindow(callingDOMWindow(info.GetIsolate())); | 8787 impl->callWithActiveWindow(callingDOMWindow(info.GetIsolate())); |
| 8788 } | 8788 } |
| 8789 | 8789 |
| 8790 static void callWithActiveWindowMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 8790 static void callWithActiveWindowMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 8791 { | 8791 { |
| 8792 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8792 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8793 TestObjectV8Internal::callWithActiveWindowMethod(info); | 8793 TestObjectV8Internal::callWithActiveWindowMethod(info); |
| 8794 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8794 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8795 } | 8795 } |
| 8796 | 8796 |
| 8797 static void callWithActiveWindowScriptWindowMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | 8797 static void callWithActiveWindowScriptWindowMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 8798 { | 8798 { |
| 8799 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8799 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8800 impl->callWithActiveWindowScriptWindow(callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate())); | 8800 impl->callWithActiveWindowScriptWindow(callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate())); |
| 8801 } | 8801 } |
| 8802 | 8802 |
| 8803 static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 8803 static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 8804 { | 8804 { |
| 8805 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8805 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8806 TestObjectV8Internal::callWithActiveWindowScriptWindowMethod(info); | 8806 TestObjectV8Internal::callWithActiveWindowScriptWindowMethod(info); |
| 8807 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8807 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8808 } | 8808 } |
| 8809 | 8809 |
| 8810 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 8810 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 8811 { | 8811 { |
| 8812 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8812 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8813 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check
SecurityForNodeVoidMethod(exceptionState), exceptionState)) { | 8813 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check
SecurityForNodeVoidMethod(exceptionState), exceptionState)) { |
| 8814 v8SetReturnValueNull(info); | 8814 v8SetReturnValueNull(info); |
| 8815 exceptionState.throwIfNeeded(); | 8815 exceptionState.throwIfNeeded(); |
| 8816 return; | 8816 return; |
| 8817 } | 8817 } |
| 8818 impl->checkSecurityForNodeVoidMethod(); | 8818 impl->checkSecurityForNodeVoidMethod(); |
| 8819 } | 8819 } |
| 8820 | 8820 |
| 8821 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 8821 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 8822 { | 8822 { |
| 8823 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8823 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8824 TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info); | 8824 TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info); |
| 8825 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8825 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8826 } | 8826 } |
| 8827 | 8827 |
| 8828 #if ENABLE(CONDITION) | 8828 #if ENABLE(CONDITION) |
| 8829 static void conditionalConditionVoidMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 8829 static void conditionalConditionVoidMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 8830 { | 8830 { |
| 8831 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8831 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8832 impl->conditionalConditionVoidMethod(); | 8832 impl->conditionalConditionVoidMethod(); |
| 8833 } | 8833 } |
| 8834 #endif // ENABLE(CONDITION) | 8834 #endif // ENABLE(CONDITION) |
| 8835 | 8835 |
| 8836 #if ENABLE(CONDITION) | 8836 #if ENABLE(CONDITION) |
| 8837 static void conditionalConditionVoidMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 8837 static void conditionalConditionVoidMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 8838 { | 8838 { |
| 8839 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8839 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8840 TestObjectV8Internal::conditionalConditionVoidMethodMethod(info); | 8840 TestObjectV8Internal::conditionalConditionVoidMethodMethod(info); |
| 8841 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8841 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 8869 static void conditionalConditionCustomVoidMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 8869 static void conditionalConditionCustomVoidMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 8870 { | 8870 { |
| 8871 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8871 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8872 V8TestObject::conditionalConditionCustomVoidMethodMethodCustom(info); | 8872 V8TestObject::conditionalConditionCustomVoidMethodMethodCustom(info); |
| 8873 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8873 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8874 } | 8874 } |
| 8875 #endif // ENABLE(CONDITION) | 8875 #endif // ENABLE(CONDITION) |
| 8876 | 8876 |
| 8877 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | 8877 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 8878 { | 8878 { |
| 8879 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8879 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8880 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 8880 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 8881 impl->customElementCallbacksVoidMethod(); | 8881 impl->customElementCallbacksVoidMethod(); |
| 8882 } | 8882 } |
| 8883 | 8883 |
| 8884 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 8884 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 8885 { | 8885 { |
| 8886 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8886 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8887 TestObjectV8Internal::customElementCallbacksVoidMethodMethod(info); | 8887 TestObjectV8Internal::customElementCallbacksVoidMethodMethod(info); |
| 8888 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8888 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8889 } | 8889 } |
| 8890 | 8890 |
| 8891 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 8891 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 8892 { | 8892 { |
| 8893 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8893 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8894 impl->deprecatedVoidMethod(); | 8894 impl->deprecatedVoidMethod(); |
| 8895 } | 8895 } |
| 8896 | 8896 |
| 8897 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 8897 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 8898 { | 8898 { |
| 8899 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8899 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8900 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::voidMethod); | 8900 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::voidMethod); |
| 8901 TestObjectV8Internal::deprecatedVoidMethodMethod(info); | 8901 TestObjectV8Internal::deprecatedVoidMethodMethod(info); |
| 8902 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8902 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8903 } | 8903 } |
| 8904 | 8904 |
| 8905 static void doNotCheckSignatureVoidMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | 8905 static void doNotCheckSignatureVoidMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 8906 { | 8906 { |
| 8907 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8907 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8908 impl->doNotCheckSignatureVoidMethod(); | 8908 impl->doNotCheckSignatureVoidMethod(); |
| 8909 } | 8909 } |
| 8910 | 8910 |
| 8911 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 8911 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 8912 { | 8912 { |
| 8913 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8913 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8914 TestObjectV8Internal::doNotCheckSignatureVoidMethodMethod(info); | 8914 TestObjectV8Internal::doNotCheckSignatureVoidMethodMethod(info); |
| 8915 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8915 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8916 } | 8916 } |
| 8917 | 8917 |
| 8918 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 8918 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 8919 { | 8919 { |
| 8920 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8920 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8921 impl->implementedAsMethodName(); | 8921 impl->implementedAsMethodName(); |
| 8922 } | 8922 } |
| 8923 | 8923 |
| 8924 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 8924 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 8925 { | 8925 { |
| 8926 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8926 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8927 TestObjectV8Internal::implementedAsVoidMethodMethod(info); | 8927 TestObjectV8Internal::implementedAsVoidMethodMethod(info); |
| 8928 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8928 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8929 } | 8929 } |
| 8930 | 8930 |
| 8931 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8931 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8932 { | 8932 { |
| 8933 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8933 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8934 impl->measureAsVoidMethod(); | 8934 impl->measureAsVoidMethod(); |
| 8935 } | 8935 } |
| 8936 | 8936 |
| 8937 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 8937 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 8938 { | 8938 { |
| 8939 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8939 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8940 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 8940 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
| 8941 TestObjectV8Internal::measureAsVoidMethodMethod(info); | 8941 TestObjectV8Internal::measureAsVoidMethodMethod(info); |
| 8942 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8942 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8943 } | 8943 } |
| 8944 | 8944 |
| 8945 static void DeprecateAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8
::Value>& info) | 8945 static void DeprecateAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 8946 { | 8946 { |
| 8947 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8947 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8948 impl->DeprecateAsOverloadedMethod(); | 8948 impl->DeprecateAsOverloadedMethod(); |
| 8949 } | 8949 } |
| 8950 | 8950 |
| 8951 static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8
::Value>& info) | 8951 static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 8952 { | 8952 { |
| 8953 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
OverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8953 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
OverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 8954 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8954 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8955 int arg; | 8955 int arg; |
| 8956 { | 8956 { |
| 8957 v8::TryCatch block; | 8957 v8::TryCatch block; |
| 8958 V8RethrowTryCatchScope rethrow(block); | 8958 V8RethrowTryCatchScope rethrow(block); |
| 8959 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | 8959 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); |
| 8960 } | 8960 } |
| 8961 impl->DeprecateAsOverloadedMethod(arg); | 8961 impl->DeprecateAsOverloadedMethod(arg); |
| 8962 } | 8962 } |
| 8963 | 8963 |
| 8964 static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 8964 static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 8990 | 8990 |
| 8991 static void DeprecateAsOverloadedMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 8991 static void DeprecateAsOverloadedMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 8992 { | 8992 { |
| 8993 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8993 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8994 TestObjectV8Internal::DeprecateAsOverloadedMethodMethod(info); | 8994 TestObjectV8Internal::DeprecateAsOverloadedMethodMethod(info); |
| 8995 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8995 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8996 } | 8996 } |
| 8997 | 8997 |
| 8998 static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 8998 static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 8999 { | 8999 { |
| 9000 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9000 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9001 impl->DeprecateAsSameValueOverloadedMethod(); | 9001 impl->DeprecateAsSameValueOverloadedMethod(); |
| 9002 } | 9002 } |
| 9003 | 9003 |
| 9004 static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 9004 static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 9005 { | 9005 { |
| 9006 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
SameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9006 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs
SameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 9007 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9007 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9008 int arg; | 9008 int arg; |
| 9009 { | 9009 { |
| 9010 v8::TryCatch block; | 9010 v8::TryCatch block; |
| 9011 V8RethrowTryCatchScope rethrow(block); | 9011 V8RethrowTryCatchScope rethrow(block); |
| 9012 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | 9012 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); |
| 9013 } | 9013 } |
| 9014 impl->DeprecateAsSameValueOverloadedMethod(arg); | 9014 impl->DeprecateAsSameValueOverloadedMethod(arg); |
| 9015 } | 9015 } |
| 9016 | 9016 |
| 9017 static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 9017 static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 9042 | 9042 |
| 9043 static void DeprecateAsSameValueOverloadedMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 9043 static void DeprecateAsSameValueOverloadedMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 9044 { | 9044 { |
| 9045 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9045 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9046 TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethod(info); | 9046 TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethod(info); |
| 9047 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9047 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9048 } | 9048 } |
| 9049 | 9049 |
| 9050 static void measureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 9050 static void measureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 9051 { | 9051 { |
| 9052 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9052 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9053 impl->measureAsOverloadedMethod(); | 9053 impl->measureAsOverloadedMethod(); |
| 9054 } | 9054 } |
| 9055 | 9055 |
| 9056 static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 9056 static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 9057 { | 9057 { |
| 9058 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOv
erloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9058 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOv
erloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 9059 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9059 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9060 int arg; | 9060 int arg; |
| 9061 { | 9061 { |
| 9062 v8::TryCatch block; | 9062 v8::TryCatch block; |
| 9063 V8RethrowTryCatchScope rethrow(block); | 9063 V8RethrowTryCatchScope rethrow(block); |
| 9064 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | 9064 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); |
| 9065 } | 9065 } |
| 9066 impl->measureAsOverloadedMethod(arg); | 9066 impl->measureAsOverloadedMethod(arg); |
| 9067 } | 9067 } |
| 9068 | 9068 |
| 9069 static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 9069 static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 9095 | 9095 |
| 9096 static void measureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 9096 static void measureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 9097 { | 9097 { |
| 9098 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9098 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9099 TestObjectV8Internal::measureAsOverloadedMethodMethod(info); | 9099 TestObjectV8Internal::measureAsOverloadedMethodMethod(info); |
| 9100 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9100 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9101 } | 9101 } |
| 9102 | 9102 |
| 9103 static void measureAsSameValueOverloadedMethod1Method(const v8::FunctionCallback
Info<v8::Value>& info) | 9103 static void measureAsSameValueOverloadedMethod1Method(const v8::FunctionCallback
Info<v8::Value>& info) |
| 9104 { | 9104 { |
| 9105 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9105 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9106 impl->measureAsSameValueOverloadedMethod(); | 9106 impl->measureAsSameValueOverloadedMethod(); |
| 9107 } | 9107 } |
| 9108 | 9108 |
| 9109 static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallback
Info<v8::Value>& info) | 9109 static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallback
Info<v8::Value>& info) |
| 9110 { | 9110 { |
| 9111 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSa
meValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9111 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSa
meValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 9112 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9112 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9113 int arg; | 9113 int arg; |
| 9114 { | 9114 { |
| 9115 v8::TryCatch block; | 9115 v8::TryCatch block; |
| 9116 V8RethrowTryCatchScope rethrow(block); | 9116 V8RethrowTryCatchScope rethrow(block); |
| 9117 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | 9117 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); |
| 9118 } | 9118 } |
| 9119 impl->measureAsSameValueOverloadedMethod(arg); | 9119 impl->measureAsSameValueOverloadedMethod(arg); |
| 9120 } | 9120 } |
| 9121 | 9121 |
| 9122 static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 9122 static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 9147 | 9147 |
| 9148 static void measureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 9148 static void measureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 9149 { | 9149 { |
| 9150 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9150 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9151 TestObjectV8Internal::measureAsSameValueOverloadedMethodMethod(info); | 9151 TestObjectV8Internal::measureAsSameValueOverloadedMethodMethod(info); |
| 9152 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9152 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9153 } | 9153 } |
| 9154 | 9154 |
| 9155 static void deprecateAsMeasureAsSameValueOverloadedMethod1Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 9155 static void deprecateAsMeasureAsSameValueOverloadedMethod1Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 9156 { | 9156 { |
| 9157 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9157 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9158 impl->deprecateAsMeasureAsSameValueOverloadedMethod(); | 9158 impl->deprecateAsMeasureAsSameValueOverloadedMethod(); |
| 9159 } | 9159 } |
| 9160 | 9160 |
| 9161 static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 9161 static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 9162 { | 9162 { |
| 9163 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
MeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | 9163 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
MeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); |
| 9164 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9164 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9165 int arg; | 9165 int arg; |
| 9166 { | 9166 { |
| 9167 v8::TryCatch block; | 9167 v8::TryCatch block; |
| 9168 V8RethrowTryCatchScope rethrow(block); | 9168 V8RethrowTryCatchScope rethrow(block); |
| 9169 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | 9169 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); |
| 9170 } | 9170 } |
| 9171 impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg); | 9171 impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg); |
| 9172 } | 9172 } |
| 9173 | 9173 |
| 9174 static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | 9174 static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 9201 | 9201 |
| 9202 static void deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 9202 static void deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) |
| 9203 { | 9203 { |
| 9204 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9204 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9205 TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethod(in
fo); | 9205 TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethod(in
fo); |
| 9206 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9206 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9207 } | 9207 } |
| 9208 | 9208 |
| 9209 static void deprecateAsSameValueMeasureAsOverloadedMethod1Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 9209 static void deprecateAsSameValueMeasureAsOverloadedMethod1Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 9210 { | 9210 { |
| 9211 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9211 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9212 impl->deprecateAsSameValueMeasureAsOverloadedMethod(); | 9212 impl->deprecateAsSameValueMeasureAsOverloadedMethod(); |
| 9213 } | 9213 } |
| 9214 | 9214 |
| 9215 static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 9215 static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 9216 { | 9216 { |
| 9217 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); | 9217 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat
e()); |
| 9218 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9218 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9219 int arg; | 9219 int arg; |
| 9220 { | 9220 { |
| 9221 v8::TryCatch block; | 9221 v8::TryCatch block; |
| 9222 V8RethrowTryCatchScope rethrow(block); | 9222 V8RethrowTryCatchScope rethrow(block); |
| 9223 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | 9223 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); |
| 9224 } | 9224 } |
| 9225 impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg); | 9225 impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg); |
| 9226 } | 9226 } |
| 9227 | 9227 |
| 9228 static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | 9228 static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 9255 | 9255 |
| 9256 static void deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 9256 static void deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) |
| 9257 { | 9257 { |
| 9258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9259 TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethod(in
fo); | 9259 TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethod(in
fo); |
| 9260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9261 } | 9261 } |
| 9262 | 9262 |
| 9263 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(const
v8::FunctionCallbackInfo<v8::Value>& info) | 9263 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 9264 { | 9264 { |
| 9265 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9265 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9266 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(); | 9266 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(); |
| 9267 } | 9267 } |
| 9268 | 9268 |
| 9269 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const
v8::FunctionCallbackInfo<v8::Value>& info) | 9269 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 9270 { | 9270 { |
| 9271 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.
GetIsolate()); | 9271 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs
SameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.
GetIsolate()); |
| 9272 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9272 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9273 int arg; | 9273 int arg; |
| 9274 { | 9274 { |
| 9275 v8::TryCatch block; | 9275 v8::TryCatch block; |
| 9276 V8RethrowTryCatchScope rethrow(block); | 9276 V8RethrowTryCatchScope rethrow(block); |
| 9277 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); | 9277 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(arg, toInt32(info[0], exceptionSta
te), exceptionState); |
| 9278 } | 9278 } |
| 9279 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg); | 9279 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg); |
| 9280 } | 9280 } |
| 9281 | 9281 |
| 9282 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | 9282 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 9308 | 9308 |
| 9309 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 9309 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9310 { | 9310 { |
| 9311 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9311 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9312 TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethod
Method(info); | 9312 TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethod
Method(info); |
| 9313 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9313 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9314 } | 9314 } |
| 9315 | 9315 |
| 9316 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 9316 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 9317 { | 9317 { |
| 9318 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9318 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9319 impl->notEnumerableVoidMethod(); | 9319 impl->notEnumerableVoidMethod(); |
| 9320 } | 9320 } |
| 9321 | 9321 |
| 9322 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 9322 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 9323 { | 9323 { |
| 9324 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9324 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9325 TestObjectV8Internal::notEnumerableVoidMethodMethod(info); | 9325 TestObjectV8Internal::notEnumerableVoidMethodMethod(info); |
| 9326 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9326 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9327 } | 9327 } |
| 9328 | 9328 |
| 9329 static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 9329 static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 9330 { | 9330 { |
| 9331 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9331 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9332 impl->perContextEnabledVoidMethod(); | 9332 impl->perContextEnabledVoidMethod(); |
| 9333 } | 9333 } |
| 9334 | 9334 |
| 9335 static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 9335 static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 9336 { | 9336 { |
| 9337 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9337 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9338 TestObjectV8Internal::perContextEnabledVoidMethodMethod(info); | 9338 TestObjectV8Internal::perContextEnabledVoidMethodMethod(info); |
| 9339 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9339 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9340 } | 9340 } |
| 9341 | 9341 |
| 9342 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 9342 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 9343 { | 9343 { |
| 9344 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9344 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9345 impl->perWorldBindingsVoidMethod(); | 9345 impl->perWorldBindingsVoidMethod(); |
| 9346 } | 9346 } |
| 9347 | 9347 |
| 9348 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 9348 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 9349 { | 9349 { |
| 9350 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9350 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9351 TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info); | 9351 TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info); |
| 9352 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9352 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9353 } | 9353 } |
| 9354 | 9354 |
| 9355 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 9355 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 9356 { | 9356 { |
| 9357 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9357 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9358 impl->perWorldBindingsVoidMethod(); | 9358 impl->perWorldBindingsVoidMethod(); |
| 9359 } | 9359 } |
| 9360 | 9360 |
| 9361 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 9361 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 9362 { | 9362 { |
| 9363 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9363 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9364 TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info); | 9364 TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info); |
| 9365 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9365 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9366 } | 9366 } |
| 9367 | 9367 |
| 9368 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | 9368 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 9369 { | 9369 { |
| 9370 if (UNLIKELY(info.Length() < 1)) { | 9370 if (UNLIKELY(info.Length() < 1)) { |
| 9371 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("p
erWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(),
info.GetIsolate()), info.GetIsolate()); | 9371 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("p
erWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(),
info.GetIsolate()), info.GetIsolate()); |
| 9372 return; | 9372 return; |
| 9373 } | 9373 } |
| 9374 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9374 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9375 TestInterfaceEmpty* testInterfaceEmptyArg; | 9375 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 9376 { | 9376 { |
| 9377 v8::TryCatch block; | 9377 v8::TryCatch block; |
| 9378 V8RethrowTryCatchScope rethrow(block); | 9378 V8RethrowTryCatchScope rethrow(block); |
| 9379 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); | 9379 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); |
| 9380 } | 9380 } |
| 9381 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg)
; | 9381 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg)
; |
| 9382 } | 9382 } |
| 9383 | 9383 |
| 9384 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 9384 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 9385 { | 9385 { |
| 9386 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9386 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9387 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(
info); | 9387 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(
info); |
| 9388 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9388 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9389 } | 9389 } |
| 9390 | 9390 |
| 9391 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 9391 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 9392 { | 9392 { |
| 9393 if (UNLIKELY(info.Length() < 1)) { | 9393 if (UNLIKELY(info.Length() < 1)) { |
| 9394 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("p
erWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(),
info.GetIsolate()), info.GetIsolate()); | 9394 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("p
erWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(),
info.GetIsolate()), info.GetIsolate()); |
| 9395 return; | 9395 return; |
| 9396 } | 9396 } |
| 9397 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9397 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9398 TestInterfaceEmpty* testInterfaceEmptyArg; | 9398 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 9399 { | 9399 { |
| 9400 v8::TryCatch block; | 9400 v8::TryCatch block; |
| 9401 V8RethrowTryCatchScope rethrow(block); | 9401 V8RethrowTryCatchScope rethrow(block); |
| 9402 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); | 9402 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); |
| 9403 } | 9403 } |
| 9404 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg)
; | 9404 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg)
; |
| 9405 } | 9405 } |
| 9406 | 9406 |
| 9407 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain
World(const v8::FunctionCallbackInfo<v8::Value>& info) | 9407 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain
World(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9408 { | 9408 { |
| 9409 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9409 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9410 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodF
orMainWorld(info); | 9410 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodF
orMainWorld(info); |
| 9411 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9411 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9412 } | 9412 } |
| 9413 | 9413 |
| 9414 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) | 9414 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) |
| 9415 { | 9415 { |
| 9416 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9416 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9417 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); | 9417 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); |
| 9418 } | 9418 } |
| 9419 | 9419 |
| 9420 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | 9420 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9421 { | 9421 { |
| 9422 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9422 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9423 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 9423 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 9424 V8PerContextData* contextData = scriptState->perContextData(); | 9424 V8PerContextData* contextData = scriptState->perContextData(); |
| 9425 if (contextData && contextData->activityLogger()) { | 9425 if (contextData && contextData->activityLogger()) { |
| 9426 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 9426 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0); |
| 9427 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA
llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); | 9427 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA
llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); |
| 9428 } | 9428 } |
| 9429 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethod(info); | 9429 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethod(info); |
| 9430 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9430 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9431 } | 9431 } |
| 9432 | 9432 |
| 9433 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWo
rld(const v8::FunctionCallbackInfo<v8::Value>& info) | 9433 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWo
rld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9434 { | 9434 { |
| 9435 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9435 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9436 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); | 9436 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); |
| 9437 } | 9437 } |
| 9438 | 9438 |
| 9439 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackF
orMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 9439 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackF
orMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9440 { | 9440 { |
| 9441 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9441 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9442 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 9442 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 9443 V8PerContextData* contextData = scriptState->perContextData(); | 9443 V8PerContextData* contextData = scriptState->perContextData(); |
| 9444 if (contextData && contextData->activityLogger()) { | 9444 if (contextData && contextData->activityLogger()) { |
| 9445 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 9445 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0); |
| 9446 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA
llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); | 9446 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA
llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); |
| 9447 } | 9447 } |
| 9448 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethodForMainWorld(info); | 9448 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethodForMainWorld(info); |
| 9449 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9449 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9450 } | 9450 } |
| 9451 | 9451 |
| 9452 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 9452 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
| 9453 { | 9453 { |
| 9454 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9454 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9455 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); | 9455 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); |
| 9456 } | 9456 } |
| 9457 | 9457 |
| 9458 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | 9458 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9459 { | 9459 { |
| 9460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9461 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 9461 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 9462 V8PerContextData* contextData = scriptState->perContextData(); | 9462 V8PerContextData* contextData = scriptState->perContextData(); |
| 9463 if (contextData && contextData->activityLogger()) { | 9463 if (contextData && contextData->activityLogger()) { |
| 9464 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 9464 Vector<v8::Handle<v8::Value> > loggerArgs = toImplArguments<v8::Handle<v
8::Value> >(info, 0); |
| 9465 contextData->activityLogger()->logMethod("TestObject.activityLoggingForI
solatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); | 9465 contextData->activityLogger()->logMethod("TestObject.activityLoggingForI
solatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); |
| 9466 } | 9466 } |
| 9467 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethod(info); | 9467 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethod(info); |
| 9468 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9468 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9469 } | 9469 } |
| 9470 | 9470 |
| 9471 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForM
ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 9471 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForM
ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9472 { | 9472 { |
| 9473 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9473 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9474 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); | 9474 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); |
| 9475 } | 9475 } |
| 9476 | 9476 |
| 9477 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 9477 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9478 { | 9478 { |
| 9479 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9479 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9480 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethodForMainWorld(info); | 9480 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethodForMainWorld(info); |
| 9481 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9481 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9482 } | 9482 } |
| 9483 | 9483 |
| 9484 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 9484 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 9485 { | 9485 { |
| 9486 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9486 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 9487 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9487 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9488 impl->raisesExceptionVoidMethod(exceptionState); | 9488 impl->raisesExceptionVoidMethod(exceptionState); |
| 9489 if (exceptionState.hadException()) { | 9489 if (exceptionState.hadException()) { |
| 9490 exceptionState.throwIfNeeded(); | 9490 exceptionState.throwIfNeeded(); |
| 9491 return; | 9491 return; |
| 9492 } | 9492 } |
| 9493 } | 9493 } |
| 9494 | 9494 |
| 9495 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 9495 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 9496 { | 9496 { |
| 9497 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9497 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9498 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); | 9498 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); |
| 9499 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9499 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9500 } | 9500 } |
| 9501 | 9501 |
| 9502 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 9502 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 9503 { | 9503 { |
| 9504 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9504 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 9505 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9505 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9506 String result = impl->raisesExceptionStringMethod(exceptionState); | 9506 String result = impl->raisesExceptionStringMethod(exceptionState); |
| 9507 if (exceptionState.hadException()) { | 9507 if (exceptionState.hadException()) { |
| 9508 exceptionState.throwIfNeeded(); | 9508 exceptionState.throwIfNeeded(); |
| 9509 return; | 9509 return; |
| 9510 } | 9510 } |
| 9511 v8SetReturnValueString(info, result, info.GetIsolate()); | 9511 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 9512 } | 9512 } |
| 9513 | 9513 |
| 9514 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 9514 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 9515 { | 9515 { |
| 9516 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9516 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9517 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); | 9517 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); |
| 9518 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9518 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9519 } | 9519 } |
| 9520 | 9520 |
| 9521 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 9521 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 9522 { | 9522 { |
| 9523 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 9523 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| 9524 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9524 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9525 int optionalLongArg; | 9525 int optionalLongArg; |
| 9526 { | 9526 { |
| 9527 v8::TryCatch block; | 9527 v8::TryCatch block; |
| 9528 V8RethrowTryCatchScope rethrow(block); | 9528 V8RethrowTryCatchScope rethrow(block); |
| 9529 if (UNLIKELY(info.Length() <= 0)) { | 9529 if (UNLIKELY(info.Length() <= 0)) { |
| 9530 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); | 9530 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); |
| 9531 if (exceptionState.hadException()) { | 9531 if (exceptionState.hadException()) { |
| 9532 exceptionState.throwIfNeeded(); | 9532 exceptionState.throwIfNeeded(); |
| 9533 return; | 9533 return; |
| 9534 } | 9534 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 9551 } | 9551 } |
| 9552 | 9552 |
| 9553 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 9553 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
| 9554 { | 9554 { |
| 9555 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); | 9555 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); |
| 9556 if (UNLIKELY(info.Length() < 1)) { | 9556 if (UNLIKELY(info.Length() < 1)) { |
| 9557 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 9557 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 9558 exceptionState.throwIfNeeded(); | 9558 exceptionState.throwIfNeeded(); |
| 9559 return; | 9559 return; |
| 9560 } | 9560 } |
| 9561 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9561 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9562 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; | 9562 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; |
| 9563 { | 9563 { |
| 9564 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 9564 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
| 9565 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 9565 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
| 9566 exceptionState.throwIfNeeded(); | 9566 exceptionState.throwIfNeeded(); |
| 9567 return; | 9567 return; |
| 9568 } | 9568 } |
| 9569 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | 9569 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
| 9570 } | 9570 } |
| 9571 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg.release(), exceptionState); | 9571 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg.release(), exceptionState); |
| 9572 if (exceptionState.hadException()) { | 9572 if (exceptionState.hadException()) { |
| 9573 exceptionState.throwIfNeeded(); | 9573 exceptionState.throwIfNeeded(); |
| 9574 return; | 9574 return; |
| 9575 } | 9575 } |
| 9576 } | 9576 } |
| 9577 | 9577 |
| 9578 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 9578 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 9579 { | 9579 { |
| 9580 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9580 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9581 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); | 9581 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); |
| 9582 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9582 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9583 } | 9583 } |
| 9584 | 9584 |
| 9585 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 9585 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 9586 { | 9586 { |
| 9587 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); | 9587 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); |
| 9588 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9588 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9589 OwnPtrWillBeRawPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg =
nullptr;; | 9589 OwnPtrWillBeRawPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg =
nullptr;; |
| 9590 { | 9590 { |
| 9591 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | 9591 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { |
| 9592 if (!info[0]->IsFunction()) { | 9592 if (!info[0]->IsFunction()) { |
| 9593 exceptionState.throwTypeError("The callback provided as paramete
r 1 is not a function."); | 9593 exceptionState.throwTypeError("The callback provided as paramete
r 1 is not a function."); |
| 9594 exceptionState.throwIfNeeded(); | 9594 exceptionState.throwIfNeeded(); |
| 9595 return; | 9595 return; |
| 9596 } | 9596 } |
| 9597 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; | 9597 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; |
| 9598 } | 9598 } |
| 9599 } | 9599 } |
| 9600 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg.release(), exceptionState); | 9600 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg.release(), exceptionState); |
| 9601 if (exceptionState.hadException()) { | 9601 if (exceptionState.hadException()) { |
| 9602 exceptionState.throwIfNeeded(); | 9602 exceptionState.throwIfNeeded(); |
| 9603 return; | 9603 return; |
| 9604 } | 9604 } |
| 9605 } | 9605 } |
| 9606 | 9606 |
| 9607 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 9607 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9608 { | 9608 { |
| 9609 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9609 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9610 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); | 9610 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); |
| 9611 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9611 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9612 } | 9612 } |
| 9613 | 9613 |
| 9614 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) | 9614 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) |
| 9615 { | 9615 { |
| 9616 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | 9616 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); |
| 9617 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9617 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9618 RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyV
oidMethod(exceptionState); | 9618 RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyV
oidMethod(exceptionState); |
| 9619 if (exceptionState.hadException()) { | 9619 if (exceptionState.hadException()) { |
| 9620 exceptionState.throwIfNeeded(); | 9620 exceptionState.throwIfNeeded(); |
| 9621 return; | 9621 return; |
| 9622 } | 9622 } |
| 9623 v8SetReturnValue(info, result.release()); | 9623 v8SetReturnValue(info, result.release()); |
| 9624 } | 9624 } |
| 9625 | 9625 |
| 9626 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 9626 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 9627 { | 9627 { |
| 9628 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9628 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9629 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); | 9629 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); |
| 9630 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9630 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9631 } | 9631 } |
| 9632 | 9632 |
| 9633 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 9633 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 9634 { | 9634 { |
| 9635 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); | 9635 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); |
| 9636 if (UNLIKELY(info.Length() < 1)) { | 9636 if (UNLIKELY(info.Length() < 1)) { |
| 9637 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 9637 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 9638 exceptionState.throwIfNeeded(); | 9638 exceptionState.throwIfNeeded(); |
| 9639 return; | 9639 return; |
| 9640 } | 9640 } |
| 9641 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9641 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9642 int longArg; | 9642 int longArg; |
| 9643 { | 9643 { |
| 9644 v8::TryCatch block; | 9644 v8::TryCatch block; |
| 9645 V8RethrowTryCatchScope rethrow(block); | 9645 V8RethrowTryCatchScope rethrow(block); |
| 9646 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 9646 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 9647 } | 9647 } |
| 9648 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 9648 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 9649 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(executionCont
ext, longArg, exceptionState); | 9649 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(executionCont
ext, longArg, exceptionState); |
| 9650 if (exceptionState.hadException()) { | 9650 if (exceptionState.hadException()) { |
| 9651 exceptionState.throwIfNeeded(); | 9651 exceptionState.throwIfNeeded(); |
| 9652 return; | 9652 return; |
| 9653 } | 9653 } |
| 9654 } | 9654 } |
| 9655 | 9655 |
| 9656 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 9656 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9657 { | 9657 { |
| 9658 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9658 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9659 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA
rgMethod(info); | 9659 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA
rgMethod(info); |
| 9660 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9660 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9661 } | 9661 } |
| 9662 | 9662 |
| 9663 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 9663 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 9664 { | 9664 { |
| 9665 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9665 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9666 impl->runtimeEnabledVoidMethod(); | 9666 impl->runtimeEnabledVoidMethod(); |
| 9667 } | 9667 } |
| 9668 | 9668 |
| 9669 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 9669 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 9670 { | 9670 { |
| 9671 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9671 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9672 TestObjectV8Internal::runtimeEnabledVoidMethodMethod(info); | 9672 TestObjectV8Internal::runtimeEnabledVoidMethodMethod(info); |
| 9673 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9673 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9674 } | 9674 } |
| 9675 | 9675 |
| 9676 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 9676 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 9677 { | 9677 { |
| 9678 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9678 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9679 impl->perWorldBindingsRuntimeEnabledVoidMethod(); | 9679 impl->perWorldBindingsRuntimeEnabledVoidMethod(); |
| 9680 } | 9680 } |
| 9681 | 9681 |
| 9682 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 9682 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 9683 { | 9683 { |
| 9684 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9684 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9685 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info); | 9685 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info); |
| 9686 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9686 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9687 } | 9687 } |
| 9688 | 9688 |
| 9689 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 9689 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 9690 { | 9690 { |
| 9691 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9691 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9692 impl->perWorldBindingsRuntimeEnabledVoidMethod(); | 9692 impl->perWorldBindingsRuntimeEnabledVoidMethod(); |
| 9693 } | 9693 } |
| 9694 | 9694 |
| 9695 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 9695 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 9696 { | 9696 { |
| 9697 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9697 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9698 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainW
orld(info); | 9698 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainW
orld(info); |
| 9699 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9699 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9700 } | 9700 } |
| 9701 | 9701 |
| 9702 static void runtimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallback
Info<v8::Value>& info) | 9702 static void runtimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallback
Info<v8::Value>& info) |
| 9703 { | 9703 { |
| 9704 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9704 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9705 V8StringResource<> stringArg; | 9705 V8StringResource<> stringArg; |
| 9706 { | 9706 { |
| 9707 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 9707 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 9708 } | 9708 } |
| 9709 impl->runtimeEnabledOverloadedVoidMethod(stringArg); | 9709 impl->runtimeEnabledOverloadedVoidMethod(stringArg); |
| 9710 } | 9710 } |
| 9711 | 9711 |
| 9712 static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallback
Info<v8::Value>& info) | 9712 static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallback
Info<v8::Value>& info) |
| 9713 { | 9713 { |
| 9714 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab
ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | 9714 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab
ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 9715 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9715 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9716 int longArg; | 9716 int longArg; |
| 9717 { | 9717 { |
| 9718 v8::TryCatch block; | 9718 v8::TryCatch block; |
| 9719 V8RethrowTryCatchScope rethrow(block); | 9719 V8RethrowTryCatchScope rethrow(block); |
| 9720 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 9720 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 9721 } | 9721 } |
| 9722 impl->runtimeEnabledOverloadedVoidMethod(longArg); | 9722 impl->runtimeEnabledOverloadedVoidMethod(longArg); |
| 9723 } | 9723 } |
| 9724 | 9724 |
| 9725 static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 9725 static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 9751 | 9751 |
| 9752 static void runtimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 9752 static void runtimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 9753 { | 9753 { |
| 9754 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9754 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9755 TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethod(info); | 9755 TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethod(info); |
| 9756 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9756 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9757 } | 9757 } |
| 9758 | 9758 |
| 9759 static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::Functio
nCallbackInfo<v8::Value>& info) | 9759 static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 9760 { | 9760 { |
| 9761 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9761 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9762 V8StringResource<> stringArg; | 9762 V8StringResource<> stringArg; |
| 9763 { | 9763 { |
| 9764 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 9764 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 9765 } | 9765 } |
| 9766 impl->partiallyRuntimeEnabledOverloadedVoidMethod(stringArg); | 9766 impl->partiallyRuntimeEnabledOverloadedVoidMethod(stringArg); |
| 9767 } | 9767 } |
| 9768 | 9768 |
| 9769 static void partiallyRuntimeEnabledOverloadedVoidMethod2Method(const v8::Functio
nCallbackInfo<v8::Value>& info) | 9769 static void partiallyRuntimeEnabledOverloadedVoidMethod2Method(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 9770 { | 9770 { |
| 9771 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9771 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9772 TestInterfaceImplementation* testInterface; | 9772 TestInterfaceImplementation* testInterface; |
| 9773 { | 9773 { |
| 9774 v8::TryCatch block; | 9774 v8::TryCatch block; |
| 9775 V8RethrowTryCatchScope rethrow(block); | 9775 V8RethrowTryCatchScope rethrow(block); |
| 9776 TONATIVE_VOID_INTERNAL(testInterface, V8TestInterface::toNativeWithTypeC
heck(info.GetIsolate(), info[0])); | 9776 TONATIVE_VOID_INTERNAL(testInterface, V8TestInterface::toImplWithTypeChe
ck(info.GetIsolate(), info[0])); |
| 9777 } | 9777 } |
| 9778 impl->partiallyRuntimeEnabledOverloadedVoidMethod(testInterface); | 9778 impl->partiallyRuntimeEnabledOverloadedVoidMethod(testInterface); |
| 9779 } | 9779 } |
| 9780 | 9780 |
| 9781 static void partiallyRuntimeEnabledOverloadedVoidMethod3Method(const v8::Functio
nCallbackInfo<v8::Value>& info) | 9781 static void partiallyRuntimeEnabledOverloadedVoidMethod3Method(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 9782 { | 9782 { |
| 9783 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu
ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | 9783 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu
ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); |
| 9784 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9784 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9785 int longArg; | 9785 int longArg; |
| 9786 { | 9786 { |
| 9787 v8::TryCatch block; | 9787 v8::TryCatch block; |
| 9788 V8RethrowTryCatchScope rethrow(block); | 9788 V8RethrowTryCatchScope rethrow(block); |
| 9789 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 9789 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 9790 } | 9790 } |
| 9791 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg); | 9791 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg); |
| 9792 } | 9792 } |
| 9793 | 9793 |
| 9794 static void partiallyRuntimeEnabledOverloadedVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) | 9794 static void partiallyRuntimeEnabledOverloadedVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9828 | 9828 |
| 9829 static void partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 9829 static void partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 9830 { | 9830 { |
| 9831 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9831 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9832 TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethod(info
); | 9832 TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethod(info
); |
| 9833 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9833 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9834 } | 9834 } |
| 9835 | 9835 |
| 9836 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 9836 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
| 9837 { | 9837 { |
| 9838 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9838 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9839 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Method(), info.GetIsolate()); | 9839 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Method(), info.GetIsolate()); |
| 9840 } | 9840 } |
| 9841 | 9841 |
| 9842 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 9842 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
| 9843 { | 9843 { |
| 9844 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9844 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9845 TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info); | 9845 TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info); |
| 9846 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9846 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9847 } | 9847 } |
| 9848 | 9848 |
| 9849 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 9849 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 9850 { | 9850 { |
| 9851 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9851 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9852 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringMethod(), info.GetIsolate()); | 9852 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringMethod(), info.GetIsolate()); |
| 9853 } | 9853 } |
| 9854 | 9854 |
| 9855 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 9855 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 9856 { | 9856 { |
| 9857 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9857 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9858 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethod(i
nfo); | 9858 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethod(i
nfo); |
| 9859 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9859 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9860 } | 9860 } |
| 9861 | 9861 |
| 9862 static void treatReturnedNullStringAsNullByteStringMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | 9862 static void treatReturnedNullStringAsNullByteStringMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 9863 { | 9863 { |
| 9864 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9864 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9865 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullByteSt
ringMethod(), info.GetIsolate()); | 9865 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullByteSt
ringMethod(), info.GetIsolate()); |
| 9866 } | 9866 } |
| 9867 | 9867 |
| 9868 static void treatReturnedNullStringAsNullByteStringMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 9868 static void treatReturnedNullStringAsNullByteStringMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) |
| 9869 { | 9869 { |
| 9870 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9870 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9871 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringMethodMethod(in
fo); | 9871 TestObjectV8Internal::treatReturnedNullStringAsNullByteStringMethodMethod(in
fo); |
| 9872 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9872 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9873 } | 9873 } |
| 9874 | 9874 |
| 9875 static void treatReturnedNullStringAsUndefinedByteStringMethodMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) | 9875 static void treatReturnedNullStringAsUndefinedByteStringMethodMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) |
| 9876 { | 9876 { |
| 9877 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9877 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9878 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedByteStringMethod(), info.GetIsolate()); | 9878 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedByteStringMethod(), info.GetIsolate()); |
| 9879 } | 9879 } |
| 9880 | 9880 |
| 9881 static void treatReturnedNullStringAsUndefinedByteStringMethodMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 9881 static void treatReturnedNullStringAsUndefinedByteStringMethodMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
| 9882 { | 9882 { |
| 9883 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9883 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9884 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringMethodMeth
od(info); | 9884 TestObjectV8Internal::treatReturnedNullStringAsUndefinedByteStringMethodMeth
od(info); |
| 9885 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9885 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9886 } | 9886 } |
| 9887 | 9887 |
| 9888 static void treatReturnedNullStringAsNullScalarValueStringMethodMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 9888 static void treatReturnedNullStringAsNullScalarValueStringMethodMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 9889 { | 9889 { |
| 9890 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9890 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9891 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullScalar
ValueStringMethod(), info.GetIsolate()); | 9891 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullScalar
ValueStringMethod(), info.GetIsolate()); |
| 9892 } | 9892 } |
| 9893 | 9893 |
| 9894 static void treatReturnedNullStringAsNullScalarValueStringMethodMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 9894 static void treatReturnedNullStringAsNullScalarValueStringMethodMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 9895 { | 9895 { |
| 9896 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9896 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9897 TestObjectV8Internal::treatReturnedNullStringAsNullScalarValueStringMethodMe
thod(info); | 9897 TestObjectV8Internal::treatReturnedNullStringAsNullScalarValueStringMethodMe
thod(info); |
| 9898 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9898 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9899 } | 9899 } |
| 9900 | 9900 |
| 9901 static void treatReturnedNullStringAsUndefinedScalarValueStringMethodMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 9901 static void treatReturnedNullStringAsUndefinedScalarValueStringMethodMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 9902 { | 9902 { |
| 9903 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9903 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9904 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedScalarValueStringMethod(), info.GetIsolate()); | 9904 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedScalarValueStringMethod(), info.GetIsolate()); |
| 9905 } | 9905 } |
| 9906 | 9906 |
| 9907 static void treatReturnedNullStringAsUndefinedScalarValueStringMethodMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 9907 static void treatReturnedNullStringAsUndefinedScalarValueStringMethodMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9908 { | 9908 { |
| 9909 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9909 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9910 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringMet
hodMethod(info); | 9910 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringMet
hodMethod(info); |
| 9911 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9911 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9912 } | 9912 } |
| 9913 | 9913 |
| 9914 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 9914 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 9915 { | 9915 { |
| 9916 if (UNLIKELY(info.Length() < 1)) { | 9916 if (UNLIKELY(info.Length() < 1)) { |
| 9917 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("t
ypeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Leng
th(), info.GetIsolate()), info.GetIsolate()); | 9917 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("t
ypeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Leng
th(), info.GetIsolate()), info.GetIsolate()); |
| 9918 return; | 9918 return; |
| 9919 } | 9919 } |
| 9920 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9920 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9921 TestInterfaceEmpty* testInterfaceEmptyArg; | 9921 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 9922 { | 9922 { |
| 9923 v8::TryCatch block; | 9923 v8::TryCatch block; |
| 9924 V8RethrowTryCatchScope rethrow(block); | 9924 V8RethrowTryCatchScope rethrow(block); |
| 9925 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate())) { | 9925 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate())) { |
| 9926 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter
1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); | 9926 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter
1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); |
| 9927 return; | 9927 return; |
| 9928 } | 9928 } |
| 9929 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); | 9929 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); |
| 9930 } | 9930 } |
| 9931 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmpt
yArg); | 9931 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmpt
yArg); |
| 9932 } | 9932 } |
| 9933 | 9933 |
| 9934 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 9934 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 9935 { | 9935 { |
| 9936 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9936 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9937 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMe
thod(info); | 9937 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMe
thod(info); |
| 9938 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9938 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9939 } | 9939 } |
| 9940 | 9940 |
| 9941 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 9941 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 9942 { | 9942 { |
| 9943 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9943 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9944 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyArg; | 9944 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyArg; |
| 9945 { | 9945 { |
| 9946 for (int i = 0; i < info.Length(); ++i) { | 9946 for (int i = 0; i < info.Length(); ++i) { |
| 9947 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ | 9947 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate()))
{ |
| 9948 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg", "TestObject"
, "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); | 9948 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg", "TestObject"
, "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); |
| 9949 return; | 9949 return; |
| 9950 } | 9950 } |
| 9951 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toNative(v8::Hand
le<v8::Object>::Cast(info[i]))); | 9951 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Handle
<v8::Object>::Cast(info[i]))); |
| 9952 } | 9952 } |
| 9953 } | 9953 } |
| 9954 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg(testInter
faceEmptyArg); | 9954 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg(testInter
faceEmptyArg); |
| 9955 } | 9955 } |
| 9956 | 9956 |
| 9957 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) | 9957 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9958 { | 9958 { |
| 9959 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9959 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9960 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyVaria
dicArgMethod(info); | 9960 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyVaria
dicArgMethod(info); |
| 9961 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9961 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9962 } | 9962 } |
| 9963 | 9963 |
| 9964 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) | 9964 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 9965 { | 9965 { |
| 9966 if (UNLIKELY(info.Length() < 2)) { | 9966 if (UNLIKELY(info.Length() < 2)) { |
| 9967 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("t
ypeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", 2, info.Lengt
h(), info.GetIsolate()), info.GetIsolate()); | 9967 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("t
ypeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", 2, info.Lengt
h(), info.GetIsolate()), info.GetIsolate()); |
| 9968 return; | 9968 return; |
| 9969 } | 9969 } |
| 9970 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9970 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9971 float floatArg; | 9971 float floatArg; |
| 9972 double doubleArg; | 9972 double doubleArg; |
| 9973 { | 9973 { |
| 9974 v8::TryCatch block; | 9974 v8::TryCatch block; |
| 9975 V8RethrowTryCatchScope rethrow(block); | 9975 V8RethrowTryCatchScope rethrow(block); |
| 9976 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue
())); | 9976 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue
())); |
| 9977 if (!std::isfinite(floatArg)) { | 9977 if (!std::isfinite(floatArg)) { |
| 9978 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", "float para
meter 1 is non-finite."), info.GetIsolate()); | 9978 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", "float para
meter 1 is non-finite."), info.GetIsolate()); |
| 9979 return; | 9979 return; |
| 9980 } | 9980 } |
| 9981 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[1]->NumberVal
ue())); | 9981 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[1]->NumberVal
ue())); |
| 9982 if (!std::isfinite(doubleArg)) { | 9982 if (!std::isfinite(doubleArg)) { |
| 9983 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", "double par
ameter 2 is non-finite."), info.GetIsolate()); | 9983 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", "double par
ameter 2 is non-finite."), info.GetIsolate()); |
| 9984 return; | 9984 return; |
| 9985 } | 9985 } |
| 9986 } | 9986 } |
| 9987 impl->typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(floatArg, doubleAr
g); | 9987 impl->typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(floatArg, doubleAr
g); |
| 9988 } | 9988 } |
| 9989 | 9989 |
| 9990 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 9990 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 9991 { | 9991 { |
| 9992 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9992 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9993 TestObjectV8Internal::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMet
hod(info); | 9993 TestObjectV8Internal::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMet
hod(info); |
| 9994 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9994 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9995 } | 9995 } |
| 9996 | 9996 |
| 9997 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 9997 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 9998 { | 9998 { |
| 9999 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9999 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10000 impl->unforgeableVoidMethod(); | 10000 impl->unforgeableVoidMethod(); |
| 10001 } | 10001 } |
| 10002 | 10002 |
| 10003 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 10003 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 10004 { | 10004 { |
| 10005 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10005 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10006 TestObjectV8Internal::unforgeableVoidMethodMethod(info); | 10006 TestObjectV8Internal::unforgeableVoidMethodMethod(info); |
| 10007 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10007 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10008 } | 10008 } |
| 10009 | 10009 |
| 10010 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) | 10010 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::F
unctionCallbackInfo<v8::Value>& info) |
| 10011 { | 10011 { |
| 10012 if (UNLIKELY(info.Length() < 1)) { | 10012 if (UNLIKELY(info.Length() < 1)) { |
| 10013 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceGarbageCollectedSequenceArg", "TestObject", 1, info.Length
(), info.GetIsolate()), info.GetIsolate()); | 10013 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceGarbageCollectedSequenceArg", "TestObject", 1, info.Length
(), info.GetIsolate()), info.GetIsolate()); |
| 10014 return; | 10014 return; |
| 10015 } | 10015 } |
| 10016 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10016 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10017 HeapVector<Member<TestInterfaceGarbageCollected> > testInterfaceGarbageColle
ctedSequenceArg; | 10017 HeapVector<Member<TestInterfaceGarbageCollected> > testInterfaceGarbageColle
ctedSequenceArg; |
| 10018 { | 10018 { |
| 10019 v8::TryCatch block; | 10019 v8::TryCatch block; |
| 10020 V8RethrowTryCatchScope rethrow(block); | 10020 V8RethrowTryCatchScope rethrow(block); |
| 10021 TONATIVE_VOID_INTERNAL(testInterfaceGarbageCollectedSequenceArg, (toMemb
erNativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(in
fo[0], 1, info.GetIsolate()))); | 10021 TONATIVE_VOID_INTERNAL(testInterfaceGarbageCollectedSequenceArg, (toMemb
erNativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(in
fo[0], 1, info.GetIsolate()))); |
| 10022 } | 10022 } |
| 10023 impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbag
eCollectedSequenceArg); | 10023 impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbag
eCollectedSequenceArg); |
| 10024 } | 10024 } |
| 10025 | 10025 |
| 10026 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 10026 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
| 10027 { | 10027 { |
| 10028 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10028 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10029 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMeth
od(info); | 10029 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMeth
od(info); |
| 10030 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10030 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10031 } | 10031 } |
| 10032 | 10032 |
| 10033 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | 10033 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 10034 { | 10034 { |
| 10035 if (UNLIKELY(info.Length() < 1)) { | 10035 if (UNLIKELY(info.Length() < 1)) { |
| 10036 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceGarbageCollectedArrayArg", "TestObject", 1, info.Length(),
info.GetIsolate()), info.GetIsolate()); | 10036 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceGarbageCollectedArrayArg", "TestObject", 1, info.Length(),
info.GetIsolate()), info.GetIsolate()); |
| 10037 return; | 10037 return; |
| 10038 } | 10038 } |
| 10039 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10039 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10040 HeapVector<Member<TestInterfaceGarbageCollected> > testInterfaceGarbageColle
ctedArrayArg; | 10040 HeapVector<Member<TestInterfaceGarbageCollected> > testInterfaceGarbageColle
ctedArrayArg; |
| 10041 { | 10041 { |
| 10042 v8::TryCatch block; | 10042 v8::TryCatch block; |
| 10043 V8RethrowTryCatchScope rethrow(block); | 10043 V8RethrowTryCatchScope rethrow(block); |
| 10044 TONATIVE_VOID_INTERNAL(testInterfaceGarbageCollectedArrayArg, (toMemberN
ativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(info[
0], 1, info.GetIsolate()))); | 10044 TONATIVE_VOID_INTERNAL(testInterfaceGarbageCollectedArrayArg, (toMemberN
ativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(info[
0], 1, info.GetIsolate()))); |
| 10045 } | 10045 } |
| 10046 impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCo
llectedArrayArg); | 10046 impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCo
llectedArrayArg); |
| 10047 } | 10047 } |
| 10048 | 10048 |
| 10049 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10049 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 10050 { | 10050 { |
| 10051 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10051 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10052 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod(
info); | 10052 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod(
info); |
| 10053 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10053 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10054 } | 10054 } |
| 10055 | 10055 |
| 10056 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10056 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 10057 { | 10057 { |
| 10058 if (UNLIKELY(info.Length() < 1)) { | 10058 if (UNLIKELY(info.Length() < 1)) { |
| 10059 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", "TestObject", 1, info.
Length(), info.GetIsolate()), info.GetIsolate()); | 10059 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", "TestObject", 1, info.
Length(), info.GetIsolate()), info.GetIsolate()); |
| 10060 return; | 10060 return; |
| 10061 } | 10061 } |
| 10062 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10062 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10063 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > t
estInterfaceWillBeGarbageCollectedSequenceArg; | 10063 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > t
estInterfaceWillBeGarbageCollectedSequenceArg; |
| 10064 { | 10064 { |
| 10065 v8::TryCatch block; | 10065 v8::TryCatch block; |
| 10066 V8RethrowTryCatchScope rethrow(block); | 10066 V8RethrowTryCatchScope rethrow(block); |
| 10067 TONATIVE_VOID_INTERNAL(testInterfaceWillBeGarbageCollectedSequenceArg, (
toRefPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInter
faceWillBeGarbageCollected>(info[0], 1, info.GetIsolate()))); | 10067 TONATIVE_VOID_INTERNAL(testInterfaceWillBeGarbageCollectedSequenceArg, (
toRefPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInter
faceWillBeGarbageCollected>(info[0], 1, info.GetIsolate()))); |
| 10068 } | 10068 } |
| 10069 impl->voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(testInterface
WillBeGarbageCollectedSequenceArg); | 10069 impl->voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(testInterface
WillBeGarbageCollectedSequenceArg); |
| 10070 } | 10070 } |
| 10071 | 10071 |
| 10072 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 10072 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10073 { | 10073 { |
| 10074 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10074 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10075 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceA
rgMethod(info); | 10075 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceA
rgMethod(info); |
| 10076 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10076 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10077 } | 10077 } |
| 10078 | 10078 |
| 10079 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) | 10079 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) |
| 10080 { | 10080 { |
| 10081 if (UNLIKELY(info.Length() < 1)) { | 10081 if (UNLIKELY(info.Length() < 1)) { |
| 10082 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceWillBeGarbageCollectedArrayArg", "TestObject", 1, info.Len
gth(), info.GetIsolate()), info.GetIsolate()); | 10082 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestInterfaceWillBeGarbageCollectedArrayArg", "TestObject", 1, info.Len
gth(), info.GetIsolate()), info.GetIsolate()); |
| 10083 return; | 10083 return; |
| 10084 } | 10084 } |
| 10085 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10085 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10086 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > t
estInterfaceWillBeGarbageCollectedArrayArg; | 10086 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > t
estInterfaceWillBeGarbageCollectedArrayArg; |
| 10087 { | 10087 { |
| 10088 v8::TryCatch block; | 10088 v8::TryCatch block; |
| 10089 V8RethrowTryCatchScope rethrow(block); | 10089 V8RethrowTryCatchScope rethrow(block); |
| 10090 TONATIVE_VOID_INTERNAL(testInterfaceWillBeGarbageCollectedArrayArg, (toR
efPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInterfac
eWillBeGarbageCollected>(info[0], 1, info.GetIsolate()))); | 10090 TONATIVE_VOID_INTERNAL(testInterfaceWillBeGarbageCollectedArrayArg, (toR
efPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInterfac
eWillBeGarbageCollected>(info[0], 1, info.GetIsolate()))); |
| 10091 } | 10091 } |
| 10092 impl->voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(testInterfaceWil
lBeGarbageCollectedArrayArg); | 10092 impl->voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(testInterfaceWil
lBeGarbageCollectedArrayArg); |
| 10093 } | 10093 } |
| 10094 | 10094 |
| 10095 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | 10095 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10096 { | 10096 { |
| 10097 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10097 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10098 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgM
ethod(info); | 10098 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgM
ethod(info); |
| 10099 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10099 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10100 } | 10100 } |
| 10101 | 10101 |
| 10102 static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 10102 static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 10103 { | 10103 { |
| 10104 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10104 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10105 V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl); | 10105 V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(toFr
ameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl); |
| 10106 } | 10106 } |
| 10107 | 10107 |
| 10108 static void voidMethodImplementedInPrivateScriptMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 10108 static void voidMethodImplementedInPrivateScriptMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 10109 { | 10109 { |
| 10110 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10110 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10111 TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethod(info); | 10111 TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethod(info); |
| 10112 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10112 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10113 } | 10113 } |
| 10114 | 10114 |
| 10115 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 10115 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 10116 { | 10116 { |
| 10117 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10117 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10118 int result = 0; | 10118 int result = 0; |
| 10119 if (!V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMetho
d(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) | 10119 if (!V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMetho
d(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) |
| 10120 return; | 10120 return; |
| 10121 v8SetReturnValueInt(info, result); | 10121 v8SetReturnValueInt(info, result); |
| 10122 } | 10122 } |
| 10123 | 10123 |
| 10124 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | 10124 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) |
| 10125 { | 10125 { |
| 10126 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10126 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10127 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); | 10127 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); |
| 10128 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10128 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10129 } | 10129 } |
| 10130 | 10130 |
| 10131 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | 10131 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 10132 { | 10132 { |
| 10133 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info.
GetIsolate()); | 10133 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info.
GetIsolate()); |
| 10134 if (UNLIKELY(info.Length() < 1)) { | 10134 if (UNLIKELY(info.Length() < 1)) { |
| 10135 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 10135 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 10136 exceptionState.throwIfNeeded(); | 10136 exceptionState.throwIfNeeded(); |
| 10137 return; | 10137 return; |
| 10138 } | 10138 } |
| 10139 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10139 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10140 int value; | 10140 int value; |
| 10141 { | 10141 { |
| 10142 v8::TryCatch block; | 10142 v8::TryCatch block; |
| 10143 V8RethrowTryCatchScope rethrow(block); | 10143 V8RethrowTryCatchScope rethrow(block); |
| 10144 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS
tate), exceptionState); | 10144 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS
tate), exceptionState); |
| 10145 } | 10145 } |
| 10146 int result = 0; | 10146 int result = 0; |
| 10147 if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInP
rivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()),
impl, value, &result)) | 10147 if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInP
rivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()),
impl, value, &result)) |
| 10148 return; | 10148 return; |
| 10149 v8SetReturnValueInt(info, result); | 10149 v8SetReturnValueInt(info, result); |
| 10150 } | 10150 } |
| 10151 | 10151 |
| 10152 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 10152 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10153 { | 10153 { |
| 10154 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10154 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10155 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript
Method(info); | 10155 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript
Method(info); |
| 10156 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10156 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10157 } | 10157 } |
| 10158 | 10158 |
| 10159 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10159 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 10160 { | 10160 { |
| 10161 if (UNLIKELY(info.Length() < 1)) { | 10161 if (UNLIKELY(info.Length() < 1)) { |
| 10162 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("s
tringMethodWithStringArgumentImplementedInPrivateScript", "TestObject", 1, info.
Length(), info.GetIsolate()), info.GetIsolate()); | 10162 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("s
tringMethodWithStringArgumentImplementedInPrivateScript", "TestObject", 1, info.
Length(), info.GetIsolate()), info.GetIsolate()); |
| 10163 return; | 10163 return; |
| 10164 } | 10164 } |
| 10165 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10165 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10166 V8StringResource<> value; | 10166 V8StringResource<> value; |
| 10167 { | 10167 { |
| 10168 TOSTRING_VOID_INTERNAL(value, info[0]); | 10168 TOSTRING_VOID_INTERNAL(value, info[0]); |
| 10169 } | 10169 } |
| 10170 String result; | 10170 String result; |
| 10171 if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedI
nPrivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()
), impl, value, &result)) | 10171 if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedI
nPrivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()
), impl, value, &result)) |
| 10172 return; | 10172 return; |
| 10173 v8SetReturnValueString(info, result, info.GetIsolate()); | 10173 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 10174 } | 10174 } |
| 10175 | 10175 |
| 10176 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 10176 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10177 { | 10177 { |
| 10178 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10178 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10179 TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScri
ptMethod(info); | 10179 TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScri
ptMethod(info); |
| 10180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10181 } | 10181 } |
| 10182 | 10182 |
| 10183 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 10183 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 10184 { | 10184 { |
| 10185 if (UNLIKELY(info.Length() < 1)) { | 10185 if (UNLIKELY(info.Length() < 1)) { |
| 10186 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("n
odeMethodWithNodeArgumentImplementedInPrivateScript", "TestObject", 1, info.Leng
th(), info.GetIsolate()), info.GetIsolate()); | 10186 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("n
odeMethodWithNodeArgumentImplementedInPrivateScript", "TestObject", 1, info.Leng
th(), info.GetIsolate()), info.GetIsolate()); |
| 10187 return; | 10187 return; |
| 10188 } | 10188 } |
| 10189 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10189 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10190 Node* value; | 10190 Node* value; |
| 10191 { | 10191 { |
| 10192 v8::TryCatch block; | 10192 v8::TryCatch block; |
| 10193 V8RethrowTryCatchScope rethrow(block); | 10193 V8RethrowTryCatchScope rethrow(block); |
| 10194 TONATIVE_VOID_INTERNAL(value, V8Node::toNativeWithTypeCheck(info.GetIsol
ate(), info[0])); | 10194 TONATIVE_VOID_INTERNAL(value, V8Node::toImplWithTypeCheck(info.GetIsolat
e(), info[0])); |
| 10195 } | 10195 } |
| 10196 RefPtrWillBeRawPtr<Node> result = nullptr; | 10196 RefPtrWillBeRawPtr<Node> result = nullptr; |
| 10197 if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPri
vateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), i
mpl, value, &result)) | 10197 if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPri
vateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), i
mpl, value, &result)) |
| 10198 return; | 10198 return; |
| 10199 v8SetReturnValue(info, result.release()); | 10199 v8SetReturnValue(info, result.release()); |
| 10200 } | 10200 } |
| 10201 | 10201 |
| 10202 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 10202 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 10203 { | 10203 { |
| 10204 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10204 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10205 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe
thod(info); | 10205 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe
thod(info); |
| 10206 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10206 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10207 } | 10207 } |
| 10208 | 10208 |
| 10209 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10209 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 10210 { | 10210 { |
| 10211 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), inf
o.GetIsolate()); | 10211 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), inf
o.GetIsolate()); |
| 10212 if (UNLIKELY(info.Length() < 5)) { | 10212 if (UNLIKELY(info.Length() < 5)) { |
| 10213 setMinimumArityTypeError(exceptionState, 5, info.Length()); | 10213 setMinimumArityTypeError(exceptionState, 5, info.Length()); |
| 10214 exceptionState.throwIfNeeded(); | 10214 exceptionState.throwIfNeeded(); |
| 10215 return; | 10215 return; |
| 10216 } | 10216 } |
| 10217 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10217 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10218 Document* document; | 10218 Document* document; |
| 10219 Node* node; | 10219 Node* node; |
| 10220 int value1; | 10220 int value1; |
| 10221 double value2; | 10221 double value2; |
| 10222 V8StringResource<> string; | 10222 V8StringResource<> string; |
| 10223 { | 10223 { |
| 10224 v8::TryCatch block; | 10224 v8::TryCatch block; |
| 10225 V8RethrowTryCatchScope rethrow(block); | 10225 V8RethrowTryCatchScope rethrow(block); |
| 10226 TONATIVE_VOID_INTERNAL(document, V8Document::toNativeWithTypeCheck(info.
GetIsolate(), info[0])); | 10226 TONATIVE_VOID_INTERNAL(document, V8Document::toImplWithTypeCheck(info.Ge
tIsolate(), info[0])); |
| 10227 TONATIVE_VOID_INTERNAL(node, V8Node::toNativeWithTypeCheck(info.GetIsola
te(), info[1])); | 10227 TONATIVE_VOID_INTERNAL(node, V8Node::toImplWithTypeCheck(info.GetIsolate
(), info[1])); |
| 10228 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value1, toInt16(info[2], exception
State), exceptionState); | 10228 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value1, toInt16(info[2], exception
State), exceptionState); |
| 10229 TONATIVE_VOID_INTERNAL(value2, static_cast<double>(info[3]->NumberValue(
))); | 10229 TONATIVE_VOID_INTERNAL(value2, static_cast<double>(info[3]->NumberValue(
))); |
| 10230 TOSTRING_VOID_INTERNAL(string, info[4]); | 10230 TOSTRING_VOID_INTERNAL(string, info[4]); |
| 10231 } | 10231 } |
| 10232 RefPtrWillBeRawPtr<Node> result = nullptr; | 10232 RefPtrWillBeRawPtr<Node> result = nullptr; |
| 10233 if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedI
nPrivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()
), impl, document, node, value1, value2, string, &result)) | 10233 if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedI
nPrivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()
), impl, document, node, value1, value2, string, &result)) |
| 10234 return; | 10234 return; |
| 10235 v8SetReturnValue(info, result.release()); | 10235 v8SetReturnValue(info, result.release()); |
| 10236 } | 10236 } |
| 10237 | 10237 |
| 10238 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 10238 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10239 { | 10239 { |
| 10240 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10240 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10241 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri
ptMethod(info); | 10241 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri
ptMethod(info); |
| 10242 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10242 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10243 } | 10243 } |
| 10244 | 10244 |
| 10245 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | 10245 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 10246 { | 10246 { |
| 10247 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImple
mentedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate()
); | 10247 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImple
mentedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate()
); |
| 10248 if (UNLIKELY(info.Length() < 2)) { | 10248 if (UNLIKELY(info.Length() < 2)) { |
| 10249 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 10249 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| 10250 exceptionState.throwIfNeeded(); | 10250 exceptionState.throwIfNeeded(); |
| 10251 return; | 10251 return; |
| 10252 } | 10252 } |
| 10253 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10253 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10254 int value1; | 10254 int value1; |
| 10255 int value2; | 10255 int value2; |
| 10256 { | 10256 { |
| 10257 v8::TryCatch block; | 10257 v8::TryCatch block; |
| 10258 V8RethrowTryCatchScope rethrow(block); | 10258 V8RethrowTryCatchScope rethrow(block); |
| 10259 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value1, toInt16(info[0], exception
State), exceptionState); | 10259 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value1, toInt16(info[0], exception
State), exceptionState); |
| 10260 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value2, toInt16(info[1], exception
State), exceptionState); | 10260 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value2, toInt16(info[1], exception
State), exceptionState); |
| 10261 } | 10261 } |
| 10262 v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(v
alue1, value2)); | 10262 v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(v
alue1, value2)); |
| 10263 } | 10263 } |
| 10264 | 10264 |
| 10265 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 10265 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
| 10266 { | 10266 { |
| 10267 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10267 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10268 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info)
; | 10268 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info)
; |
| 10269 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10269 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10270 } | 10270 } |
| 10271 | 10271 |
| 10272 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10272 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10273 { | 10273 { |
| 10274 TestObject* impl = V8TestObject::toNative(info.Holder()); | 10274 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10275 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); | 10275 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); |
| 10276 } | 10276 } |
| 10277 | 10277 |
| 10278 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 10278 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 10279 { | 10279 { |
| 10280 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10280 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10281 TestObjectV8Internal::toStringMethod(info); | 10281 TestObjectV8Internal::toStringMethod(info); |
| 10282 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10282 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10283 } | 10283 } |
| 10284 | 10284 |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10792 bool V8TestObject::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isola
te) | 10792 bool V8TestObject::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isola
te) |
| 10793 { | 10793 { |
| 10794 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 10794 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 10795 } | 10795 } |
| 10796 | 10796 |
| 10797 v8::Handle<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Handle<v8:
:Value> v8Value, v8::Isolate* isolate) | 10797 v8::Handle<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Handle<v8:
:Value> v8Value, v8::Isolate* isolate) |
| 10798 { | 10798 { |
| 10799 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 10799 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 10800 } | 10800 } |
| 10801 | 10801 |
| 10802 TestObject* V8TestObject::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle
<v8::Value> value) | 10802 TestObject* V8TestObject::toImplWithTypeCheck(v8::Isolate* isolate, v8::Handle<v
8::Value> value) |
| 10803 { | 10803 { |
| 10804 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 10804 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle
<v8::Object>::Cast(value))->toImpl<TestObject>() : 0; |
| 10805 } | 10805 } |
| 10806 | 10806 |
| 10807 void V8TestObject::installConditionallyEnabledProperties(v8::Handle<v8::Object>
instanceObject, v8::Isolate* isolate) | 10807 void V8TestObject::installConditionallyEnabledProperties(v8::Handle<v8::Object>
instanceObject, v8::Isolate* isolate) |
| 10808 { | 10808 { |
| 10809 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance
Object->GetPrototype()); | 10809 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance
Object->GetPrototype()); |
| 10810 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | 10810 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); |
| 10811 | 10811 |
| 10812 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | 10812 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { |
| 10813 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 10813 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 10814 {"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}; | 10814 {"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}; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 10828 ASSERT(context); | 10828 ASSERT(context); |
| 10829 | 10829 |
| 10830 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { | 10830 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) { |
| 10831 prototypeObject->Set(v8AtomicString(isolate, "perContextEnabledVoidMetho
d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledV
oidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); | 10831 prototypeObject->Set(v8AtomicString(isolate, "perContextEnabledVoidMetho
d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledV
oidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
| 10832 } | 10832 } |
| 10833 } | 10833 } |
| 10834 | 10834 |
| 10835 | 10835 |
| 10836 void V8TestObject::refObject(ScriptWrappableBase* internalPointer) | 10836 void V8TestObject::refObject(ScriptWrappableBase* internalPointer) |
| 10837 { | 10837 { |
| 10838 fromInternalPointer(internalPointer)->ref(); | 10838 internalPointer->toImpl<TestObject>()->ref(); |
| 10839 } | 10839 } |
| 10840 | 10840 |
| 10841 void V8TestObject::derefObject(ScriptWrappableBase* internalPointer) | 10841 void V8TestObject::derefObject(ScriptWrappableBase* internalPointer) |
| 10842 { | 10842 { |
| 10843 fromInternalPointer(internalPointer)->deref(); | 10843 internalPointer->toImpl<TestObject>()->deref(); |
| 10844 } | 10844 } |
| 10845 | 10845 |
| 10846 WrapperPersistentNode* V8TestObject::createPersistentHandle(ScriptWrappableBase*
internalPointer) | 10846 WrapperPersistentNode* V8TestObject::createPersistentHandle(ScriptWrappableBase*
internalPointer) |
| 10847 { | 10847 { |
| 10848 ASSERT_NOT_REACHED(); | 10848 ASSERT_NOT_REACHED(); |
| 10849 return 0; | 10849 return 0; |
| 10850 } | 10850 } |
| 10851 | 10851 |
| 10852 template<> | 10852 template<> |
| 10853 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 10853 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10997 v8::Handle<v8::Value> valueHandle = toV8(value, scriptState->context()->Glob
al(), scriptState->isolate()); | 10997 v8::Handle<v8::Value> valueHandle = toV8(value, scriptState->context()->Glob
al(), scriptState->isolate()); |
| 10998 v8::Handle<v8::Value> argv[] = { valueHandle }; | 10998 v8::Handle<v8::Value> argv[] = { valueHandle }; |
| 10999 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context()
->Global(), scriptState->isolate()); | 10999 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context()
->Global(), scriptState->isolate()); |
| 11000 v8::TryCatch block; | 11000 v8::TryCatch block; |
| 11001 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder,
1, argv); | 11001 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder,
1, argv); |
| 11002 if (block.HasCaught()) { | 11002 if (block.HasCaught()) { |
| 11003 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | 11003 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); |
| 11004 block.ReThrow(); | 11004 block.ReThrow(); |
| 11005 return false; | 11005 return false; |
| 11006 } | 11006 } |
| 11007 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 11007 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toImplWithTypeCheck(scriptState->i
solate(), v8Value), false); |
| 11008 RELEASE_ASSERT(!exceptionState.hadException()); | 11008 RELEASE_ASSERT(!exceptionState.hadException()); |
| 11009 *result = cppValue; | 11009 *result = cppValue; |
| 11010 return true; | 11010 return true; |
| 11011 } | 11011 } |
| 11012 | 11012 |
| 11013 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) | 11013 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) |
| 11014 { | 11014 { |
| 11015 if (!frame) | 11015 if (!frame) |
| 11016 return false; | 11016 return false; |
| 11017 v8::HandleScope handleScope(toIsolate(frame)); | 11017 v8::HandleScope handleScope(toIsolate(frame)); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 11033 v8::Handle<v8::Value> stringHandle = v8String(scriptState->isolate(), string
); | 11033 v8::Handle<v8::Value> stringHandle = v8String(scriptState->isolate(), string
); |
| 11034 v8::Handle<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, v
alue2Handle, stringHandle }; | 11034 v8::Handle<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, v
alue2Handle, stringHandle }; |
| 11035 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); | 11035 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW
ithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->conte
xt()->Global(), scriptState->isolate()); |
| 11036 v8::TryCatch block; | 11036 v8::TryCatch block; |
| 11037 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", hol
der, 5, argv); | 11037 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat
e, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", hol
der, 5, argv); |
| 11038 if (block.HasCaught()) { | 11038 if (block.HasCaught()) { |
| 11039 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | 11039 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); |
| 11040 block.ReThrow(); | 11040 block.ReThrow(); |
| 11041 return false; | 11041 return false; |
| 11042 } | 11042 } |
| 11043 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 11043 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toImplWithTypeCheck(scriptState->i
solate(), v8Value), false); |
| 11044 RELEASE_ASSERT(!exceptionState.hadException()); | 11044 RELEASE_ASSERT(!exceptionState.hadException()); |
| 11045 *result = cppValue; | 11045 *result = cppValue; |
| 11046 return true; | 11046 return true; |
| 11047 } | 11047 } |
| 11048 | 11048 |
| 11049 bool V8TestObject::PrivateScript::methodForPrivateScriptOnlyMethod(LocalFrame* f
rame, TestObject* holderImpl, int value1, int value2, int* result) | 11049 bool V8TestObject::PrivateScript::methodForPrivateScriptOnlyMethod(LocalFrame* f
rame, TestObject* holderImpl, int value1, int value2, int* result) |
| 11050 { | 11050 { |
| 11051 if (!frame) | 11051 if (!frame) |
| 11052 return false; | 11052 return false; |
| 11053 v8::HandleScope handleScope(toIsolate(frame)); | 11053 v8::HandleScope handleScope(toIsolate(frame)); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11240 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11240 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
| 11241 | 11241 |
| 11242 ExceptionState exceptionState(ExceptionState::GetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); | 11242 ExceptionState exceptionState(ExceptionState::GetterContext, "nodeAttribute"
, "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| 11243 v8::TryCatch block; | 11243 v8::TryCatch block; |
| 11244 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "nodeAttribute", holder); | 11244 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s
criptState, "TestObject", "nodeAttribute", holder); |
| 11245 if (block.HasCaught()) { | 11245 if (block.HasCaught()) { |
| 11246 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | 11246 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); |
| 11247 block.ReThrow(); | 11247 block.ReThrow(); |
| 11248 return false; | 11248 return false; |
| 11249 } | 11249 } |
| 11250 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toNativeWithTypeCheck(scriptState-
>isolate(), v8Value), false); | 11250 TONATIVE_DEFAULT(Node*, cppValue, V8Node::toImplWithTypeCheck(scriptState->i
solate(), v8Value), false); |
| 11251 RELEASE_ASSERT(!exceptionState.hadException()); | 11251 RELEASE_ASSERT(!exceptionState.hadException()); |
| 11252 *result = cppValue; | 11252 *result = cppValue; |
| 11253 return true; | 11253 return true; |
| 11254 } | 11254 } |
| 11255 | 11255 |
| 11256 bool V8TestObject::PrivateScript::nodeAttributeAttributeSetter(LocalFrame* frame
, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue) | 11256 bool V8TestObject::PrivateScript::nodeAttributeAttributeSetter(LocalFrame* frame
, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue) |
| 11257 { | 11257 { |
| 11258 if (!frame) | 11258 if (!frame) |
| 11259 return false; | 11259 return false; |
| 11260 v8::HandleScope handleScope(toIsolate(frame)); | 11260 v8::HandleScope handleScope(toIsolate(frame)); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11388 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF
orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); | 11388 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF
orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); |
| 11389 if (block.HasCaught()) { | 11389 if (block.HasCaught()) { |
| 11390 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | 11390 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); |
| 11391 block.ReThrow(); | 11391 block.ReThrow(); |
| 11392 return false; | 11392 return false; |
| 11393 } | 11393 } |
| 11394 return true; | 11394 return true; |
| 11395 } | 11395 } |
| 11396 | 11396 |
| 11397 } // namespace blink | 11397 } // namespace blink |
| OLD | NEW |