OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 namespace WebCore { | 92 namespace WebCore { |
93 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::derefObject, 0, V8TestObject::toEventTarge
t, 0, V8TestObject::installPerContextEnabledMethods, &V8EventTarget::wrapperType
Info, WrapperTypeObjectPrototype, false }; | 93 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::derefObject, 0, V8TestObject::toEventTarge
t, 0, V8TestObject::installPerContextEnabledMethods, &V8EventTarget::wrapperType
Info, WrapperTypeObjectPrototype, false }; |
94 | 94 |
95 namespace TestObjectV8Internal { | 95 namespace TestObjectV8Internal { |
96 | 96 |
97 template <typename T> void V8_USE(T) { } | 97 template <typename T> void V8_USE(T) { } |
98 | 98 |
99 static void readOnlyLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 99 static void readOnlyLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
100 { | 100 { |
101 TestObject* imp = V8TestObject::toNative(info.Holder()); | 101 TestObject* impl = V8TestObject::toNative(info.Holder()); |
102 v8SetReturnValueInt(info, imp->readOnlyLongAttr()); | 102 v8SetReturnValueInt(info, impl->readOnlyLongAttr()); |
103 } | 103 } |
104 | 104 |
105 static void readOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 105 static void readOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
106 { | 106 { |
107 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 107 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
108 TestObjectV8Internal::readOnlyLongAttrAttributeGetter(info); | 108 TestObjectV8Internal::readOnlyLongAttrAttributeGetter(info); |
109 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 109 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
110 } | 110 } |
111 | 111 |
112 static void readOnlyStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 112 static void readOnlyStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
113 { | 113 { |
114 TestObject* imp = V8TestObject::toNative(info.Holder()); | 114 TestObject* impl = V8TestObject::toNative(info.Holder()); |
115 v8SetReturnValueString(info, imp->readOnlyStringAttr(), info.GetIsolate()); | 115 v8SetReturnValueString(info, impl->readOnlyStringAttr(), info.GetIsolate()); |
116 } | 116 } |
117 | 117 |
118 static void readOnlyStringAttrAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 118 static void readOnlyStringAttrAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
119 { | 119 { |
120 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 120 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
121 TestObjectV8Internal::readOnlyStringAttrAttributeGetter(info); | 121 TestObjectV8Internal::readOnlyStringAttrAttributeGetter(info); |
122 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 122 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
123 } | 123 } |
124 | 124 |
125 static void readOnlyTestObjectAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 125 static void readOnlyTestObjectAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
126 { | 126 { |
127 TestObject* imp = V8TestObject::toNative(info.Holder()); | 127 TestObject* impl = V8TestObject::toNative(info.Holder()); |
128 RefPtr<TestObject> result(imp->readOnlyTestObjectAttr()); | 128 RefPtr<TestObject> result(impl->readOnlyTestObjectAttr()); |
129 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) | 129 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) |
130 return; | 130 return; |
131 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 131 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
132 if (!wrapper.IsEmpty()) { | 132 if (!wrapper.IsEmpty()) { |
133 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), v8Atomic
String(info.GetIsolate(), "readOnlyTestObjectAttr"), wrapper); | 133 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), v8Atomic
String(info.GetIsolate(), "readOnlyTestObjectAttr"), wrapper); |
134 v8SetReturnValue(info, wrapper); | 134 v8SetReturnValue(info, wrapper); |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
138 static void readOnlyTestObjectAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 138 static void readOnlyTestObjectAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 175 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
176 { | 176 { |
177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
178 TestObjectV8Internal::staticStringAttrAttributeSetter(jsValue, info); | 178 TestObjectV8Internal::staticStringAttrAttributeSetter(jsValue, info); |
179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
180 } | 180 } |
181 | 181 |
182 static void enumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 182 static void enumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
183 { | 183 { |
184 TestObject* imp = V8TestObject::toNative(info.Holder()); | 184 TestObject* impl = V8TestObject::toNative(info.Holder()); |
185 v8SetReturnValueString(info, imp->enumAttr(), info.GetIsolate()); | 185 v8SetReturnValueString(info, impl->enumAttr(), info.GetIsolate()); |
186 } | 186 } |
187 | 187 |
188 static void enumAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 188 static void enumAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
189 { | 189 { |
190 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 190 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
191 TestObjectV8Internal::enumAttrAttributeGetter(info); | 191 TestObjectV8Internal::enumAttrAttributeGetter(info); |
192 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 192 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
193 } | 193 } |
194 | 194 |
195 static void enumAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 195 static void enumAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
196 { | 196 { |
197 TestObject* imp = V8TestObject::toNative(info.Holder()); | 197 TestObject* impl = V8TestObject::toNative(info.Holder()); |
198 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 198 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
199 String string = cppValue; | 199 String string = cppValue; |
200 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 200 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
201 return; | 201 return; |
202 imp->setEnumAttr(cppValue); | 202 impl->setEnumAttr(cppValue); |
203 } | 203 } |
204 | 204 |
205 static void enumAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 205 static void enumAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
206 { | 206 { |
207 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 207 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
208 TestObjectV8Internal::enumAttrAttributeSetter(jsValue, info); | 208 TestObjectV8Internal::enumAttrAttributeSetter(jsValue, info); |
209 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 209 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
210 } | 210 } |
211 | 211 |
212 static void readOnlyEnumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 212 static void readOnlyEnumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
213 { | 213 { |
214 TestObject* imp = V8TestObject::toNative(info.Holder()); | 214 TestObject* impl = V8TestObject::toNative(info.Holder()); |
215 v8SetReturnValueString(info, imp->readOnlyEnumAttr(), info.GetIsolate()); | 215 v8SetReturnValueString(info, impl->readOnlyEnumAttr(), info.GetIsolate()); |
216 } | 216 } |
217 | 217 |
218 static void readOnlyEnumAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 218 static void readOnlyEnumAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
219 { | 219 { |
220 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 220 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
221 TestObjectV8Internal::readOnlyEnumAttrAttributeGetter(info); | 221 TestObjectV8Internal::readOnlyEnumAttrAttributeGetter(info); |
222 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 222 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
223 } | 223 } |
224 | 224 |
225 static void byteAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 225 static void byteAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
226 { | 226 { |
227 TestObject* imp = V8TestObject::toNative(info.Holder()); | 227 TestObject* impl = V8TestObject::toNative(info.Holder()); |
228 v8SetReturnValueInt(info, imp->byteAttr()); | 228 v8SetReturnValueInt(info, impl->byteAttr()); |
229 } | 229 } |
230 | 230 |
231 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 231 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
232 { | 232 { |
233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
234 TestObjectV8Internal::byteAttrAttributeGetter(info); | 234 TestObjectV8Internal::byteAttrAttributeGetter(info); |
235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
236 } | 236 } |
237 | 237 |
238 static void byteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 238 static void byteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
239 { | 239 { |
240 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttr", "Te
stObject", info.Holder(), info.GetIsolate()); | 240 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttr", "Te
stObject", info.Holder(), info.GetIsolate()); |
241 TestObject* imp = V8TestObject::toNative(info.Holder()); | 241 TestObject* impl = V8TestObject::toNative(info.Holder()); |
242 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, exceptionState), ex
ceptionState); | 242 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, exceptionState), ex
ceptionState); |
243 imp->setByteAttr(cppValue); | 243 impl->setByteAttr(cppValue); |
244 } | 244 } |
245 | 245 |
246 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 246 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
247 { | 247 { |
248 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 248 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
249 TestObjectV8Internal::byteAttrAttributeSetter(jsValue, info); | 249 TestObjectV8Internal::byteAttrAttributeSetter(jsValue, info); |
250 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 250 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
251 } | 251 } |
252 | 252 |
253 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 253 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
254 { | 254 { |
255 TestObject* imp = V8TestObject::toNative(info.Holder()); | 255 TestObject* impl = V8TestObject::toNative(info.Holder()); |
256 v8SetReturnValueUnsigned(info, imp->octetAttr()); | 256 v8SetReturnValueUnsigned(info, impl->octetAttr()); |
257 } | 257 } |
258 | 258 |
259 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 259 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
260 { | 260 { |
261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
262 TestObjectV8Internal::octetAttrAttributeGetter(info); | 262 TestObjectV8Internal::octetAttrAttributeGetter(info); |
263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
264 } | 264 } |
265 | 265 |
266 static void octetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro
pertyCallbackInfo<void>& info) | 266 static void octetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro
pertyCallbackInfo<void>& info) |
267 { | 267 { |
268 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttr", "T
estObject", info.Holder(), info.GetIsolate()); | 268 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttr", "T
estObject", info.Holder(), info.GetIsolate()); |
269 TestObject* imp = V8TestObject::toNative(info.Holder()); | 269 TestObject* impl = V8TestObject::toNative(info.Holder()); |
270 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, exceptionStat
e), exceptionState); | 270 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, exceptionStat
e), exceptionState); |
271 imp->setOctetAttr(cppValue); | 271 impl->setOctetAttr(cppValue); |
272 } | 272 } |
273 | 273 |
274 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 274 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
275 { | 275 { |
276 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 276 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
277 TestObjectV8Internal::octetAttrAttributeSetter(jsValue, info); | 277 TestObjectV8Internal::octetAttrAttributeSetter(jsValue, info); |
278 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 278 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
279 } | 279 } |
280 | 280 |
281 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 281 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
282 { | 282 { |
283 TestObject* imp = V8TestObject::toNative(info.Holder()); | 283 TestObject* impl = V8TestObject::toNative(info.Holder()); |
284 v8SetReturnValueInt(info, imp->shortAttr()); | 284 v8SetReturnValueInt(info, impl->shortAttr()); |
285 } | 285 } |
286 | 286 |
287 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 287 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
288 { | 288 { |
289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
290 TestObjectV8Internal::shortAttrAttributeGetter(info); | 290 TestObjectV8Internal::shortAttrAttributeGetter(info); |
291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
292 } | 292 } |
293 | 293 |
294 static void shortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro
pertyCallbackInfo<void>& info) | 294 static void shortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro
pertyCallbackInfo<void>& info) |
295 { | 295 { |
296 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttr", "T
estObject", info.Holder(), info.GetIsolate()); | 296 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttr", "T
estObject", info.Holder(), info.GetIsolate()); |
297 TestObject* imp = V8TestObject::toNative(info.Holder()); | 297 TestObject* impl = V8TestObject::toNative(info.Holder()); |
298 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, exceptionState), e
xceptionState); | 298 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, exceptionState), e
xceptionState); |
299 imp->setShortAttr(cppValue); | 299 impl->setShortAttr(cppValue); |
300 } | 300 } |
301 | 301 |
302 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 302 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
303 { | 303 { |
304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
305 TestObjectV8Internal::shortAttrAttributeSetter(jsValue, info); | 305 TestObjectV8Internal::shortAttrAttributeSetter(jsValue, info); |
306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
307 } | 307 } |
308 | 308 |
309 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 309 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
310 { | 310 { |
311 TestObject* imp = V8TestObject::toNative(info.Holder()); | 311 TestObject* impl = V8TestObject::toNative(info.Holder()); |
312 v8SetReturnValueUnsigned(info, imp->unsignedShortAttr()); | 312 v8SetReturnValueUnsigned(info, impl->unsignedShortAttr()); |
313 } | 313 } |
314 | 314 |
315 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 315 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
316 { | 316 { |
317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
318 TestObjectV8Internal::unsignedShortAttrAttributeGetter(info); | 318 TestObjectV8Internal::unsignedShortAttrAttributeGetter(info); |
319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
320 } | 320 } |
321 | 321 |
322 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 322 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
323 { | 323 { |
324 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttr", "TestObject", info.Holder(), info.GetIsolate()); | 324 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttr", "TestObject", info.Holder(), info.GetIsolate()); |
325 TestObject* imp = V8TestObject::toNative(info.Holder()); | 325 TestObject* impl = V8TestObject::toNative(info.Holder()); |
326 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, exceptionSta
te), exceptionState); | 326 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, exceptionSta
te), exceptionState); |
327 imp->setUnsignedShortAttr(cppValue); | 327 impl->setUnsignedShortAttr(cppValue); |
328 } | 328 } |
329 | 329 |
330 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 330 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
331 { | 331 { |
332 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 332 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
333 TestObjectV8Internal::unsignedShortAttrAttributeSetter(jsValue, info); | 333 TestObjectV8Internal::unsignedShortAttrAttributeSetter(jsValue, info); |
334 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 334 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
335 } | 335 } |
336 | 336 |
337 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 337 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
338 { | 338 { |
339 TestObject* imp = V8TestObject::toNative(info.Holder()); | 339 TestObject* impl = V8TestObject::toNative(info.Holder()); |
340 v8SetReturnValueInt(info, imp->longAttr()); | 340 v8SetReturnValueInt(info, impl->longAttr()); |
341 } | 341 } |
342 | 342 |
343 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 343 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
344 { | 344 { |
345 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 345 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
346 TestObjectV8Internal::longAttrAttributeGetter(info); | 346 TestObjectV8Internal::longAttrAttributeGetter(info); |
347 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 347 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
348 } | 348 } |
349 | 349 |
350 static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 350 static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
351 { | 351 { |
352 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "Te
stObject", info.Holder(), info.GetIsolate()); | 352 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "Te
stObject", info.Holder(), info.GetIsolate()); |
353 TestObject* imp = V8TestObject::toNative(info.Holder()); | 353 TestObject* impl = V8TestObject::toNative(info.Holder()); |
354 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 354 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
355 imp->setLongAttr(cppValue); | 355 impl->setLongAttr(cppValue); |
356 } | 356 } |
357 | 357 |
358 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 358 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
359 { | 359 { |
360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
361 TestObjectV8Internal::longAttrAttributeSetter(jsValue, info); | 361 TestObjectV8Internal::longAttrAttributeSetter(jsValue, info); |
362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
363 } | 363 } |
364 | 364 |
365 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 365 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
366 { | 366 { |
367 TestObject* imp = V8TestObject::toNative(info.Holder()); | 367 TestObject* impl = V8TestObject::toNative(info.Holder()); |
368 v8SetReturnValue(info, static_cast<double>(imp->longLongAttr())); | 368 v8SetReturnValue(info, static_cast<double>(impl->longLongAttr())); |
369 } | 369 } |
370 | 370 |
371 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 371 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
372 { | 372 { |
373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
374 TestObjectV8Internal::longLongAttrAttributeGetter(info); | 374 TestObjectV8Internal::longLongAttrAttributeGetter(info); |
375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
376 } | 376 } |
377 | 377 |
378 static void longLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::
PropertyCallbackInfo<void>& info) | 378 static void longLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::
PropertyCallbackInfo<void>& info) |
379 { | 379 { |
380 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttr",
"TestObject", info.Holder(), info.GetIsolate()); | 380 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttr",
"TestObject", info.Holder(), info.GetIsolate()); |
381 TestObject* imp = V8TestObject::toNative(info.Holder()); | 381 TestObject* impl = V8TestObject::toNative(info.Holder()); |
382 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, exceptionSta
te), exceptionState); | 382 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, exceptionSta
te), exceptionState); |
383 imp->setLongLongAttr(cppValue); | 383 impl->setLongLongAttr(cppValue); |
384 } | 384 } |
385 | 385 |
386 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 386 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
387 { | 387 { |
388 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 388 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
389 TestObjectV8Internal::longLongAttrAttributeSetter(jsValue, info); | 389 TestObjectV8Internal::longLongAttrAttributeSetter(jsValue, info); |
390 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 390 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
391 } | 391 } |
392 | 392 |
393 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 393 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
394 { | 394 { |
395 TestObject* imp = V8TestObject::toNative(info.Holder()); | 395 TestObject* impl = V8TestObject::toNative(info.Holder()); |
396 v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttr())); | 396 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttr())); |
397 } | 397 } |
398 | 398 |
399 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 399 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
400 { | 400 { |
401 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 401 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
402 TestObjectV8Internal::unsignedLongLongAttrAttributeGetter(info); | 402 TestObjectV8Internal::unsignedLongLongAttrAttributeGetter(info); |
403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
404 } | 404 } |
405 | 405 |
406 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 406 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
407 { | 407 { |
408 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestObject", info.Holder(), info.GetIsolate()); | 408 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestObject", info.Holder(), info.GetIsolate()); |
409 TestObject* imp = V8TestObject::toNative(info.Holder()); | 409 TestObject* impl = V8TestObject::toNative(info.Holder()); |
410 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, ex
ceptionState), exceptionState); | 410 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, ex
ceptionState), exceptionState); |
411 imp->setUnsignedLongLongAttr(cppValue); | 411 impl->setUnsignedLongLongAttr(cppValue); |
412 } | 412 } |
413 | 413 |
414 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 414 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
415 { | 415 { |
416 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 416 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
417 TestObjectV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info); | 417 TestObjectV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info); |
418 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 418 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
419 } | 419 } |
420 | 420 |
421 static void stringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 421 static void stringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
422 { | 422 { |
423 TestObject* imp = V8TestObject::toNative(info.Holder()); | 423 TestObject* impl = V8TestObject::toNative(info.Holder()); |
424 v8SetReturnValueString(info, imp->stringAttr(), info.GetIsolate()); | 424 v8SetReturnValueString(info, impl->stringAttr(), info.GetIsolate()); |
425 } | 425 } |
426 | 426 |
427 static void stringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 427 static void stringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
428 { | 428 { |
429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
430 TestObjectV8Internal::stringAttrAttributeGetter(info); | 430 TestObjectV8Internal::stringAttrAttributeGetter(info); |
431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
432 } | 432 } |
433 | 433 |
434 static void stringAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 434 static void stringAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) |
435 { | 435 { |
436 TestObject* imp = V8TestObject::toNative(info.Holder()); | 436 TestObject* impl = V8TestObject::toNative(info.Holder()); |
437 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 437 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
438 imp->setStringAttr(cppValue); | 438 impl->setStringAttr(cppValue); |
439 } | 439 } |
440 | 440 |
441 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 441 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
442 { | 442 { |
443 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 443 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
444 TestObjectV8Internal::stringAttrAttributeSetter(jsValue, info); | 444 TestObjectV8Internal::stringAttrAttributeSetter(jsValue, info); |
445 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 445 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
446 } | 446 } |
447 | 447 |
448 static void treatNullAsNullStringStringAttrAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 448 static void treatNullAsNullStringStringAttrAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
449 { | 449 { |
450 TestObject* imp = V8TestObject::toNative(info.Holder()); | 450 TestObject* impl = V8TestObject::toNative(info.Holder()); |
451 v8SetReturnValueString(info, imp->treatNullAsNullStringStringAttr(), info.Ge
tIsolate()); | 451 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttr(), info.G
etIsolate()); |
452 } | 452 } |
453 | 453 |
454 static void treatNullAsNullStringStringAttrAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 454 static void treatNullAsNullStringStringAttrAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
455 { | 455 { |
456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
457 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeGetter(info); | 457 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeGetter(info); |
458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
459 } | 459 } |
460 | 460 |
461 static void treatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 461 static void treatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) |
462 { | 462 { |
463 TestObject* imp = V8TestObject::toNative(info.Holder()); | 463 TestObject* impl = V8TestObject::toNative(info.Holder()); |
464 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 464 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); |
465 imp->setTreatNullAsNullStringStringAttr(cppValue); | 465 impl->setTreatNullAsNullStringStringAttr(cppValue); |
466 } | 466 } |
467 | 467 |
468 static void treatNullAsNullStringStringAttrAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) | 468 static void treatNullAsNullStringStringAttrAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) |
469 { | 469 { |
470 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 470 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
471 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeSetter(jsValue
, info); | 471 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeSetter(jsValue
, info); |
472 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 472 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
473 } | 473 } |
474 | 474 |
475 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tter(const v8::PropertyCallbackInfo<v8::Value>& info) | 475 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tter(const v8::PropertyCallbackInfo<v8::Value>& info) |
476 { | 476 { |
477 TestObject* imp = V8TestObject::toNative(info.Holder()); | 477 TestObject* impl = V8TestObject::toNative(info.Holder()); |
478 v8SetReturnValueString(info, imp->treatNullAsNullStringTreatUndefinedAsNullS
tringStringAttr(), info.GetIsolate()); | 478 v8SetReturnValueString(info, impl->treatNullAsNullStringTreatUndefinedAsNull
StringStringAttr(), info.GetIsolate()); |
479 } | 479 } |
480 | 480 |
481 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 481 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
482 { | 482 { |
483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
484 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeGetter(info); | 484 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeGetter(info); |
485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
486 } | 486 } |
487 | 487 |
488 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 488 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
489 { | 489 { |
490 TestObject* imp = V8TestObject::toNative(info.Holder()); | 490 TestObject* impl = V8TestObject::toNative(info.Holder()); |
491 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 491 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); |
492 imp->setTreatNullAsNullStringTreatUndefinedAsNullStringStringAttr(cppValue); | 492 impl->setTreatNullAsNullStringTreatUndefinedAsNullStringStringAttr(cppValue)
; |
493 } | 493 } |
494 | 494 |
495 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 495 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
496 { | 496 { |
497 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 497 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
498 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeSetter(jsValue, info); | 498 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeSetter(jsValue, info); |
499 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 499 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
500 } | 500 } |
501 | 501 |
502 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 502 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
503 { | 503 { |
504 TestObject* imp = V8TestObject::toNative(info.Holder()); | 504 TestObject* impl = V8TestObject::toNative(info.Holder()); |
505 EventListener* jsValue = imp->eventHandlerAttr(); | 505 EventListener* jsValue = impl->eventHandlerAttr(); |
506 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::
Value>(v8::Null(info.GetIsolate()))); | 506 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); |
507 } | 507 } |
508 | 508 |
509 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 509 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
510 { | 510 { |
511 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 511 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
512 TestObjectV8Internal::eventHandlerAttrAttributeGetter(info); | 512 TestObjectV8Internal::eventHandlerAttrAttributeGetter(info); |
513 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 513 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
514 } | 514 } |
515 | 515 |
516 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 516 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
517 { | 517 { |
518 TestObject* imp = V8TestObject::toNative(info.Holder()); | 518 TestObject* impl = V8TestObject::toNative(info.Holder()); |
519 moveEventListenerToNewWrapper(info.Holder(), imp->eventHandlerAttr(), jsValu
e, V8TestObject::eventListenerCacheIndex, info.GetIsolate()); | 519 moveEventListenerToNewWrapper(info.Holder(), impl->eventHandlerAttr(), jsVal
ue, V8TestObject::eventListenerCacheIndex, info.GetIsolate()); |
520 imp->setEventHandlerAttr(V8EventListenerList::getEventListener(jsValue, true
, ListenerFindOrCreate)); | 520 impl->setEventHandlerAttr(V8EventListenerList::getEventListener(jsValue, tru
e, ListenerFindOrCreate)); |
521 } | 521 } |
522 | 522 |
523 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 523 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, 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::eventHandlerAttrAttributeSetter(jsValue, info); | 526 TestObjectV8Internal::eventHandlerAttrAttributeSetter(jsValue, info); |
527 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 527 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
528 } | 528 } |
529 | 529 |
530 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 530 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
531 { | 531 { |
532 TestObject* imp = V8TestObject::toNative(info.Holder()); | 532 TestObject* impl = V8TestObject::toNative(info.Holder()); |
533 v8SetReturnValueFast(info, WTF::getPtr(imp->testObjAttr()), imp); | 533 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjAttr()), impl); |
534 } | 534 } |
535 | 535 |
536 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 536 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
537 { | 537 { |
538 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 538 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
539 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 539 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
540 TestObjectV8Internal::testObjAttrAttributeGetter(info); | 540 TestObjectV8Internal::testObjAttrAttributeGetter(info); |
541 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 541 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
542 } | 542 } |
543 | 543 |
544 static void testObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) | 544 static void testObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) |
545 { | 545 { |
546 TestObject* imp = V8TestObject::toNative(info.Holder()); | 546 TestObject* impl = V8TestObject::toNative(info.Holder()); |
547 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 547 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
548 imp->setTestObjAttr(WTF::getPtr(cppValue)); | 548 impl->setTestObjAttr(WTF::getPtr(cppValue)); |
549 } | 549 } |
550 | 550 |
551 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 551 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
552 { | 552 { |
553 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 553 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
554 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 554 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
555 TestObjectV8Internal::testObjAttrAttributeSetter(jsValue, info); | 555 TestObjectV8Internal::testObjAttrAttributeSetter(jsValue, info); |
556 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 556 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
557 } | 557 } |
558 | 558 |
559 static void attrWithJSGetterAndSetterAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 559 static void attrWithJSGetterAndSetterAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
560 { | 560 { |
561 TestObject* imp = V8TestObject::toNative(info.Holder()); | 561 TestObject* impl = V8TestObject::toNative(info.Holder()); |
562 v8SetReturnValueString(info, imp->attrWithJSGetterAndSetter(), info.GetIsola
te()); | 562 v8SetReturnValueString(info, impl->attrWithJSGetterAndSetter(), info.GetIsol
ate()); |
563 } | 563 } |
564 | 564 |
565 static void attrWithJSGetterAndSetterAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 565 static void attrWithJSGetterAndSetterAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
566 { | 566 { |
567 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 567 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
568 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeGetter(info); | 568 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeGetter(info); |
569 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 569 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
570 } | 570 } |
571 | 571 |
572 static void attrWithJSGetterAndSetterAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::FunctionCallbackInfo<v8::Value>& info) | 572 static void attrWithJSGetterAndSetterAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::FunctionCallbackInfo<v8::Value>& info) |
573 { | 573 { |
574 TestObject* imp = V8TestObject::toNative(info.Holder()); | 574 TestObject* impl = V8TestObject::toNative(info.Holder()); |
575 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 575 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
576 imp->setAttrWithJSGetterAndSetter(cppValue); | 576 impl->setAttrWithJSGetterAndSetter(cppValue); |
577 } | 577 } |
578 | 578 |
579 static void attrWithJSGetterAndSetterAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 579 static void attrWithJSGetterAndSetterAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
580 { | 580 { |
581 v8::Local<v8::Value> jsValue = info[0]; | 581 v8::Local<v8::Value> jsValue = info[0]; |
582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
583 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeSetter(jsValue, info
); | 583 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeSetter(jsValue, info
); |
584 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 584 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
585 } | 585 } |
586 | 586 |
587 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 587 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
588 { | 588 { |
589 TestObject* imp = V8TestObject::toNative(info.Holder()); | 589 TestObject* impl = V8TestObject::toNative(info.Holder()); |
590 v8SetReturnValueFast(info, WTF::getPtr(imp->xmlObjAttr()), imp); | 590 v8SetReturnValueFast(info, WTF::getPtr(impl->xmlObjAttr()), impl); |
591 } | 591 } |
592 | 592 |
593 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 593 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
594 { | 594 { |
595 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 595 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
596 TestObjectV8Internal::XMLObjAttrAttributeGetter(info); | 596 TestObjectV8Internal::XMLObjAttrAttributeGetter(info); |
597 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 597 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
598 } | 598 } |
599 | 599 |
600 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 600 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) |
601 { | 601 { |
602 TestObject* imp = V8TestObject::toNative(info.Holder()); | 602 TestObject* impl = V8TestObject::toNative(info.Holder()); |
603 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 603 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
604 imp->setXMLObjAttr(WTF::getPtr(cppValue)); | 604 impl->setXMLObjAttr(WTF::getPtr(cppValue)); |
605 } | 605 } |
606 | 606 |
607 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 607 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
608 { | 608 { |
609 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 609 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
610 TestObjectV8Internal::XMLObjAttrAttributeSetter(jsValue, info); | 610 TestObjectV8Internal::XMLObjAttrAttributeSetter(jsValue, info); |
611 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 611 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
612 } | 612 } |
613 | 613 |
614 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 614 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
615 { | 615 { |
616 TestObject* imp = V8TestObject::toNative(info.Holder()); | 616 TestObject* impl = V8TestObject::toNative(info.Holder()); |
617 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::reflectedstrin
gattrAttr), info.GetIsolate()); | 617 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedstri
ngattrAttr), info.GetIsolate()); |
618 } | 618 } |
619 | 619 |
620 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 620 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
621 { | 621 { |
622 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 622 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
623 TestObjectV8Internal::reflectedStringAttrAttributeGetter(info); | 623 TestObjectV8Internal::reflectedStringAttrAttributeGetter(info); |
624 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 624 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
625 } | 625 } |
626 | 626 |
627 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 627 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) |
628 { | 628 { |
629 TestObject* imp = V8TestObject::toNative(info.Holder()); | 629 TestObject* impl = V8TestObject::toNative(info.Holder()); |
630 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 630 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
631 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 631 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
632 imp->setAttribute(HTMLNames::reflectedstringattrAttr, cppValue); | 632 impl->setAttribute(HTMLNames::reflectedstringattrAttr, cppValue); |
633 } | 633 } |
634 | 634 |
635 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 635 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
636 { | 636 { |
637 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 637 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
638 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 638 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
639 TestObjectV8Internal::reflectedStringAttrAttributeSetter(jsValue, info); | 639 TestObjectV8Internal::reflectedStringAttrAttributeSetter(jsValue, info); |
640 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 640 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
641 } | 641 } |
642 | 642 |
643 static void reflectedTreatNullAsNullStringStringAttrAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 643 static void reflectedTreatNullAsNullStringStringAttrAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
644 { | 644 { |
645 TestObject* imp = V8TestObject::toNative(info.Holder()); | 645 TestObject* impl = V8TestObject::toNative(info.Holder()); |
646 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::reflectedtreat
nullasnullstringstringattrAttr), info.GetIsolate()); | 646 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringstringattrAttr), info.GetIsolate()); |
647 } | 647 } |
648 | 648 |
649 static void reflectedTreatNullAsNullStringStringAttrAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 649 static void reflectedTreatNullAsNullStringStringAttrAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
650 { | 650 { |
651 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 651 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
652 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeGette
r(info); | 652 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeGette
r(info); |
653 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 653 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
654 } | 654 } |
655 | 655 |
656 static void reflectedTreatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 656 static void reflectedTreatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
657 { | 657 { |
658 TestObject* imp = V8TestObject::toNative(info.Holder()); | 658 TestObject* impl = V8TestObject::toNative(info.Holder()); |
659 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 659 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); |
660 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 660 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
661 imp->setAttribute(HTMLNames::reflectedtreatnullasnullstringstringattrAttr, c
ppValue); | 661 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringstringattrAttr,
cppValue); |
662 } | 662 } |
663 | 663 |
664 static void reflectedTreatNullAsNullStringStringAttrAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 664 static void reflectedTreatNullAsNullStringStringAttrAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) |
665 { | 665 { |
666 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 666 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
667 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 667 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
668 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeSette
r(jsValue, info); | 668 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeSette
r(jsValue, info); |
669 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 669 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
670 } | 670 } |
671 | 671 |
672 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 672 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
673 { | 673 { |
674 TestObject* imp = V8TestObject::toNative(info.Holder()); | 674 TestObject* impl = V8TestObject::toNative(info.Holder()); |
675 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::reflectedtreat
nullasnullstringtreatundefinedasnullstringstringattrAttr), info.GetIsolate()); | 675 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringtreatundefinedasnullstringstringattrAttr), info.GetIsolate()); |
676 } | 676 } |
677 | 677 |
678 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::
Value>& info) | 678 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::
Value>& info) |
679 { | 679 { |
680 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 680 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
681 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeGetter(info); | 681 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeGetter(info); |
682 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 682 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
683 } | 683 } |
684 | 684 |
685 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>
& info) | 685 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>
& info) |
686 { | 686 { |
687 TestObject* imp = V8TestObject::toNative(info.Holder()); | 687 TestObject* impl = V8TestObject::toNative(info.Holder()); |
688 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 688 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); |
689 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 689 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
690 imp->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedasn
ullstringstringattrAttr, cppValue); | 690 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringstringattrAttr, cppValue); |
691 } | 691 } |
692 | 692 |
693 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 693 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
694 { | 694 { |
695 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 695 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
696 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 696 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
697 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeSetter(jsValue, info); | 697 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeSetter(jsValue, info); |
698 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 698 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
699 } | 699 } |
700 | 700 |
701 static void reflectedIntegralAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 701 static void reflectedIntegralAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
702 { | 702 { |
703 TestObject* imp = V8TestObject::toNative(info.Holder()); | 703 TestObject* impl = V8TestObject::toNative(info.Holder()); |
704 v8SetReturnValueInt(info, imp->getIntegralAttribute(HTMLNames::reflectedinte
gralattrAttr)); | 704 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectedint
egralattrAttr)); |
705 } | 705 } |
706 | 706 |
707 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 707 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
708 { | 708 { |
709 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 709 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
710 TestObjectV8Internal::reflectedIntegralAttrAttributeGetter(info); | 710 TestObjectV8Internal::reflectedIntegralAttrAttributeGetter(info); |
711 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 711 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
712 } | 712 } |
713 | 713 |
714 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 714 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
715 { | 715 { |
716 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedInteg
ralAttr", "TestObject", info.Holder(), info.GetIsolate()); | 716 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedInteg
ralAttr", "TestObject", info.Holder(), info.GetIsolate()); |
717 TestObject* imp = V8TestObject::toNative(info.Holder()); | 717 TestObject* impl = V8TestObject::toNative(info.Holder()); |
718 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 718 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
719 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 719 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
720 imp->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue); | 720 impl->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue); |
721 } | 721 } |
722 | 722 |
723 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 723 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
724 { | 724 { |
725 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 725 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
726 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 726 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
727 TestObjectV8Internal::reflectedIntegralAttrAttributeSetter(jsValue, info); | 727 TestObjectV8Internal::reflectedIntegralAttrAttributeSetter(jsValue, info); |
728 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 728 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
729 } | 729 } |
730 | 730 |
731 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 731 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
732 { | 732 { |
733 TestObject* imp = V8TestObject::toNative(info.Holder()); | 733 TestObject* impl = V8TestObject::toNative(info.Holder()); |
734 v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(HTMLNam
es::reflectedunsignedintegralattrAttr))); | 734 v8SetReturnValueUnsigned(info, std::max(0, impl->getIntegralAttribute(HTMLNa
mes::reflectedunsignedintegralattrAttr))); |
735 } | 735 } |
736 | 736 |
737 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 737 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
738 { | 738 { |
739 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 739 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
740 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info); | 740 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info); |
741 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 741 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
742 } | 742 } |
743 | 743 |
744 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 744 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
745 { | 745 { |
746 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedUnsig
nedIntegralAttr", "TestObject", info.Holder(), info.GetIsolate()); | 746 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedUnsig
nedIntegralAttr", "TestObject", info.Holder(), info.GetIsolate()); |
747 TestObject* imp = V8TestObject::toNative(info.Holder()); | 747 TestObject* impl = V8TestObject::toNative(info.Holder()); |
748 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, exceptionSta
te), exceptionState); | 748 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, exceptionSta
te), exceptionState); |
749 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 749 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
750 imp->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrAt
tr, cppValue); | 750 impl->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrA
ttr, cppValue); |
751 } | 751 } |
752 | 752 |
753 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 753 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
754 { | 754 { |
755 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 755 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
756 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 756 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
757 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(jsValue,
info); | 757 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(jsValue,
info); |
758 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 758 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
759 } | 759 } |
760 | 760 |
761 static void reflectedBooleanAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 761 static void reflectedBooleanAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
762 { | 762 { |
763 TestObject* imp = V8TestObject::toNative(info.Holder()); | 763 TestObject* impl = V8TestObject::toNative(info.Holder()); |
764 v8SetReturnValueBool(info, imp->fastHasAttribute(HTMLNames::reflectedboolean
attrAttr)); | 764 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectedboolea
nattrAttr)); |
765 } | 765 } |
766 | 766 |
767 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 767 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
768 { | 768 { |
769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
770 TestObjectV8Internal::reflectedBooleanAttrAttributeGetter(info); | 770 TestObjectV8Internal::reflectedBooleanAttrAttributeGetter(info); |
771 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 771 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
772 } | 772 } |
773 | 773 |
774 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 774 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
775 { | 775 { |
776 TestObject* imp = V8TestObject::toNative(info.Holder()); | 776 TestObject* impl = V8TestObject::toNative(info.Holder()); |
777 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); | 777 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); |
778 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 778 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
779 imp->setBooleanAttribute(HTMLNames::reflectedbooleanattrAttr, cppValue); | 779 impl->setBooleanAttribute(HTMLNames::reflectedbooleanattrAttr, cppValue); |
780 } | 780 } |
781 | 781 |
782 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 782 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
783 { | 783 { |
784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
785 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 785 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
786 TestObjectV8Internal::reflectedBooleanAttrAttributeSetter(jsValue, info); | 786 TestObjectV8Internal::reflectedBooleanAttrAttributeSetter(jsValue, info); |
787 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 787 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
788 } | 788 } |
789 | 789 |
790 static void reflectedURLAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 790 static void reflectedURLAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
791 { | 791 { |
792 TestObject* imp = V8TestObject::toNative(info.Holder()); | 792 TestObject* impl = V8TestObject::toNative(info.Holder()); |
793 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::reflectedurlatt
rAttr), info.GetIsolate()); | 793 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedurlat
trAttr), info.GetIsolate()); |
794 } | 794 } |
795 | 795 |
796 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 796 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
797 { | 797 { |
798 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 798 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
799 TestObjectV8Internal::reflectedURLAttrAttributeGetter(info); | 799 TestObjectV8Internal::reflectedURLAttrAttributeGetter(info); |
800 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 800 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
801 } | 801 } |
802 | 802 |
803 static void reflectedURLAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 803 static void reflectedURLAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
804 { | 804 { |
805 TestObject* imp = V8TestObject::toNative(info.Holder()); | 805 TestObject* impl = V8TestObject::toNative(info.Holder()); |
806 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 806 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
807 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 807 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
808 imp->setAttribute(HTMLNames::reflectedurlattrAttr, cppValue); | 808 impl->setAttribute(HTMLNames::reflectedurlattrAttr, cppValue); |
809 } | 809 } |
810 | 810 |
811 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 811 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
812 { | 812 { |
813 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 813 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
814 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 814 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
815 TestObjectV8Internal::reflectedURLAttrAttributeSetter(jsValue, info); | 815 TestObjectV8Internal::reflectedURLAttrAttributeSetter(jsValue, info); |
816 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 816 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
817 } | 817 } |
818 | 818 |
819 static void reflectedTreatNullAsNullStringURLAttrAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 819 static void reflectedTreatNullAsNullStringURLAttrAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
820 { | 820 { |
821 TestObject* imp = V8TestObject::toNative(info.Holder()); | 821 TestObject* impl = V8TestObject::toNative(info.Holder()); |
822 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::reflectedtreatn
ullasnullstringurlattrAttr), info.GetIsolate()); | 822 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringurlattrAttr), info.GetIsolate()); |
823 } | 823 } |
824 | 824 |
825 static void reflectedTreatNullAsNullStringURLAttrAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 825 static void reflectedTreatNullAsNullStringURLAttrAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
826 { | 826 { |
827 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 827 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
828 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeGetter(i
nfo); | 828 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeGetter(i
nfo); |
829 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 829 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
830 } | 830 } |
831 | 831 |
832 static void reflectedTreatNullAsNullStringURLAttrAttributeSetter(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 832 static void reflectedTreatNullAsNullStringURLAttrAttributeSetter(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
833 { | 833 { |
834 TestObject* imp = V8TestObject::toNative(info.Holder()); | 834 TestObject* impl = V8TestObject::toNative(info.Holder()); |
835 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 835 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); |
836 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 836 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
837 imp->setAttribute(HTMLNames::reflectedtreatnullasnullstringurlattrAttr, cppV
alue); | 837 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringurlattrAttr, cpp
Value); |
838 } | 838 } |
839 | 839 |
840 static void reflectedTreatNullAsNullStringURLAttrAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) | 840 static void reflectedTreatNullAsNullStringURLAttrAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) |
841 { | 841 { |
842 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 842 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
843 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 843 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
844 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeSetter(j
sValue, info); | 844 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeSetter(j
sValue, info); |
845 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 845 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
846 } | 846 } |
847 | 847 |
848 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 848 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
849 { | 849 { |
850 TestObject* imp = V8TestObject::toNative(info.Holder()); | 850 TestObject* impl = V8TestObject::toNative(info.Holder()); |
851 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::reflectedtreatn
ullasnullstringtreatundefinedasnullstringurlattrAttr), info.GetIsolate()); | 851 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringtreatundefinedasnullstringurlattrAttr), info.GetIsolate()); |
852 } | 852 } |
853 | 853 |
854 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 854 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
855 { | 855 { |
856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
857 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeGetter(info); | 857 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeGetter(info); |
858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
859 } | 859 } |
860 | 860 |
861 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) | 861 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) |
862 { | 862 { |
863 TestObject* imp = V8TestObject::toNative(info.Holder()); | 863 TestObject* impl = V8TestObject::toNative(info.Holder()); |
864 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 864 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); |
865 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 865 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
866 imp->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedasn
ullstringurlattrAttr, cppValue); | 866 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringurlattrAttr, cppValue); |
867 } | 867 } |
868 | 868 |
869 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 869 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) |
870 { | 870 { |
871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
872 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 872 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
873 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeSetter(jsValue, info); | 873 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeSetter(jsValue, info); |
874 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 874 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
875 } | 875 } |
876 | 876 |
877 static void reflectedCustomStringAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 877 static void reflectedCustomStringAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
878 { | 878 { |
879 TestObject* imp = V8TestObject::toNative(info.Holder()); | 879 TestObject* impl = V8TestObject::toNative(info.Holder()); |
880 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::customContentS
tringAttrAttr), info.GetIsolate()); | 880 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
881 } | 881 } |
882 | 882 |
883 static void reflectedCustomStringAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 883 static void reflectedCustomStringAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
884 { | 884 { |
885 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 885 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
886 TestObjectV8Internal::reflectedCustomStringAttrAttributeGetter(info); | 886 TestObjectV8Internal::reflectedCustomStringAttrAttributeGetter(info); |
887 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 887 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
888 } | 888 } |
889 | 889 |
890 static void reflectedCustomStringAttrAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 890 static void reflectedCustomStringAttrAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
891 { | 891 { |
892 TestObject* imp = V8TestObject::toNative(info.Holder()); | 892 TestObject* impl = V8TestObject::toNative(info.Holder()); |
893 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 893 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
894 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 894 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
895 imp->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); | 895 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
896 } | 896 } |
897 | 897 |
898 static void reflectedCustomStringAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 898 static void reflectedCustomStringAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
899 { | 899 { |
900 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 900 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
901 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 901 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
902 TestObjectV8Internal::reflectedCustomStringAttrAttributeSetter(jsValue, info
); | 902 TestObjectV8Internal::reflectedCustomStringAttrAttributeSetter(jsValue, info
); |
903 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 903 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
904 } | 904 } |
905 | 905 |
906 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 906 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
907 { | 907 { |
908 TestObject* imp = V8TestObject::toNative(info.Holder()); | 908 TestObject* impl = V8TestObject::toNative(info.Holder()); |
909 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::customContentS
tringAttrAttr), info.GetIsolate()); | 909 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
910 } | 910 } |
911 | 911 |
912 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 912 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
913 { | 913 { |
914 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 914 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
915 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eGetter(info); | 915 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eGetter(info); |
916 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 916 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
917 } | 917 } |
918 | 918 |
919 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetter(v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 919 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetter(v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
920 { | 920 { |
921 TestObject* imp = V8TestObject::toNative(info.Holder()); | 921 TestObject* impl = V8TestObject::toNative(info.Holder()); |
922 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 922 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); |
923 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 923 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
924 imp->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); | 924 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
925 } | 925 } |
926 | 926 |
927 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac
kInfo<void>& info) | 927 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac
kInfo<void>& info) |
928 { | 928 { |
929 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 929 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
930 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 930 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
931 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eSetter(jsValue, info); | 931 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eSetter(jsValue, info); |
932 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 932 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
933 } | 933 } |
934 | 934 |
935 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 935 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
936 { | 936 { |
937 TestObject* imp = V8TestObject::toNative(info.Holder()); | 937 TestObject* impl = V8TestObject::toNative(info.Holder()); |
938 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::customContentS
tringAttrAttr), info.GetIsolate()); | 938 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
939 } | 939 } |
940 | 940 |
941 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf
o<v8::Value>& info) | 941 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf
o<v8::Value>& info) |
942 { | 942 { |
943 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 943 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
944 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeGetter(info); | 944 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeGetter(info); |
945 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 945 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
946 } | 946 } |
947 | 947 |
948 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) | 948 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) |
949 { | 949 { |
950 TestObject* imp = V8TestObject::toNative(info.Holder()); | 950 TestObject* impl = V8TestObject::toNative(info.Holder()); |
951 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 951 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); |
952 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 952 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
953 imp->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); | 953 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
954 } | 954 } |
955 | 955 |
956 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 956 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
957 { | 957 { |
958 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 958 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
959 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 959 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
960 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeSetter(jsValue, info); | 960 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeSetter(jsValue, info); |
961 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 961 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
962 } | 962 } |
963 | 963 |
964 static void reflectedCustomIntegralAttrAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 964 static void reflectedCustomIntegralAttrAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
965 { | 965 { |
966 TestObject* imp = V8TestObject::toNative(info.Holder()); | 966 TestObject* impl = V8TestObject::toNative(info.Holder()); |
967 v8SetReturnValueInt(info, imp->getIntegralAttribute(HTMLNames::customContent
IntegralAttrAttr)); | 967 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::customConten
tIntegralAttrAttr)); |
968 } | 968 } |
969 | 969 |
970 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 970 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
971 { | 971 { |
972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
973 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeGetter(info); | 973 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeGetter(info); |
974 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 974 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
975 } | 975 } |
976 | 976 |
977 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) | 977 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) |
978 { | 978 { |
979 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto
mIntegralAttr", "TestObject", info.Holder(), info.GetIsolate()); | 979 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto
mIntegralAttr", "TestObject", info.Holder(), info.GetIsolate()); |
980 TestObject* imp = V8TestObject::toNative(info.Holder()); | 980 TestObject* impl = V8TestObject::toNative(info.Holder()); |
981 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 981 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
982 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 982 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
983 imp->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValue
); | 983 impl->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValu
e); |
984 } | 984 } |
985 | 985 |
986 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 986 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
987 { | 987 { |
988 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 988 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
989 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 989 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
990 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeSetter(jsValue, in
fo); | 990 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeSetter(jsValue, in
fo); |
991 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 991 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
992 } | 992 } |
993 | 993 |
994 static void reflectedCustomBooleanAttrAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 994 static void reflectedCustomBooleanAttrAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
995 { | 995 { |
996 TestObject* imp = V8TestObject::toNative(info.Holder()); | 996 TestObject* impl = V8TestObject::toNative(info.Holder()); |
997 v8SetReturnValueBool(info, imp->fastHasAttribute(HTMLNames::customContentBoo
leanAttrAttr)); | 997 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::customContentBo
oleanAttrAttr)); |
998 } | 998 } |
999 | 999 |
1000 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1000 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1001 { | 1001 { |
1002 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1002 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1003 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeGetter(info); | 1003 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeGetter(info); |
1004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1005 } | 1005 } |
1006 | 1006 |
1007 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::Value> jsVal
ue, const v8::PropertyCallbackInfo<void>& info) | 1007 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::Value> jsVal
ue, const v8::PropertyCallbackInfo<void>& info) |
1008 { | 1008 { |
1009 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1009 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1010 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); | 1010 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); |
1011 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1011 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1012 imp->setBooleanAttribute(HTMLNames::customContentBooleanAttrAttr, cppValue); | 1012 impl->setBooleanAttribute(HTMLNames::customContentBooleanAttrAttr, cppValue)
; |
1013 } | 1013 } |
1014 | 1014 |
1015 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1015 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1016 { | 1016 { |
1017 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1017 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1018 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1018 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1019 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeSetter(jsValue, inf
o); | 1019 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeSetter(jsValue, inf
o); |
1020 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1020 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1021 } | 1021 } |
1022 | 1022 |
1023 static void reflectedCustomURLAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1023 static void reflectedCustomURLAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1024 { | 1024 { |
1025 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1025 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1026 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::customContentUR
LAttrAttr), info.GetIsolate()); | 1026 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
1027 } | 1027 } |
1028 | 1028 |
1029 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1029 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1030 { | 1030 { |
1031 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1031 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1032 TestObjectV8Internal::reflectedCustomURLAttrAttributeGetter(info); | 1032 TestObjectV8Internal::reflectedCustomURLAttrAttributeGetter(info); |
1033 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1033 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1034 } | 1034 } |
1035 | 1035 |
1036 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1036 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1037 { | 1037 { |
1038 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1038 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1039 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1039 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1040 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1040 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1041 imp->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); | 1041 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
1042 } | 1042 } |
1043 | 1043 |
1044 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1044 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1045 { | 1045 { |
1046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1047 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1047 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1048 TestObjectV8Internal::reflectedCustomURLAttrAttributeSetter(jsValue, info); | 1048 TestObjectV8Internal::reflectedCustomURLAttrAttributeSetter(jsValue, info); |
1049 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1049 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1050 } | 1050 } |
1051 | 1051 |
1052 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) | 1052 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) |
1053 { | 1053 { |
1054 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1054 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1055 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::customContentUR
LAttrAttr), info.GetIsolate()); | 1055 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
1056 } | 1056 } |
1057 | 1057 |
1058 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1058 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1059 { | 1059 { |
1060 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1060 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1061 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeGe
tter(info); | 1061 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeGe
tter(info); |
1062 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1062 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1063 } | 1063 } |
1064 | 1064 |
1065 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetter(v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1065 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetter(v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1066 { | 1066 { |
1067 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1067 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1068 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 1068 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); |
1069 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1069 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1070 imp->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); | 1070 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
1071 } | 1071 } |
1072 | 1072 |
1073 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn
fo<void>& info) | 1073 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn
fo<void>& info) |
1074 { | 1074 { |
1075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1076 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1076 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1077 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeSe
tter(jsValue, info); | 1077 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeSe
tter(jsValue, info); |
1078 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1078 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1079 } | 1079 } |
1080 | 1080 |
1081 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 1081 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
1082 { | 1082 { |
1083 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1083 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1084 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::customContentUR
LAttrAttr), info.GetIsolate()); | 1084 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
1085 } | 1085 } |
1086 | 1086 |
1087 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v
8::Value>& info) | 1087 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v
8::Value>& info) |
1088 { | 1088 { |
1089 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1089 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1090 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeGetter(info); | 1090 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeGetter(info); |
1091 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1091 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1092 } | 1092 } |
1093 | 1093 |
1094 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<vo
id>& info) | 1094 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<vo
id>& info) |
1095 { | 1095 { |
1096 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1096 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1097 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 1097 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); |
1098 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1098 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1099 imp->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); | 1099 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
1100 } | 1100 } |
1101 | 1101 |
1102 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 1102 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
1103 { | 1103 { |
1104 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1104 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1105 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1105 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1106 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeSetter(jsValue, info); | 1106 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeSetter(jsValue, info); |
1107 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1107 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1108 } | 1108 } |
1109 | 1109 |
1110 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 1110 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
1111 { | 1111 { |
1112 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1112 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1113 String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyoneattrib
uteAttr); | 1113 String resultValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattri
buteAttr); |
1114 if (resultValue.isEmpty()) { | 1114 if (resultValue.isEmpty()) { |
1115 ; | 1115 ; |
1116 } else if (equalIgnoringCase(resultValue, "unique")) { | 1116 } else if (equalIgnoringCase(resultValue, "unique")) { |
1117 resultValue = "unique"; | 1117 resultValue = "unique"; |
1118 } else { | 1118 } else { |
1119 resultValue = ""; | 1119 resultValue = ""; |
1120 } | 1120 } |
1121 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1121 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1122 } | 1122 } |
1123 | 1123 |
1124 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1124 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1125 { | 1125 { |
1126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1127 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); | 1127 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); |
1128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1129 } | 1129 } |
1130 | 1130 |
1131 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 1131 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
1132 { | 1132 { |
1133 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1133 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1134 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1134 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1135 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1135 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1136 imp->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); | 1136 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); |
1137 } | 1137 } |
1138 | 1138 |
1139 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1139 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1140 { | 1140 { |
1141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1142 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1142 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1143 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info
); | 1143 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info
); |
1144 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1144 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1145 } | 1145 } |
1146 | 1146 |
1147 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1147 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1148 { | 1148 { |
1149 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1149 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1150 String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyattribute
Attr); | 1150 String resultValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyattribut
eAttr); |
1151 if (resultValue.isEmpty()) { | 1151 if (resultValue.isEmpty()) { |
1152 ; | 1152 ; |
1153 } else if (equalIgnoringCase(resultValue, "Per")) { | 1153 } else if (equalIgnoringCase(resultValue, "Per")) { |
1154 resultValue = "Per"; | 1154 resultValue = "Per"; |
1155 } else if (equalIgnoringCase(resultValue, "Paal")) { | 1155 } else if (equalIgnoringCase(resultValue, "Paal")) { |
1156 resultValue = "Paal"; | 1156 resultValue = "Paal"; |
1157 } else if (equalIgnoringCase(resultValue, "Espen")) { | 1157 } else if (equalIgnoringCase(resultValue, "Espen")) { |
1158 resultValue = "Espen"; | 1158 resultValue = "Espen"; |
1159 } else { | 1159 } else { |
1160 resultValue = ""; | 1160 resultValue = ""; |
1161 } | 1161 } |
1162 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1162 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1163 } | 1163 } |
1164 | 1164 |
1165 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1165 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1166 { | 1166 { |
1167 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1167 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1168 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); | 1168 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); |
1169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1170 } | 1170 } |
1171 | 1171 |
1172 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1172 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1173 { | 1173 { |
1174 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1174 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1175 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1175 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1176 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1176 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1177 imp->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); | 1177 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); |
1178 } | 1178 } |
1179 | 1179 |
1180 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1180 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1181 { | 1181 { |
1182 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1182 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1183 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1183 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1184 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info); | 1184 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info); |
1185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1186 } | 1186 } |
1187 | 1187 |
1188 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1188 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
1189 { | 1189 { |
1190 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1190 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1191 String resultValue = imp->fastGetAttribute(HTMLNames::OtherAttr); | 1191 String resultValue = impl->fastGetAttribute(HTMLNames::OtherAttr); |
1192 if (resultValue.isEmpty()) { | 1192 if (resultValue.isEmpty()) { |
1193 ; | 1193 ; |
1194 } else if (equalIgnoringCase(resultValue, "Value1")) { | 1194 } else if (equalIgnoringCase(resultValue, "Value1")) { |
1195 resultValue = "Value1"; | 1195 resultValue = "Value1"; |
1196 } else if (equalIgnoringCase(resultValue, "Value2")) { | 1196 } else if (equalIgnoringCase(resultValue, "Value2")) { |
1197 resultValue = "Value2"; | 1197 resultValue = "Value2"; |
1198 } else { | 1198 } else { |
1199 resultValue = ""; | 1199 resultValue = ""; |
1200 } | 1200 } |
1201 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1201 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1202 } | 1202 } |
1203 | 1203 |
1204 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1204 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1205 { | 1205 { |
1206 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1206 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1207 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); | 1207 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); |
1208 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1208 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1209 } | 1209 } |
1210 | 1210 |
1211 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) | 1211 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) |
1212 { | 1212 { |
1213 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1213 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1214 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1214 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1215 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1215 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1216 imp->setAttribute(HTMLNames::OtherAttr, cppValue); | 1216 impl->setAttribute(HTMLNames::OtherAttr, cppValue); |
1217 } | 1217 } |
1218 | 1218 |
1219 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1219 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1220 { | 1220 { |
1221 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1221 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1222 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1222 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1223 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, in
fo); | 1223 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, in
fo); |
1224 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1224 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1225 } | 1225 } |
1226 | 1226 |
1227 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 1227 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
1228 { | 1228 { |
1229 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1229 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1230 String resultValue = imp->fastGetAttribute(HTMLNames::limitedwithmissingdefa
ultattributeAttr); | 1230 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithmissingdef
aultattributeAttr); |
1231 if (resultValue.isEmpty()) { | 1231 if (resultValue.isEmpty()) { |
1232 resultValue = "rsa"; | 1232 resultValue = "rsa"; |
1233 } else if (equalIgnoringCase(resultValue, "rsa")) { | 1233 } else if (equalIgnoringCase(resultValue, "rsa")) { |
1234 resultValue = "rsa"; | 1234 resultValue = "rsa"; |
1235 } else if (equalIgnoringCase(resultValue, "dsa")) { | 1235 } else if (equalIgnoringCase(resultValue, "dsa")) { |
1236 resultValue = "dsa"; | 1236 resultValue = "dsa"; |
1237 } else { | 1237 } else { |
1238 resultValue = ""; | 1238 resultValue = ""; |
1239 } | 1239 } |
1240 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1240 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1241 } | 1241 } |
1242 | 1242 |
1243 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1243 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1244 { | 1244 { |
1245 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1245 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1246 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); | 1246 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); |
1247 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1247 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1248 } | 1248 } |
1249 | 1249 |
1250 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1250 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1251 { | 1251 { |
1252 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1252 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1253 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1253 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1254 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1254 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1255 imp->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppValu
e); | 1255 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal
ue); |
1256 } | 1256 } |
1257 | 1257 |
1258 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) | 1258 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) |
1259 { | 1259 { |
1260 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1260 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1261 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1261 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1262 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(jsVa
lue, info); | 1262 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(jsVa
lue, info); |
1263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1264 } | 1264 } |
1265 | 1265 |
1266 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) | 1266 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) |
1267 { | 1267 { |
1268 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1268 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1269 String resultValue = imp->fastGetAttribute(HTMLNames::limitedwithinvalidmiss
ingdefaultattributeAttr); | 1269 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidmis
singdefaultattributeAttr); |
1270 if (resultValue.isEmpty()) { | 1270 if (resultValue.isEmpty()) { |
1271 resultValue = "auto"; | 1271 resultValue = "auto"; |
1272 } else if (equalIgnoringCase(resultValue, "ltr")) { | 1272 } else if (equalIgnoringCase(resultValue, "ltr")) { |
1273 resultValue = "ltr"; | 1273 resultValue = "ltr"; |
1274 } else if (equalIgnoringCase(resultValue, "rtl")) { | 1274 } else if (equalIgnoringCase(resultValue, "rtl")) { |
1275 resultValue = "rtl"; | 1275 resultValue = "rtl"; |
1276 } else if (equalIgnoringCase(resultValue, "auto")) { | 1276 } else if (equalIgnoringCase(resultValue, "auto")) { |
1277 resultValue = "auto"; | 1277 resultValue = "auto"; |
1278 } else { | 1278 } else { |
1279 resultValue = "ltr"; | 1279 resultValue = "ltr"; |
1280 } | 1280 } |
1281 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1281 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1282 } | 1282 } |
1283 | 1283 |
1284 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1284 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1285 { | 1285 { |
1286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1287 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); | 1287 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); |
1288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1289 } | 1289 } |
1290 | 1290 |
1291 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1291 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1292 { | 1292 { |
1293 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1293 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1294 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1294 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1295 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1295 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1296 imp->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); | 1296 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); |
1297 } | 1297 } |
1298 | 1298 |
1299 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) | 1299 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) |
1300 { | 1300 { |
1301 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1301 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1302 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1302 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1303 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(jsValue, info); | 1303 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(jsValue, info); |
1304 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1304 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1305 } | 1305 } |
1306 | 1306 |
1307 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 1307 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
1308 { | 1308 { |
1309 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1309 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1310 String resultValue = imp->fastGetAttribute(HTMLNames::limitedwithinvalidandm
issingdefaultattributeAttr); | 1310 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidand
missingdefaultattributeAttr); |
1311 if (resultValue.isEmpty()) { | 1311 if (resultValue.isEmpty()) { |
1312 resultValue = "left"; | 1312 resultValue = "left"; |
1313 } else if (equalIgnoringCase(resultValue, "left")) { | 1313 } else if (equalIgnoringCase(resultValue, "left")) { |
1314 resultValue = "left"; | 1314 resultValue = "left"; |
1315 } else if (equalIgnoringCase(resultValue, "right")) { | 1315 } else if (equalIgnoringCase(resultValue, "right")) { |
1316 resultValue = "right"; | 1316 resultValue = "right"; |
1317 } else { | 1317 } else { |
1318 resultValue = "left"; | 1318 resultValue = "left"; |
1319 } | 1319 } |
1320 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1320 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1321 } | 1321 } |
1322 | 1322 |
1323 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1323 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1324 { | 1324 { |
1325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1326 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeG
etter(info); | 1326 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeG
etter(info); |
1327 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1327 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1328 } | 1328 } |
1329 | 1329 |
1330 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetter(v8::Loca
l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1330 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetter(v8::Loca
l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1331 { | 1331 { |
1332 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1332 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1333 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1333 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1334 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1334 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1335 imp->setAttribute(HTMLNames::limitedwithinvalidandmissingdefaultattributeAtt
r, cppValue); | 1335 impl->setAttribute(HTMLNames::limitedwithinvalidandmissingdefaultattributeAt
tr, cppValue); |
1336 } | 1336 } |
1337 | 1337 |
1338 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI
nfo<void>& info) | 1338 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI
nfo<void>& info) |
1339 { | 1339 { |
1340 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1340 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1341 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1341 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1342 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeS
etter(jsValue, info); | 1342 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeS
etter(jsValue, info); |
1343 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1343 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1344 } | 1344 } |
1345 | 1345 |
1346 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1346 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
1347 { | 1347 { |
1348 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1348 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1349 String resultValue = imp->fastGetAttribute(HTMLNames::corssettingattributeAt
tr); | 1349 String resultValue = impl->fastGetAttribute(HTMLNames::corssettingattributeA
ttr); |
1350 if (resultValue.isNull()) { | 1350 if (resultValue.isNull()) { |
1351 ; | 1351 ; |
1352 } else if (resultValue.isEmpty()) { | 1352 } else if (resultValue.isEmpty()) { |
1353 resultValue = "anonymous"; | 1353 resultValue = "anonymous"; |
1354 } else if (equalIgnoringCase(resultValue, "anonymous")) { | 1354 } else if (equalIgnoringCase(resultValue, "anonymous")) { |
1355 resultValue = "anonymous"; | 1355 resultValue = "anonymous"; |
1356 } else if (equalIgnoringCase(resultValue, "use-credentials")) { | 1356 } else if (equalIgnoringCase(resultValue, "use-credentials")) { |
1357 resultValue = "use-credentials"; | 1357 resultValue = "use-credentials"; |
1358 } else { | 1358 } else { |
1359 resultValue = "anonymous"; | 1359 resultValue = "anonymous"; |
1360 } | 1360 } |
1361 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1361 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1362 } | 1362 } |
1363 | 1363 |
1364 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1364 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
1365 { | 1365 { |
1366 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1366 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1367 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); | 1367 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); |
1368 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1368 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1369 } | 1369 } |
1370 | 1370 |
1371 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1371 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
1372 { | 1372 { |
1373 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1373 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1374 String resultValue = imp->fastGetAttribute(HTMLNames::limitedwithemptymissin
ginvalidattributeAttr); | 1374 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithemptymissi
nginvalidattributeAttr); |
1375 if (resultValue.isNull()) { | 1375 if (resultValue.isNull()) { |
1376 resultValue = "missing"; | 1376 resultValue = "missing"; |
1377 } else if (resultValue.isEmpty()) { | 1377 } else if (resultValue.isEmpty()) { |
1378 resultValue = "empty"; | 1378 resultValue = "empty"; |
1379 } else if (equalIgnoringCase(resultValue, "empty")) { | 1379 } else if (equalIgnoringCase(resultValue, "empty")) { |
1380 resultValue = "empty"; | 1380 resultValue = "empty"; |
1381 } else if (equalIgnoringCase(resultValue, "missing")) { | 1381 } else if (equalIgnoringCase(resultValue, "missing")) { |
1382 resultValue = "missing"; | 1382 resultValue = "missing"; |
1383 } else if (equalIgnoringCase(resultValue, "invalid")) { | 1383 } else if (equalIgnoringCase(resultValue, "invalid")) { |
1384 resultValue = "invalid"; | 1384 resultValue = "invalid"; |
1385 } else if (equalIgnoringCase(resultValue, "a-normal")) { | 1385 } else if (equalIgnoringCase(resultValue, "a-normal")) { |
1386 resultValue = "a-normal"; | 1386 resultValue = "a-normal"; |
1387 } else { | 1387 } else { |
1388 resultValue = "invalid"; | 1388 resultValue = "invalid"; |
1389 } | 1389 } |
1390 v8SetReturnValueString(info, resultValue, info.GetIsolate()); | 1390 v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
1391 } | 1391 } |
1392 | 1392 |
1393 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1393 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1394 { | 1394 { |
1395 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1395 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1396 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); | 1396 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); |
1397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1398 } | 1398 } |
1399 | 1399 |
1400 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 1400 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
1401 { | 1401 { |
1402 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1402 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1403 v8SetReturnValueFast(info, WTF::getPtr(imp->typedArrayAttr()), imp); | 1403 v8SetReturnValueFast(info, WTF::getPtr(impl->typedArrayAttr()), impl); |
1404 } | 1404 } |
1405 | 1405 |
1406 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 1406 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
1407 { | 1407 { |
1408 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1408 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1409 TestObjectV8Internal::typedArrayAttrAttributeGetter(info); | 1409 TestObjectV8Internal::typedArrayAttrAttributeGetter(info); |
1410 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1410 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1411 } | 1411 } |
1412 | 1412 |
1413 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 1413 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) |
1414 { | 1414 { |
1415 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1415 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1416 V8TRYCATCH_VOID(Float32Array*, cppValue, jsValue->IsFloat32Array() ? V8Float
32Array::toNative(v8::Handle<v8::Float32Array>::Cast(jsValue)) : 0); | 1416 V8TRYCATCH_VOID(Float32Array*, cppValue, jsValue->IsFloat32Array() ? V8Float
32Array::toNative(v8::Handle<v8::Float32Array>::Cast(jsValue)) : 0); |
1417 imp->setTypedArrayAttr(WTF::getPtr(cppValue)); | 1417 impl->setTypedArrayAttr(WTF::getPtr(cppValue)); |
1418 } | 1418 } |
1419 | 1419 |
1420 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1420 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1421 { | 1421 { |
1422 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1422 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1423 TestObjectV8Internal::typedArrayAttrAttributeSetter(jsValue, info); | 1423 TestObjectV8Internal::typedArrayAttrAttributeSetter(jsValue, info); |
1424 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1424 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1425 } | 1425 } |
1426 | 1426 |
1427 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1427 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
1428 { | 1428 { |
1429 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1429 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1430 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestObject", info.Holder(), info.GetIsolate()); | 1430 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestObject", info.Holder(), info.GetIsolate()); |
1431 int jsValue = imp->attrWithGetterException(exceptionState); | 1431 int jsValue = impl->attrWithGetterException(exceptionState); |
1432 if (UNLIKELY(exceptionState.throwIfNeeded())) | 1432 if (UNLIKELY(exceptionState.throwIfNeeded())) |
1433 return; | 1433 return; |
1434 v8SetReturnValueInt(info, jsValue); | 1434 v8SetReturnValueInt(info, jsValue); |
1435 } | 1435 } |
1436 | 1436 |
1437 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1437 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
1438 { | 1438 { |
1439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1440 TestObjectV8Internal::attrWithGetterExceptionAttributeGetter(info); | 1440 TestObjectV8Internal::attrWithGetterExceptionAttributeGetter(info); |
1441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1442 } | 1442 } |
1443 | 1443 |
1444 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1444 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1445 { | 1445 { |
1446 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestObject", info.Holder(), info.GetIsolate()); | 1446 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestObject", info.Holder(), info.GetIsolate()); |
1447 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1447 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1448 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1448 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
1449 imp->setAttrWithGetterException(cppValue); | 1449 impl->setAttrWithGetterException(cppValue); |
1450 } | 1450 } |
1451 | 1451 |
1452 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1452 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1453 { | 1453 { |
1454 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1454 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1455 TestObjectV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info); | 1455 TestObjectV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info); |
1456 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1456 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1457 } | 1457 } |
1458 | 1458 |
1459 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1459 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
1460 { | 1460 { |
1461 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1461 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1462 v8SetReturnValueInt(info, imp->attrWithSetterException()); | 1462 v8SetReturnValueInt(info, impl->attrWithSetterException()); |
1463 } | 1463 } |
1464 | 1464 |
1465 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1465 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
1466 { | 1466 { |
1467 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1467 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1468 TestObjectV8Internal::attrWithSetterExceptionAttributeGetter(info); | 1468 TestObjectV8Internal::attrWithSetterExceptionAttributeGetter(info); |
1469 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1469 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1470 } | 1470 } |
1471 | 1471 |
1472 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1472 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1473 { | 1473 { |
1474 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestObject", info.Holder(), info.GetIsolate()); | 1474 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestObject", info.Holder(), info.GetIsolate()); |
1475 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1475 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1476 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1476 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
1477 imp->setAttrWithSetterException(cppValue, exceptionState); | 1477 impl->setAttrWithSetterException(cppValue, exceptionState); |
1478 exceptionState.throwIfNeeded(); | 1478 exceptionState.throwIfNeeded(); |
1479 } | 1479 } |
1480 | 1480 |
1481 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1481 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1482 { | 1482 { |
1483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1484 TestObjectV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info); | 1484 TestObjectV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info); |
1485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1486 } | 1486 } |
1487 | 1487 |
1488 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1488 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1489 { | 1489 { |
1490 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1490 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1491 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestObject", info.Holder(), info.GetIsolate()); | 1491 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestObject", info.Holder(), info.GetIsolate()); |
1492 String jsValue = imp->stringAttrWithGetterException(exceptionState); | 1492 String jsValue = impl->stringAttrWithGetterException(exceptionState); |
1493 if (UNLIKELY(exceptionState.throwIfNeeded())) | 1493 if (UNLIKELY(exceptionState.throwIfNeeded())) |
1494 return; | 1494 return; |
1495 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1495 v8SetReturnValueString(info, jsValue, info.GetIsolate()); |
1496 } | 1496 } |
1497 | 1497 |
1498 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1498 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1499 { | 1499 { |
1500 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1500 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1501 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); | 1501 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); |
1502 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1502 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1503 } | 1503 } |
1504 | 1504 |
1505 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1505 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
1506 { | 1506 { |
1507 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1507 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1508 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1508 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1509 imp->setStringAttrWithGetterException(cppValue); | 1509 impl->setStringAttrWithGetterException(cppValue); |
1510 } | 1510 } |
1511 | 1511 |
1512 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1512 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
1513 { | 1513 { |
1514 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1514 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1515 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue,
info); | 1515 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue,
info); |
1516 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1516 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1517 } | 1517 } |
1518 | 1518 |
1519 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1519 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1520 { | 1520 { |
1521 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1521 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1522 v8SetReturnValueString(info, imp->stringAttrWithSetterException(), info.GetI
solate()); | 1522 v8SetReturnValueString(info, impl->stringAttrWithSetterException(), info.Get
Isolate()); |
1523 } | 1523 } |
1524 | 1524 |
1525 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1525 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1526 { | 1526 { |
1527 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1527 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1528 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); | 1528 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); |
1529 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1529 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1530 } | 1530 } |
1531 | 1531 |
1532 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1532 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
1533 { | 1533 { |
1534 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestObject", info.Holder(), info.GetIsolate()); | 1534 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestObject", info.Holder(), info.GetIsolate()); |
1535 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1535 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1536 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1536 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
1537 imp->setStringAttrWithSetterException(cppValue, exceptionState); | 1537 impl->setStringAttrWithSetterException(cppValue, exceptionState); |
1538 exceptionState.throwIfNeeded(); | 1538 exceptionState.throwIfNeeded(); |
1539 } | 1539 } |
1540 | 1540 |
1541 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1541 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
1542 { | 1542 { |
1543 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1543 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1544 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeSetter(jsValue,
info); | 1544 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeSetter(jsValue,
info); |
1545 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1545 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1546 } | 1546 } |
1547 | 1547 |
1548 static void customAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 1548 static void customAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
1549 { | 1549 { |
1550 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1550 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1551 V8TestObject::customAttrAttributeGetterCustom(info); | 1551 V8TestObject::customAttrAttributeGetterCustom(info); |
1552 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1552 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1553 } | 1553 } |
1554 | 1554 |
1555 static void customAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1555 static void customAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1556 { | 1556 { |
1557 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1557 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1558 V8TestObject::customAttrAttributeSetterCustom(jsValue, info); | 1558 V8TestObject::customAttrAttributeSetterCustom(jsValue, info); |
1559 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1559 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1560 } | 1560 } |
1561 | 1561 |
1562 static void withExecutionContextAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1562 static void withExecutionContextAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1563 { | 1563 { |
1564 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1564 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1565 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 1565 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
1566 v8SetReturnValueFast(info, WTF::getPtr(imp->withExecutionContextAttribute(sc
riptContext)), imp); | 1566 v8SetReturnValueFast(info, WTF::getPtr(impl->withExecutionContextAttribute(s
criptContext)), impl); |
1567 } | 1567 } |
1568 | 1568 |
1569 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1569 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1570 { | 1570 { |
1571 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1571 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1572 TestObjectV8Internal::withExecutionContextAttributeAttributeGetter(info); | 1572 TestObjectV8Internal::withExecutionContextAttributeAttributeGetter(info); |
1573 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1573 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1574 } | 1574 } |
1575 | 1575 |
1576 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1576 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
1577 { | 1577 { |
1578 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1578 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1579 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 1579 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
1580 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 1580 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
1581 imp->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue)); | 1581 impl->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue))
; |
1582 } | 1582 } |
1583 | 1583 |
1584 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1584 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
1585 { | 1585 { |
1586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1587 TestObjectV8Internal::withExecutionContextAttributeAttributeSetter(jsValue,
info); | 1587 TestObjectV8Internal::withExecutionContextAttributeAttributeSetter(jsValue,
info); |
1588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1589 } | 1589 } |
1590 | 1590 |
1591 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1591 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
1592 { | 1592 { |
1593 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1593 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1594 v8SetReturnValueFast(info, WTF::getPtr(imp->withActiveWindowAndFirstWindowAt
tribute()), imp); | 1594 v8SetReturnValueFast(info, WTF::getPtr(impl->withActiveWindowAndFirstWindowA
ttribute()), impl); |
1595 } | 1595 } |
1596 | 1596 |
1597 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1597 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1598 { | 1598 { |
1599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1600 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter
(info); | 1600 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter
(info); |
1601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1602 } | 1602 } |
1603 | 1603 |
1604 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1604 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1605 { | 1605 { |
1606 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1606 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1607 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 1607 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
1608 imp->setWithActiveWindowAndFirstWindowAttribute(callingDOMWindow(info.GetIso
late()), enteredDOMWindow(info.GetIsolate()), WTF::getPtr(cppValue)); | 1608 impl->setWithActiveWindowAndFirstWindowAttribute(callingDOMWindow(info.GetIs
olate()), enteredDOMWindow(info.GetIsolate()), WTF::getPtr(cppValue)); |
1609 } | 1609 } |
1610 | 1610 |
1611 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) | 1611 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) |
1612 { | 1612 { |
1613 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1613 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1614 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter
(jsValue, info); | 1614 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter
(jsValue, info); |
1615 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1615 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1616 } | 1616 } |
1617 | 1617 |
1618 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 1618 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
1619 { | 1619 { |
1620 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1620 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1621 ExceptionState exceptionState(ExceptionState::GetterContext, "withScriptStat
eAttributeRaises", "TestObject", info.Holder(), info.GetIsolate()); | 1621 ExceptionState exceptionState(ExceptionState::GetterContext, "withScriptStat
eAttributeRaises", "TestObject", info.Holder(), info.GetIsolate()); |
1622 RefPtr<TestObject> jsValue = imp->withScriptStateAttributeRaises(exceptionSt
ate); | 1622 RefPtr<TestObject> jsValue = impl->withScriptStateAttributeRaises(exceptionS
tate); |
1623 if (UNLIKELY(exceptionState.throwIfNeeded())) | 1623 if (UNLIKELY(exceptionState.throwIfNeeded())) |
1624 return; | 1624 return; |
1625 v8SetReturnValueFast(info, WTF::getPtr(jsValue.release()), imp); | 1625 v8SetReturnValueFast(info, WTF::getPtr(jsValue.release()), impl); |
1626 } | 1626 } |
1627 | 1627 |
1628 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1628 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1629 { | 1629 { |
1630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1631 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeGetter(info); | 1631 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeGetter(info); |
1632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1633 } | 1633 } |
1634 | 1634 |
1635 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) | 1635 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) |
1636 { | 1636 { |
1637 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1637 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1638 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 1638 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
1639 imp->setWithScriptStateAttributeRaises(WTF::getPtr(cppValue)); | 1639 impl->setWithScriptStateAttributeRaises(WTF::getPtr(cppValue)); |
1640 } | 1640 } |
1641 | 1641 |
1642 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) | 1642 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) |
1643 { | 1643 { |
1644 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1644 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1645 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeSetter(jsValue,
info); | 1645 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeSetter(jsValue,
info); |
1646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1647 } | 1647 } |
1648 | 1648 |
1649 static void enforcedRangeByteAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1649 static void enforcedRangeByteAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
1650 { | 1650 { |
1651 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1651 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1652 v8SetReturnValueInt(info, imp->enforcedRangeByteAttr()); | 1652 v8SetReturnValueInt(info, impl->enforcedRangeByteAttr()); |
1653 } | 1653 } |
1654 | 1654 |
1655 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1655 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1656 { | 1656 { |
1657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1658 TestObjectV8Internal::enforcedRangeByteAttrAttributeGetter(info); | 1658 TestObjectV8Internal::enforcedRangeByteAttrAttributeGetter(info); |
1659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1660 } | 1660 } |
1661 | 1661 |
1662 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 1662 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
1663 { | 1663 { |
1664 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeB
yteAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1664 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeB
yteAttr", "TestObject", info.Holder(), info.GetIsolate()); |
1665 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1665 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1666 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, EnforceRange, excep
tionState), exceptionState); | 1666 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, EnforceRange, excep
tionState), exceptionState); |
1667 imp->setEnforcedRangeByteAttr(cppValue); | 1667 impl->setEnforcedRangeByteAttr(cppValue); |
1668 } | 1668 } |
1669 | 1669 |
1670 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1670 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1671 { | 1671 { |
1672 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1672 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1673 TestObjectV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info); | 1673 TestObjectV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info); |
1674 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1674 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1675 } | 1675 } |
1676 | 1676 |
1677 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1677 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1678 { | 1678 { |
1679 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1679 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1680 v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr()); | 1680 v8SetReturnValueUnsigned(info, impl->enforcedRangeOctetAttr()); |
1681 } | 1681 } |
1682 | 1682 |
1683 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1683 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1684 { | 1684 { |
1685 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1685 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1686 TestObjectV8Internal::enforcedRangeOctetAttrAttributeGetter(info); | 1686 TestObjectV8Internal::enforcedRangeOctetAttrAttributeGetter(info); |
1687 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1687 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1688 } | 1688 } |
1689 | 1689 |
1690 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1690 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1691 { | 1691 { |
1692 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeO
ctetAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1692 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeO
ctetAttr", "TestObject", info.Holder(), info.GetIsolate()); |
1693 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1693 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1694 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceRange,
exceptionState), exceptionState); | 1694 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceRange,
exceptionState), exceptionState); |
1695 imp->setEnforcedRangeOctetAttr(cppValue); | 1695 impl->setEnforcedRangeOctetAttr(cppValue); |
1696 } | 1696 } |
1697 | 1697 |
1698 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1698 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1699 { | 1699 { |
1700 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1700 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1701 TestObjectV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info); | 1701 TestObjectV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info); |
1702 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1702 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1703 } | 1703 } |
1704 | 1704 |
1705 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1705 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1706 { | 1706 { |
1707 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1707 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1708 v8SetReturnValueInt(info, imp->enforcedRangeShortAttr()); | 1708 v8SetReturnValueInt(info, impl->enforcedRangeShortAttr()); |
1709 } | 1709 } |
1710 | 1710 |
1711 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1711 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1712 { | 1712 { |
1713 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1713 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1714 TestObjectV8Internal::enforcedRangeShortAttrAttributeGetter(info); | 1714 TestObjectV8Internal::enforcedRangeShortAttrAttributeGetter(info); |
1715 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1715 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1716 } | 1716 } |
1717 | 1717 |
1718 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1718 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
1719 { | 1719 { |
1720 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeS
hortAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1720 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeS
hortAttr", "TestObject", info.Holder(), info.GetIsolate()); |
1721 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1721 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1722 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, EnforceRange, exce
ptionState), exceptionState); | 1722 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, EnforceRange, exce
ptionState), exceptionState); |
1723 imp->setEnforcedRangeShortAttr(cppValue); | 1723 impl->setEnforcedRangeShortAttr(cppValue); |
1724 } | 1724 } |
1725 | 1725 |
1726 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1726 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1727 { | 1727 { |
1728 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1728 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1729 TestObjectV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info); | 1729 TestObjectV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info); |
1730 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1730 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1731 } | 1731 } |
1732 | 1732 |
1733 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 1733 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
1734 { | 1734 { |
1735 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1735 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1736 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedShortAttr()); | 1736 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedShortAttr()); |
1737 } | 1737 } |
1738 | 1738 |
1739 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1739 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1740 { | 1740 { |
1741 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1741 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1742 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info); | 1742 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info); |
1743 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1743 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1744 } | 1744 } |
1745 | 1745 |
1746 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) | 1746 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) |
1747 { | 1747 { |
1748 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedShortAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1748 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedShortAttr", "TestObject", info.Holder(), info.GetIsolate()); |
1749 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1749 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1750 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, EnforceRange
, exceptionState), exceptionState); | 1750 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, EnforceRange
, exceptionState), exceptionState); |
1751 imp->setEnforcedRangeUnsignedShortAttr(cppValue); | 1751 impl->setEnforcedRangeUnsignedShortAttr(cppValue); |
1752 } | 1752 } |
1753 | 1753 |
1754 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) | 1754 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) |
1755 { | 1755 { |
1756 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1756 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1757 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue,
info); | 1757 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue,
info); |
1758 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1758 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1759 } | 1759 } |
1760 | 1760 |
1761 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1761 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
1762 { | 1762 { |
1763 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1763 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1764 v8SetReturnValueInt(info, imp->enforcedRangeLongAttr()); | 1764 v8SetReturnValueInt(info, impl->enforcedRangeLongAttr()); |
1765 } | 1765 } |
1766 | 1766 |
1767 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1767 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1768 { | 1768 { |
1769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1770 TestObjectV8Internal::enforcedRangeLongAttrAttributeGetter(info); | 1770 TestObjectV8Internal::enforcedRangeLongAttrAttributeGetter(info); |
1771 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1771 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1772 } | 1772 } |
1773 | 1773 |
1774 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 1774 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
1775 { | 1775 { |
1776 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1776 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongAttr", "TestObject", info.Holder(), info.GetIsolate()); |
1777 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1777 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1778 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, EnforceRange, exce
ptionState), exceptionState); | 1778 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, EnforceRange, exce
ptionState), exceptionState); |
1779 imp->setEnforcedRangeLongAttr(cppValue); | 1779 impl->setEnforcedRangeLongAttr(cppValue); |
1780 } | 1780 } |
1781 | 1781 |
1782 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1782 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1783 { | 1783 { |
1784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1785 TestObjectV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info); | 1785 TestObjectV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info); |
1786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1787 } | 1787 } |
1788 | 1788 |
1789 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1789 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1790 { | 1790 { |
1791 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1791 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1792 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr()); | 1792 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedLongAttr()); |
1793 } | 1793 } |
1794 | 1794 |
1795 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1795 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1796 { | 1796 { |
1797 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1797 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1798 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info); | 1798 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info); |
1799 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1799 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1800 } | 1800 } |
1801 | 1801 |
1802 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1802 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
1803 { | 1803 { |
1804 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1804 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongAttr", "TestObject", info.Holder(), info.GetIsolate()); |
1805 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1805 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1806 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, EnforceRange
, exceptionState), exceptionState); | 1806 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, EnforceRange
, exceptionState), exceptionState); |
1807 imp->setEnforcedRangeUnsignedLongAttr(cppValue); | 1807 impl->setEnforcedRangeUnsignedLongAttr(cppValue); |
1808 } | 1808 } |
1809 | 1809 |
1810 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1810 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
1811 { | 1811 { |
1812 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1812 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1813 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue,
info); | 1813 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue,
info); |
1814 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1814 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1815 } | 1815 } |
1816 | 1816 |
1817 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 1817 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
1818 { | 1818 { |
1819 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1819 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1820 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr())
); | 1820 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeLongLongAttr()
)); |
1821 } | 1821 } |
1822 | 1822 |
1823 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1823 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1824 { | 1824 { |
1825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1826 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeGetter(info); | 1826 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeGetter(info); |
1827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1828 } | 1828 } |
1829 | 1829 |
1830 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 1830 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
1831 { | 1831 { |
1832 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongLongAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1832 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongLongAttr", "TestObject", info.Holder(), info.GetIsolate()); |
1833 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1833 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1834 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, EnforceRange
, exceptionState), exceptionState); | 1834 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, EnforceRange
, exceptionState), exceptionState); |
1835 imp->setEnforcedRangeLongLongAttr(cppValue); | 1835 impl->setEnforcedRangeLongLongAttr(cppValue); |
1836 } | 1836 } |
1837 | 1837 |
1838 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1838 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1839 { | 1839 { |
1840 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1840 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1841 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info
); | 1841 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info
); |
1842 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1842 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1843 } | 1843 } |
1844 | 1844 |
1845 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) | 1845 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) |
1846 { | 1846 { |
1847 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1847 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1848 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLon
gAttr())); | 1848 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeUnsignedLongLo
ngAttr())); |
1849 } | 1849 } |
1850 | 1850 |
1851 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v
8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1851 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v
8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1852 { | 1852 { |
1853 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1853 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1854 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info)
; | 1854 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info)
; |
1855 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1855 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1856 } | 1856 } |
1857 | 1857 |
1858 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value
> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1858 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value
> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1859 { | 1859 { |
1860 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongLongAttr", "TestObject", info.Holder(), info.GetIsolate()); | 1860 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongLongAttr", "TestObject", info.Holder(), info.GetIsolate()); |
1861 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1861 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1862 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, En
forceRange, exceptionState), exceptionState); | 1862 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, En
forceRange, exceptionState), exceptionState); |
1863 imp->setEnforcedRangeUnsignedLongLongAttr(cppValue); | 1863 impl->setEnforcedRangeUnsignedLongLongAttr(cppValue); |
1864 } | 1864 } |
1865 | 1865 |
1866 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v
8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) | 1866 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v
8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) |
1867 { | 1867 { |
1868 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1868 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1869 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsVal
ue, info); | 1869 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsVal
ue, info); |
1870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1871 } | 1871 } |
1872 | 1872 |
1873 #if ENABLE(Condition1) | 1873 #if ENABLE(Condition1) |
1874 static void conditionalAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1874 static void conditionalAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1875 { | 1875 { |
1876 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1876 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1877 v8SetReturnValueInt(info, imp->conditionalAttr1()); | 1877 v8SetReturnValueInt(info, impl->conditionalAttr1()); |
1878 } | 1878 } |
1879 #endif // ENABLE(Condition1) | 1879 #endif // ENABLE(Condition1) |
1880 | 1880 |
1881 #if ENABLE(Condition1) | 1881 #if ENABLE(Condition1) |
1882 static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1882 static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1883 { | 1883 { |
1884 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1884 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1885 TestObjectV8Internal::conditionalAttr1AttributeGetter(info); | 1885 TestObjectV8Internal::conditionalAttr1AttributeGetter(info); |
1886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1887 } | 1887 } |
1888 #endif // ENABLE(Condition1) | 1888 #endif // ENABLE(Condition1) |
1889 | 1889 |
1890 #if ENABLE(Condition1) | 1890 #if ENABLE(Condition1) |
1891 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 1891 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
1892 { | 1892 { |
1893 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r1", "TestObject", info.Holder(), info.GetIsolate()); | 1893 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r1", "TestObject", info.Holder(), info.GetIsolate()); |
1894 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1894 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1895 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1895 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
1896 imp->setConditionalAttr1(cppValue); | 1896 impl->setConditionalAttr1(cppValue); |
1897 } | 1897 } |
1898 #endif // ENABLE(Condition1) | 1898 #endif // ENABLE(Condition1) |
1899 | 1899 |
1900 #if ENABLE(Condition1) | 1900 #if ENABLE(Condition1) |
1901 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1901 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1902 { | 1902 { |
1903 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1903 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1904 TestObjectV8Internal::conditionalAttr1AttributeSetter(jsValue, info); | 1904 TestObjectV8Internal::conditionalAttr1AttributeSetter(jsValue, info); |
1905 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1905 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1906 } | 1906 } |
1907 #endif // ENABLE(Condition1) | 1907 #endif // ENABLE(Condition1) |
1908 | 1908 |
1909 #if ENABLE(Condition1) && ENABLE(Condition2) | 1909 #if ENABLE(Condition1) && ENABLE(Condition2) |
1910 static void conditionalAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1910 static void conditionalAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1911 { | 1911 { |
1912 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1912 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1913 v8SetReturnValueInt(info, imp->conditionalAttr2()); | 1913 v8SetReturnValueInt(info, impl->conditionalAttr2()); |
1914 } | 1914 } |
1915 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1915 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
1916 | 1916 |
1917 #if ENABLE(Condition1) && ENABLE(Condition2) | 1917 #if ENABLE(Condition1) && ENABLE(Condition2) |
1918 static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1918 static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1919 { | 1919 { |
1920 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1920 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1921 TestObjectV8Internal::conditionalAttr2AttributeGetter(info); | 1921 TestObjectV8Internal::conditionalAttr2AttributeGetter(info); |
1922 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1922 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1923 } | 1923 } |
1924 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1924 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
1925 | 1925 |
1926 #if ENABLE(Condition1) && ENABLE(Condition2) | 1926 #if ENABLE(Condition1) && ENABLE(Condition2) |
1927 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 1927 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
1928 { | 1928 { |
1929 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r2", "TestObject", info.Holder(), info.GetIsolate()); | 1929 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r2", "TestObject", info.Holder(), info.GetIsolate()); |
1930 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1930 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1931 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1931 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
1932 imp->setConditionalAttr2(cppValue); | 1932 impl->setConditionalAttr2(cppValue); |
1933 } | 1933 } |
1934 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1934 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
1935 | 1935 |
1936 #if ENABLE(Condition1) && ENABLE(Condition2) | 1936 #if ENABLE(Condition1) && ENABLE(Condition2) |
1937 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1937 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1938 { | 1938 { |
1939 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1939 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1940 TestObjectV8Internal::conditionalAttr2AttributeSetter(jsValue, info); | 1940 TestObjectV8Internal::conditionalAttr2AttributeSetter(jsValue, info); |
1941 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1941 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1942 } | 1942 } |
1943 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 1943 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
1944 | 1944 |
1945 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 1945 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1946 static void conditionalAttr3AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1946 static void conditionalAttr3AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1947 { | 1947 { |
1948 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1948 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1949 v8SetReturnValueInt(info, imp->conditionalAttr3()); | 1949 v8SetReturnValueInt(info, impl->conditionalAttr3()); |
1950 } | 1950 } |
1951 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 1951 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1952 | 1952 |
1953 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 1953 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1954 static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1954 static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1955 { | 1955 { |
1956 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1956 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1957 TestObjectV8Internal::conditionalAttr3AttributeGetter(info); | 1957 TestObjectV8Internal::conditionalAttr3AttributeGetter(info); |
1958 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1958 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1959 } | 1959 } |
1960 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 1960 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1961 | 1961 |
1962 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 1962 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1963 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 1963 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
1964 { | 1964 { |
1965 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r3", "TestObject", info.Holder(), info.GetIsolate()); | 1965 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r3", "TestObject", info.Holder(), info.GetIsolate()); |
1966 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1966 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1967 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1967 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
1968 imp->setConditionalAttr3(cppValue); | 1968 impl->setConditionalAttr3(cppValue); |
1969 } | 1969 } |
1970 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 1970 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1971 | 1971 |
1972 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 1972 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1973 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1973 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
1974 { | 1974 { |
1975 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1975 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1976 TestObjectV8Internal::conditionalAttr3AttributeSetter(jsValue, info); | 1976 TestObjectV8Internal::conditionalAttr3AttributeSetter(jsValue, info); |
1977 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1977 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1978 } | 1978 } |
1979 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 1979 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
1980 | 1980 |
1981 static void cachedAttribute1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1981 static void cachedAttribute1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1982 { | 1982 { |
1983 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1983 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1984 v8SetReturnValue(info, imp->cachedAttribute1().v8Value()); | 1984 v8SetReturnValue(info, impl->cachedAttribute1().v8Value()); |
1985 } | 1985 } |
1986 | 1986 |
1987 static void cachedAttribute1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1987 static void cachedAttribute1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1988 { | 1988 { |
1989 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1989 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1990 TestObjectV8Internal::cachedAttribute1AttributeGetter(info); | 1990 TestObjectV8Internal::cachedAttribute1AttributeGetter(info); |
1991 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1991 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1992 } | 1992 } |
1993 | 1993 |
1994 static void cachedAttribute2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1994 static void cachedAttribute2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1995 { | 1995 { |
1996 TestObject* imp = V8TestObject::toNative(info.Holder()); | 1996 TestObject* impl = V8TestObject::toNative(info.Holder()); |
1997 v8SetReturnValue(info, imp->cachedAttribute2().v8Value()); | 1997 v8SetReturnValue(info, impl->cachedAttribute2().v8Value()); |
1998 } | 1998 } |
1999 | 1999 |
2000 static void cachedAttribute2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2000 static void cachedAttribute2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
2001 { | 2001 { |
2002 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2002 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2003 TestObjectV8Internal::cachedAttribute2AttributeGetter(info); | 2003 TestObjectV8Internal::cachedAttribute2AttributeGetter(info); |
2004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2005 } | 2005 } |
2006 | 2006 |
2007 static void cachedDirtyableAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 2007 static void cachedDirtyableAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
2008 { | 2008 { |
2009 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttribute"); | 2009 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttribute"); |
2010 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2010 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2011 if (!imp->isValueDirty()) { | 2011 if (!impl->isValueDirty()) { |
2012 v8::Handle<v8::Value> jsValue = V8HiddenValue::getHiddenValue(info.GetIs
olate(), info.Holder(), propertyName); | 2012 v8::Handle<v8::Value> jsValue = V8HiddenValue::getHiddenValue(info.GetIs
olate(), info.Holder(), propertyName); |
2013 if (!jsValue.IsEmpty()) { | 2013 if (!jsValue.IsEmpty()) { |
2014 v8SetReturnValue(info, jsValue); | 2014 v8SetReturnValue(info, jsValue); |
2015 return; | 2015 return; |
2016 } | 2016 } |
2017 } | 2017 } |
2018 ScriptValue jsValue = imp->cachedDirtyableAttribute(); | 2018 ScriptValue jsValue = impl->cachedDirtyableAttribute(); |
2019 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), propertyName
, jsValue.v8Value()); | 2019 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), propertyName
, jsValue.v8Value()); |
2020 v8SetReturnValue(info, jsValue.v8Value()); | 2020 v8SetReturnValue(info, jsValue.v8Value()); |
2021 } | 2021 } |
2022 | 2022 |
2023 static void cachedDirtyableAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2023 static void cachedDirtyableAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2024 { | 2024 { |
2025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2026 TestObjectV8Internal::cachedDirtyableAttributeAttributeGetter(info); | 2026 TestObjectV8Internal::cachedDirtyableAttributeAttributeGetter(info); |
2027 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2027 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2028 } | 2028 } |
2029 | 2029 |
2030 static void cachedDirtyableAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 2030 static void cachedDirtyableAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
2031 { | 2031 { |
2032 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttributeRaises"); | 2032 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttributeRaises"); |
2033 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2033 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2034 if (!imp->isValueDirty()) { | 2034 if (!impl->isValueDirty()) { |
2035 v8::Handle<v8::Value> jsValue = V8HiddenValue::getHiddenValue(info.GetIs
olate(), info.Holder(), propertyName); | 2035 v8::Handle<v8::Value> jsValue = V8HiddenValue::getHiddenValue(info.GetIs
olate(), info.Holder(), propertyName); |
2036 if (!jsValue.IsEmpty()) { | 2036 if (!jsValue.IsEmpty()) { |
2037 v8SetReturnValue(info, jsValue); | 2037 v8SetReturnValue(info, jsValue); |
2038 return; | 2038 return; |
2039 } | 2039 } |
2040 } | 2040 } |
2041 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedDirtyabl
eAttributeRaises", "TestObject", info.Holder(), info.GetIsolate()); | 2041 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedDirtyabl
eAttributeRaises", "TestObject", info.Holder(), info.GetIsolate()); |
2042 ScriptValue jsValue = imp->cachedDirtyableAttributeRaises(exceptionState); | 2042 ScriptValue jsValue = impl->cachedDirtyableAttributeRaises(exceptionState); |
2043 if (UNLIKELY(exceptionState.throwIfNeeded())) | 2043 if (UNLIKELY(exceptionState.throwIfNeeded())) |
2044 return; | 2044 return; |
2045 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), propertyName
, jsValue.v8Value()); | 2045 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), propertyName
, jsValue.v8Value()); |
2046 v8SetReturnValue(info, jsValue.v8Value()); | 2046 v8SetReturnValue(info, jsValue.v8Value()); |
2047 } | 2047 } |
2048 | 2048 |
2049 static void cachedDirtyableAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2049 static void cachedDirtyableAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2050 { | 2050 { |
2051 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2051 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2052 TestObjectV8Internal::cachedDirtyableAttributeRaisesAttributeGetter(info); | 2052 TestObjectV8Internal::cachedDirtyableAttributeRaisesAttributeGetter(info); |
2053 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2053 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2054 } | 2054 } |
2055 | 2055 |
2056 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 2056 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
2057 { | 2057 { |
2058 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2058 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2059 v8SetReturnValue(info, imp->anyAttribute().v8Value()); | 2059 v8SetReturnValue(info, impl->anyAttribute().v8Value()); |
2060 } | 2060 } |
2061 | 2061 |
2062 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 2062 static void anyAttributeAttributeGetterCallback(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::anyAttributeAttributeGetter(info); | 2065 TestObjectV8Internal::anyAttributeAttributeGetter(info); |
2066 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2066 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2067 } | 2067 } |
2068 | 2068 |
2069 static void anyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::
PropertyCallbackInfo<void>& info) | 2069 static void anyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::
PropertyCallbackInfo<void>& info) |
2070 { | 2070 { |
2071 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2071 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2072 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); | 2072 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); |
2073 imp->setAnyAttribute(cppValue); | 2073 impl->setAnyAttribute(cppValue); |
2074 } | 2074 } |
2075 | 2075 |
2076 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2076 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2077 { | 2077 { |
2078 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2078 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2079 TestObjectV8Internal::anyAttributeAttributeSetter(jsValue, info); | 2079 TestObjectV8Internal::anyAttributeAttributeSetter(jsValue, info); |
2080 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2080 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2081 } | 2081 } |
2082 | 2082 |
2083 static void callbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2083 static void callbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2084 { | 2084 { |
2085 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2085 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2086 v8SetReturnValue(info, imp->callbackFunctionAttribute().v8Value()); | 2086 v8SetReturnValue(info, impl->callbackFunctionAttribute().v8Value()); |
2087 } | 2087 } |
2088 | 2088 |
2089 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2089 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2090 { | 2090 { |
2091 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2091 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2092 TestObjectV8Internal::callbackFunctionAttributeAttributeGetter(info); | 2092 TestObjectV8Internal::callbackFunctionAttributeAttributeGetter(info); |
2093 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2093 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2094 } | 2094 } |
2095 | 2095 |
2096 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2096 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
2097 { | 2097 { |
2098 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2098 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2099 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); | 2099 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); |
2100 imp->setCallbackFunctionAttribute(cppValue); | 2100 impl->setCallbackFunctionAttribute(cppValue); |
2101 } | 2101 } |
2102 | 2102 |
2103 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2103 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2104 { | 2104 { |
2105 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2105 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2106 TestObjectV8Internal::callbackFunctionAttributeAttributeSetter(jsValue, info
); | 2106 TestObjectV8Internal::callbackFunctionAttributeAttributeSetter(jsValue, info
); |
2107 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2107 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2108 } | 2108 } |
2109 | 2109 |
2110 static void enabledAtRuntimeAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 2110 static void enabledAtRuntimeAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
2111 { | 2111 { |
2112 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2112 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2113 v8SetReturnValueInt(info, imp->enabledAtRuntimeAttr()); | 2113 v8SetReturnValueInt(info, impl->enabledAtRuntimeAttr()); |
2114 } | 2114 } |
2115 | 2115 |
2116 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2116 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
2117 { | 2117 { |
2118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2119 TestObjectV8Internal::enabledAtRuntimeAttrAttributeGetter(info); | 2119 TestObjectV8Internal::enabledAtRuntimeAttrAttributeGetter(info); |
2120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2121 } | 2121 } |
2122 | 2122 |
2123 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 2123 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
2124 { | 2124 { |
2125 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRunti
meAttr", "TestObject", info.Holder(), info.GetIsolate()); | 2125 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRunti
meAttr", "TestObject", info.Holder(), info.GetIsolate()); |
2126 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2126 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2127 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2127 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2128 imp->setEnabledAtRuntimeAttr(cppValue); | 2128 impl->setEnabledAtRuntimeAttr(cppValue); |
2129 } | 2129 } |
2130 | 2130 |
2131 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2131 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2132 { | 2132 { |
2133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2134 TestObjectV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info); | 2134 TestObjectV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info); |
2135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2136 } | 2136 } |
2137 | 2137 |
2138 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 2138 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
2139 { | 2139 { |
2140 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2140 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2141 v8SetReturnValueInt(info, imp->enabledPerContextAttr()); | 2141 v8SetReturnValueInt(info, impl->enabledPerContextAttr()); |
2142 } | 2142 } |
2143 | 2143 |
2144 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2144 static void enabledPerContextAttrAttributeGetterCallback(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 TestObjectV8Internal::enabledPerContextAttrAttributeGetter(info); | 2147 TestObjectV8Internal::enabledPerContextAttrAttributeGetter(info); |
2148 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2148 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2149 } | 2149 } |
2150 | 2150 |
2151 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 2151 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
2152 { | 2152 { |
2153 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerCont
extAttr", "TestObject", info.Holder(), info.GetIsolate()); | 2153 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerCont
extAttr", "TestObject", info.Holder(), info.GetIsolate()); |
2154 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2154 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2155 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2155 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2156 imp->setEnabledPerContextAttr(cppValue); | 2156 impl->setEnabledPerContextAttr(cppValue); |
2157 } | 2157 } |
2158 | 2158 |
2159 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2159 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2160 { | 2160 { |
2161 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2161 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2162 TestObjectV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info); | 2162 TestObjectV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info); |
2163 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2163 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2164 } | 2164 } |
2165 | 2165 |
2166 static void floatArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 2166 static void floatArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
2167 { | 2167 { |
2168 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2168 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2169 v8SetReturnValue(info, v8Array(imp->floatArray(), info.GetIsolate())); | 2169 v8SetReturnValue(info, v8Array(impl->floatArray(), info.GetIsolate())); |
2170 } | 2170 } |
2171 | 2171 |
2172 static void floatArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 2172 static void floatArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
2173 { | 2173 { |
2174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2175 TestObjectV8Internal::floatArrayAttributeGetter(info); | 2175 TestObjectV8Internal::floatArrayAttributeGetter(info); |
2176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2177 } | 2177 } |
2178 | 2178 |
2179 static void floatArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 2179 static void floatArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) |
2180 { | 2180 { |
2181 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2181 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2182 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, in
fo.GetIsolate())); | 2182 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, in
fo.GetIsolate())); |
2183 imp->setFloatArray(cppValue); | 2183 impl->setFloatArray(cppValue); |
2184 } | 2184 } |
2185 | 2185 |
2186 static void floatArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2186 static void floatArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2187 { | 2187 { |
2188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2189 TestObjectV8Internal::floatArrayAttributeSetter(jsValue, info); | 2189 TestObjectV8Internal::floatArrayAttributeSetter(jsValue, info); |
2190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2191 } | 2191 } |
2192 | 2192 |
2193 static void doubleArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 2193 static void doubleArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
2194 { | 2194 { |
2195 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2195 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2196 v8SetReturnValue(info, v8Array(imp->doubleArray(), info.GetIsolate())); | 2196 v8SetReturnValue(info, v8Array(impl->doubleArray(), info.GetIsolate())); |
2197 } | 2197 } |
2198 | 2198 |
2199 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 2199 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
2200 { | 2200 { |
2201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2202 TestObjectV8Internal::doubleArrayAttributeGetter(info); | 2202 TestObjectV8Internal::doubleArrayAttributeGetter(info); |
2203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2204 } | 2204 } |
2205 | 2205 |
2206 static void doubleArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) | 2206 static void doubleArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) |
2207 { | 2207 { |
2208 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2208 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2209 V8TRYCATCH_VOID(Vector<double>, cppValue, toNativeArray<double>(jsValue, 0,
info.GetIsolate())); | 2209 V8TRYCATCH_VOID(Vector<double>, cppValue, toNativeArray<double>(jsValue, 0,
info.GetIsolate())); |
2210 imp->setDoubleArray(cppValue); | 2210 impl->setDoubleArray(cppValue); |
2211 } | 2211 } |
2212 | 2212 |
2213 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2213 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2214 { | 2214 { |
2215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2216 TestObjectV8Internal::doubleArrayAttributeSetter(jsValue, info); | 2216 TestObjectV8Internal::doubleArrayAttributeSetter(jsValue, info); |
2217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2218 } | 2218 } |
2219 | 2219 |
2220 static void messagePortArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 2220 static void messagePortArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
2221 { | 2221 { |
2222 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2222 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2223 v8SetReturnValue(info, v8Array(imp->messagePortArray(), info.GetIsolate())); | 2223 v8SetReturnValue(info, v8Array(impl->messagePortArray(), info.GetIsolate()))
; |
2224 } | 2224 } |
2225 | 2225 |
2226 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2226 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
2227 { | 2227 { |
2228 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2228 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2229 TestObjectV8Internal::messagePortArrayAttributeGetter(info); | 2229 TestObjectV8Internal::messagePortArrayAttributeGetter(info); |
2230 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2230 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2231 } | 2231 } |
2232 | 2232 |
2233 static void messagePortArrayAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2233 static void messagePortArrayAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
2234 { | 2234 { |
2235 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2235 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2236 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, cppValue, (toRefPtrNativeArray
<MessagePort, V8MessagePort>(jsValue, 0, info.GetIsolate()))); | 2236 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, cppValue, (toRefPtrNativeArray
<MessagePort, V8MessagePort>(jsValue, 0, info.GetIsolate()))); |
2237 imp->setMessagePortArray(cppValue); | 2237 impl->setMessagePortArray(cppValue); |
2238 } | 2238 } |
2239 | 2239 |
2240 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2240 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2241 { | 2241 { |
2242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2243 TestObjectV8Internal::messagePortArrayAttributeSetter(jsValue, info); | 2243 TestObjectV8Internal::messagePortArrayAttributeSetter(jsValue, info); |
2244 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2244 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2245 } | 2245 } |
2246 | 2246 |
2247 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 2247 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
2248 { | 2248 { |
2249 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2249 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2250 ExceptionState exceptionState(ExceptionState::GetterContext, "contentDocumen
t", "TestObject", info.Holder(), info.GetIsolate()); | 2250 ExceptionState exceptionState(ExceptionState::GetterContext, "contentDocumen
t", "TestObject", info.Holder(), info.GetIsolate()); |
2251 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), imp->conten
tDocument(), exceptionState)) { | 2251 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->conte
ntDocument(), exceptionState)) { |
2252 v8SetReturnValueNull(info); | 2252 v8SetReturnValueNull(info); |
2253 exceptionState.throwIfNeeded(); | 2253 exceptionState.throwIfNeeded(); |
2254 return; | 2254 return; |
2255 } | 2255 } |
2256 v8SetReturnValueFast(info, WTF::getPtr(imp->contentDocument()), imp); | 2256 v8SetReturnValueFast(info, WTF::getPtr(impl->contentDocument()), impl); |
2257 } | 2257 } |
2258 | 2258 |
2259 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2259 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
2260 { | 2260 { |
2261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2262 TestObjectV8Internal::contentDocumentAttributeGetter(info); | 2262 TestObjectV8Internal::contentDocumentAttributeGetter(info); |
2263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2264 } | 2264 } |
2265 | 2265 |
2266 static void strawberryAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 2266 static void strawberryAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
2267 { | 2267 { |
2268 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2268 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2269 v8SetReturnValueInt(info, imp->blueberry()); | 2269 v8SetReturnValueInt(info, impl->blueberry()); |
2270 } | 2270 } |
2271 | 2271 |
2272 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 2272 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
2273 { | 2273 { |
2274 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2274 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2275 TestObjectV8Internal::strawberryAttributeGetter(info); | 2275 TestObjectV8Internal::strawberryAttributeGetter(info); |
2276 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2276 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2277 } | 2277 } |
2278 | 2278 |
2279 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 2279 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) |
2280 { | 2280 { |
2281 ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", "
TestObject", info.Holder(), info.GetIsolate()); | 2281 ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", "
TestObject", info.Holder(), info.GetIsolate()); |
2282 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2282 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2283 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2283 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2284 imp->setBlueberry(cppValue); | 2284 impl->setBlueberry(cppValue); |
2285 } | 2285 } |
2286 | 2286 |
2287 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2287 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2288 { | 2288 { |
2289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2290 TestObjectV8Internal::strawberryAttributeSetter(jsValue, info); | 2290 TestObjectV8Internal::strawberryAttributeSetter(jsValue, info); |
2291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2292 } | 2292 } |
2293 | 2293 |
2294 static void strictFloatAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 2294 static void strictFloatAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
2295 { | 2295 { |
2296 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2296 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2297 v8SetReturnValue(info, imp->strictFloat()); | 2297 v8SetReturnValue(info, impl->strictFloat()); |
2298 } | 2298 } |
2299 | 2299 |
2300 static void strictFloatAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 2300 static void strictFloatAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
2301 { | 2301 { |
2302 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2302 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2303 TestObjectV8Internal::strictFloatAttributeGetter(info); | 2303 TestObjectV8Internal::strictFloatAttributeGetter(info); |
2304 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2304 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2305 } | 2305 } |
2306 | 2306 |
2307 static void strictFloatAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) | 2307 static void strictFloatAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) |
2308 { | 2308 { |
2309 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2309 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2310 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue()))
; | 2310 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue()))
; |
2311 imp->setStrictFloat(cppValue); | 2311 impl->setStrictFloat(cppValue); |
2312 } | 2312 } |
2313 | 2313 |
2314 static void strictFloatAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2314 static void strictFloatAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2315 { | 2315 { |
2316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2317 TestObjectV8Internal::strictFloatAttributeSetter(jsValue, info); | 2317 TestObjectV8Internal::strictFloatAttributeSetter(jsValue, info); |
2318 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2318 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2319 } | 2319 } |
2320 | 2320 |
2321 static void replaceableAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 2321 static void replaceableAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
2322 { | 2322 { |
2323 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2323 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2324 v8SetReturnValueInt(info, imp->replaceableAttribute()); | 2324 v8SetReturnValueInt(info, impl->replaceableAttribute()); |
2325 } | 2325 } |
2326 | 2326 |
2327 static void replaceableAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2327 static void replaceableAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
2328 { | 2328 { |
2329 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2329 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2330 TestObjectV8Internal::replaceableAttributeAttributeGetter(info); | 2330 TestObjectV8Internal::replaceableAttributeAttributeGetter(info); |
2331 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2331 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2332 } | 2332 } |
2333 | 2333 |
2334 static void nullableDoubleAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 2334 static void nullableDoubleAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
2335 { | 2335 { |
2336 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2336 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2337 bool isNull = false; | 2337 bool isNull = false; |
2338 double jsValue = imp->nullableDoubleAttribute(isNull); | 2338 double jsValue = impl->nullableDoubleAttribute(isNull); |
2339 if (isNull) { | 2339 if (isNull) { |
2340 v8SetReturnValueNull(info); | 2340 v8SetReturnValueNull(info); |
2341 return; | 2341 return; |
2342 } | 2342 } |
2343 v8SetReturnValue(info, jsValue); | 2343 v8SetReturnValue(info, jsValue); |
2344 } | 2344 } |
2345 | 2345 |
2346 static void nullableDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 2346 static void nullableDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
2347 { | 2347 { |
2348 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2348 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2349 TestObjectV8Internal::nullableDoubleAttributeAttributeGetter(info); | 2349 TestObjectV8Internal::nullableDoubleAttributeAttributeGetter(info); |
2350 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2350 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2351 } | 2351 } |
2352 | 2352 |
2353 static void nullableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 2353 static void nullableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
2354 { | 2354 { |
2355 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2355 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2356 bool isNull = false; | 2356 bool isNull = false; |
2357 int jsValue = imp->nullableLongAttribute(isNull); | 2357 int jsValue = impl->nullableLongAttribute(isNull); |
2358 if (isNull) { | 2358 if (isNull) { |
2359 v8SetReturnValueNull(info); | 2359 v8SetReturnValueNull(info); |
2360 return; | 2360 return; |
2361 } | 2361 } |
2362 v8SetReturnValueInt(info, jsValue); | 2362 v8SetReturnValueInt(info, jsValue); |
2363 } | 2363 } |
2364 | 2364 |
2365 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2365 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
2366 { | 2366 { |
2367 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2367 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2368 TestObjectV8Internal::nullableLongAttributeAttributeGetter(info); | 2368 TestObjectV8Internal::nullableLongAttributeAttributeGetter(info); |
2369 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2369 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2370 } | 2370 } |
2371 | 2371 |
2372 static void nullableBooleanAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 2372 static void nullableBooleanAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
2373 { | 2373 { |
2374 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2374 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2375 bool isNull = false; | 2375 bool isNull = false; |
2376 bool jsValue = imp->nullableBooleanAttribute(isNull); | 2376 bool jsValue = impl->nullableBooleanAttribute(isNull); |
2377 if (isNull) { | 2377 if (isNull) { |
2378 v8SetReturnValueNull(info); | 2378 v8SetReturnValueNull(info); |
2379 return; | 2379 return; |
2380 } | 2380 } |
2381 v8SetReturnValueBool(info, jsValue); | 2381 v8SetReturnValueBool(info, jsValue); |
2382 } | 2382 } |
2383 | 2383 |
2384 static void nullableBooleanAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2384 static void nullableBooleanAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2385 { | 2385 { |
2386 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2386 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2387 TestObjectV8Internal::nullableBooleanAttributeAttributeGetter(info); | 2387 TestObjectV8Internal::nullableBooleanAttributeAttributeGetter(info); |
2388 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2388 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2389 } | 2389 } |
2390 | 2390 |
2391 static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 2391 static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
2392 { | 2392 { |
2393 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2393 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2394 bool isNull = false; | 2394 bool isNull = false; |
2395 String jsValue = imp->nullableStringAttribute(isNull); | 2395 String jsValue = impl->nullableStringAttribute(isNull); |
2396 if (isNull) { | 2396 if (isNull) { |
2397 v8SetReturnValueNull(info); | 2397 v8SetReturnValueNull(info); |
2398 return; | 2398 return; |
2399 } | 2399 } |
2400 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 2400 v8SetReturnValueString(info, jsValue, info.GetIsolate()); |
2401 } | 2401 } |
2402 | 2402 |
2403 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 2403 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
2404 { | 2404 { |
2405 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2405 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2406 TestObjectV8Internal::nullableStringAttributeAttributeGetter(info); | 2406 TestObjectV8Internal::nullableStringAttributeAttributeGetter(info); |
2407 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2407 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2408 } | 2408 } |
2409 | 2409 |
2410 static void nullableLongSettableAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 2410 static void nullableLongSettableAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
2411 { | 2411 { |
2412 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2412 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2413 bool isNull = false; | 2413 bool isNull = false; |
2414 int jsValue = imp->nullableLongSettableAttribute(isNull); | 2414 int jsValue = impl->nullableLongSettableAttribute(isNull); |
2415 if (isNull) { | 2415 if (isNull) { |
2416 v8SetReturnValueNull(info); | 2416 v8SetReturnValueNull(info); |
2417 return; | 2417 return; |
2418 } | 2418 } |
2419 v8SetReturnValueInt(info, jsValue); | 2419 v8SetReturnValueInt(info, jsValue); |
2420 } | 2420 } |
2421 | 2421 |
2422 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2422 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2423 { | 2423 { |
2424 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2424 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2425 TestObjectV8Internal::nullableLongSettableAttributeAttributeGetter(info); | 2425 TestObjectV8Internal::nullableLongSettableAttributeAttributeGetter(info); |
2426 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2426 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2427 } | 2427 } |
2428 | 2428 |
2429 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 2429 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
2430 { | 2430 { |
2431 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSe
ttableAttribute", "TestObject", info.Holder(), info.GetIsolate()); | 2431 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSe
ttableAttribute", "TestObject", info.Holder(), info.GetIsolate()); |
2432 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2432 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2433 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2433 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2434 imp->setNullableLongSettableAttribute(cppValue); | 2434 impl->setNullableLongSettableAttribute(cppValue); |
2435 } | 2435 } |
2436 | 2436 |
2437 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 2437 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
2438 { | 2438 { |
2439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2440 TestObjectV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue,
info); | 2440 TestObjectV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue,
info); |
2441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2442 } | 2442 } |
2443 | 2443 |
2444 static void perWorldReadOnlyAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2444 static void perWorldReadOnlyAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2445 { | 2445 { |
2446 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2446 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2447 RefPtr<TestObject> result(imp->perWorldReadOnlyAttribute()); | 2447 RefPtr<TestObject> result(impl->perWorldReadOnlyAttribute()); |
2448 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) | 2448 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) |
2449 return; | 2449 return; |
2450 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 2450 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
2451 if (!wrapper.IsEmpty()) { | 2451 if (!wrapper.IsEmpty()) { |
2452 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), v8Atomic
String(info.GetIsolate(), "perWorldReadOnlyAttribute"), wrapper); | 2452 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), v8Atomic
String(info.GetIsolate(), "perWorldReadOnlyAttribute"), wrapper); |
2453 v8SetReturnValue(info, wrapper); | 2453 v8SetReturnValue(info, wrapper); |
2454 } | 2454 } |
2455 } | 2455 } |
2456 | 2456 |
2457 static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2457 static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2458 { | 2458 { |
2459 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2459 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2460 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetter(info); | 2460 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetter(info); |
2461 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2461 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2462 } | 2462 } |
2463 | 2463 |
2464 static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 2464 static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
2465 { | 2465 { |
2466 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2466 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2467 RefPtr<TestObject> result(imp->perWorldReadOnlyAttribute()); | 2467 RefPtr<TestObject> result(impl->perWorldReadOnlyAttribute()); |
2468 if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObje
ct>(info.GetReturnValue(), result.get())) | 2468 if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObje
ct>(info.GetReturnValue(), result.get())) |
2469 return; | 2469 return; |
2470 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 2470 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
2471 if (!wrapper.IsEmpty()) { | 2471 if (!wrapper.IsEmpty()) { |
2472 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), v8Atomic
String(info.GetIsolate(), "perWorldReadOnlyAttribute"), wrapper); | 2472 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder(), v8Atomic
String(info.GetIsolate(), "perWorldReadOnlyAttribute"), wrapper); |
2473 v8SetReturnValue(info, wrapper); | 2473 v8SetReturnValue(info, wrapper); |
2474 } | 2474 } |
2475 } | 2475 } |
2476 | 2476 |
2477 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2477 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2478 { | 2478 { |
2479 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2479 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2480 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetterForMainWorld(i
nfo); | 2480 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetterForMainWorld(i
nfo); |
2481 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2481 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2482 } | 2482 } |
2483 | 2483 |
2484 static void perWorldAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 2484 static void perWorldAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
2485 { | 2485 { |
2486 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2486 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2487 v8SetReturnValueFast(info, WTF::getPtr(imp->perWorldAttribute()), imp); | 2487 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldAttribute()), impl); |
2488 } | 2488 } |
2489 | 2489 |
2490 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 2490 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
2491 { | 2491 { |
2492 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2492 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2493 TestObjectV8Internal::perWorldAttributeAttributeGetter(info); | 2493 TestObjectV8Internal::perWorldAttributeAttributeGetter(info); |
2494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2495 } | 2495 } |
2496 | 2496 |
2497 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2497 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
2498 { | 2498 { |
2499 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2499 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2500 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 2500 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
2501 imp->setPerWorldAttribute(WTF::getPtr(cppValue)); | 2501 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); |
2502 } | 2502 } |
2503 | 2503 |
2504 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2504 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2505 { | 2505 { |
2506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2507 TestObjectV8Internal::perWorldAttributeAttributeSetter(jsValue, info); | 2507 TestObjectV8Internal::perWorldAttributeAttributeSetter(jsValue, info); |
2508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2509 } | 2509 } |
2510 | 2510 |
2511 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 2511 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
2512 { | 2512 { |
2513 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2513 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2514 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldAttribute())); | 2514 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldAttribute())); |
2515 } | 2515 } |
2516 | 2516 |
2517 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2517 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2518 { | 2518 { |
2519 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2519 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2520 TestObjectV8Internal::perWorldAttributeAttributeGetterForMainWorld(info); | 2520 TestObjectV8Internal::perWorldAttributeAttributeGetterForMainWorld(info); |
2521 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2521 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2522 } | 2522 } |
2523 | 2523 |
2524 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 2524 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
2525 { | 2525 { |
2526 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2526 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2527 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 2527 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); |
2528 imp->setPerWorldAttribute(WTF::getPtr(cppValue)); | 2528 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); |
2529 } | 2529 } |
2530 | 2530 |
2531 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 2531 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
2532 { | 2532 { |
2533 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2533 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2534 TestObjectV8Internal::perWorldAttributeAttributeSetterForMainWorld(jsValue,
info); | 2534 TestObjectV8Internal::perWorldAttributeAttributeSetterForMainWorld(jsValue,
info); |
2535 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2535 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2536 } | 2536 } |
2537 | 2537 |
2538 static void activityLoggedAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 2538 static void activityLoggedAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
2539 { | 2539 { |
2540 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2540 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2541 v8SetReturnValueInt(info, imp->activityLoggedAttr1()); | 2541 v8SetReturnValueInt(info, impl->activityLoggedAttr1()); |
2542 } | 2542 } |
2543 | 2543 |
2544 static void activityLoggedAttr1AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2544 static void activityLoggedAttr1AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
2545 { | 2545 { |
2546 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2546 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2547 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2547 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2548 if (contextData && contextData->activityLogger()) | 2548 if (contextData && contextData->activityLogger()) |
2549 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); | 2549 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); |
2550 TestObjectV8Internal::activityLoggedAttr1AttributeGetter(info); | 2550 TestObjectV8Internal::activityLoggedAttr1AttributeGetter(info); |
2551 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2551 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2552 } | 2552 } |
2553 | 2553 |
2554 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 2554 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) |
2555 { | 2555 { |
2556 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr1", "TestObject", info.Holder(), info.GetIsolate()); | 2556 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr1", "TestObject", info.Holder(), info.GetIsolate()); |
2557 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2557 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2558 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2558 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2559 imp->setActivityLoggedAttr1(cppValue); | 2559 impl->setActivityLoggedAttr1(cppValue); |
2560 } | 2560 } |
2561 | 2561 |
2562 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2562 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2563 { | 2563 { |
2564 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2564 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2565 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2565 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2566 if (contextData && contextData->activityLogger()) { | 2566 if (contextData && contextData->activityLogger()) { |
2567 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2567 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2568 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); | 2568 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); |
2569 } | 2569 } |
2570 TestObjectV8Internal::activityLoggedAttr1AttributeSetter(jsValue, info); | 2570 TestObjectV8Internal::activityLoggedAttr1AttributeSetter(jsValue, info); |
2571 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2571 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2572 } | 2572 } |
2573 | 2573 |
2574 static void activityLoggedAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 2574 static void activityLoggedAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
2575 { | 2575 { |
2576 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2576 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2577 v8SetReturnValueInt(info, imp->activityLoggedAttr2()); | 2577 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); |
2578 } | 2578 } |
2579 | 2579 |
2580 static void activityLoggedAttr2AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2580 static void activityLoggedAttr2AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
2581 { | 2581 { |
2582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2583 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2583 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2584 if (contextData && contextData->activityLogger()) | 2584 if (contextData && contextData->activityLogger()) |
2585 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); | 2585 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
2586 TestObjectV8Internal::activityLoggedAttr2AttributeGetter(info); | 2586 TestObjectV8Internal::activityLoggedAttr2AttributeGetter(info); |
2587 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2587 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2588 } | 2588 } |
2589 | 2589 |
2590 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 2590 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) |
2591 { | 2591 { |
2592 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", info.Holder(), info.GetIsolate()); | 2592 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", info.Holder(), info.GetIsolate()); |
2593 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2593 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2594 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2594 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2595 imp->setActivityLoggedAttr2(cppValue); | 2595 impl->setActivityLoggedAttr2(cppValue); |
2596 } | 2596 } |
2597 | 2597 |
2598 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2598 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2599 { | 2599 { |
2600 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2600 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2601 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2601 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2602 if (contextData && contextData->activityLogger()) { | 2602 if (contextData && contextData->activityLogger()) { |
2603 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2603 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2604 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); | 2604 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
2605 } | 2605 } |
2606 TestObjectV8Internal::activityLoggedAttr2AttributeSetter(jsValue, info); | 2606 TestObjectV8Internal::activityLoggedAttr2AttributeSetter(jsValue, info); |
2607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2608 } | 2608 } |
2609 | 2609 |
2610 static void activityLoggedAttr2AttributeGetterForMainWorld(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 2610 static void activityLoggedAttr2AttributeGetterForMainWorld(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
2611 { | 2611 { |
2612 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2612 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2613 v8SetReturnValueInt(info, imp->activityLoggedAttr2()); | 2613 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); |
2614 } | 2614 } |
2615 | 2615 |
2616 static void activityLoggedAttr2AttributeGetterCallbackForMainWorld(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2616 static void activityLoggedAttr2AttributeGetterCallbackForMainWorld(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2617 { | 2617 { |
2618 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2618 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2619 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2619 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2620 if (contextData && contextData->activityLogger()) | 2620 if (contextData && contextData->activityLogger()) |
2621 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); | 2621 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
2622 TestObjectV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info); | 2622 TestObjectV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info); |
2623 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2623 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2624 } | 2624 } |
2625 | 2625 |
2626 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 2626 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) |
2627 { | 2627 { |
2628 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", info.Holder(), info.GetIsolate()); | 2628 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", info.Holder(), info.GetIsolate()); |
2629 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2629 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2630 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2630 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2631 imp->setActivityLoggedAttr2(cppValue); | 2631 impl->setActivityLoggedAttr2(cppValue); |
2632 } | 2632 } |
2633 | 2633 |
2634 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) | 2634 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) |
2635 { | 2635 { |
2636 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2636 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2637 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2637 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2638 if (contextData && contextData->activityLogger()) { | 2638 if (contextData && contextData->activityLogger()) { |
2639 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2639 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2640 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); | 2640 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
2641 } | 2641 } |
2642 TestObjectV8Internal::activityLoggedAttr2AttributeSetterForMainWorld(jsValue
, info); | 2642 TestObjectV8Internal::activityLoggedAttr2AttributeSetterForMainWorld(jsValue
, info); |
2643 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2643 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2644 } | 2644 } |
2645 | 2645 |
2646 static void activityLoggedInIsolatedWorldsAttrAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 2646 static void activityLoggedInIsolatedWorldsAttrAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
2647 { | 2647 { |
2648 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2648 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2649 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttr()); | 2649 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); |
2650 } | 2650 } |
2651 | 2651 |
2652 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2652 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2653 { | 2653 { |
2654 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2654 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2655 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2655 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2656 if (contextData && contextData->activityLogger()) | 2656 if (contextData && contextData->activityLogger()) |
2657 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); | 2657 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); |
2658 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info
); | 2658 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info
); |
2659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2660 } | 2660 } |
2661 | 2661 |
2662 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu
e> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2662 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu
e> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2663 { | 2663 { |
2664 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate()); | 2664 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate()); |
2665 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2665 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2666 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2666 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2667 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue); | 2667 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); |
2668 } | 2668 } |
2669 | 2669 |
2670 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) | 2670 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) |
2671 { | 2671 { |
2672 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2672 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2673 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2673 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2674 if (contextData && contextData->activityLogger()) { | 2674 if (contextData && contextData->activityLogger()) { |
2675 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2675 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2676 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); | 2676 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); |
2677 } | 2677 } |
2678 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetter(jsVa
lue, info); | 2678 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetter(jsVa
lue, info); |
2679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2680 } | 2680 } |
2681 | 2681 |
2682 static void activityLoggedInIsolatedWorldsAttrAttributeGetterForMainWorld(const
v8::PropertyCallbackInfo<v8::Value>& info) | 2682 static void activityLoggedInIsolatedWorldsAttrAttributeGetterForMainWorld(const
v8::PropertyCallbackInfo<v8::Value>& info) |
2683 { | 2683 { |
2684 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2684 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2685 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttr()); | 2685 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); |
2686 } | 2686 } |
2687 | 2687 |
2688 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl
d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2688 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl
d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2689 { | 2689 { |
2690 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2690 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2691 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMa
inWorld(info); | 2691 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMa
inWorld(info); |
2692 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2692 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2693 } | 2693 } |
2694 | 2694 |
2695 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2695 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2696 { | 2696 { |
2697 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate()); | 2697 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate()); |
2698 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2698 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2699 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2699 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2700 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue); | 2700 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); |
2701 } | 2701 } |
2702 | 2702 |
2703 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl
d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac
kInfo<void>& info) | 2703 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl
d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac
kInfo<void>& info) |
2704 { | 2704 { |
2705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2706 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMa
inWorld(jsValue, info); | 2706 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMa
inWorld(jsValue, info); |
2707 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2707 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2708 } | 2708 } |
2709 | 2709 |
2710 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2710 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2711 { | 2711 { |
2712 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2712 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2713 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter1()); | 2713 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter1()); |
2714 } | 2714 } |
2715 | 2715 |
2716 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2716 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2717 { | 2717 { |
2718 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2718 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2719 TestObjectV8Internal::activityLoggedAttrSetter1AttributeGetter(info); | 2719 TestObjectV8Internal::activityLoggedAttrSetter1AttributeGetter(info); |
2720 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2720 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2721 } | 2721 } |
2722 | 2722 |
2723 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2723 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
2724 { | 2724 { |
2725 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter1", "TestObject", info.Holder(), info.GetIsolate()); | 2725 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter1", "TestObject", info.Holder(), info.GetIsolate()); |
2726 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2726 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2727 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2727 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2728 imp->setActivityLoggedAttrSetter1(cppValue); | 2728 impl->setActivityLoggedAttrSetter1(cppValue); |
2729 } | 2729 } |
2730 | 2730 |
2731 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2731 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2732 { | 2732 { |
2733 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2733 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2734 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2734 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2735 if (contextData && contextData->activityLogger()) { | 2735 if (contextData && contextData->activityLogger()) { |
2736 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2736 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2737 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); | 2737 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); |
2738 } | 2738 } |
2739 TestObjectV8Internal::activityLoggedAttrSetter1AttributeSetter(jsValue, info
); | 2739 TestObjectV8Internal::activityLoggedAttrSetter1AttributeSetter(jsValue, info
); |
2740 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2740 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2741 } | 2741 } |
2742 | 2742 |
2743 static void activityLoggedAttrSetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2743 static void activityLoggedAttrSetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2744 { | 2744 { |
2745 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2745 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2746 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter2()); | 2746 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); |
2747 } | 2747 } |
2748 | 2748 |
2749 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2749 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2750 { | 2750 { |
2751 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2751 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2752 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetter(info); | 2752 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetter(info); |
2753 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2753 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2754 } | 2754 } |
2755 | 2755 |
2756 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2756 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
2757 { | 2757 { |
2758 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", info.Holder(), info.GetIsolate()); | 2758 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", info.Holder(), info.GetIsolate()); |
2759 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2759 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2760 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2760 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2761 imp->setActivityLoggedAttrSetter2(cppValue); | 2761 impl->setActivityLoggedAttrSetter2(cppValue); |
2762 } | 2762 } |
2763 | 2763 |
2764 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2764 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2765 { | 2765 { |
2766 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2766 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2767 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2767 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2768 if (contextData && contextData->activityLogger()) { | 2768 if (contextData && contextData->activityLogger()) { |
2769 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2769 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2770 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); | 2770 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
2771 } | 2771 } |
2772 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetter(jsValue, info
); | 2772 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetter(jsValue, info
); |
2773 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2773 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2774 } | 2774 } |
2775 | 2775 |
2776 static void activityLoggedAttrSetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 2776 static void activityLoggedAttrSetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
2777 { | 2777 { |
2778 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2778 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2779 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter2()); | 2779 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); |
2780 } | 2780 } |
2781 | 2781 |
2782 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2782 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2783 { | 2783 { |
2784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2785 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(i
nfo); | 2785 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(i
nfo); |
2786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2787 } | 2787 } |
2788 | 2788 |
2789 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2789 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2790 { | 2790 { |
2791 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", info.Holder(), info.GetIsolate()); | 2791 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", info.Holder(), info.GetIsolate()); |
2792 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2792 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2793 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2793 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2794 imp->setActivityLoggedAttrSetter2(cppValue); | 2794 impl->setActivityLoggedAttrSetter2(cppValue); |
2795 } | 2795 } |
2796 | 2796 |
2797 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) | 2797 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) |
2798 { | 2798 { |
2799 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2799 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2800 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2800 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2801 if (contextData && contextData->activityLogger()) { | 2801 if (contextData && contextData->activityLogger()) { |
2802 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2802 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2803 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); | 2803 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
2804 } | 2804 } |
2805 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetterForMainWorld(j
sValue, info); | 2805 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetterForMainWorld(j
sValue, info); |
2806 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2806 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2807 } | 2807 } |
2808 | 2808 |
2809 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 2809 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
2810 { | 2810 { |
2811 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2811 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2812 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrSetter()); | 2812 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); |
2813 } | 2813 } |
2814 | 2814 |
2815 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2815 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2816 { | 2816 { |
2817 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2817 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2818 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
r(info); | 2818 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
r(info); |
2819 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2819 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2820 } | 2820 } |
2821 | 2821 |
2822 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2822 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2823 { | 2823 { |
2824 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate()); | 2824 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate()); |
2825 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2825 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2826 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2826 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2827 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); | 2827 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); |
2828 } | 2828 } |
2829 | 2829 |
2830 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 2830 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) |
2831 { | 2831 { |
2832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2833 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2833 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2834 if (contextData && contextData->activityLogger()) { | 2834 if (contextData && contextData->activityLogger()) { |
2835 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2835 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
2836 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); | 2836 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); |
2837 } | 2837 } |
2838 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
r(jsValue, info); | 2838 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
r(jsValue, info); |
2839 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2839 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2840 } | 2840 } |
2841 | 2841 |
2842 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) | 2842 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) |
2843 { | 2843 { |
2844 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2844 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2845 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrSetter()); | 2845 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); |
2846 } | 2846 } |
2847 | 2847 |
2848 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2848 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2849 { | 2849 { |
2850 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2850 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2851 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
rForMainWorld(info); | 2851 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
rForMainWorld(info); |
2852 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2852 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2853 } | 2853 } |
2854 | 2854 |
2855 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld(
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2855 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld(
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2856 { | 2856 { |
2857 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate()); | 2857 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate()); |
2858 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2858 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2859 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2859 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2860 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); | 2860 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); |
2861 } | 2861 } |
2862 | 2862 |
2863 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC
allbackInfo<void>& info) | 2863 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC
allbackInfo<void>& info) |
2864 { | 2864 { |
2865 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2865 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2866 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
rForMainWorld(jsValue, info); | 2866 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
rForMainWorld(jsValue, info); |
2867 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2867 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2868 } | 2868 } |
2869 | 2869 |
2870 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2870 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2871 { | 2871 { |
2872 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2872 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2873 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter1()); | 2873 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter1()); |
2874 } | 2874 } |
2875 | 2875 |
2876 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2876 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2877 { | 2877 { |
2878 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2878 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2879 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2879 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2880 if (contextData && contextData->activityLogger()) | 2880 if (contextData && contextData->activityLogger()) |
2881 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); | 2881 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); |
2882 TestObjectV8Internal::activityLoggedAttrGetter1AttributeGetter(info); | 2882 TestObjectV8Internal::activityLoggedAttrGetter1AttributeGetter(info); |
2883 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2883 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2884 } | 2884 } |
2885 | 2885 |
2886 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2886 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
2887 { | 2887 { |
2888 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter1", "TestObject", info.Holder(), info.GetIsolate()); | 2888 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter1", "TestObject", info.Holder(), info.GetIsolate()); |
2889 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2889 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2890 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2890 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2891 imp->setActivityLoggedAttrGetter1(cppValue); | 2891 impl->setActivityLoggedAttrGetter1(cppValue); |
2892 } | 2892 } |
2893 | 2893 |
2894 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2894 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2895 { | 2895 { |
2896 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2896 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2897 TestObjectV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info
); | 2897 TestObjectV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info
); |
2898 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2898 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2899 } | 2899 } |
2900 | 2900 |
2901 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2901 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2902 { | 2902 { |
2903 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2903 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2904 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2()); | 2904 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); |
2905 } | 2905 } |
2906 | 2906 |
2907 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2907 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2908 { | 2908 { |
2909 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2909 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2910 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2910 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2911 if (contextData && contextData->activityLogger()) | 2911 if (contextData && contextData->activityLogger()) |
2912 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); | 2912 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
2913 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetter(info); | 2913 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetter(info); |
2914 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2914 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2915 } | 2915 } |
2916 | 2916 |
2917 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2917 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
2918 { | 2918 { |
2919 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", info.Holder(), info.GetIsolate()); | 2919 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", info.Holder(), info.GetIsolate()); |
2920 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2920 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2921 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2921 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2922 imp->setActivityLoggedAttrGetter2(cppValue); | 2922 impl->setActivityLoggedAttrGetter2(cppValue); |
2923 } | 2923 } |
2924 | 2924 |
2925 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2925 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2926 { | 2926 { |
2927 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2927 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2928 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info
); | 2928 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info
); |
2929 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2929 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2930 } | 2930 } |
2931 | 2931 |
2932 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 2932 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
2933 { | 2933 { |
2934 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2934 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2935 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2()); | 2935 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); |
2936 } | 2936 } |
2937 | 2937 |
2938 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2938 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2939 { | 2939 { |
2940 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2940 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2941 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2941 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2942 if (contextData && contextData->activityLogger()) | 2942 if (contextData && contextData->activityLogger()) |
2943 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); | 2943 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
2944 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(i
nfo); | 2944 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(i
nfo); |
2945 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2945 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2946 } | 2946 } |
2947 | 2947 |
2948 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2948 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2949 { | 2949 { |
2950 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", info.Holder(), info.GetIsolate()); | 2950 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", info.Holder(), info.GetIsolate()); |
2951 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2951 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2952 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2952 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2953 imp->setActivityLoggedAttrGetter2(cppValue); | 2953 impl->setActivityLoggedAttrGetter2(cppValue); |
2954 } | 2954 } |
2955 | 2955 |
2956 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) | 2956 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) |
2957 { | 2957 { |
2958 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2958 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2959 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(j
sValue, info); | 2959 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(j
sValue, info); |
2960 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2960 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2961 } | 2961 } |
2962 | 2962 |
2963 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 2963 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
2964 { | 2964 { |
2965 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2965 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2966 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); | 2966 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); |
2967 } | 2967 } |
2968 | 2968 |
2969 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2969 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(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 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2972 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2973 if (contextData && contextData->activityLogger()) | 2973 if (contextData && contextData->activityLogger()) |
2974 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); | 2974 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); |
2975 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
r(info); | 2975 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
r(info); |
2976 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2976 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2977 } | 2977 } |
2978 | 2978 |
2979 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2979 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2980 { | 2980 { |
2981 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate()); | 2981 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate()); |
2982 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2982 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2983 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2983 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
2984 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); | 2984 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); |
2985 } | 2985 } |
2986 | 2986 |
2987 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 2987 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, 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::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
r(jsValue, info); | 2990 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
r(jsValue, info); |
2991 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2991 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2992 } | 2992 } |
2993 | 2993 |
2994 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) | 2994 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) |
2995 { | 2995 { |
2996 TestObject* imp = V8TestObject::toNative(info.Holder()); | 2996 TestObject* impl = V8TestObject::toNative(info.Holder()); |
2997 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); | 2997 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); |
2998 } | 2998 } |
2999 | 2999 |
3000 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3000 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
3001 { | 3001 { |
3002 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3002 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3003 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
rForMainWorld(info); | 3003 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
rForMainWorld(info); |
3004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3005 } | 3005 } |
3006 | 3006 |
3007 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld(
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3007 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld(
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3008 { | 3008 { |
3009 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate()); | 3009 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate()); |
3010 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3010 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3011 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3011 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
3012 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); | 3012 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); |
3013 } | 3013 } |
3014 | 3014 |
3015 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC
allbackInfo<void>& info) | 3015 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC
allbackInfo<void>& info) |
3016 { | 3016 { |
3017 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3017 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3018 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
rForMainWorld(jsValue, info); | 3018 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
rForMainWorld(jsValue, info); |
3019 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3019 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3020 } | 3020 } |
3021 | 3021 |
3022 static void deprecatedStaticReadOnlyAttrAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 3022 static void deprecatedStaticReadOnlyAttrAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3055 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3055 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3056 { | 3056 { |
3057 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3057 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3058 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); | 3058 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); |
3059 TestObjectV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info); | 3059 TestObjectV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info); |
3060 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3060 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3061 } | 3061 } |
3062 | 3062 |
3063 static void deprecatedReadonlyAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 3063 static void deprecatedReadonlyAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
3064 { | 3064 { |
3065 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3065 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3066 v8SetReturnValueInt(info, imp->deprecatedReadonlyAttr()); | 3066 v8SetReturnValueInt(info, impl->deprecatedReadonlyAttr()); |
3067 } | 3067 } |
3068 | 3068 |
3069 static void deprecatedReadonlyAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 3069 static void deprecatedReadonlyAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
3070 { | 3070 { |
3071 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3071 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3072 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::ReadonlyAttribute); | 3072 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::ReadonlyAttribute); |
3073 TestObjectV8Internal::deprecatedReadonlyAttrAttributeGetter(info); | 3073 TestObjectV8Internal::deprecatedReadonlyAttrAttributeGetter(info); |
3074 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3074 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3075 } | 3075 } |
3076 | 3076 |
3077 static void deprecatedAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 3077 static void deprecatedAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
3078 { | 3078 { |
3079 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3079 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3080 v8SetReturnValueInt(info, imp->deprecatedAttr()); | 3080 v8SetReturnValueInt(info, impl->deprecatedAttr()); |
3081 } | 3081 } |
3082 | 3082 |
3083 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 3083 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
3084 { | 3084 { |
3085 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3085 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3086 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); | 3086 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); |
3087 TestObjectV8Internal::deprecatedAttrAttributeGetter(info); | 3087 TestObjectV8Internal::deprecatedAttrAttributeGetter(info); |
3088 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3088 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3089 } | 3089 } |
3090 | 3090 |
3091 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 3091 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) |
3092 { | 3092 { |
3093 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr
", "TestObject", info.Holder(), info.GetIsolate()); | 3093 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr
", "TestObject", info.Holder(), info.GetIsolate()); |
3094 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3094 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3095 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3095 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); |
3096 imp->setDeprecatedAttr(cppValue); | 3096 impl->setDeprecatedAttr(cppValue); |
3097 } | 3097 } |
3098 | 3098 |
3099 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3099 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3100 { | 3100 { |
3101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3102 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); | 3102 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); |
3103 TestObjectV8Internal::deprecatedAttrAttributeSetter(jsValue, info); | 3103 TestObjectV8Internal::deprecatedAttrAttributeSetter(jsValue, info); |
3104 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3104 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3105 } | 3105 } |
3106 | 3106 |
3107 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 3107 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
3108 { | 3108 { |
3109 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3109 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3110 v8SetReturnValueFast(info, WTF::getPtr(imp->location()), imp); | 3110 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); |
3111 } | 3111 } |
3112 | 3112 |
3113 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 3113 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
3114 { | 3114 { |
3115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3116 TestObjectV8Internal::locationAttributeGetter(info); | 3116 TestObjectV8Internal::locationAttributeGetter(info); |
3117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3118 } | 3118 } |
3119 | 3119 |
3120 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 3120 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
3121 { | 3121 { |
3122 TestObject* proxyImp = V8TestObject::toNative(info.Holder()); | 3122 TestObject* proxyImpl = V8TestObject::toNative(info.Holder()); |
3123 RefPtr<TestNode> imp = WTF::getPtr(proxyImp->location()); | 3123 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); |
3124 if (!imp) | 3124 if (!impl) |
3125 return; | 3125 return; |
3126 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 3126 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
3127 imp->setHref(cppValue); | 3127 impl->setHref(cppValue); |
3128 } | 3128 } |
3129 | 3129 |
3130 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3130 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3131 { | 3131 { |
3132 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3132 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3133 TestObjectV8Internal::locationAttributeSetter(jsValue, info); | 3133 TestObjectV8Internal::locationAttributeSetter(jsValue, info); |
3134 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3134 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3135 } | 3135 } |
3136 | 3136 |
3137 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 3137 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
3138 { | 3138 { |
3139 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3139 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3140 v8SetReturnValueFast(info, WTF::getPtr(imp->locationWithException()), imp); | 3140 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; |
3141 } | 3141 } |
3142 | 3142 |
3143 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 3143 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
3144 { | 3144 { |
3145 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3145 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3146 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); | 3146 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); |
3147 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3147 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3148 } | 3148 } |
3149 | 3149 |
3150 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 3150 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
3151 { | 3151 { |
3152 TestObject* proxyImp = V8TestObject::toNative(info.Holder()); | 3152 TestObject* proxyImpl = V8TestObject::toNative(info.Holder()); |
3153 RefPtr<TestNode> imp = WTF::getPtr(proxyImp->locationWithException()); | 3153 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException()); |
3154 if (!imp) | 3154 if (!impl) |
3155 return; | 3155 return; |
3156 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 3156 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
3157 imp->setHrefThrows(cppValue); | 3157 impl->setHrefThrows(cppValue); |
3158 } | 3158 } |
3159 | 3159 |
3160 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3160 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3161 { | 3161 { |
3162 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3162 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3163 TestObjectV8Internal::locationWithExceptionAttributeSetter(jsValue, info); | 3163 TestObjectV8Internal::locationWithExceptionAttributeSetter(jsValue, info); |
3164 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3164 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3165 } | 3165 } |
3166 | 3166 |
3167 static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 3167 static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) |
(...skipping 27 matching lines...) Expand all Loading... |
3195 info.This()->ForceSet(name, jsValue); | 3195 info.This()->ForceSet(name, jsValue); |
3196 } | 3196 } |
3197 | 3197 |
3198 static void TestObjectReplaceableAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3198 static void TestObjectReplaceableAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3199 { | 3199 { |
3200 TestObjectV8Internal::TestObjectReplaceableAttributeSetter(name, jsValue, in
fo); | 3200 TestObjectV8Internal::TestObjectReplaceableAttributeSetter(name, jsValue, in
fo); |
3201 } | 3201 } |
3202 | 3202 |
3203 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 3203 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
3204 { | 3204 { |
3205 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3205 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3206 imp->voidMethod(); | 3206 impl->voidMethod(); |
3207 } | 3207 } |
3208 | 3208 |
3209 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3209 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
3210 { | 3210 { |
3211 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3211 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3212 TestObjectV8Internal::voidMethodMethod(info); | 3212 TestObjectV8Internal::voidMethodMethod(info); |
3213 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3213 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3214 } | 3214 } |
3215 | 3215 |
3216 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3216 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
3217 { | 3217 { |
3218 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodW
ithArgs", "TestObject", info.Holder(), info.GetIsolate()); | 3218 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodW
ithArgs", "TestObject", info.Holder(), info.GetIsolate()); |
3219 if (UNLIKELY(info.Length() < 3)) { | 3219 if (UNLIKELY(info.Length() < 3)) { |
3220 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); | 3220 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); |
3221 exceptionState.throwIfNeeded(); | 3221 exceptionState.throwIfNeeded(); |
3222 return; | 3222 return; |
3223 } | 3223 } |
3224 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3224 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3225 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3225 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
3226 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); | 3226 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
3227 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[2])); | 3227 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[2])); |
3228 imp->voidMethodWithArgs(longArg, strArg, objArg); | 3228 impl->voidMethodWithArgs(longArg, strArg, objArg); |
3229 } | 3229 } |
3230 | 3230 |
3231 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 3231 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
3232 { | 3232 { |
3233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3234 TestObjectV8Internal::voidMethodWithArgsMethod(info); | 3234 TestObjectV8Internal::voidMethodWithArgsMethod(info); |
3235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3236 } | 3236 } |
3237 | 3237 |
3238 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 3238 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
3239 { | 3239 { |
3240 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3240 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3241 v8SetReturnValueInt(info, imp->longMethod()); | 3241 v8SetReturnValueInt(info, impl->longMethod()); |
3242 } | 3242 } |
3243 | 3243 |
3244 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3244 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
3245 { | 3245 { |
3246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3247 TestObjectV8Internal::longMethodMethod(info); | 3247 TestObjectV8Internal::longMethodMethod(info); |
3248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3249 } | 3249 } |
3250 | 3250 |
3251 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3251 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
3252 { | 3252 { |
3253 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodW
ithArgs", "TestObject", info.Holder(), info.GetIsolate()); | 3253 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodW
ithArgs", "TestObject", info.Holder(), info.GetIsolate()); |
3254 if (UNLIKELY(info.Length() < 3)) { | 3254 if (UNLIKELY(info.Length() < 3)) { |
3255 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); | 3255 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); |
3256 exceptionState.throwIfNeeded(); | 3256 exceptionState.throwIfNeeded(); |
3257 return; | 3257 return; |
3258 } | 3258 } |
3259 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3259 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3260 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3260 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
3261 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); | 3261 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
3262 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[2])); | 3262 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[2])); |
3263 v8SetReturnValueInt(info, imp->longMethodWithArgs(longArg, strArg, objArg)); | 3263 v8SetReturnValueInt(info, impl->longMethodWithArgs(longArg, strArg, objArg))
; |
3264 } | 3264 } |
3265 | 3265 |
3266 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 3266 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
3267 { | 3267 { |
3268 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3268 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3269 TestObjectV8Internal::longMethodWithArgsMethod(info); | 3269 TestObjectV8Internal::longMethodWithArgsMethod(info); |
3270 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3270 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3271 } | 3271 } |
3272 | 3272 |
3273 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 3273 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
3274 { | 3274 { |
3275 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3275 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3276 v8SetReturnValue(info, imp->objMethod()); | 3276 v8SetReturnValue(info, impl->objMethod()); |
3277 } | 3277 } |
3278 | 3278 |
3279 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 3279 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
3280 { | 3280 { |
3281 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3281 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3282 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 3282 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
3283 TestObjectV8Internal::objMethodMethod(info); | 3283 TestObjectV8Internal::objMethodMethod(info); |
3284 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3284 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3285 } | 3285 } |
3286 | 3286 |
3287 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 3287 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
3288 { | 3288 { |
3289 ExceptionState exceptionState(ExceptionState::ExecutionContext, "objMethodWi
thArgs", "TestObject", info.Holder(), info.GetIsolate()); | 3289 ExceptionState exceptionState(ExceptionState::ExecutionContext, "objMethodWi
thArgs", "TestObject", info.Holder(), info.GetIsolate()); |
3290 if (UNLIKELY(info.Length() < 3)) { | 3290 if (UNLIKELY(info.Length() < 3)) { |
3291 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); | 3291 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); |
3292 exceptionState.throwIfNeeded(); | 3292 exceptionState.throwIfNeeded(); |
3293 return; | 3293 return; |
3294 } | 3294 } |
3295 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3295 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3296 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3296 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
3297 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); | 3297 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
3298 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[2])); | 3298 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[2])); |
3299 v8SetReturnValue(info, imp->objMethodWithArgs(longArg, strArg, objArg)); | 3299 v8SetReturnValue(info, impl->objMethodWithArgs(longArg, strArg, objArg)); |
3300 } | 3300 } |
3301 | 3301 |
3302 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 3302 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
3303 { | 3303 { |
3304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3305 TestObjectV8Internal::objMethodWithArgsMethod(info); | 3305 TestObjectV8Internal::objMethodWithArgsMethod(info); |
3306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3307 } | 3307 } |
3308 | 3308 |
3309 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 3309 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
3310 { | 3310 { |
3311 if (UNLIKELY(info.Length() < 1)) { | 3311 if (UNLIKELY(info.Length() < 1)) { |
3312 throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg
", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.
GetIsolate()); | 3312 throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg
", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.
GetIsolate()); |
3313 return; | 3313 return; |
3314 } | 3314 } |
3315 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3315 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3316 V8TRYCATCH_VOID(Vector<RefPtr<TestInterface> >, sequenceArg, (toRefPtrNative
Array<TestInterface, V8TestInterface>(info[0], 1, info.GetIsolate()))); | 3316 V8TRYCATCH_VOID(Vector<RefPtr<TestInterface> >, sequenceArg, (toRefPtrNative
Array<TestInterface, V8TestInterface>(info[0], 1, info.GetIsolate()))); |
3317 imp->methodWithSequenceArg(sequenceArg); | 3317 impl->methodWithSequenceArg(sequenceArg); |
3318 } | 3318 } |
3319 | 3319 |
3320 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 3320 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
3321 { | 3321 { |
3322 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3322 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3323 TestObjectV8Internal::methodWithSequenceArgMethod(info); | 3323 TestObjectV8Internal::methodWithSequenceArgMethod(info); |
3324 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3324 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3325 } | 3325 } |
3326 | 3326 |
3327 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 3327 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
3328 { | 3328 { |
3329 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodRetur
ningSequence", "TestObject", info.Holder(), info.GetIsolate()); | 3329 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodRetur
ningSequence", "TestObject", info.Holder(), info.GetIsolate()); |
3330 if (UNLIKELY(info.Length() < 1)) { | 3330 if (UNLIKELY(info.Length() < 1)) { |
3331 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3331 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
3332 exceptionState.throwIfNeeded(); | 3332 exceptionState.throwIfNeeded(); |
3333 return; | 3333 return; |
3334 } | 3334 } |
3335 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3335 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3336 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3336 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
3337 v8SetReturnValue(info, v8Array(imp->methodReturningSequence(longArg), info.G
etIsolate())); | 3337 v8SetReturnValue(info, v8Array(impl->methodReturningSequence(longArg), info.
GetIsolate())); |
3338 } | 3338 } |
3339 | 3339 |
3340 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 3340 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
3341 { | 3341 { |
3342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3343 TestObjectV8Internal::methodReturningSequenceMethod(info); | 3343 TestObjectV8Internal::methodReturningSequenceMethod(info); |
3344 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3344 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3345 } | 3345 } |
3346 | 3346 |
3347 static void methodWithEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 3347 static void methodWithEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
3348 { | 3348 { |
3349 if (UNLIKELY(info.Length() < 1)) { | 3349 if (UNLIKELY(info.Length() < 1)) { |
3350 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | 3350 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
3351 return; | 3351 return; |
3352 } | 3352 } |
3353 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3353 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3354 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, enumArg, info[0]); | 3354 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, enumArg, info[0]); |
3355 String string = enumArg; | 3355 String string = enumArg; |
3356 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { | 3356 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { |
3357 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", "
TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), info.
GetIsolate()); | 3357 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", "
TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), info.
GetIsolate()); |
3358 return; | 3358 return; |
3359 } | 3359 } |
3360 imp->methodWithEnumArg(enumArg); | 3360 impl->methodWithEnumArg(enumArg); |
3361 } | 3361 } |
3362 | 3362 |
3363 static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 3363 static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
3364 { | 3364 { |
3365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3366 TestObjectV8Internal::methodWithEnumArgMethod(info); | 3366 TestObjectV8Internal::methodWithEnumArgMethod(info); |
3367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3368 } | 3368 } |
3369 | 3369 |
3370 static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 3370 static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
3371 { | 3371 { |
3372 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodThatR
equiresAllArgsAndThrows", "TestObject", info.Holder(), info.GetIsolate()); | 3372 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodThatR
equiresAllArgsAndThrows", "TestObject", info.Holder(), info.GetIsolate()); |
3373 if (UNLIKELY(info.Length() < 2)) { | 3373 if (UNLIKELY(info.Length() < 2)) { |
3374 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 3374 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
3375 exceptionState.throwIfNeeded(); | 3375 exceptionState.throwIfNeeded(); |
3376 return; | 3376 return; |
3377 } | 3377 } |
3378 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3378 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3379 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 3379 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
3380 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[1])); | 3380 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[1])); |
3381 RefPtr<TestObject> result = imp->methodThatRequiresAllArgsAndThrows(strArg,
objArg, exceptionState); | 3381 RefPtr<TestObject> result = impl->methodThatRequiresAllArgsAndThrows(strArg,
objArg, exceptionState); |
3382 if (exceptionState.throwIfNeeded()) | 3382 if (exceptionState.throwIfNeeded()) |
3383 return; | 3383 return; |
3384 v8SetReturnValue(info, result.release()); | 3384 v8SetReturnValue(info, result.release()); |
3385 } | 3385 } |
3386 | 3386 |
3387 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 3387 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
3388 { | 3388 { |
3389 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3389 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3390 TestObjectV8Internal::methodThatRequiresAllArgsAndThrowsMethod(info); | 3390 TestObjectV8Internal::methodThatRequiresAllArgsAndThrowsMethod(info); |
3391 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3391 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3392 } | 3392 } |
3393 | 3393 |
3394 static void methodQueryListListenerMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 3394 static void methodQueryListListenerMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
3395 { | 3395 { |
3396 if (UNLIKELY(info.Length() < 1)) { | 3396 if (UNLIKELY(info.Length() < 1)) { |
3397 throwTypeError(ExceptionMessages::failedToExecute("methodQueryListListen
er", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 3397 throwTypeError(ExceptionMessages::failedToExecute("methodQueryListListen
er", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); |
3398 return; | 3398 return; |
3399 } | 3399 } |
3400 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3400 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3401 V8TRYCATCH_VOID(RefPtrWillBeRawPtr<MediaQueryListListener>, listener, MediaQ
ueryListListener::create(ScriptValue(info[0], info.GetIsolate()))); | 3401 V8TRYCATCH_VOID(RefPtrWillBeRawPtr<MediaQueryListListener>, listener, MediaQ
ueryListListener::create(ScriptValue(info[0], info.GetIsolate()))); |
3402 imp->methodQueryListListener(listener); | 3402 impl->methodQueryListListener(listener); |
3403 } | 3403 } |
3404 | 3404 |
3405 static void methodQueryListListenerMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 3405 static void methodQueryListListenerMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
3406 { | 3406 { |
3407 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3407 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3408 TestObjectV8Internal::methodQueryListListenerMethod(info); | 3408 TestObjectV8Internal::methodQueryListListenerMethod(info); |
3409 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3409 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3410 } | 3410 } |
3411 | 3411 |
3412 static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 3412 static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
3413 { | 3413 { |
3414 ExceptionState exceptionState(ExceptionState::ExecutionContext, "serializedV
alue", "TestObject", info.Holder(), info.GetIsolate()); | 3414 ExceptionState exceptionState(ExceptionState::ExecutionContext, "serializedV
alue", "TestObject", info.Holder(), info.GetIsolate()); |
3415 if (UNLIKELY(info.Length() < 1)) { | 3415 if (UNLIKELY(info.Length() < 1)) { |
3416 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3416 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
3417 exceptionState.throwIfNeeded(); | 3417 exceptionState.throwIfNeeded(); |
3418 return; | 3418 return; |
3419 } | 3419 } |
3420 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3420 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3421 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(
info[0], 0, 0, exceptionState, info.GetIsolate()); | 3421 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(
info[0], 0, 0, exceptionState, info.GetIsolate()); |
3422 if (exceptionState.throwIfNeeded()) | 3422 if (exceptionState.throwIfNeeded()) |
3423 return; | 3423 return; |
3424 imp->serializedValue(serializedArg); | 3424 impl->serializedValue(serializedArg); |
3425 } | 3425 } |
3426 | 3426 |
3427 static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 3427 static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
3428 { | 3428 { |
3429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3430 TestObjectV8Internal::serializedValueMethod(info); | 3430 TestObjectV8Internal::serializedValueMethod(info); |
3431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3432 } | 3432 } |
3433 | 3433 |
3434 static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 3434 static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
3435 { | 3435 { |
3436 if (UNLIKELY(info.Length() < 1)) { | 3436 if (UNLIKELY(info.Length() < 1)) { |
3437 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test
Object", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsola
te()); | 3437 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test
Object", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsola
te()); |
3438 return; | 3438 return; |
3439 } | 3439 } |
3440 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3440 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3441 V8TRYCATCH_VOID(Dictionary, oo, Dictionary(info[0], info.GetIsolate())); | 3441 V8TRYCATCH_VOID(Dictionary, oo, Dictionary(info[0], info.GetIsolate())); |
3442 if (!oo.isUndefinedOrNull() && !oo.isObject()) { | 3442 if (!oo.isUndefinedOrNull() && !oo.isObject()) { |
3443 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test
Object", "parameter 1 ('oo') is not an object."), info.GetIsolate()); | 3443 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test
Object", "parameter 1 ('oo') is not an object."), info.GetIsolate()); |
3444 return; | 3444 return; |
3445 } | 3445 } |
3446 V8TRYCATCH_VOID(Dictionary, ooo, Dictionary(info[1], info.GetIsolate())); | 3446 V8TRYCATCH_VOID(Dictionary, ooo, Dictionary(info[1], info.GetIsolate())); |
3447 if (!ooo.isUndefinedOrNull() && !ooo.isObject()) { | 3447 if (!ooo.isUndefinedOrNull() && !ooo.isObject()) { |
3448 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test
Object", "parameter 2 ('ooo') is not an object."), info.GetIsolate()); | 3448 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test
Object", "parameter 2 ('ooo') is not an object."), info.GetIsolate()); |
3449 return; | 3449 return; |
3450 } | 3450 } |
3451 imp->optionsObject(oo, ooo); | 3451 impl->optionsObject(oo, ooo); |
3452 } | 3452 } |
3453 | 3453 |
3454 static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | 3454 static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
3455 { | 3455 { |
3456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3457 TestObjectV8Internal::optionsObjectMethod(info); | 3457 TestObjectV8Internal::optionsObjectMethod(info); |
3458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3459 } | 3459 } |
3460 | 3460 |
3461 static void optionsObjectListMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 3461 static void optionsObjectListMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
3462 { | 3462 { |
3463 if (UNLIKELY(info.Length() < 1)) { | 3463 if (UNLIKELY(info.Length() < 1)) { |
3464 throwTypeError(ExceptionMessages::failedToExecute("optionsObjectList", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | 3464 throwTypeError(ExceptionMessages::failedToExecute("optionsObjectList", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
3465 return; | 3465 return; |
3466 } | 3466 } |
3467 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3467 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3468 V8TRYCATCH_VOID(Vector<Dictionary>, list, toNativeArray<Dictionary>(info[0],
1, info.GetIsolate())); | 3468 V8TRYCATCH_VOID(Vector<Dictionary>, list, toNativeArray<Dictionary>(info[0],
1, info.GetIsolate())); |
3469 imp->optionsObjectList(list); | 3469 impl->optionsObjectList(list); |
3470 } | 3470 } |
3471 | 3471 |
3472 static void optionsObjectListMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 3472 static void optionsObjectListMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
3473 { | 3473 { |
3474 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3474 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3475 TestObjectV8Internal::optionsObjectListMethod(info); | 3475 TestObjectV8Internal::optionsObjectListMethod(info); |
3476 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3476 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3477 } | 3477 } |
3478 | 3478 |
3479 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3479 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
3480 { | 3480 { |
3481 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
xception", "TestObject", info.Holder(), info.GetIsolate()); | 3481 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
xception", "TestObject", info.Holder(), info.GetIsolate()); |
3482 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3482 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3483 imp->methodWithException(exceptionState); | 3483 impl->methodWithException(exceptionState); |
3484 if (exceptionState.throwIfNeeded()) | 3484 if (exceptionState.throwIfNeeded()) |
3485 return; | 3485 return; |
3486 } | 3486 } |
3487 | 3487 |
3488 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 3488 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
3489 { | 3489 { |
3490 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3490 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3491 TestObjectV8Internal::methodWithExceptionMethod(info); | 3491 TestObjectV8Internal::methodWithExceptionMethod(info); |
3492 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3492 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3493 } | 3493 } |
3494 | 3494 |
3495 static void customMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 3495 static void customMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
3496 { | 3496 { |
3497 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3497 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3498 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Cu
stomTestFeature); | 3498 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Cu
stomTestFeature); |
3499 V8TestObject::customMethodMethodCustom(info); | 3499 V8TestObject::customMethodMethodCustom(info); |
3500 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3500 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3501 } | 3501 } |
3502 | 3502 |
3503 static void customMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 3503 static void customMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
3504 { | 3504 { |
3505 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3505 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3506 V8TestObject::customMethodWithArgsMethodCustom(info); | 3506 V8TestObject::customMethodWithArgsMethodCustom(info); |
3507 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3507 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3508 } | 3508 } |
3509 | 3509 |
3510 static void withScriptStateVoidMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3510 static void withScriptStateVoidMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
3511 { | 3511 { |
3512 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3512 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3513 ScriptState* currentState = ScriptState::current(); | 3513 ScriptState* currentState = ScriptState::current(); |
3514 if (!currentState) | 3514 if (!currentState) |
3515 return; | 3515 return; |
3516 ScriptState& state = *currentState; | 3516 ScriptState& state = *currentState; |
3517 imp->withScriptStateVoid(&state); | 3517 impl->withScriptStateVoid(&state); |
3518 if (state.hadException()) { | 3518 if (state.hadException()) { |
3519 v8::Local<v8::Value> exception = state.exception(); | 3519 v8::Local<v8::Value> exception = state.exception(); |
3520 state.clearException(); | 3520 state.clearException(); |
3521 throwError(exception, info.GetIsolate()); | 3521 throwError(exception, info.GetIsolate()); |
3522 return; | 3522 return; |
3523 } | 3523 } |
3524 } | 3524 } |
3525 | 3525 |
3526 static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 3526 static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
3527 { | 3527 { |
3528 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3528 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3529 TestObjectV8Internal::withScriptStateVoidMethod(info); | 3529 TestObjectV8Internal::withScriptStateVoidMethod(info); |
3530 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3530 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3531 } | 3531 } |
3532 | 3532 |
3533 static void withScriptStateObjMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3533 static void withScriptStateObjMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
3534 { | 3534 { |
3535 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3535 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3536 ScriptState* currentState = ScriptState::current(); | 3536 ScriptState* currentState = ScriptState::current(); |
3537 if (!currentState) | 3537 if (!currentState) |
3538 return; | 3538 return; |
3539 ScriptState& state = *currentState; | 3539 ScriptState& state = *currentState; |
3540 RefPtr<TestObject> result = imp->withScriptStateObj(&state); | 3540 RefPtr<TestObject> result = impl->withScriptStateObj(&state); |
3541 if (state.hadException()) { | 3541 if (state.hadException()) { |
3542 v8::Local<v8::Value> exception = state.exception(); | 3542 v8::Local<v8::Value> exception = state.exception(); |
3543 state.clearException(); | 3543 state.clearException(); |
3544 throwError(exception, info.GetIsolate()); | 3544 throwError(exception, info.GetIsolate()); |
3545 return; | 3545 return; |
3546 } | 3546 } |
3547 v8SetReturnValue(info, result.release()); | 3547 v8SetReturnValue(info, result.release()); |
3548 } | 3548 } |
3549 | 3549 |
3550 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 3550 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
3551 { | 3551 { |
3552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3553 TestObjectV8Internal::withScriptStateObjMethod(info); | 3553 TestObjectV8Internal::withScriptStateObjMethod(info); |
3554 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3554 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3555 } | 3555 } |
3556 | 3556 |
3557 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | 3557 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) |
3558 { | 3558 { |
3559 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withScriptS
tateVoidException", "TestObject", info.Holder(), info.GetIsolate()); | 3559 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withScriptS
tateVoidException", "TestObject", info.Holder(), info.GetIsolate()); |
3560 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3560 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3561 ScriptState* currentState = ScriptState::current(); | 3561 ScriptState* currentState = ScriptState::current(); |
3562 if (!currentState) | 3562 if (!currentState) |
3563 return; | 3563 return; |
3564 ScriptState& state = *currentState; | 3564 ScriptState& state = *currentState; |
3565 imp->withScriptStateVoidException(&state, exceptionState); | 3565 impl->withScriptStateVoidException(&state, exceptionState); |
3566 if (exceptionState.throwIfNeeded()) | 3566 if (exceptionState.throwIfNeeded()) |
3567 return; | 3567 return; |
3568 if (state.hadException()) { | 3568 if (state.hadException()) { |
3569 v8::Local<v8::Value> exception = state.exception(); | 3569 v8::Local<v8::Value> exception = state.exception(); |
3570 state.clearException(); | 3570 state.clearException(); |
3571 throwError(exception, info.GetIsolate()); | 3571 throwError(exception, info.GetIsolate()); |
3572 return; | 3572 return; |
3573 } | 3573 } |
3574 } | 3574 } |
3575 | 3575 |
3576 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 3576 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
3577 { | 3577 { |
3578 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3578 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3579 TestObjectV8Internal::withScriptStateVoidExceptionMethod(info); | 3579 TestObjectV8Internal::withScriptStateVoidExceptionMethod(info); |
3580 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3580 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3581 } | 3581 } |
3582 | 3582 |
3583 static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 3583 static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
3584 { | 3584 { |
3585 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withScriptS
tateObjException", "TestObject", info.Holder(), info.GetIsolate()); | 3585 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withScriptS
tateObjException", "TestObject", info.Holder(), info.GetIsolate()); |
3586 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3586 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3587 ScriptState* currentState = ScriptState::current(); | 3587 ScriptState* currentState = ScriptState::current(); |
3588 if (!currentState) | 3588 if (!currentState) |
3589 return; | 3589 return; |
3590 ScriptState& state = *currentState; | 3590 ScriptState& state = *currentState; |
3591 RefPtr<TestObject> result = imp->withScriptStateObjException(&state, excepti
onState); | 3591 RefPtr<TestObject> result = impl->withScriptStateObjException(&state, except
ionState); |
3592 if (exceptionState.throwIfNeeded()) | 3592 if (exceptionState.throwIfNeeded()) |
3593 return; | 3593 return; |
3594 if (state.hadException()) { | 3594 if (state.hadException()) { |
3595 v8::Local<v8::Value> exception = state.exception(); | 3595 v8::Local<v8::Value> exception = state.exception(); |
3596 state.clearException(); | 3596 state.clearException(); |
3597 throwError(exception, info.GetIsolate()); | 3597 throwError(exception, info.GetIsolate()); |
3598 return; | 3598 return; |
3599 } | 3599 } |
3600 v8SetReturnValue(info, result.release()); | 3600 v8SetReturnValue(info, result.release()); |
3601 } | 3601 } |
3602 | 3602 |
3603 static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 3603 static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
3604 { | 3604 { |
3605 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3605 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3606 TestObjectV8Internal::withScriptStateObjExceptionMethod(info); | 3606 TestObjectV8Internal::withScriptStateObjExceptionMethod(info); |
3607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3608 } | 3608 } |
3609 | 3609 |
3610 static void withExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 3610 static void withExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
3611 { | 3611 { |
3612 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3612 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3613 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 3613 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
3614 imp->withExecutionContext(scriptContext); | 3614 impl->withExecutionContext(scriptContext); |
3615 } | 3615 } |
3616 | 3616 |
3617 static void withExecutionContextMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 3617 static void withExecutionContextMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
3618 { | 3618 { |
3619 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3619 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3620 TestObjectV8Internal::withExecutionContextMethod(info); | 3620 TestObjectV8Internal::withExecutionContextMethod(info); |
3621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3622 } | 3622 } |
3623 | 3623 |
3624 static void withExecutionContextAndScriptStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 3624 static void withExecutionContextAndScriptStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
3625 { | 3625 { |
3626 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3626 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3627 ScriptState* currentState = ScriptState::current(); | 3627 ScriptState* currentState = ScriptState::current(); |
3628 if (!currentState) | 3628 if (!currentState) |
3629 return; | 3629 return; |
3630 ScriptState& state = *currentState; | 3630 ScriptState& state = *currentState; |
3631 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 3631 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
3632 imp->withExecutionContextAndScriptState(&state, scriptContext); | 3632 impl->withExecutionContextAndScriptState(&state, scriptContext); |
3633 if (state.hadException()) { | 3633 if (state.hadException()) { |
3634 v8::Local<v8::Value> exception = state.exception(); | 3634 v8::Local<v8::Value> exception = state.exception(); |
3635 state.clearException(); | 3635 state.clearException(); |
3636 throwError(exception, info.GetIsolate()); | 3636 throwError(exception, info.GetIsolate()); |
3637 return; | 3637 return; |
3638 } | 3638 } |
3639 } | 3639 } |
3640 | 3640 |
3641 static void withExecutionContextAndScriptStateMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 3641 static void withExecutionContextAndScriptStateMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
3642 { | 3642 { |
3643 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3643 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3644 TestObjectV8Internal::withExecutionContextAndScriptStateMethod(info); | 3644 TestObjectV8Internal::withExecutionContextAndScriptStateMethod(info); |
3645 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3645 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3646 } | 3646 } |
3647 | 3647 |
3648 static void withExecutionContextAndScriptStateObjExceptionMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 3648 static void withExecutionContextAndScriptStateObjExceptionMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
3649 { | 3649 { |
3650 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withExecuti
onContextAndScriptStateObjException", "TestObject", info.Holder(), info.GetIsola
te()); | 3650 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withExecuti
onContextAndScriptStateObjException", "TestObject", info.Holder(), info.GetIsola
te()); |
3651 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3651 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3652 ScriptState* currentState = ScriptState::current(); | 3652 ScriptState* currentState = ScriptState::current(); |
3653 if (!currentState) | 3653 if (!currentState) |
3654 return; | 3654 return; |
3655 ScriptState& state = *currentState; | 3655 ScriptState& state = *currentState; |
3656 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 3656 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
3657 RefPtr<TestObject> result = imp->withExecutionContextAndScriptStateObjExcept
ion(&state, scriptContext, exceptionState); | 3657 RefPtr<TestObject> result = impl->withExecutionContextAndScriptStateObjExcep
tion(&state, scriptContext, exceptionState); |
3658 if (exceptionState.throwIfNeeded()) | 3658 if (exceptionState.throwIfNeeded()) |
3659 return; | 3659 return; |
3660 if (state.hadException()) { | 3660 if (state.hadException()) { |
3661 v8::Local<v8::Value> exception = state.exception(); | 3661 v8::Local<v8::Value> exception = state.exception(); |
3662 state.clearException(); | 3662 state.clearException(); |
3663 throwError(exception, info.GetIsolate()); | 3663 throwError(exception, info.GetIsolate()); |
3664 return; | 3664 return; |
3665 } | 3665 } |
3666 v8SetReturnValue(info, result.release()); | 3666 v8SetReturnValue(info, result.release()); |
3667 } | 3667 } |
3668 | 3668 |
3669 static void withExecutionContextAndScriptStateObjExceptionMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 3669 static void withExecutionContextAndScriptStateObjExceptionMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
3670 { | 3670 { |
3671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3672 TestObjectV8Internal::withExecutionContextAndScriptStateObjExceptionMethod(i
nfo); | 3672 TestObjectV8Internal::withExecutionContextAndScriptStateObjExceptionMethod(i
nfo); |
3673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3674 } | 3674 } |
3675 | 3675 |
3676 static void withExecutionContextAndScriptStateWithSpacesMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) | 3676 static void withExecutionContextAndScriptStateWithSpacesMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) |
3677 { | 3677 { |
3678 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3678 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3679 ScriptState* currentState = ScriptState::current(); | 3679 ScriptState* currentState = ScriptState::current(); |
3680 if (!currentState) | 3680 if (!currentState) |
3681 return; | 3681 return; |
3682 ScriptState& state = *currentState; | 3682 ScriptState& state = *currentState; |
3683 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 3683 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
3684 RefPtr<TestObject> result = imp->withExecutionContextAndScriptStateWithSpace
s(&state, scriptContext); | 3684 RefPtr<TestObject> result = impl->withExecutionContextAndScriptStateWithSpac
es(&state, scriptContext); |
3685 if (state.hadException()) { | 3685 if (state.hadException()) { |
3686 v8::Local<v8::Value> exception = state.exception(); | 3686 v8::Local<v8::Value> exception = state.exception(); |
3687 state.clearException(); | 3687 state.clearException(); |
3688 throwError(exception, info.GetIsolate()); | 3688 throwError(exception, info.GetIsolate()); |
3689 return; | 3689 return; |
3690 } | 3690 } |
3691 v8SetReturnValue(info, result.release()); | 3691 v8SetReturnValue(info, result.release()); |
3692 } | 3692 } |
3693 | 3693 |
3694 static void withExecutionContextAndScriptStateWithSpacesMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 3694 static void withExecutionContextAndScriptStateWithSpacesMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
3695 { | 3695 { |
3696 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3696 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3697 TestObjectV8Internal::withExecutionContextAndScriptStateWithSpacesMethod(inf
o); | 3697 TestObjectV8Internal::withExecutionContextAndScriptStateWithSpacesMethod(inf
o); |
3698 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3698 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3699 } | 3699 } |
3700 | 3700 |
3701 static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 3701 static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
3702 { | 3702 { |
3703 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3703 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3704 imp->withActiveWindowAndFirstWindow(callingDOMWindow(info.GetIsolate()), ent
eredDOMWindow(info.GetIsolate())); | 3704 impl->withActiveWindowAndFirstWindow(callingDOMWindow(info.GetIsolate()), en
teredDOMWindow(info.GetIsolate())); |
3705 } | 3705 } |
3706 | 3706 |
3707 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 3707 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
3708 { | 3708 { |
3709 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3709 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3710 TestObjectV8Internal::withActiveWindowAndFirstWindowMethod(info); | 3710 TestObjectV8Internal::withActiveWindowAndFirstWindowMethod(info); |
3711 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3711 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3712 } | 3712 } |
3713 | 3713 |
3714 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 3714 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
3715 { | 3715 { |
3716 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithO
ptionalArg", "TestObject", info.Holder(), info.GetIsolate()); | 3716 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithO
ptionalArg", "TestObject", info.Holder(), info.GetIsolate()); |
3717 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3717 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3718 if (UNLIKELY(info.Length() <= 0)) { | 3718 if (UNLIKELY(info.Length() <= 0)) { |
3719 imp->methodWithOptionalArg(); | 3719 impl->methodWithOptionalArg(); |
3720 return; | 3720 return; |
3721 } | 3721 } |
3722 V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[0], exceptionState), except
ionState); | 3722 V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[0], exceptionState), except
ionState); |
3723 imp->methodWithOptionalArg(opt); | 3723 impl->methodWithOptionalArg(opt); |
3724 } | 3724 } |
3725 | 3725 |
3726 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 3726 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
3727 { | 3727 { |
3728 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3728 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3729 TestObjectV8Internal::methodWithOptionalArgMethod(info); | 3729 TestObjectV8Internal::methodWithOptionalArgMethod(info); |
3730 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3730 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3731 } | 3731 } |
3732 | 3732 |
3733 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 3733 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
3734 { | 3734 { |
3735 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN
onOptionalArgAndOptionalArg", "TestObject", info.Holder(), info.GetIsolate()); | 3735 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN
onOptionalArgAndOptionalArg", "TestObject", info.Holder(), info.GetIsolate()); |
3736 if (UNLIKELY(info.Length() < 1)) { | 3736 if (UNLIKELY(info.Length() < 1)) { |
3737 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3737 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
3738 exceptionState.throwIfNeeded(); | 3738 exceptionState.throwIfNeeded(); |
3739 return; | 3739 return; |
3740 } | 3740 } |
3741 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3741 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3742 V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exc
eptionState); | 3742 V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exc
eptionState); |
3743 if (UNLIKELY(info.Length() <= 1)) { | 3743 if (UNLIKELY(info.Length() <= 1)) { |
3744 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); | 3744 impl->methodWithNonOptionalArgAndOptionalArg(nonOpt); |
3745 return; | 3745 return; |
3746 } | 3746 } |
3747 V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[1], exceptionState), except
ionState); | 3747 V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[1], exceptionState), except
ionState); |
3748 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); | 3748 impl->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); |
3749 } | 3749 } |
3750 | 3750 |
3751 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 3751 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
3752 { | 3752 { |
3753 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3753 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3754 TestObjectV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(info); | 3754 TestObjectV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(info); |
3755 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3755 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3756 } | 3756 } |
3757 | 3757 |
3758 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | 3758 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) |
3759 { | 3759 { |
3760 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN
onOptionalArgAndTwoOptionalArgs", "TestObject", info.Holder(), info.GetIsolate()
); | 3760 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN
onOptionalArgAndTwoOptionalArgs", "TestObject", info.Holder(), info.GetIsolate()
); |
3761 if (UNLIKELY(info.Length() < 1)) { | 3761 if (UNLIKELY(info.Length() < 1)) { |
3762 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3762 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
3763 exceptionState.throwIfNeeded(); | 3763 exceptionState.throwIfNeeded(); |
3764 return; | 3764 return; |
3765 } | 3765 } |
3766 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3766 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3767 V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exc
eptionState); | 3767 V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exc
eptionState); |
3768 if (UNLIKELY(info.Length() <= 1)) { | 3768 if (UNLIKELY(info.Length() <= 1)) { |
3769 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); | 3769 impl->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); |
3770 return; | 3770 return; |
3771 } | 3771 } |
3772 V8TRYCATCH_EXCEPTION_VOID(int, opt1, toInt32(info[1], exceptionState), excep
tionState); | 3772 V8TRYCATCH_EXCEPTION_VOID(int, opt1, toInt32(info[1], exceptionState), excep
tionState); |
3773 if (UNLIKELY(info.Length() <= 2)) { | 3773 if (UNLIKELY(info.Length() <= 2)) { |
3774 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); | 3774 impl->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); |
3775 return; | 3775 return; |
3776 } | 3776 } |
3777 V8TRYCATCH_EXCEPTION_VOID(int, opt2, toInt32(info[2], exceptionState), excep
tionState); | 3777 V8TRYCATCH_EXCEPTION_VOID(int, opt2, toInt32(info[2], exceptionState), excep
tionState); |
3778 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); | 3778 impl->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); |
3779 } | 3779 } |
3780 | 3780 |
3781 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 3781 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
3782 { | 3782 { |
3783 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3783 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3784 TestObjectV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(info)
; | 3784 TestObjectV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(info)
; |
3785 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3785 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3786 } | 3786 } |
3787 | 3787 |
3788 static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 3788 static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
3789 { | 3789 { |
3790 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3790 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3791 if (UNLIKELY(info.Length() <= 0)) { | 3791 if (UNLIKELY(info.Length() <= 0)) { |
3792 imp->methodWithOptionalString(); | 3792 impl->methodWithOptionalString(); |
3793 return; | 3793 return; |
3794 } | 3794 } |
3795 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); | 3795 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); |
3796 imp->methodWithOptionalString(str); | 3796 impl->methodWithOptionalString(str); |
3797 } | 3797 } |
3798 | 3798 |
3799 static void methodWithOptionalStringMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 3799 static void methodWithOptionalStringMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
3800 { | 3800 { |
3801 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3801 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3802 TestObjectV8Internal::methodWithOptionalStringMethod(info); | 3802 TestObjectV8Internal::methodWithOptionalStringMethod(info); |
3803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3804 } | 3804 } |
3805 | 3805 |
3806 static void methodWithOptionalStringIsUndefinedMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 3806 static void methodWithOptionalStringIsUndefinedMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
3807 { | 3807 { |
3808 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3808 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3809 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); | 3809 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); |
3810 imp->methodWithOptionalStringIsUndefined(str); | 3810 impl->methodWithOptionalStringIsUndefined(str); |
3811 } | 3811 } |
3812 | 3812 |
3813 static void methodWithOptionalStringIsUndefinedMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 3813 static void methodWithOptionalStringIsUndefinedMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
3814 { | 3814 { |
3815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3816 TestObjectV8Internal::methodWithOptionalStringIsUndefinedMethod(info); | 3816 TestObjectV8Internal::methodWithOptionalStringIsUndefinedMethod(info); |
3817 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3817 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3818 } | 3818 } |
3819 | 3819 |
3820 static void methodWithOptionalStringIsNullStringMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 3820 static void methodWithOptionalStringIsNullStringMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
3821 { | 3821 { |
3822 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3822 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3823 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, argumentOrNull
(info, 0)); | 3823 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, argumentOrNull
(info, 0)); |
3824 imp->methodWithOptionalStringIsNullString(str); | 3824 impl->methodWithOptionalStringIsNullString(str); |
3825 } | 3825 } |
3826 | 3826 |
3827 static void methodWithOptionalStringIsNullStringMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 3827 static void methodWithOptionalStringIsNullStringMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
3828 { | 3828 { |
3829 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3829 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3830 TestObjectV8Internal::methodWithOptionalStringIsNullStringMethod(info); | 3830 TestObjectV8Internal::methodWithOptionalStringIsNullStringMethod(info); |
3831 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3831 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3832 } | 3832 } |
3833 | 3833 |
3834 static void methodWithCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 3834 static void methodWithCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
3835 { | 3835 { |
3836 if (UNLIKELY(info.Length() < 1)) { | 3836 if (UNLIKELY(info.Length() < 1)) { |
3837 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackInt
erfaceArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()
)), info.GetIsolate()); | 3837 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackInt
erfaceArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()
)), info.GetIsolate()); |
3838 return; | 3838 return; |
3839 } | 3839 } |
3840 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3840 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3841 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 3841 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
3842 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackInt
erfaceArg", "TestObject", "The callback provided as parameter 1 is not a functio
n."), info.GetIsolate()); | 3842 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackInt
erfaceArg", "TestObject", "The callback provided as parameter 1 is not a functio
n."), info.GetIsolate()); |
3843 return; | 3843 return; |
3844 } | 3844 } |
3845 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c
reate(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetI
solate())); | 3845 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c
reate(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetI
solate())); |
3846 imp->methodWithCallbackInterfaceArg(callbackInterface.release()); | 3846 impl->methodWithCallbackInterfaceArg(callbackInterface.release()); |
3847 } | 3847 } |
3848 | 3848 |
3849 static void methodWithCallbackInterfaceArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 3849 static void methodWithCallbackInterfaceArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
3850 { | 3850 { |
3851 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3851 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3852 TestObjectV8Internal::methodWithCallbackInterfaceArgMethod(info); | 3852 TestObjectV8Internal::methodWithCallbackInterfaceArgMethod(info); |
3853 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3853 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3854 } | 3854 } |
3855 | 3855 |
3856 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | 3856 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) |
3857 { | 3857 { |
3858 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN
onCallbackArgAndCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsol
ate()); | 3858 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN
onCallbackArgAndCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsol
ate()); |
3859 if (UNLIKELY(info.Length() < 2)) { | 3859 if (UNLIKELY(info.Length() < 2)) { |
3860 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 3860 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
3861 exceptionState.throwIfNeeded(); | 3861 exceptionState.throwIfNeeded(); |
3862 return; | 3862 return; |
3863 } | 3863 } |
3864 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3864 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3865 V8TRYCATCH_EXCEPTION_VOID(int, nonCallback, toInt32(info[0], exceptionState)
, exceptionState); | 3865 V8TRYCATCH_EXCEPTION_VOID(int, nonCallback, toInt32(info[0], exceptionState)
, exceptionState); |
3866 if (info.Length() <= 1 || !info[1]->IsFunction()) { | 3866 if (info.Length() <= 1 || !info[1]->IsFunction()) { |
3867 exceptionState.throwTypeError("The callback provided as parameter 2 is n
ot a function."); | 3867 exceptionState.throwTypeError("The callback provided as parameter 2 is n
ot a function."); |
3868 exceptionState.throwIfNeeded(); | 3868 exceptionState.throwIfNeeded(); |
3869 return; | 3869 return; |
3870 } | 3870 } |
3871 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c
reate(v8::Handle<v8::Function>::Cast(info[1]), currentExecutionContext(info.GetI
solate())); | 3871 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c
reate(v8::Handle<v8::Function>::Cast(info[1]), currentExecutionContext(info.GetI
solate())); |
3872 imp->methodWithNonCallbackArgAndCallbackInterfaceArg(nonCallback, callbackIn
terface.release()); | 3872 impl->methodWithNonCallbackArgAndCallbackInterfaceArg(nonCallback, callbackI
nterface.release()); |
3873 } | 3873 } |
3874 | 3874 |
3875 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 3875 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
3876 { | 3876 { |
3877 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3877 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3878 TestObjectV8Internal::methodWithNonCallbackArgAndCallbackInterfaceArgMethod(
info); | 3878 TestObjectV8Internal::methodWithNonCallbackArgAndCallbackInterfaceArgMethod(
info); |
3879 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3879 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3880 } | 3880 } |
3881 | 3881 |
3882 static void methodWithCallbackInterfaceAndOptionalArgMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 3882 static void methodWithCallbackInterfaceAndOptionalArgMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
3883 { | 3883 { |
3884 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3884 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3885 OwnPtr<TestCallbackInterface> callbackInterface; | 3885 OwnPtr<TestCallbackInterface> callbackInterface; |
3886 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | 3886 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { |
3887 if (!info[0]->IsFunction()) { | 3887 if (!info[0]->IsFunction()) { |
3888 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbac
kInterfaceAndOptionalArg", "TestObject", "The callback provided as parameter 1 i
s not a function."), info.GetIsolate()); | 3888 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbac
kInterfaceAndOptionalArg", "TestObject", "The callback provided as parameter 1 i
s not a function."), info.GetIsolate()); |
3889 return; | 3889 return; |
3890 } | 3890 } |
3891 callbackInterface = V8TestCallbackInterface::create(v8::Handle<v8::Funct
ion>::Cast(info[0]), currentExecutionContext(info.GetIsolate())); | 3891 callbackInterface = V8TestCallbackInterface::create(v8::Handle<v8::Funct
ion>::Cast(info[0]), currentExecutionContext(info.GetIsolate())); |
3892 } | 3892 } |
3893 imp->methodWithCallbackInterfaceAndOptionalArg(callbackInterface.release()); | 3893 impl->methodWithCallbackInterfaceAndOptionalArg(callbackInterface.release())
; |
3894 } | 3894 } |
3895 | 3895 |
3896 static void methodWithCallbackInterfaceAndOptionalArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 3896 static void methodWithCallbackInterfaceAndOptionalArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
3897 { | 3897 { |
3898 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3898 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3899 TestObjectV8Internal::methodWithCallbackInterfaceAndOptionalArgMethod(info); | 3899 TestObjectV8Internal::methodWithCallbackInterfaceAndOptionalArgMethod(info); |
3900 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3900 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3901 } | 3901 } |
3902 | 3902 |
3903 static void methodWithNullableCallbackInterfaceArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 3903 static void methodWithNullableCallbackInterfaceArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
3904 { | 3904 { |
3905 if (UNLIKELY(info.Length() < 1)) { | 3905 if (UNLIKELY(info.Length() < 1)) { |
3906 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal
lbackInterfaceArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.
Length())), info.GetIsolate()); | 3906 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal
lbackInterfaceArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.
Length())), info.GetIsolate()); |
3907 return; | 3907 return; |
3908 } | 3908 } |
3909 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3909 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3910 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { | 3910 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { |
3911 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal
lbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a
function."), info.GetIsolate()); | 3911 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal
lbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a
function."), info.GetIsolate()); |
3912 return; | 3912 return; |
3913 } | 3913 } |
3914 OwnPtr<TestCallbackInterface> callbackInterface = info[0]->IsNull() ? nullpt
r : V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), cur
rentExecutionContext(info.GetIsolate())); | 3914 OwnPtr<TestCallbackInterface> callbackInterface = info[0]->IsNull() ? nullpt
r : V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), cur
rentExecutionContext(info.GetIsolate())); |
3915 imp->methodWithNullableCallbackInterfaceArg(callbackInterface.release()); | 3915 impl->methodWithNullableCallbackInterfaceArg(callbackInterface.release()); |
3916 } | 3916 } |
3917 | 3917 |
3918 static void methodWithNullableCallbackInterfaceArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 3918 static void methodWithNullableCallbackInterfaceArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
3919 { | 3919 { |
3920 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3920 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3921 TestObjectV8Internal::methodWithNullableCallbackInterfaceArgMethod(info); | 3921 TestObjectV8Internal::methodWithNullableCallbackInterfaceArgMethod(info); |
3922 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3922 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3923 } | 3923 } |
3924 | 3924 |
3925 static void staticMethodWithCallbackAndOptionalArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 3925 static void staticMethodWithCallbackAndOptionalArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3964 } | 3964 } |
3965 | 3965 |
3966 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 3966 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
3967 { | 3967 { |
3968 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt8", "TestObject", info.Holder(), info.GetIsolate()); | 3968 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt8", "TestObject", info.Holder(), info.GetIsolate()); |
3969 if (UNLIKELY(info.Length() < 1)) { | 3969 if (UNLIKELY(info.Length() < 1)) { |
3970 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3970 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
3971 exceptionState.throwIfNeeded(); | 3971 exceptionState.throwIfNeeded(); |
3972 return; | 3972 return; |
3973 } | 3973 } |
3974 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3974 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3975 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt8(info[0], EnforceRange, exceptio
nState), exceptionState); | 3975 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt8(info[0], EnforceRange, exceptio
nState), exceptionState); |
3976 imp->methodWithEnforceRangeInt8(value); | 3976 impl->methodWithEnforceRangeInt8(value); |
3977 } | 3977 } |
3978 | 3978 |
3979 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 3979 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
3980 { | 3980 { |
3981 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3981 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
3982 TestObjectV8Internal::methodWithEnforceRangeInt8Method(info); | 3982 TestObjectV8Internal::methodWithEnforceRangeInt8Method(info); |
3983 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3983 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3984 } | 3984 } |
3985 | 3985 |
3986 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 3986 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
3987 { | 3987 { |
3988 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt8", "TestObject", info.Holder(), info.GetIsolate()); | 3988 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt8", "TestObject", info.Holder(), info.GetIsolate()); |
3989 if (UNLIKELY(info.Length() < 1)) { | 3989 if (UNLIKELY(info.Length() < 1)) { |
3990 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3990 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
3991 exceptionState.throwIfNeeded(); | 3991 exceptionState.throwIfNeeded(); |
3992 return; | 3992 return; |
3993 } | 3993 } |
3994 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3994 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3995 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt8(info[0], EnforceRange, ex
ceptionState), exceptionState); | 3995 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt8(info[0], EnforceRange, ex
ceptionState), exceptionState); |
3996 imp->methodWithEnforceRangeUInt8(value); | 3996 impl->methodWithEnforceRangeUInt8(value); |
3997 } | 3997 } |
3998 | 3998 |
3999 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 3999 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
4000 { | 4000 { |
4001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4002 TestObjectV8Internal::methodWithEnforceRangeUInt8Method(info); | 4002 TestObjectV8Internal::methodWithEnforceRangeUInt8Method(info); |
4003 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4003 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4004 } | 4004 } |
4005 | 4005 |
4006 static void methodWithEnforceRangeInt16Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 4006 static void methodWithEnforceRangeInt16Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
4007 { | 4007 { |
4008 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt16", "TestObject", info.Holder(), info.GetIsolate()); | 4008 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt16", "TestObject", info.Holder(), info.GetIsolate()); |
4009 if (UNLIKELY(info.Length() < 1)) { | 4009 if (UNLIKELY(info.Length() < 1)) { |
4010 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4010 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4011 exceptionState.throwIfNeeded(); | 4011 exceptionState.throwIfNeeded(); |
4012 return; | 4012 return; |
4013 } | 4013 } |
4014 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4014 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4015 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt16(info[0], EnforceRange, excepti
onState), exceptionState); | 4015 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt16(info[0], EnforceRange, excepti
onState), exceptionState); |
4016 imp->methodWithEnforceRangeInt16(value); | 4016 impl->methodWithEnforceRangeInt16(value); |
4017 } | 4017 } |
4018 | 4018 |
4019 static void methodWithEnforceRangeInt16MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 4019 static void methodWithEnforceRangeInt16MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
4020 { | 4020 { |
4021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4022 TestObjectV8Internal::methodWithEnforceRangeInt16Method(info); | 4022 TestObjectV8Internal::methodWithEnforceRangeInt16Method(info); |
4023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4024 } | 4024 } |
4025 | 4025 |
4026 static void methodWithEnforceRangeUInt16Method(const v8::FunctionCallbackInfo<v8
::Value>& info) | 4026 static void methodWithEnforceRangeUInt16Method(const v8::FunctionCallbackInfo<v8
::Value>& info) |
4027 { | 4027 { |
4028 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt16", "TestObject", info.Holder(), info.GetIsolate()); | 4028 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt16", "TestObject", info.Holder(), info.GetIsolate()); |
4029 if (UNLIKELY(info.Length() < 1)) { | 4029 if (UNLIKELY(info.Length() < 1)) { |
4030 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4030 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4031 exceptionState.throwIfNeeded(); | 4031 exceptionState.throwIfNeeded(); |
4032 return; | 4032 return; |
4033 } | 4033 } |
4034 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4034 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4035 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt16(info[0], EnforceRange, e
xceptionState), exceptionState); | 4035 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt16(info[0], EnforceRange, e
xceptionState), exceptionState); |
4036 imp->methodWithEnforceRangeUInt16(value); | 4036 impl->methodWithEnforceRangeUInt16(value); |
4037 } | 4037 } |
4038 | 4038 |
4039 static void methodWithEnforceRangeUInt16MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 4039 static void methodWithEnforceRangeUInt16MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
4040 { | 4040 { |
4041 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4041 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4042 TestObjectV8Internal::methodWithEnforceRangeUInt16Method(info); | 4042 TestObjectV8Internal::methodWithEnforceRangeUInt16Method(info); |
4043 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4043 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4044 } | 4044 } |
4045 | 4045 |
4046 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 4046 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
4047 { | 4047 { |
4048 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt32", "TestObject", info.Holder(), info.GetIsolate()); | 4048 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt32", "TestObject", info.Holder(), info.GetIsolate()); |
4049 if (UNLIKELY(info.Length() < 1)) { | 4049 if (UNLIKELY(info.Length() < 1)) { |
4050 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4050 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4051 exceptionState.throwIfNeeded(); | 4051 exceptionState.throwIfNeeded(); |
4052 return; | 4052 return; |
4053 } | 4053 } |
4054 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4054 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4055 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt32(info[0], EnforceRange, excepti
onState), exceptionState); | 4055 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt32(info[0], EnforceRange, excepti
onState), exceptionState); |
4056 imp->methodWithEnforceRangeInt32(value); | 4056 impl->methodWithEnforceRangeInt32(value); |
4057 } | 4057 } |
4058 | 4058 |
4059 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 4059 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
4060 { | 4060 { |
4061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4062 TestObjectV8Internal::methodWithEnforceRangeInt32Method(info); | 4062 TestObjectV8Internal::methodWithEnforceRangeInt32Method(info); |
4063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4064 } | 4064 } |
4065 | 4065 |
4066 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8
::Value>& info) | 4066 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8
::Value>& info) |
4067 { | 4067 { |
4068 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt32", "TestObject", info.Holder(), info.GetIsolate()); | 4068 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt32", "TestObject", info.Holder(), info.GetIsolate()); |
4069 if (UNLIKELY(info.Length() < 1)) { | 4069 if (UNLIKELY(info.Length() < 1)) { |
4070 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4070 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4071 exceptionState.throwIfNeeded(); | 4071 exceptionState.throwIfNeeded(); |
4072 return; | 4072 return; |
4073 } | 4073 } |
4074 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4074 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4075 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt32(info[0], EnforceRange, e
xceptionState), exceptionState); | 4075 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt32(info[0], EnforceRange, e
xceptionState), exceptionState); |
4076 imp->methodWithEnforceRangeUInt32(value); | 4076 impl->methodWithEnforceRangeUInt32(value); |
4077 } | 4077 } |
4078 | 4078 |
4079 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 4079 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
4080 { | 4080 { |
4081 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4081 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4082 TestObjectV8Internal::methodWithEnforceRangeUInt32Method(info); | 4082 TestObjectV8Internal::methodWithEnforceRangeUInt32Method(info); |
4083 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4083 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4084 } | 4084 } |
4085 | 4085 |
4086 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 4086 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
4087 { | 4087 { |
4088 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt64", "TestObject", info.Holder(), info.GetIsolate()); | 4088 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt64", "TestObject", info.Holder(), info.GetIsolate()); |
4089 if (UNLIKELY(info.Length() < 1)) { | 4089 if (UNLIKELY(info.Length() < 1)) { |
4090 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4090 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4091 exceptionState.throwIfNeeded(); | 4091 exceptionState.throwIfNeeded(); |
4092 return; | 4092 return; |
4093 } | 4093 } |
4094 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4094 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4095 V8TRYCATCH_EXCEPTION_VOID(long long, value, toInt64(info[0], EnforceRange, e
xceptionState), exceptionState); | 4095 V8TRYCATCH_EXCEPTION_VOID(long long, value, toInt64(info[0], EnforceRange, e
xceptionState), exceptionState); |
4096 imp->methodWithEnforceRangeInt64(value); | 4096 impl->methodWithEnforceRangeInt64(value); |
4097 } | 4097 } |
4098 | 4098 |
4099 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 4099 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
4100 { | 4100 { |
4101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4101 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4102 TestObjectV8Internal::methodWithEnforceRangeInt64Method(info); | 4102 TestObjectV8Internal::methodWithEnforceRangeInt64Method(info); |
4103 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4103 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4104 } | 4104 } |
4105 | 4105 |
4106 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8
::Value>& info) | 4106 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8
::Value>& info) |
4107 { | 4107 { |
4108 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt64", "TestObject", info.Holder(), info.GetIsolate()); | 4108 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt64", "TestObject", info.Holder(), info.GetIsolate()); |
4109 if (UNLIKELY(info.Length() < 1)) { | 4109 if (UNLIKELY(info.Length() < 1)) { |
4110 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4110 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4111 exceptionState.throwIfNeeded(); | 4111 exceptionState.throwIfNeeded(); |
4112 return; | 4112 return; |
4113 } | 4113 } |
4114 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4114 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4115 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, value, toUInt64(info[0], Enfor
ceRange, exceptionState), exceptionState); | 4115 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, value, toUInt64(info[0], Enfor
ceRange, exceptionState), exceptionState); |
4116 imp->methodWithEnforceRangeUInt64(value); | 4116 impl->methodWithEnforceRangeUInt64(value); |
4117 } | 4117 } |
4118 | 4118 |
4119 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 4119 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
4120 { | 4120 { |
4121 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4121 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4122 TestObjectV8Internal::methodWithEnforceRangeUInt64Method(info); | 4122 TestObjectV8Internal::methodWithEnforceRangeUInt64Method(info); |
4123 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4123 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4124 } | 4124 } |
4125 | 4125 |
4126 #if ENABLE(Condition1) | 4126 #if ENABLE(Condition1) |
4127 static void conditionalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4127 static void conditionalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4128 { | 4128 { |
4129 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4129 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4130 v8SetReturnValueString(info, imp->conditionalMethod1(), info.GetIsolate()); | 4130 v8SetReturnValueString(info, impl->conditionalMethod1(), info.GetIsolate()); |
4131 } | 4131 } |
4132 #endif // ENABLE(Condition1) | 4132 #endif // ENABLE(Condition1) |
4133 | 4133 |
4134 #if ENABLE(Condition1) | 4134 #if ENABLE(Condition1) |
4135 static void conditionalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 4135 static void conditionalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
4136 { | 4136 { |
4137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4138 TestObjectV8Internal::conditionalMethod1Method(info); | 4138 TestObjectV8Internal::conditionalMethod1Method(info); |
4139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4140 } | 4140 } |
4141 #endif // ENABLE(Condition1) | 4141 #endif // ENABLE(Condition1) |
4142 | 4142 |
4143 #if ENABLE(Condition1) && ENABLE(Condition2) | 4143 #if ENABLE(Condition1) && ENABLE(Condition2) |
4144 static void conditionalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4144 static void conditionalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4145 { | 4145 { |
4146 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4146 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4147 imp->conditionalMethod2(); | 4147 impl->conditionalMethod2(); |
4148 } | 4148 } |
4149 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 4149 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
4150 | 4150 |
4151 #if ENABLE(Condition1) && ENABLE(Condition2) | 4151 #if ENABLE(Condition1) && ENABLE(Condition2) |
4152 static void conditionalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 4152 static void conditionalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
4153 { | 4153 { |
4154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4155 TestObjectV8Internal::conditionalMethod2Method(info); | 4155 TestObjectV8Internal::conditionalMethod2Method(info); |
4156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4157 } | 4157 } |
4158 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 4158 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
4159 | 4159 |
4160 #if ENABLE(Condition1) || ENABLE(Condition2) | 4160 #if ENABLE(Condition1) || ENABLE(Condition2) |
4161 static void conditionalMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4161 static void conditionalMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4162 { | 4162 { |
4163 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4163 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4164 imp->conditionalMethod3(); | 4164 impl->conditionalMethod3(); |
4165 } | 4165 } |
4166 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 4166 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
4167 | 4167 |
4168 #if ENABLE(Condition1) || ENABLE(Condition2) | 4168 #if ENABLE(Condition1) || ENABLE(Condition2) |
4169 static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 4169 static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
4170 { | 4170 { |
4171 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4171 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4172 TestObjectV8Internal::conditionalMethod3Method(info); | 4172 TestObjectV8Internal::conditionalMethod3Method(info); |
4173 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4173 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4174 } | 4174 } |
4175 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 4175 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
4176 | 4176 |
4177 static void callbackFunctionReturnValueMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 4177 static void callbackFunctionReturnValueMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
4178 { | 4178 { |
4179 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4179 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4180 v8SetReturnValue(info, imp->callbackFunctionReturnValue().v8Value()); | 4180 v8SetReturnValue(info, impl->callbackFunctionReturnValue().v8Value()); |
4181 } | 4181 } |
4182 | 4182 |
4183 static void callbackFunctionReturnValueMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 4183 static void callbackFunctionReturnValueMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
4184 { | 4184 { |
4185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4186 TestObjectV8Internal::callbackFunctionReturnValueMethod(info); | 4186 TestObjectV8Internal::callbackFunctionReturnValueMethod(info); |
4187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4188 } | 4188 } |
4189 | 4189 |
4190 static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 4190 static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
4191 { | 4191 { |
4192 if (UNLIKELY(info.Length() < 1)) { | 4192 if (UNLIKELY(info.Length() < 1)) { |
4193 throwTypeError(ExceptionMessages::failedToExecute("callbackFunctionArgum
ent", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in
fo.GetIsolate()); | 4193 throwTypeError(ExceptionMessages::failedToExecute("callbackFunctionArgum
ent", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in
fo.GetIsolate()); |
4194 return; | 4194 return; |
4195 } | 4195 } |
4196 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4196 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4197 V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(info[0], info.GetIsolate(
))); | 4197 V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(info[0], info.GetIsolate(
))); |
4198 imp->callbackFunctionArgument(function); | 4198 impl->callbackFunctionArgument(function); |
4199 } | 4199 } |
4200 | 4200 |
4201 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 4201 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
4202 { | 4202 { |
4203 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4203 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4204 TestObjectV8Internal::callbackFunctionArgumentMethod(info); | 4204 TestObjectV8Internal::callbackFunctionArgumentMethod(info); |
4205 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4205 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4206 } | 4206 } |
4207 | 4207 |
4208 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4208 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4209 { | 4209 { |
4210 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethod", "TestObject", info.Holder(), info.GetIsolate()); | 4210 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethod", "TestObject", info.Holder(), info.GetIsolate()); |
4211 if (UNLIKELY(info.Length() < 1)) { | 4211 if (UNLIKELY(info.Length() < 1)) { |
4212 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4212 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4213 exceptionState.throwIfNeeded(); | 4213 exceptionState.throwIfNeeded(); |
4214 return; | 4214 return; |
4215 } | 4215 } |
4216 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4216 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4217 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 4217 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4218 imp->overloadedMethod(longArg); | 4218 impl->overloadedMethod(longArg); |
4219 } | 4219 } |
4220 | 4220 |
4221 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4221 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4222 { | 4222 { |
4223 if (UNLIKELY(info.Length() < 1)) { | 4223 if (UNLIKELY(info.Length() < 1)) { |
4224 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); | 4224 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); |
4225 return; | 4225 return; |
4226 } | 4226 } |
4227 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4227 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4228 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 4228 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
4229 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", "The callback provided as parameter 1 is not a function."), info.Get
Isolate()); | 4229 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", "The callback provided as parameter 1 is not a function."), info.Get
Isolate()); |
4230 return; | 4230 return; |
4231 } | 4231 } |
4232 OwnPtr<TestCallbackInterface> callbackInterfaceArg = V8TestCallbackInterface
::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.G
etIsolate())); | 4232 OwnPtr<TestCallbackInterface> callbackInterfaceArg = V8TestCallbackInterface
::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.G
etIsolate())); |
4233 imp->overloadedMethod(callbackInterfaceArg.release()); | 4233 impl->overloadedMethod(callbackInterfaceArg.release()); |
4234 } | 4234 } |
4235 | 4235 |
4236 static void overloadedMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4236 static void overloadedMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4237 { | 4237 { |
4238 if (UNLIKELY(info.Length() < 1)) { | 4238 if (UNLIKELY(info.Length() < 1)) { |
4239 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); | 4239 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); |
4240 return; | 4240 return; |
4241 } | 4241 } |
4242 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4242 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4243 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[0])); | 4243 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[0])); |
4244 imp->overloadedMethod(objArg); | 4244 impl->overloadedMethod(objArg); |
4245 } | 4245 } |
4246 | 4246 |
4247 static void overloadedMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4247 static void overloadedMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4248 { | 4248 { |
4249 if (UNLIKELY(info.Length() < 1)) { | 4249 if (UNLIKELY(info.Length() < 1)) { |
4250 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); | 4250 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); |
4251 return; | 4251 return; |
4252 } | 4252 } |
4253 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4253 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4254 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(info[0], 1,
info.GetIsolate())); | 4254 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(info[0], 1,
info.GetIsolate())); |
4255 imp->overloadedMethod(arrayArg); | 4255 impl->overloadedMethod(arrayArg); |
4256 } | 4256 } |
4257 | 4257 |
4258 static void overloadedMethod5Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4258 static void overloadedMethod5Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4259 { | 4259 { |
4260 if (UNLIKELY(info.Length() < 1)) { | 4260 if (UNLIKELY(info.Length() < 1)) { |
4261 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); | 4261 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); |
4262 return; | 4262 return; |
4263 } | 4263 } |
4264 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4264 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4265 V8TRYCATCH_VOID(Vector<unsigned>, sequenceArg, toNativeArray<unsigned>(info[
0], 1, info.GetIsolate())); | 4265 V8TRYCATCH_VOID(Vector<unsigned>, sequenceArg, toNativeArray<unsigned>(info[
0], 1, info.GetIsolate())); |
4266 imp->overloadedMethod(sequenceArg); | 4266 impl->overloadedMethod(sequenceArg); |
4267 } | 4267 } |
4268 | 4268 |
4269 static void overloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 4269 static void overloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
4270 { | 4270 { |
4271 if (((info.Length() == 1))) { | 4271 if (((info.Length() == 1))) { |
4272 overloadedMethod1Method(info); | 4272 overloadedMethod1Method(info); |
4273 return; | 4273 return; |
4274 } | 4274 } |
4275 if (((info.Length() == 1) && (info[0]->IsNull() || info[0]->IsFunction())))
{ | 4275 if (((info.Length() == 1) && (info[0]->IsNull() || info[0]->IsFunction())))
{ |
4276 overloadedMethod2Method(info); | 4276 overloadedMethod2Method(info); |
(...skipping 29 matching lines...) Expand all Loading... |
4306 } | 4306 } |
4307 | 4307 |
4308 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4308 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4309 { | 4309 { |
4310 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | 4310 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); |
4311 if (UNLIKELY(info.Length() < 1)) { | 4311 if (UNLIKELY(info.Length() < 1)) { |
4312 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4312 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4313 exceptionState.throwIfNeeded(); | 4313 exceptionState.throwIfNeeded(); |
4314 return; | 4314 return; |
4315 } | 4315 } |
4316 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4316 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4317 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[0])); | 4317 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[0])); |
4318 if (UNLIKELY(info.Length() <= 1)) { | 4318 if (UNLIKELY(info.Length() <= 1)) { |
4319 imp->overloadedMethodA(objArg); | 4319 impl->overloadedMethodA(objArg); |
4320 return; | 4320 return; |
4321 } | 4321 } |
4322 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); | 4322 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
4323 imp->overloadedMethodA(objArg, longArg); | 4323 impl->overloadedMethodA(objArg, longArg); |
4324 } | 4324 } |
4325 | 4325 |
4326 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4326 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4327 { | 4327 { |
4328 if (UNLIKELY(info.Length() < 2)) { | 4328 if (UNLIKELY(info.Length() < 2)) { |
4329 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", "
TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetI
solate()); | 4329 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", "
TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetI
solate()); |
4330 return; | 4330 return; |
4331 } | 4331 } |
4332 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4332 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4333 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[0])); | 4333 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[0])); |
4334 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); | 4334 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
4335 imp->overloadedMethodA(objArg, strArg); | 4335 impl->overloadedMethodA(objArg, strArg); |
4336 } | 4336 } |
4337 | 4337 |
4338 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4338 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4339 { | 4339 { |
4340 if (((info.Length() == 1) && (info[0]->IsNull() || V8TestObject::hasInstance
(info[0], info.GetIsolate()))) || ((info.Length() == 2) && (info[0]->IsNull() ||
V8TestObject::hasInstance(info[0], info.GetIsolate())))) { | 4340 if (((info.Length() == 1) && (info[0]->IsNull() || V8TestObject::hasInstance
(info[0], info.GetIsolate()))) || ((info.Length() == 2) && (info[0]->IsNull() ||
V8TestObject::hasInstance(info[0], info.GetIsolate())))) { |
4341 overloadedMethodA1Method(info); | 4341 overloadedMethodA1Method(info); |
4342 return; | 4342 return; |
4343 } | 4343 } |
4344 if (((info.Length() == 2) && (info[0]->IsNull() || V8TestObject::hasInstance
(info[0], info.GetIsolate())))) { | 4344 if (((info.Length() == 2) && (info[0]->IsNull() || V8TestObject::hasInstance
(info[0], info.GetIsolate())))) { |
4345 overloadedMethodA2Method(info); | 4345 overloadedMethodA2Method(info); |
(...skipping 15 matching lines...) Expand all Loading... |
4361 TestObjectV8Internal::overloadedMethodAMethod(info); | 4361 TestObjectV8Internal::overloadedMethodAMethod(info); |
4362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4363 } | 4363 } |
4364 | 4364 |
4365 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4365 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4366 { | 4366 { |
4367 if (UNLIKELY(info.Length() < 1)) { | 4367 if (UNLIKELY(info.Length() < 1)) { |
4368 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | 4368 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
4369 return; | 4369 return; |
4370 } | 4370 } |
4371 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4371 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4372 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 4372 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
4373 imp->overloadedMethodB(strArg); | 4373 impl->overloadedMethodB(strArg); |
4374 } | 4374 } |
4375 | 4375 |
4376 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4376 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4377 { | 4377 { |
4378 if (UNLIKELY(info.Length() < 1)) { | 4378 if (UNLIKELY(info.Length() < 1)) { |
4379 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | 4379 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
4380 return; | 4380 return; |
4381 } | 4381 } |
4382 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4382 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4383 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 4383 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
4384 imp->overloadedMethodB(strArg); | 4384 impl->overloadedMethodB(strArg); |
4385 } | 4385 } |
4386 | 4386 |
4387 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4387 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4388 { | 4388 { |
4389 if (((info.Length() == 1))) { | 4389 if (((info.Length() == 1))) { |
4390 overloadedMethodB1Method(info); | 4390 overloadedMethodB1Method(info); |
4391 return; | 4391 return; |
4392 } | 4392 } |
4393 if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || info[0]->IsStrin
g() || info[0]->IsObject()))) { | 4393 if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || info[0]->IsStrin
g() || info[0]->IsObject()))) { |
4394 overloadedMethodB2Method(info); | 4394 overloadedMethodB2Method(info); |
(...skipping 15 matching lines...) Expand all Loading... |
4410 TestObjectV8Internal::overloadedMethodBMethod(info); | 4410 TestObjectV8Internal::overloadedMethodBMethod(info); |
4411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4412 } | 4412 } |
4413 | 4413 |
4414 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4414 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4415 { | 4415 { |
4416 if (UNLIKELY(info.Length() < 1)) { | 4416 if (UNLIKELY(info.Length() < 1)) { |
4417 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | 4417 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
4418 return; | 4418 return; |
4419 } | 4419 } |
4420 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4420 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4421 V8TRYCATCH_VOID(Dictionary, dictionaryArg, Dictionary(info[0], info.GetIsola
te())); | 4421 V8TRYCATCH_VOID(Dictionary, dictionaryArg, Dictionary(info[0], info.GetIsola
te())); |
4422 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | 4422 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { |
4423 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "
TestObject", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate
()); | 4423 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "
TestObject", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate
()); |
4424 return; | 4424 return; |
4425 } | 4425 } |
4426 imp->overloadedMethodC(dictionaryArg); | 4426 impl->overloadedMethodC(dictionaryArg); |
4427 } | 4427 } |
4428 | 4428 |
4429 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4429 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4430 { | 4430 { |
4431 if (UNLIKELY(info.Length() < 1)) { | 4431 if (UNLIKELY(info.Length() < 1)) { |
4432 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | 4432 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
4433 return; | 4433 return; |
4434 } | 4434 } |
4435 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4435 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4436 V8TRYCATCH_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue(
))); | 4436 V8TRYCATCH_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue(
))); |
4437 imp->overloadedMethodC(doubleArg); | 4437 impl->overloadedMethodC(doubleArg); |
4438 } | 4438 } |
4439 | 4439 |
4440 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4440 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4441 { | 4441 { |
4442 if (((info.Length() == 1) && (info[0]->IsObject()))) { | 4442 if (((info.Length() == 1) && (info[0]->IsObject()))) { |
4443 overloadedMethodC1Method(info); | 4443 overloadedMethodC1Method(info); |
4444 return; | 4444 return; |
4445 } | 4445 } |
4446 if (((info.Length() == 1))) { | 4446 if (((info.Length() == 1))) { |
4447 overloadedMethodC2Method(info); | 4447 overloadedMethodC2Method(info); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4502 } | 4502 } |
4503 | 4503 |
4504 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 4504 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
4505 { | 4505 { |
4506 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod
WithClamp", "TestObject", info.Holder(), info.GetIsolate()); | 4506 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod
WithClamp", "TestObject", info.Holder(), info.GetIsolate()); |
4507 if (UNLIKELY(info.Length() < 2)) { | 4507 if (UNLIKELY(info.Length() < 2)) { |
4508 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 4508 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
4509 exceptionState.throwIfNeeded(); | 4509 exceptionState.throwIfNeeded(); |
4510 return; | 4510 return; |
4511 } | 4511 } |
4512 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4512 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4513 unsigned objArgsShort = 0; | 4513 unsigned objArgsShort = 0; |
4514 V8TRYCATCH_VOID(double, objArgsShortNativeValue, info[0]->NumberValue()); | 4514 V8TRYCATCH_VOID(double, objArgsShortNativeValue, info[0]->NumberValue()); |
4515 if (!std::isnan(objArgsShortNativeValue)) | 4515 if (!std::isnan(objArgsShortNativeValue)) |
4516 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); | 4516 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); |
4517 unsigned objArgsLong = 0; | 4517 unsigned objArgsLong = 0; |
4518 V8TRYCATCH_VOID(double, objArgsLongNativeValue, info[1]->NumberValue()); | 4518 V8TRYCATCH_VOID(double, objArgsLongNativeValue, info[1]->NumberValue()); |
4519 if (!std::isnan(objArgsLongNativeValue)) | 4519 if (!std::isnan(objArgsLongNativeValue)) |
4520 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); | 4520 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); |
4521 imp->classMethodWithClamp(objArgsShort, objArgsLong); | 4521 impl->classMethodWithClamp(objArgsShort, objArgsLong); |
4522 } | 4522 } |
4523 | 4523 |
4524 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 4524 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
4525 { | 4525 { |
4526 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4526 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4527 TestObjectV8Internal::classMethodWithClampMethod(info); | 4527 TestObjectV8Internal::classMethodWithClampMethod(info); |
4528 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4528 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4529 } | 4529 } |
4530 | 4530 |
4531 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 4531 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
4532 { | 4532 { |
4533 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledAtRu
ntimeMethod", "TestObject", info.Holder(), info.GetIsolate()); | 4533 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledAtRu
ntimeMethod", "TestObject", info.Holder(), info.GetIsolate()); |
4534 if (UNLIKELY(info.Length() < 1)) { | 4534 if (UNLIKELY(info.Length() < 1)) { |
4535 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4535 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4536 exceptionState.throwIfNeeded(); | 4536 exceptionState.throwIfNeeded(); |
4537 return; | 4537 return; |
4538 } | 4538 } |
4539 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4539 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4540 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 4540 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4541 imp->enabledAtRuntimeMethod(longArg); | 4541 impl->enabledAtRuntimeMethod(longArg); |
4542 } | 4542 } |
4543 | 4543 |
4544 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 4544 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
4545 { | 4545 { |
4546 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4546 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4547 TestObjectV8Internal::enabledAtRuntimeMethodMethod(info); | 4547 TestObjectV8Internal::enabledAtRuntimeMethodMethod(info); |
4548 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4548 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4549 } | 4549 } |
4550 | 4550 |
4551 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 4551 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
4552 { | 4552 { |
4553 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledPerC
ontextMethod", "TestObject", info.Holder(), info.GetIsolate()); | 4553 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledPerC
ontextMethod", "TestObject", info.Holder(), info.GetIsolate()); |
4554 if (UNLIKELY(info.Length() < 1)) { | 4554 if (UNLIKELY(info.Length() < 1)) { |
4555 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4555 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4556 exceptionState.throwIfNeeded(); | 4556 exceptionState.throwIfNeeded(); |
4557 return; | 4557 return; |
4558 } | 4558 } |
4559 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4559 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4560 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 4560 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4561 imp->enabledPerContextMethod(longArg); | 4561 impl->enabledPerContextMethod(longArg); |
4562 } | 4562 } |
4563 | 4563 |
4564 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 4564 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
4565 { | 4565 { |
4566 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4566 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4567 TestObjectV8Internal::enabledPerContextMethodMethod(info); | 4567 TestObjectV8Internal::enabledPerContextMethodMethod(info); |
4568 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4568 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4569 } | 4569 } |
4570 | 4570 |
4571 static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 4571 static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
4572 { | 4572 { |
4573 if (UNLIKELY(info.Length() < 1)) { | 4573 if (UNLIKELY(info.Length() < 1)) { |
4574 throwTypeError(ExceptionMessages::failedToExecute("methodWithUnsignedLon
gSequence", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()
)), info.GetIsolate()); | 4574 throwTypeError(ExceptionMessages::failedToExecute("methodWithUnsignedLon
gSequence", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()
)), info.GetIsolate()); |
4575 return; | 4575 return; |
4576 } | 4576 } |
4577 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4577 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4578 V8TRYCATCH_VOID(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsign
ed>(info[0], 1, info.GetIsolate())); | 4578 V8TRYCATCH_VOID(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsign
ed>(info[0], 1, info.GetIsolate())); |
4579 imp->methodWithUnsignedLongSequence(unsignedLongSequence); | 4579 impl->methodWithUnsignedLongSequence(unsignedLongSequence); |
4580 } | 4580 } |
4581 | 4581 |
4582 static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 4582 static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
4583 { | 4583 { |
4584 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4584 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4585 TestObjectV8Internal::methodWithUnsignedLongSequenceMethod(info); | 4585 TestObjectV8Internal::methodWithUnsignedLongSequenceMethod(info); |
4586 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4586 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4587 } | 4587 } |
4588 | 4588 |
4589 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4589 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4590 { | 4590 { |
4591 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArray
Function", "TestObject", info.Holder(), info.GetIsolate()); | 4591 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArray
Function", "TestObject", info.Holder(), info.GetIsolate()); |
4592 if (UNLIKELY(info.Length() < 1)) { | 4592 if (UNLIKELY(info.Length() < 1)) { |
4593 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4593 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4594 exceptionState.throwIfNeeded(); | 4594 exceptionState.throwIfNeeded(); |
4595 return; | 4595 return; |
4596 } | 4596 } |
4597 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4597 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4598 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(info[0], 1, in
fo.GetIsolate())); | 4598 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(info[0], 1, in
fo.GetIsolate())); |
4599 Vector<String> result = imp->stringArrayFunction(values, exceptionState); | 4599 Vector<String> result = impl->stringArrayFunction(values, exceptionState); |
4600 if (exceptionState.throwIfNeeded()) | 4600 if (exceptionState.throwIfNeeded()) |
4601 return; | 4601 return; |
4602 v8SetReturnValue(info, v8Array(result, info.GetIsolate())); | 4602 v8SetReturnValue(info, v8Array(result, info.GetIsolate())); |
4603 } | 4603 } |
4604 | 4604 |
4605 static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 4605 static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
4606 { | 4606 { |
4607 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4607 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4608 TestObjectV8Internal::stringArrayFunctionMethod(info); | 4608 TestObjectV8Internal::stringArrayFunctionMethod(info); |
4609 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4609 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4610 } | 4610 } |
4611 | 4611 |
4612 static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 4612 static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
4613 { | 4613 { |
4614 ExceptionState exceptionState(ExceptionState::ExecutionContext, "domStringLi
stFunction", "TestObject", info.Holder(), info.GetIsolate()); | 4614 ExceptionState exceptionState(ExceptionState::ExecutionContext, "domStringLi
stFunction", "TestObject", info.Holder(), info.GetIsolate()); |
4615 if (UNLIKELY(info.Length() < 1)) { | 4615 if (UNLIKELY(info.Length() < 1)) { |
4616 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4616 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4617 exceptionState.throwIfNeeded(); | 4617 exceptionState.throwIfNeeded(); |
4618 return; | 4618 return; |
4619 } | 4619 } |
4620 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4620 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4621 V8TRYCATCH_VOID(DOMStringList*, values, V8DOMStringList::toNativeWithTypeChe
ck(info.GetIsolate(), info[0])); | 4621 V8TRYCATCH_VOID(DOMStringList*, values, V8DOMStringList::toNativeWithTypeChe
ck(info.GetIsolate(), info[0])); |
4622 RefPtr<DOMStringList> result = imp->domStringListFunction(values, exceptionS
tate); | 4622 RefPtr<DOMStringList> result = impl->domStringListFunction(values, exception
State); |
4623 if (exceptionState.throwIfNeeded()) | 4623 if (exceptionState.throwIfNeeded()) |
4624 return; | 4624 return; |
4625 v8SetReturnValue(info, result.release()); | 4625 v8SetReturnValue(info, result.release()); |
4626 } | 4626 } |
4627 | 4627 |
4628 static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 4628 static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
4629 { | 4629 { |
4630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4631 TestObjectV8Internal::domStringListFunctionMethod(info); | 4631 TestObjectV8Internal::domStringListFunctionMethod(info); |
4632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4633 } | 4633 } |
4634 | 4634 |
4635 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& info) | 4635 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
4636 { | 4636 { |
4637 if (UNLIKELY(info.Length() < 1)) { | 4637 if (UNLIKELY(info.Length() < 1)) { |
4638 throwTypeError(ExceptionMessages::failedToExecute("convert1", "TestObjec
t", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate())
; | 4638 throwTypeError(ExceptionMessages::failedToExecute("convert1", "TestObjec
t", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate())
; |
4639 return; | 4639 return; |
4640 } | 4640 } |
4641 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4641 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4642 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::toNativeWithTypeCheck(info.Get
Isolate(), info[0])); | 4642 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::toNativeWithTypeCheck(info.Get
Isolate(), info[0])); |
4643 imp->convert1(value); | 4643 impl->convert1(value); |
4644 } | 4644 } |
4645 | 4645 |
4646 static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 4646 static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
4647 { | 4647 { |
4648 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4648 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4649 TestObjectV8Internal::convert1Method(info); | 4649 TestObjectV8Internal::convert1Method(info); |
4650 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4650 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4651 } | 4651 } |
4652 | 4652 |
4653 static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& info) | 4653 static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
4654 { | 4654 { |
4655 if (UNLIKELY(info.Length() < 1)) { | 4655 if (UNLIKELY(info.Length() < 1)) { |
4656 throwTypeError(ExceptionMessages::failedToExecute("convert2", "TestObjec
t", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate())
; | 4656 throwTypeError(ExceptionMessages::failedToExecute("convert2", "TestObjec
t", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate())
; |
4657 return; | 4657 return; |
4658 } | 4658 } |
4659 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4659 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4660 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::toNativeWithTypeCheck(info.Get
Isolate(), info[0])); | 4660 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::toNativeWithTypeCheck(info.Get
Isolate(), info[0])); |
4661 imp->convert2(value); | 4661 impl->convert2(value); |
4662 } | 4662 } |
4663 | 4663 |
4664 static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 4664 static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
4665 { | 4665 { |
4666 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4666 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4667 TestObjectV8Internal::convert2Method(info); | 4667 TestObjectV8Internal::convert2Method(info); |
4668 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4668 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4669 } | 4669 } |
4670 | 4670 |
4671 static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 4671 static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
4672 { | 4672 { |
4673 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4673 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4674 imp->banana(); | 4674 impl->banana(); |
4675 } | 4675 } |
4676 | 4676 |
4677 static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 4677 static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
4678 { | 4678 { |
4679 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4679 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4680 TestObjectV8Internal::orangeMethod(info); | 4680 TestObjectV8Internal::orangeMethod(info); |
4681 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4681 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4682 } | 4682 } |
4683 | 4683 |
4684 static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) | 4684 static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) |
4685 { | 4685 { |
4686 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictFunct
ion", "TestObject", info.Holder(), info.GetIsolate()); | 4686 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictFunct
ion", "TestObject", info.Holder(), info.GetIsolate()); |
4687 if (UNLIKELY(info.Length() < 3)) { | 4687 if (UNLIKELY(info.Length() < 3)) { |
4688 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); | 4688 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); |
4689 exceptionState.throwIfNeeded(); | 4689 exceptionState.throwIfNeeded(); |
4690 return; | 4690 return; |
4691 } | 4691 } |
4692 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4692 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4693 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); | 4693 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); |
4694 V8TRYCATCH_VOID(float, a, static_cast<float>(info[1]->NumberValue())); | 4694 V8TRYCATCH_VOID(float, a, static_cast<float>(info[1]->NumberValue())); |
4695 V8TRYCATCH_EXCEPTION_VOID(int, b, toInt32(info[2], exceptionState), exceptio
nState); | 4695 V8TRYCATCH_EXCEPTION_VOID(int, b, toInt32(info[2], exceptionState), exceptio
nState); |
4696 bool result = imp->strictFunction(str, a, b, exceptionState); | 4696 bool result = impl->strictFunction(str, a, b, exceptionState); |
4697 if (exceptionState.throwIfNeeded()) | 4697 if (exceptionState.throwIfNeeded()) |
4698 return; | 4698 return; |
4699 v8SetReturnValueBool(info, result); | 4699 v8SetReturnValueBool(info, result); |
4700 } | 4700 } |
4701 | 4701 |
4702 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 4702 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
4703 { | 4703 { |
4704 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4704 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4705 TestObjectV8Internal::strictFunctionMethod(info); | 4705 TestObjectV8Internal::strictFunctionMethod(info); |
4706 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4706 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4707 } | 4707 } |
4708 | 4708 |
4709 static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 4709 static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
4710 { | 4710 { |
4711 if (UNLIKELY(info.Length() < 1)) { | 4711 if (UNLIKELY(info.Length() < 1)) { |
4712 throwTypeError(ExceptionMessages::failedToExecute("variadicStringMethod"
, "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G
etIsolate()); | 4712 throwTypeError(ExceptionMessages::failedToExecute("variadicStringMethod"
, "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G
etIsolate()); |
4713 return; | 4713 return; |
4714 } | 4714 } |
4715 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4715 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4716 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, head, info[0]); | 4716 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, head, info[0]); |
4717 V8TRYCATCH_VOID(Vector<String>, tail, toNativeArguments<String>(info, 1)); | 4717 V8TRYCATCH_VOID(Vector<String>, tail, toNativeArguments<String>(info, 1)); |
4718 imp->variadicStringMethod(head, tail); | 4718 impl->variadicStringMethod(head, tail); |
4719 } | 4719 } |
4720 | 4720 |
4721 static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 4721 static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
4722 { | 4722 { |
4723 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4723 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4724 TestObjectV8Internal::variadicStringMethodMethod(info); | 4724 TestObjectV8Internal::variadicStringMethodMethod(info); |
4725 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4725 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4726 } | 4726 } |
4727 | 4727 |
4728 static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 4728 static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
4729 { | 4729 { |
4730 if (UNLIKELY(info.Length() < 1)) { | 4730 if (UNLIKELY(info.Length() < 1)) { |
4731 throwTypeError(ExceptionMessages::failedToExecute("variadicDoubleMethod"
, "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G
etIsolate()); | 4731 throwTypeError(ExceptionMessages::failedToExecute("variadicDoubleMethod"
, "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G
etIsolate()); |
4732 return; | 4732 return; |
4733 } | 4733 } |
4734 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4734 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4735 V8TRYCATCH_VOID(double, head, static_cast<double>(info[0]->NumberValue())); | 4735 V8TRYCATCH_VOID(double, head, static_cast<double>(info[0]->NumberValue())); |
4736 V8TRYCATCH_VOID(Vector<double>, tail, toNativeArguments<double>(info, 1)); | 4736 V8TRYCATCH_VOID(Vector<double>, tail, toNativeArguments<double>(info, 1)); |
4737 imp->variadicDoubleMethod(head, tail); | 4737 impl->variadicDoubleMethod(head, tail); |
4738 } | 4738 } |
4739 | 4739 |
4740 static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 4740 static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
4741 { | 4741 { |
4742 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4742 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4743 TestObjectV8Internal::variadicDoubleMethodMethod(info); | 4743 TestObjectV8Internal::variadicDoubleMethodMethod(info); |
4744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4745 } | 4745 } |
4746 | 4746 |
4747 static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4747 static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4748 { | 4748 { |
4749 if (UNLIKELY(info.Length() < 1)) { | 4749 if (UNLIKELY(info.Length() < 1)) { |
4750 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMethod",
"TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Get
Isolate()); | 4750 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMethod",
"TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Get
Isolate()); |
4751 return; | 4751 return; |
4752 } | 4752 } |
4753 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4753 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4754 V8TRYCATCH_VOID(Node*, head, V8Node::toNativeWithTypeCheck(info.GetIsolate()
, info[0])); | 4754 V8TRYCATCH_VOID(Node*, head, V8Node::toNativeWithTypeCheck(info.GetIsolate()
, info[0])); |
4755 Vector<RefPtr<Node> > tail; | 4755 Vector<RefPtr<Node> > tail; |
4756 for (int i = 1; i < info.Length(); ++i) { | 4756 for (int i = 1; i < info.Length(); ++i) { |
4757 if (!V8Node::hasInstance(info[i], info.GetIsolate())) { | 4757 if (!V8Node::hasInstance(info[i], info.GetIsolate())) { |
4758 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMetho
d", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate()); | 4758 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMetho
d", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate()); |
4759 return; | 4759 return; |
4760 } | 4760 } |
4761 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(info[i]))); | 4761 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(info[i]))); |
4762 } | 4762 } |
4763 imp->variadicNodeMethod(head, tail); | 4763 impl->variadicNodeMethod(head, tail); |
4764 } | 4764 } |
4765 | 4765 |
4766 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 4766 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
4767 { | 4767 { |
4768 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4768 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4769 TestObjectV8Internal::variadicNodeMethodMethod(info); | 4769 TestObjectV8Internal::variadicNodeMethodMethod(info); |
4770 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4770 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4771 } | 4771 } |
4772 | 4772 |
4773 static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) | 4773 static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) |
4774 { | 4774 { |
4775 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4775 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4776 imp->perWorldMethod(); | 4776 impl->perWorldMethod(); |
4777 } | 4777 } |
4778 | 4778 |
4779 static void perWorldMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 4779 static void perWorldMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
4780 { | 4780 { |
4781 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4781 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4782 TestObjectV8Internal::perWorldMethodMethod(info); | 4782 TestObjectV8Internal::perWorldMethodMethod(info); |
4783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4784 } | 4784 } |
4785 | 4785 |
4786 static void perWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::
Value>& info) | 4786 static void perWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::
Value>& info) |
4787 { | 4787 { |
4788 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4788 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4789 imp->perWorldMethod(); | 4789 impl->perWorldMethod(); |
4790 } | 4790 } |
4791 | 4791 |
4792 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 4792 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
4793 { | 4793 { |
4794 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4794 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4795 TestObjectV8Internal::perWorldMethodMethodForMainWorld(info); | 4795 TestObjectV8Internal::perWorldMethodMethodForMainWorld(info); |
4796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4797 } | 4797 } |
4798 | 4798 |
4799 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 4799 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
4800 { | 4800 { |
4801 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); | 4801 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
4802 if (UNLIKELY(info.Length() < 1)) { | 4802 if (UNLIKELY(info.Length() < 1)) { |
4803 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4803 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4804 exceptionState.throwIfNeeded(); | 4804 exceptionState.throwIfNeeded(); |
4805 return; | 4805 return; |
4806 } | 4806 } |
4807 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4807 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4808 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 4808 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4809 imp->overloadedPerWorldMethod(longArg); | 4809 impl->overloadedPerWorldMethod(longArg); |
4810 } | 4810 } |
4811 | 4811 |
4812 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 4812 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
4813 { | 4813 { |
4814 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); | 4814 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
4815 if (UNLIKELY(info.Length() < 1)) { | 4815 if (UNLIKELY(info.Length() < 1)) { |
4816 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4816 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4817 exceptionState.throwIfNeeded(); | 4817 exceptionState.throwIfNeeded(); |
4818 return; | 4818 return; |
4819 } | 4819 } |
4820 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4820 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4821 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 4821 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4822 imp->overloadedPerWorldMethod(longArg); | 4822 impl->overloadedPerWorldMethod(longArg); |
4823 } | 4823 } |
4824 | 4824 |
4825 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 4825 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
4826 { | 4826 { |
4827 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); | 4827 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
4828 if (UNLIKELY(info.Length() < 2)) { | 4828 if (UNLIKELY(info.Length() < 2)) { |
4829 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 4829 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
4830 exceptionState.throwIfNeeded(); | 4830 exceptionState.throwIfNeeded(); |
4831 return; | 4831 return; |
4832 } | 4832 } |
4833 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4833 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4834 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 4834 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
4835 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); | 4835 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
4836 imp->overloadedPerWorldMethod(strArg, longArg); | 4836 impl->overloadedPerWorldMethod(strArg, longArg); |
4837 } | 4837 } |
4838 | 4838 |
4839 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 4839 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
4840 { | 4840 { |
4841 if (((info.Length() == 1))) { | 4841 if (((info.Length() == 1))) { |
4842 overloadedPerWorldMethod1Method(info); | 4842 overloadedPerWorldMethod1Method(info); |
4843 return; | 4843 return; |
4844 } | 4844 } |
4845 if (((info.Length() == 2))) { | 4845 if (((info.Length() == 2))) { |
4846 overloadedPerWorldMethod2Method(info); | 4846 overloadedPerWorldMethod2Method(info); |
(...skipping 17 matching lines...) Expand all Loading... |
4864 } | 4864 } |
4865 | 4865 |
4866 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 4866 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
4867 { | 4867 { |
4868 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); | 4868 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
4869 if (UNLIKELY(info.Length() < 2)) { | 4869 if (UNLIKELY(info.Length() < 2)) { |
4870 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 4870 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
4871 exceptionState.throwIfNeeded(); | 4871 exceptionState.throwIfNeeded(); |
4872 return; | 4872 return; |
4873 } | 4873 } |
4874 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4874 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4875 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 4875 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
4876 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); | 4876 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
4877 imp->overloadedPerWorldMethod(strArg, longArg); | 4877 impl->overloadedPerWorldMethod(strArg, longArg); |
4878 } | 4878 } |
4879 | 4879 |
4880 static void overloadedPerWorldMethodMethodForMainWorld(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 4880 static void overloadedPerWorldMethodMethodForMainWorld(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
4881 { | 4881 { |
4882 if (((info.Length() == 1))) { | 4882 if (((info.Length() == 1))) { |
4883 overloadedPerWorldMethod1MethodForMainWorld(info); | 4883 overloadedPerWorldMethod1MethodForMainWorld(info); |
4884 return; | 4884 return; |
4885 } | 4885 } |
4886 if (((info.Length() == 2))) { | 4886 if (((info.Length() == 2))) { |
4887 overloadedPerWorldMethod2MethodForMainWorld(info); | 4887 overloadedPerWorldMethod2MethodForMainWorld(info); |
(...skipping 17 matching lines...) Expand all Loading... |
4905 } | 4905 } |
4906 | 4906 |
4907 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value
>& info) | 4907 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value
>& info) |
4908 { | 4908 { |
4909 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedMethod1", "TestObject", info.Holder(), info.GetIsolate()); | 4909 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedMethod1", "TestObject", info.Holder(), info.GetIsolate()); |
4910 if (UNLIKELY(info.Length() < 1)) { | 4910 if (UNLIKELY(info.Length() < 1)) { |
4911 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4911 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4912 exceptionState.throwIfNeeded(); | 4912 exceptionState.throwIfNeeded(); |
4913 return; | 4913 return; |
4914 } | 4914 } |
4915 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4915 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4916 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 4916 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4917 imp->activityLoggedMethod1(longArg); | 4917 impl->activityLoggedMethod1(longArg); |
4918 } | 4918 } |
4919 | 4919 |
4920 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 4920 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
4921 { | 4921 { |
4922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4923 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 4923 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
4924 if (contextData && contextData->activityLogger()) { | 4924 if (contextData && contextData->activityLogger()) { |
4925 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 4925 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
4926 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", i
nfo.Length(), loggerArgs.data(), "Method"); | 4926 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", i
nfo.Length(), loggerArgs.data(), "Method"); |
4927 } | 4927 } |
4928 TestObjectV8Internal::activityLoggedMethod1Method(info); | 4928 TestObjectV8Internal::activityLoggedMethod1Method(info); |
4929 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4929 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4930 } | 4930 } |
4931 | 4931 |
4932 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value
>& info) | 4932 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value
>& info) |
4933 { | 4933 { |
4934 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedMethod2", "TestObject", info.Holder(), info.GetIsolate()); | 4934 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedMethod2", "TestObject", info.Holder(), info.GetIsolate()); |
4935 if (UNLIKELY(info.Length() < 1)) { | 4935 if (UNLIKELY(info.Length() < 1)) { |
4936 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4936 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4937 exceptionState.throwIfNeeded(); | 4937 exceptionState.throwIfNeeded(); |
4938 return; | 4938 return; |
4939 } | 4939 } |
4940 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4940 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4941 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 4941 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4942 imp->activityLoggedMethod2(longArg); | 4942 impl->activityLoggedMethod2(longArg); |
4943 } | 4943 } |
4944 | 4944 |
4945 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 4945 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
4946 { | 4946 { |
4947 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4947 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4948 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 4948 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
4949 if (contextData && contextData->activityLogger()) { | 4949 if (contextData && contextData->activityLogger()) { |
4950 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 4950 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
4951 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i
nfo.Length(), loggerArgs.data(), "Method"); | 4951 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i
nfo.Length(), loggerArgs.data(), "Method"); |
4952 } | 4952 } |
4953 TestObjectV8Internal::activityLoggedMethod2Method(info); | 4953 TestObjectV8Internal::activityLoggedMethod2Method(info); |
4954 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4954 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4955 } | 4955 } |
4956 | 4956 |
4957 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 4957 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
4958 { | 4958 { |
4959 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedMethod2", "TestObject", info.Holder(), info.GetIsolate()); | 4959 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedMethod2", "TestObject", info.Holder(), info.GetIsolate()); |
4960 if (UNLIKELY(info.Length() < 1)) { | 4960 if (UNLIKELY(info.Length() < 1)) { |
4961 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4961 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4962 exceptionState.throwIfNeeded(); | 4962 exceptionState.throwIfNeeded(); |
4963 return; | 4963 return; |
4964 } | 4964 } |
4965 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4965 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4966 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 4966 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4967 imp->activityLoggedMethod2(longArg); | 4967 impl->activityLoggedMethod2(longArg); |
4968 } | 4968 } |
4969 | 4969 |
4970 static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCa
llbackInfo<v8::Value>& info) | 4970 static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
4971 { | 4971 { |
4972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4973 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 4973 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
4974 if (contextData && contextData->activityLogger()) { | 4974 if (contextData && contextData->activityLogger()) { |
4975 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 4975 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
4976 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i
nfo.Length(), loggerArgs.data(), "Method"); | 4976 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i
nfo.Length(), loggerArgs.data(), "Method"); |
4977 } | 4977 } |
4978 TestObjectV8Internal::activityLoggedMethod2MethodForMainWorld(info); | 4978 TestObjectV8Internal::activityLoggedMethod2MethodForMainWorld(info); |
4979 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4979 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4980 } | 4980 } |
4981 | 4981 |
4982 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 4982 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
4983 { | 4983 { |
4984 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); | 4984 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
4985 if (UNLIKELY(info.Length() < 1)) { | 4985 if (UNLIKELY(info.Length() < 1)) { |
4986 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4986 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
4987 exceptionState.throwIfNeeded(); | 4987 exceptionState.throwIfNeeded(); |
4988 return; | 4988 return; |
4989 } | 4989 } |
4990 TestObject* imp = V8TestObject::toNative(info.Holder()); | 4990 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4991 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 4991 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4992 imp->activityLoggedInIsolatedWorldMethod(longArg); | 4992 impl->activityLoggedInIsolatedWorldMethod(longArg); |
4993 } | 4993 } |
4994 | 4994 |
4995 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 4995 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
4996 { | 4996 { |
4997 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4997 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4998 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 4998 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
4999 if (contextData && contextData->activityLogger()) { | 4999 if (contextData && contextData->activityLogger()) { |
5000 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 5000 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
5001 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldMethod", info.Length(), loggerArgs.data(), "Method"); | 5001 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldMethod", info.Length(), loggerArgs.data(), "Method"); |
5002 } | 5002 } |
5003 TestObjectV8Internal::activityLoggedInIsolatedWorldMethodMethod(info); | 5003 TestObjectV8Internal::activityLoggedInIsolatedWorldMethodMethod(info); |
5004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5005 } | 5005 } |
5006 | 5006 |
5007 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func
tionCallbackInfo<v8::Value>& info) | 5007 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func
tionCallbackInfo<v8::Value>& info) |
5008 { | 5008 { |
5009 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); | 5009 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
5010 if (UNLIKELY(info.Length() < 1)) { | 5010 if (UNLIKELY(info.Length() < 1)) { |
5011 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 5011 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
5012 exceptionState.throwIfNeeded(); | 5012 exceptionState.throwIfNeeded(); |
5013 return; | 5013 return; |
5014 } | 5014 } |
5015 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5015 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5016 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 5016 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
5017 imp->activityLoggedInIsolatedWorldMethod(longArg); | 5017 impl->activityLoggedInIsolatedWorldMethod(longArg); |
5018 } | 5018 } |
5019 | 5019 |
5020 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const
v8::FunctionCallbackInfo<v8::Value>& info) | 5020 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const
v8::FunctionCallbackInfo<v8::Value>& info) |
5021 { | 5021 { |
5022 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5022 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5023 TestObjectV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(
info); | 5023 TestObjectV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(
info); |
5024 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5024 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5025 } | 5025 } |
5026 | 5026 |
5027 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo
<v8::Value>& info) | 5027 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo
<v8::Value>& info) |
5028 { | 5028 { |
5029 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 5029 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
5030 if (UNLIKELY(info.Length() < 1)) { | 5030 if (UNLIKELY(info.Length() < 1)) { |
5031 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 5031 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
5032 exceptionState.throwIfNeeded(); | 5032 exceptionState.throwIfNeeded(); |
5033 return; | 5033 return; |
5034 } | 5034 } |
5035 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5035 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5036 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 5036 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
5037 imp->overloadedActivityLoggedMethod(longArg); | 5037 impl->overloadedActivityLoggedMethod(longArg); |
5038 } | 5038 } |
5039 | 5039 |
5040 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function
CallbackInfo<v8::Value>& info) | 5040 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function
CallbackInfo<v8::Value>& info) |
5041 { | 5041 { |
5042 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 5042 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
5043 if (UNLIKELY(info.Length() < 1)) { | 5043 if (UNLIKELY(info.Length() < 1)) { |
5044 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 5044 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
5045 exceptionState.throwIfNeeded(); | 5045 exceptionState.throwIfNeeded(); |
5046 return; | 5046 return; |
5047 } | 5047 } |
5048 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5048 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5049 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 5049 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
5050 imp->overloadedActivityLoggedMethod(longArg); | 5050 impl->overloadedActivityLoggedMethod(longArg); |
5051 } | 5051 } |
5052 | 5052 |
5053 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo
<v8::Value>& info) | 5053 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo
<v8::Value>& info) |
5054 { | 5054 { |
5055 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 5055 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
5056 if (UNLIKELY(info.Length() < 2)) { | 5056 if (UNLIKELY(info.Length() < 2)) { |
5057 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 5057 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
5058 exceptionState.throwIfNeeded(); | 5058 exceptionState.throwIfNeeded(); |
5059 return; | 5059 return; |
5060 } | 5060 } |
5061 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5061 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5062 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 5062 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
5063 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); | 5063 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
5064 imp->overloadedActivityLoggedMethod(strArg, longArg); | 5064 impl->overloadedActivityLoggedMethod(strArg, longArg); |
5065 } | 5065 } |
5066 | 5066 |
5067 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 5067 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
5068 { | 5068 { |
5069 if (((info.Length() == 1))) { | 5069 if (((info.Length() == 1))) { |
5070 overloadedActivityLoggedMethod1Method(info); | 5070 overloadedActivityLoggedMethod1Method(info); |
5071 return; | 5071 return; |
5072 } | 5072 } |
5073 if (((info.Length() == 2))) { | 5073 if (((info.Length() == 2))) { |
5074 overloadedActivityLoggedMethod2Method(info); | 5074 overloadedActivityLoggedMethod2Method(info); |
(...skipping 22 matching lines...) Expand all Loading... |
5097 } | 5097 } |
5098 | 5098 |
5099 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function
CallbackInfo<v8::Value>& info) | 5099 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function
CallbackInfo<v8::Value>& info) |
5100 { | 5100 { |
5101 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); | 5101 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
5102 if (UNLIKELY(info.Length() < 2)) { | 5102 if (UNLIKELY(info.Length() < 2)) { |
5103 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 5103 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
5104 exceptionState.throwIfNeeded(); | 5104 exceptionState.throwIfNeeded(); |
5105 return; | 5105 return; |
5106 } | 5106 } |
5107 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5107 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5108 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 5108 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
5109 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); | 5109 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
5110 imp->overloadedActivityLoggedMethod(strArg, longArg); | 5110 impl->overloadedActivityLoggedMethod(strArg, longArg); |
5111 } | 5111 } |
5112 | 5112 |
5113 static void overloadedActivityLoggedMethodMethodForMainWorld(const v8::FunctionC
allbackInfo<v8::Value>& info) | 5113 static void overloadedActivityLoggedMethodMethodForMainWorld(const v8::FunctionC
allbackInfo<v8::Value>& info) |
5114 { | 5114 { |
5115 if (((info.Length() == 1))) { | 5115 if (((info.Length() == 1))) { |
5116 overloadedActivityLoggedMethod1MethodForMainWorld(info); | 5116 overloadedActivityLoggedMethod1MethodForMainWorld(info); |
5117 return; | 5117 return; |
5118 } | 5118 } |
5119 if (((info.Length() == 2))) { | 5119 if (((info.Length() == 2))) { |
5120 overloadedActivityLoggedMethod2MethodForMainWorld(info); | 5120 overloadedActivityLoggedMethod2MethodForMainWorld(info); |
(...skipping 16 matching lines...) Expand all Loading... |
5137 if (contextData && contextData->activityLogger()) { | 5137 if (contextData && contextData->activityLogger()) { |
5138 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 5138 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
5139 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM
ethod", info.Length(), loggerArgs.data(), "Method"); | 5139 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM
ethod", info.Length(), loggerArgs.data(), "Method"); |
5140 } | 5140 } |
5141 TestObjectV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(info)
; | 5141 TestObjectV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(info)
; |
5142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5143 } | 5143 } |
5144 | 5144 |
5145 static void deprecatedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 5145 static void deprecatedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
5146 { | 5146 { |
5147 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5147 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5148 imp->deprecatedMethod(); | 5148 impl->deprecatedMethod(); |
5149 } | 5149 } |
5150 | 5150 |
5151 static void deprecatedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 5151 static void deprecatedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
5152 { | 5152 { |
5153 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5153 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5154 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Method); | 5154 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Method); |
5155 TestObjectV8Internal::deprecatedMethodMethod(info); | 5155 TestObjectV8Internal::deprecatedMethodMethod(info); |
5156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5157 } | 5157 } |
5158 | 5158 |
5159 static void deprecatedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 5159 static void deprecatedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
5160 { | 5160 { |
5161 TestObject::deprecatedStaticMethod(); | 5161 TestObject::deprecatedStaticMethod(); |
5162 } | 5162 } |
5163 | 5163 |
5164 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 5164 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
5165 { | 5165 { |
5166 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5166 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5167 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticMethod); | 5167 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticMethod); |
5168 TestObjectV8Internal::deprecatedStaticMethodMethod(info); | 5168 TestObjectV8Internal::deprecatedStaticMethodMethod(info); |
5169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5170 } | 5170 } |
5171 | 5171 |
5172 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 5172 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
5173 { | 5173 { |
5174 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5174 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5175 RefPtr<Node> result = imp->anonymousIndexedGetter(index); | 5175 RefPtr<Node> result = impl->anonymousIndexedGetter(index); |
5176 if (!result) | 5176 if (!result) |
5177 return; | 5177 return; |
5178 v8SetReturnValueFast(info, WTF::getPtr(result.release()), imp); | 5178 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); |
5179 } | 5179 } |
5180 | 5180 |
5181 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 5181 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
5182 { | 5182 { |
5183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); | 5183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); |
5184 TestObjectV8Internal::indexedPropertyGetter(index, info); | 5184 TestObjectV8Internal::indexedPropertyGetter(index, info); |
5185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5186 } | 5186 } |
5187 | 5187 |
5188 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) | 5188 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) |
5189 { | 5189 { |
5190 if (info.Holder()->HasRealNamedProperty(name)) | 5190 if (info.Holder()->HasRealNamedProperty(name)) |
5191 return; | 5191 return; |
5192 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 5192 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
5193 return; | 5193 return; |
5194 | 5194 |
5195 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5195 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5196 AtomicString propertyName = toCoreAtomicString(name); | 5196 AtomicString propertyName = toCoreAtomicString(name); |
5197 String result = imp->anonymousNamedGetter(propertyName); | 5197 String result = impl->anonymousNamedGetter(propertyName); |
5198 if (result.isNull()) | 5198 if (result.isNull()) |
5199 return; | 5199 return; |
5200 v8SetReturnValueString(info, result, info.GetIsolate()); | 5200 v8SetReturnValueString(info, result, info.GetIsolate()); |
5201 } | 5201 } |
5202 | 5202 |
5203 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 5203 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
5204 { | 5204 { |
5205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 5205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
5206 TestObjectV8Internal::namedPropertyGetter(name, info); | 5206 TestObjectV8Internal::namedPropertyGetter(name, info); |
5207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5208 } | 5208 } |
5209 | 5209 |
5210 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) | 5210 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) |
5211 { | 5211 { |
5212 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5212 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5213 AtomicString propertyName = toCoreAtomicString(name); | 5213 AtomicString propertyName = toCoreAtomicString(name); |
5214 v8::String::Utf8Value namedProperty(name); | 5214 v8::String::Utf8Value namedProperty(name); |
5215 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestObject", info.Holder(), info.GetIsolate()); | 5215 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestObject", info.Holder(), info.GetIsolate()); |
5216 bool result = imp->namedPropertyQuery(propertyName, exceptionState); | 5216 bool result = impl->namedPropertyQuery(propertyName, exceptionState); |
5217 if (exceptionState.throwIfNeeded()) | 5217 if (exceptionState.throwIfNeeded()) |
5218 return; | 5218 return; |
5219 if (!result) | 5219 if (!result) |
5220 return; | 5220 return; |
5221 v8SetReturnValueInt(info, v8::None); | 5221 v8SetReturnValueInt(info, v8::None); |
5222 } | 5222 } |
5223 | 5223 |
5224 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Integer>& info) | 5224 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Integer>& info) |
5225 { | 5225 { |
5226 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 5226 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
5227 TestObjectV8Internal::namedPropertyQuery(name, info); | 5227 TestObjectV8Internal::namedPropertyQuery(name, info); |
5228 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5228 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5229 } | 5229 } |
5230 | 5230 |
5231 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) | 5231 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) |
5232 { | 5232 { |
5233 TestObject* imp = V8TestObject::toNative(info.Holder()); | 5233 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5234 Vector<String> names; | 5234 Vector<String> names; |
5235 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestObjec
t", info.Holder(), info.GetIsolate()); | 5235 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestObjec
t", info.Holder(), info.GetIsolate()); |
5236 imp->namedPropertyEnumerator(names, exceptionState); | 5236 impl->namedPropertyEnumerator(names, exceptionState); |
5237 if (exceptionState.throwIfNeeded()) | 5237 if (exceptionState.throwIfNeeded()) |
5238 return; | 5238 return; |
5239 v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size
()); | 5239 v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size
()); |
5240 for (size_t i = 0; i < names.size(); ++i) | 5240 for (size_t i = 0; i < names.size(); ++i) |
5241 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs
olate(), names[i])); | 5241 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs
olate(), names[i])); |
5242 v8SetReturnValue(info, v8names); | 5242 v8SetReturnValue(info, v8names); |
5243 } | 5243 } |
5244 | 5244 |
5245 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) | 5245 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) |
5246 { | 5246 { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5571 fromInternalPointer(object)->deref(); | 5571 fromInternalPointer(object)->deref(); |
5572 } | 5572 } |
5573 | 5573 |
5574 template<> | 5574 template<> |
5575 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 5575 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
5576 { | 5576 { |
5577 return toV8(impl, creationContext, isolate); | 5577 return toV8(impl, creationContext, isolate); |
5578 } | 5578 } |
5579 | 5579 |
5580 } // namespace WebCore | 5580 } // namespace WebCore |
OLD | NEW |