OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "HTMLNames.h" | 10 #include "HTMLNames.h" |
11 #include "RuntimeEnabledFeatures.h" | 11 #include "RuntimeEnabledFeatures.h" |
12 #include "V8Attr.h" | 12 #include "V8DOMStringList.h" |
13 #include "V8Document.h" | 13 #include "V8Document.h" |
14 #include "V8DocumentFragment.h" | 14 #include "V8MessagePort.h" |
15 #include "V8DocumentType.h" | |
16 #include "V8Element.h" | |
17 #include "V8EventTarget.h" | |
18 #include "V8HTMLCollection.h" | |
19 #include "V8HTMLElement.h" | |
20 #include "V8Node.h" | 15 #include "V8Node.h" |
21 #include "V8NodeFilter.h" | |
22 #include "V8ShadowRoot.h" | |
23 #include "V8TestCallbackInterface.h" | 16 #include "V8TestCallbackInterface.h" |
24 #include "V8TestInterface.h" | 17 #include "V8TestInterface.h" |
25 #include "V8TestInterfaceEmpty.h" | |
26 #include "V8TestInterfaceWillBeGarbageCollected.h" | |
27 #include "V8TestNode.h" | 18 #include "V8TestNode.h" |
28 #include "V8Window.h" | 19 #include "V8TestObjectectA.h" |
29 #include "V8XPathNSResolver.h" | 20 #include "V8TestObjectectB.h" |
| 21 #include "V8TestObjectectC.h" |
| 22 #include "V8TestSubObj.h" |
30 #include "bindings/v8/BindingSecurity.h" | 23 #include "bindings/v8/BindingSecurity.h" |
31 #include "bindings/v8/Dictionary.h" | 24 #include "bindings/v8/Dictionary.h" |
32 #include "bindings/v8/ExceptionState.h" | 25 #include "bindings/v8/ExceptionState.h" |
33 #include "bindings/v8/ScriptCallStackFactory.h" | |
34 #include "bindings/v8/ScriptPromise.h" | |
35 #include "bindings/v8/ScriptState.h" | 26 #include "bindings/v8/ScriptState.h" |
36 #include "bindings/v8/ScriptValue.h" | 27 #include "bindings/v8/ScriptValue.h" |
37 #include "bindings/v8/SerializedScriptValue.h" | 28 #include "bindings/v8/SerializedScriptValue.h" |
38 #include "bindings/v8/V8AbstractEventListener.h" | 29 #include "bindings/v8/V8AbstractEventListener.h" |
39 #include "bindings/v8/V8DOMActivityLogger.h" | 30 #include "bindings/v8/V8DOMActivityLogger.h" |
40 #include "bindings/v8/V8DOMConfiguration.h" | 31 #include "bindings/v8/V8DOMConfiguration.h" |
41 #include "bindings/v8/V8EventListenerList.h" | 32 #include "bindings/v8/V8EventListenerList.h" |
42 #include "bindings/v8/V8HiddenValue.h" | 33 #include "bindings/v8/V8HiddenValue.h" |
43 #include "bindings/v8/V8ObjectConstructor.h" | 34 #include "bindings/v8/V8ObjectConstructor.h" |
44 #include "bindings/v8/custom/V8ArrayBufferCustom.h" | |
45 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h" | |
46 #include "bindings/v8/custom/V8Float32ArrayCustom.h" | 35 #include "bindings/v8/custom/V8Float32ArrayCustom.h" |
47 #include "bindings/v8/custom/V8Int32ArrayCustom.h" | |
48 #include "bindings/v8/custom/V8Uint8ArrayCustom.h" | |
49 #include "core/css/MediaQueryListListener.h" | 36 #include "core/css/MediaQueryListListener.h" |
50 #include "core/dom/ContextFeatures.h" | 37 #include "core/dom/ContextFeatures.h" |
51 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" |
52 #include "core/dom/custom/CustomElementCallbackDispatcher.h" | 39 #include "core/dom/custom/CustomElementCallbackDispatcher.h" |
53 #include "core/frame/DOMWindow.h" | |
54 #include "core/frame/UseCounter.h" | 40 #include "core/frame/UseCounter.h" |
55 #include "core/inspector/ScriptArguments.h" | |
56 #include "platform/TraceEvent.h" | 41 #include "platform/TraceEvent.h" |
57 #include "wtf/GetPtr.h" | 42 #include "wtf/GetPtr.h" |
58 #include "wtf/RefPtr.h" | 43 #include "wtf/RefPtr.h" |
59 | 44 |
60 namespace WebCore { | 45 namespace WebCore { |
61 | 46 |
62 static void initializeScriptWrappableForInterface(TestObject* object) | 47 static void initializeScriptWrappableForInterface(TestObject* object) |
63 { | 48 { |
64 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 49 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
65 ScriptWrappable::setTypeInfoInObject(object, &V8TestObject::wrapperTypeI
nfo); | 50 ScriptWrappable::setTypeInfoInObject(object, &V8TestObject::wrapperTypeI
nfo); |
66 else | 51 else |
67 ASSERT_NOT_REACHED(); | 52 ASSERT_NOT_REACHED(); |
68 } | 53 } |
69 | 54 |
70 } // namespace WebCore | 55 } // namespace WebCore |
71 | 56 |
72 void webCoreInitializeScriptWrappableForInterface(WebCore::TestObject* object) | 57 void webCoreInitializeScriptWrappableForInterface(WebCore::TestObject* object) |
73 { | 58 { |
74 WebCore::initializeScriptWrappableForInterface(object); | 59 WebCore::initializeScriptWrappableForInterface(object); |
75 } | 60 } |
76 | 61 |
77 namespace WebCore { | 62 namespace WebCore { |
78 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::derefObject, 0, 0, 0, V8TestObject::instal
lPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false }; | 63 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::derefObject, 0, V8TestObject::toEventTarge
t, 0, V8TestObject::installPerContextEnabledMethods, &V8EventTarget::wrapperType
Info, WrapperTypeObjectPrototype, false }; |
79 | 64 |
80 namespace TestObjectV8Internal { | 65 namespace TestObjectV8Internal { |
81 | 66 |
82 template <typename T> void V8_USE(T) { } | 67 template <typename T> void V8_USE(T) { } |
83 | 68 |
84 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 69 static void readOnlyLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
85 { | 70 { |
86 v8::Handle<v8::Object> holder = info.Holder(); | 71 v8::Handle<v8::Object> holder = info.Holder(); |
87 TestObject* impl = V8TestObject::toNative(holder); | 72 TestObject* impl = V8TestObject::toNative(holder); |
88 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); | 73 v8SetReturnValueInt(info, impl->readOnlyLongAttr()); |
89 } | 74 } |
90 | 75 |
91 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 76 static void readOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
92 { | 77 { |
93 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 78 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
94 TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info); | 79 TestObjectV8Internal::readOnlyLongAttrAttributeGetter(info); |
95 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 80 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
96 } | 81 } |
97 | 82 |
98 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 83 static void readOnlyStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
99 { | 84 { |
100 v8::Handle<v8::Object> holder = info.Holder(); | 85 v8::Handle<v8::Object> holder = info.Holder(); |
101 TestObject* impl = V8TestObject::toNative(holder); | 86 TestObject* impl = V8TestObject::toNative(holder); |
102 RefPtr<TestInterfaceEmpty> result(impl->readonlyTestInterfaceEmptyAttribute(
)); | 87 v8SetReturnValueString(info, impl->readOnlyStringAttr(), info.GetIsolate()); |
103 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(
info.GetReturnValue(), result.get())) | 88 } |
| 89 |
| 90 static void readOnlyStringAttrAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
| 91 { |
| 92 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 93 TestObjectV8Internal::readOnlyStringAttrAttributeGetter(info); |
| 94 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 95 } |
| 96 |
| 97 static void readOnlyTestObjectAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 98 { |
| 99 v8::Handle<v8::Object> holder = info.Holder(); |
| 100 TestObject* impl = V8TestObject::toNative(holder); |
| 101 RefPtr<TestObject> result(impl->readOnlyTestObjectAttr()); |
| 102 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) |
104 return; | 103 return; |
105 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate()
); | 104 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate()
); |
106 if (!wrapper.IsEmpty()) { | 105 if (!wrapper.IsEmpty()) { |
107 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), wrapper); | 106 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "readOnlyTestObjectAttr"), wrapper); |
108 v8SetReturnValue(info, wrapper); | 107 v8SetReturnValue(info, wrapper); |
109 } | 108 } |
110 } | 109 } |
111 | 110 |
112 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 111 static void readOnlyTestObjectAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
113 { | 112 { |
114 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
115 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(inf
o); | 114 TestObjectV8Internal::readOnlyTestObjectAttrAttributeGetter(info); |
116 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
117 } | 116 } |
118 | 117 |
119 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 118 static void staticReadOnlyLongAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
120 { | 119 { |
121 v8::Handle<v8::Object> holder = info.Holder(); | 120 v8SetReturnValueInt(info, TestObject::staticReadOnlyLongAttr()); |
122 TestObject* impl = V8TestObject::toNative(holder); | 121 } |
123 v8SetReturnValueInt(info, impl->readonlyLongAttribute()); | 122 |
124 } | 123 static void staticReadOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
125 | 124 { |
126 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 125 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
127 { | 126 TestObjectV8Internal::staticReadOnlyLongAttrAttributeGetter(info); |
128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 127 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
129 TestObjectV8Internal::readonlyLongAttributeAttributeGetter(info); | 128 } |
130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 129 |
131 } | 130 static void staticStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
132 | 131 { |
133 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 132 v8SetReturnValueString(info, TestObject::staticStringAttr(), info.GetIsolate
()); |
134 { | 133 } |
135 v8::Handle<v8::Object> holder = info.Holder(); | 134 |
136 TestObject* impl = V8TestObject::toNative(holder); | 135 static void staticStringAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
137 v8SetReturnValue(info, v8DateOrNull(impl->dateAttribute(), info.GetIsolate()
)); | 136 { |
138 } | 137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
139 | 138 TestObjectV8Internal::staticStringAttrAttributeGetter(info); |
140 static void dateAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
141 { | 140 } |
142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 141 |
143 TestObjectV8Internal::dateAttributeAttributeGetter(info); | 142 static void staticStringAttrAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
144 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 143 { |
145 } | |
146 | |
147 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
148 { | |
149 v8::Handle<v8::Object> holder = info.Holder(); | |
150 TestObject* impl = V8TestObject::toNative(holder); | |
151 V8TRYCATCH_VOID(double, cppValue, toCoreDate(v8Value)); | |
152 impl->setDateAttribute(cppValue); | |
153 } | |
154 | |
155 static void dateAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
156 { | |
157 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
158 TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info); | |
159 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
160 } | |
161 | |
162 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | |
163 { | |
164 v8::Handle<v8::Object> holder = info.Holder(); | |
165 TestObject* impl = V8TestObject::toNative(holder); | |
166 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); | |
167 } | |
168 | |
169 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
170 { | |
171 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
172 TestObjectV8Internal::stringAttributeAttributeGetter(info); | |
173 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
174 } | |
175 | |
176 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | |
177 { | |
178 v8::Handle<v8::Object> holder = info.Holder(); | |
179 TestObject* impl = V8TestObject::toNative(holder); | |
180 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | 144 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
181 impl->setStringAttribute(cppValue); | 145 TestObject::setStaticStringAttr(cppValue); |
182 } | 146 } |
183 | 147 |
184 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 148 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
185 { | 149 { |
186 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 150 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
187 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); | 151 TestObjectV8Internal::staticStringAttrAttributeSetter(v8Value, info); |
188 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 152 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
189 } | 153 } |
190 | 154 |
191 static void domTimeStampAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 155 static void enumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
192 { | 156 { |
193 v8::Handle<v8::Object> holder = info.Holder(); | 157 v8::Handle<v8::Object> holder = info.Holder(); |
194 TestObject* impl = V8TestObject::toNative(holder); | 158 TestObject* impl = V8TestObject::toNative(holder); |
195 v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute())); | 159 v8SetReturnValueString(info, impl->enumAttr(), info.GetIsolate()); |
196 } | 160 } |
197 | 161 |
198 static void domTimeStampAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 162 static void enumAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
199 { | 163 { |
200 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
201 TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info); | 165 TestObjectV8Internal::enumAttrAttributeGetter(info); |
202 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 166 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
203 } | 167 } |
204 | 168 |
205 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 169 static void enumAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
206 { | |
207 v8::Handle<v8::Object> holder = info.Holder(); | |
208 ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAt
tribute", "TestObject", holder, info.GetIsolate()); | |
209 TestObject* impl = V8TestObject::toNative(holder); | |
210 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(v8Value, ex
ceptionState), exceptionState); | |
211 impl->setDomTimeStampAttribute(cppValue); | |
212 } | |
213 | |
214 static void domTimeStampAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
215 { | |
216 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
217 TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info); | |
218 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
219 } | |
220 | |
221 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | |
222 { | |
223 v8::Handle<v8::Object> holder = info.Holder(); | |
224 TestObject* impl = V8TestObject::toNative(holder); | |
225 v8SetReturnValueBool(info, impl->booleanAttribute()); | |
226 } | |
227 | |
228 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
229 { | |
230 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
231 TestObjectV8Internal::booleanAttributeAttributeGetter(info); | |
232 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
233 } | |
234 | |
235 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
236 { | |
237 v8::Handle<v8::Object> holder = info.Holder(); | |
238 TestObject* impl = V8TestObject::toNative(holder); | |
239 V8TRYCATCH_VOID(bool, cppValue, v8Value->BooleanValue()); | |
240 impl->setBooleanAttribute(cppValue); | |
241 } | |
242 | |
243 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
244 { | |
245 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
246 TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info); | |
247 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
248 } | |
249 | |
250 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
251 { | |
252 v8::Handle<v8::Object> holder = info.Holder(); | |
253 TestObject* impl = V8TestObject::toNative(holder); | |
254 v8SetReturnValueInt(info, impl->byteAttribute()); | |
255 } | |
256 | |
257 static void byteAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | |
258 { | |
259 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
260 TestObjectV8Internal::byteAttributeAttributeGetter(info); | |
261 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
262 } | |
263 | |
264 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
265 { | |
266 v8::Handle<v8::Object> holder = info.Holder(); | |
267 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute"
, "TestObject", holder, info.GetIsolate()); | |
268 TestObject* impl = V8TestObject::toNative(holder); | |
269 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(v8Value, exceptionState), ex
ceptionState); | |
270 impl->setByteAttribute(cppValue); | |
271 } | |
272 | |
273 static void byteAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
274 { | |
275 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
276 TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info); | |
277 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
278 } | |
279 | |
280 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | |
281 { | |
282 v8::Handle<v8::Object> holder = info.Holder(); | |
283 TestObject* impl = V8TestObject::toNative(holder); | |
284 v8SetReturnValue(info, impl->doubleAttribute()); | |
285 } | |
286 | |
287 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
288 { | |
289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
290 TestObjectV8Internal::doubleAttributeAttributeGetter(info); | |
291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
292 } | |
293 | |
294 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | |
295 { | |
296 v8::Handle<v8::Object> holder = info.Holder(); | |
297 TestObject* impl = V8TestObject::toNative(holder); | |
298 V8TRYCATCH_VOID(double, cppValue, static_cast<double>(v8Value->NumberValue()
)); | |
299 impl->setDoubleAttribute(cppValue); | |
300 } | |
301 | |
302 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
303 { | |
304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
305 TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info); | |
306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
307 } | |
308 | |
309 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
310 { | |
311 v8::Handle<v8::Object> holder = info.Holder(); | |
312 TestObject* impl = V8TestObject::toNative(holder); | |
313 v8SetReturnValue(info, impl->floatAttribute()); | |
314 } | |
315 | |
316 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | |
317 { | |
318 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
319 TestObjectV8Internal::floatAttributeAttributeGetter(info); | |
320 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
321 } | |
322 | |
323 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | |
324 { | |
325 v8::Handle<v8::Object> holder = info.Holder(); | |
326 TestObject* impl = V8TestObject::toNative(holder); | |
327 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue()))
; | |
328 impl->setFloatAttribute(cppValue); | |
329 } | |
330 | |
331 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
332 { | |
333 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
334 TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info); | |
335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
336 } | |
337 | |
338 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
339 { | |
340 v8::Handle<v8::Object> holder = info.Holder(); | |
341 TestObject* impl = V8TestObject::toNative(holder); | |
342 v8SetReturnValueInt(info, impl->longAttribute()); | |
343 } | |
344 | |
345 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | |
346 { | |
347 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
348 TestObjectV8Internal::longAttributeAttributeGetter(info); | |
349 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
350 } | |
351 | |
352 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
353 { | |
354 v8::Handle<v8::Object> holder = info.Holder(); | |
355 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute"
, "TestObject", holder, info.GetIsolate()); | |
356 TestObject* impl = V8TestObject::toNative(holder); | |
357 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
358 impl->setLongAttribute(cppValue); | |
359 } | |
360 | |
361 static void longAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
362 { | |
363 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
364 TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info); | |
365 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
366 } | |
367 | |
368 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | |
369 { | |
370 v8::Handle<v8::Object> holder = info.Holder(); | |
371 TestObject* impl = V8TestObject::toNative(holder); | |
372 v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute())); | |
373 } | |
374 | |
375 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | |
376 { | |
377 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
378 TestObjectV8Internal::longLongAttributeAttributeGetter(info); | |
379 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
380 } | |
381 | |
382 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
383 { | |
384 v8::Handle<v8::Object> holder = info.Holder(); | |
385 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttrib
ute", "TestObject", holder, info.GetIsolate()); | |
386 TestObject* impl = V8TestObject::toNative(holder); | |
387 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(v8Value, exceptionSta
te), exceptionState); | |
388 impl->setLongLongAttribute(cppValue); | |
389 } | |
390 | |
391 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
392 { | |
393 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
394 TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info); | |
395 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
396 } | |
397 | |
398 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
399 { | |
400 v8::Handle<v8::Object> holder = info.Holder(); | |
401 TestObject* impl = V8TestObject::toNative(holder); | |
402 v8SetReturnValueUnsigned(info, impl->octetAttribute()); | |
403 } | |
404 | |
405 static void octetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | |
406 { | |
407 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
408 TestObjectV8Internal::octetAttributeAttributeGetter(info); | |
409 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
410 } | |
411 | |
412 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | |
413 { | |
414 v8::Handle<v8::Object> holder = info.Holder(); | |
415 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute
", "TestObject", holder, info.GetIsolate()); | |
416 TestObject* impl = V8TestObject::toNative(holder); | |
417 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(v8Value, exceptionStat
e), exceptionState); | |
418 impl->setOctetAttribute(cppValue); | |
419 } | |
420 | |
421 static void octetAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
422 { | |
423 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
424 TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info); | |
425 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
426 } | |
427 | |
428 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
429 { | |
430 v8::Handle<v8::Object> holder = info.Holder(); | |
431 TestObject* impl = V8TestObject::toNative(holder); | |
432 v8SetReturnValueInt(info, impl->shortAttribute()); | |
433 } | |
434 | |
435 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | |
436 { | |
437 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
438 TestObjectV8Internal::shortAttributeAttributeGetter(info); | |
439 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
440 } | |
441 | |
442 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | |
443 { | |
444 v8::Handle<v8::Object> holder = info.Holder(); | |
445 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute
", "TestObject", holder, info.GetIsolate()); | |
446 TestObject* impl = V8TestObject::toNative(holder); | |
447 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(v8Value, exceptionState), e
xceptionState); | |
448 impl->setShortAttribute(cppValue); | |
449 } | |
450 | |
451 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
452 { | |
453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
454 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); | |
455 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
456 } | |
457 | |
458 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
459 { | |
460 v8::Handle<v8::Object> holder = info.Holder(); | |
461 TestObject* impl = V8TestObject::toNative(holder); | |
462 v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute()); | |
463 } | |
464 | |
465 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
466 { | |
467 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
468 TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info); | |
469 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
470 } | |
471 | |
472 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
473 { | |
474 v8::Handle<v8::Object> holder = info.Holder(); | |
475 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAt
tribute", "TestObject", holder, info.GetIsolate()); | |
476 TestObject* impl = V8TestObject::toNative(holder); | |
477 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(v8Value, exceptionSta
te), exceptionState); | |
478 impl->setUnsignedLongAttribute(cppValue); | |
479 } | |
480 | |
481 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
482 { | |
483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
484 TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info); | |
485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
486 } | |
487 | |
488 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | |
489 { | |
490 v8::Handle<v8::Object> holder = info.Holder(); | |
491 TestObject* impl = V8TestObject::toNative(holder); | |
492 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()
)); | |
493 } | |
494 | |
495 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
496 { | |
497 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
498 TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info); | |
499 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
500 } | |
501 | |
502 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | |
503 { | |
504 v8::Handle<v8::Object> holder = info.Holder(); | |
505 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | |
506 TestObject* impl = V8TestObject::toNative(holder); | |
507 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(v8Value, ex
ceptionState), exceptionState); | |
508 impl->setUnsignedLongLongAttribute(cppValue); | |
509 } | |
510 | |
511 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
512 { | |
513 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
514 TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info
); | |
515 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
516 } | |
517 | |
518 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | |
519 { | |
520 v8::Handle<v8::Object> holder = info.Holder(); | |
521 TestObject* impl = V8TestObject::toNative(holder); | |
522 v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute()); | |
523 } | |
524 | |
525 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
526 { | |
527 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
528 TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info); | |
529 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
530 } | |
531 | |
532 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
533 { | |
534 v8::Handle<v8::Object> holder = info.Holder(); | |
535 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttribute", "TestObject", holder, info.GetIsolate()); | |
536 TestObject* impl = V8TestObject::toNative(holder); | |
537 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(v8Value, exceptionSta
te), exceptionState); | |
538 impl->setUnsignedShortAttribute(cppValue); | |
539 } | |
540 | |
541 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
542 { | |
543 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
544 TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info); | |
545 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
546 } | |
547 | |
548 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | |
549 { | |
550 v8::Handle<v8::Object> holder = info.Holder(); | |
551 TestObject* impl = V8TestObject::toNative(holder); | |
552 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyAttribute()),
impl); | |
553 } | |
554 | |
555 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
556 { | |
557 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
558 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetter(info); | |
559 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
560 } | |
561 | |
562 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | |
563 { | |
564 v8::Handle<v8::Object> holder = info.Holder(); | |
565 TestObject* impl = V8TestObject::toNative(holder); | |
566 V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativ
eWithTypeCheck(info.GetIsolate(), v8Value)); | |
567 impl->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue)); | |
568 } | |
569 | |
570 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
571 { | |
572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
573 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, in
fo); | |
574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
575 } | |
576 | |
577 static void testObjectAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
578 { | |
579 v8::Handle<v8::Object> holder = info.Holder(); | |
580 TestObject* impl = V8TestObject::toNative(holder); | |
581 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjectAttribute()), impl); | |
582 } | |
583 | |
584 static void testObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
585 { | |
586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
587 TestObjectV8Internal::testObjectAttributeAttributeGetter(info); | |
588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
589 } | |
590 | |
591 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
592 { | |
593 v8::Handle<v8::Object> holder = info.Holder(); | |
594 TestObject* impl = V8TestObject::toNative(holder); | |
595 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); | |
596 impl->setTestObjectAttribute(WTF::getPtr(cppValue)); | |
597 } | |
598 | |
599 static void testObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
600 { | |
601 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
602 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info); | |
603 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
604 } | |
605 | |
606 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | |
607 { | |
608 v8::Handle<v8::Object> holder = info.Holder(); | |
609 TestObject* impl = V8TestObject::toNative(holder); | |
610 v8SetReturnValue(info, impl->voidCallbackFunctionAttribute().v8Value()); | |
611 } | |
612 | |
613 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
614 { | |
615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
616 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetter(info); | |
617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
618 } | |
619 | |
620 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | |
621 { | |
622 v8::Handle<v8::Object> holder = info.Holder(); | |
623 TestObject* impl = V8TestObject::toNative(holder); | |
624 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate(
))); | |
625 impl->setVoidCallbackFunctionAttribute(cppValue); | |
626 } | |
627 | |
628 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | |
629 { | |
630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
631 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetter(v8Value,
info); | |
632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
633 } | |
634 | |
635 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | |
636 { | |
637 v8::Handle<v8::Object> holder = info.Holder(); | |
638 TestObject* impl = V8TestObject::toNative(holder); | |
639 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgAttribute().v8
Value()); | |
640 } | |
641 | |
642 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
643 { | |
644 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
645 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGet
ter(info); | |
646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
647 } | |
648 | |
649 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
650 { | |
651 v8::Handle<v8::Object> holder = info.Holder(); | |
652 TestObject* impl = V8TestObject::toNative(holder); | |
653 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate(
))); | |
654 impl->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue); | |
655 } | |
656 | |
657 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | |
658 { | |
659 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
660 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSet
ter(v8Value, info); | |
661 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
662 } | |
663 | |
664 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | |
665 { | |
666 v8::Handle<v8::Object> holder = info.Holder(); | |
667 TestObject* impl = V8TestObject::toNative(holder); | |
668 v8SetReturnValueInt(info, impl->cssAttribute()); | |
669 } | |
670 | |
671 static void cssAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
672 { | |
673 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
674 TestObjectV8Internal::cssAttributeAttributeGetter(info); | |
675 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
676 } | |
677 | |
678 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | |
679 { | |
680 v8::Handle<v8::Object> holder = info.Holder(); | |
681 ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute",
"TestObject", holder, info.GetIsolate()); | |
682 TestObject* impl = V8TestObject::toNative(holder); | |
683 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
684 impl->setCSSAttribute(cppValue); | |
685 } | |
686 | |
687 static void cssAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
688 { | |
689 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
690 TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info); | |
691 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
692 } | |
693 | |
694 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | |
695 { | |
696 v8::Handle<v8::Object> holder = info.Holder(); | |
697 TestObject* impl = V8TestObject::toNative(holder); | |
698 v8SetReturnValueInt(info, impl->imeAttribute()); | |
699 } | |
700 | |
701 static void imeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
702 { | |
703 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
704 TestObjectV8Internal::imeAttributeAttributeGetter(info); | |
705 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
706 } | |
707 | |
708 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | |
709 { | |
710 v8::Handle<v8::Object> holder = info.Holder(); | |
711 ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute",
"TestObject", holder, info.GetIsolate()); | |
712 TestObject* impl = V8TestObject::toNative(holder); | |
713 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
714 impl->setIMEAttribute(cppValue); | |
715 } | |
716 | |
717 static void imeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
718 { | |
719 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
720 TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info); | |
721 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
722 } | |
723 | |
724 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | |
725 { | |
726 v8::Handle<v8::Object> holder = info.Holder(); | |
727 TestObject* impl = V8TestObject::toNative(holder); | |
728 v8SetReturnValueInt(info, impl->svgAttribute()); | |
729 } | |
730 | |
731 static void svgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
732 { | |
733 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
734 TestObjectV8Internal::svgAttributeAttributeGetter(info); | |
735 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
736 } | |
737 | |
738 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | |
739 { | |
740 v8::Handle<v8::Object> holder = info.Holder(); | |
741 ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute",
"TestObject", holder, info.GetIsolate()); | |
742 TestObject* impl = V8TestObject::toNative(holder); | |
743 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
744 impl->setSVGAttribute(cppValue); | |
745 } | |
746 | |
747 static void svgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
748 { | |
749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
750 TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info); | |
751 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
752 } | |
753 | |
754 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | |
755 { | |
756 v8::Handle<v8::Object> holder = info.Holder(); | |
757 TestObject* impl = V8TestObject::toNative(holder); | |
758 v8SetReturnValueInt(info, impl->xmlAttribute()); | |
759 } | |
760 | |
761 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
762 { | |
763 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
764 TestObjectV8Internal::xmlAttributeAttributeGetter(info); | |
765 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
766 } | |
767 | |
768 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | |
769 { | |
770 v8::Handle<v8::Object> holder = info.Holder(); | |
771 ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute",
"TestObject", holder, info.GetIsolate()); | |
772 TestObject* impl = V8TestObject::toNative(holder); | |
773 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
774 impl->setXMLAttribute(cppValue); | |
775 } | |
776 | |
777 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
778 { | |
779 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
780 TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info); | |
781 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
782 } | |
783 | |
784 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
785 { | |
786 v8::Handle<v8::Object> holder = info.Holder(); | |
787 TestObject* impl = V8TestObject::toNative(holder); | |
788 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeFilterAttribute()), impl); | |
789 } | |
790 | |
791 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
792 { | |
793 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
794 TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info); | |
795 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
796 } | |
797 | |
798 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
799 { | |
800 v8::Handle<v8::Object> holder = info.Holder(); | |
801 TestObject* impl = V8TestObject::toNative(holder); | |
802 V8TRYCATCH_VOID(RefPtr<NodeFilter>, cppValue, toNodeFilter(v8Value, info.Get
Isolate())); | |
803 impl->setNodeFilterAttribute(WTF::getPtr(cppValue)); | |
804 } | |
805 | |
806 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
807 { | |
808 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
809 TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info); | |
810 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
811 } | |
812 | |
813 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | |
814 { | |
815 v8::Handle<v8::Object> holder = info.Holder(); | |
816 TestObject* impl = V8TestObject::toNative(holder); | |
817 v8SetReturnValue(info, impl->serializedScriptValueAttribute() ? impl->serial
izedScriptValueAttribute()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.
GetIsolate()))); | |
818 } | |
819 | |
820 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
821 { | |
822 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
823 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info); | |
824 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
825 } | |
826 | |
827 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
828 { | |
829 v8::Handle<v8::Object> holder = info.Holder(); | |
830 TestObject* impl = V8TestObject::toNative(holder); | |
831 V8TRYCATCH_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptVal
ue::create(v8Value, info.GetIsolate())); | |
832 impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue)); | |
833 } | |
834 | |
835 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | |
836 { | |
837 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
838 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value,
info); | |
839 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
840 } | |
841 | |
842 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | |
843 { | |
844 v8::Handle<v8::Object> holder = info.Holder(); | |
845 TestObject* impl = V8TestObject::toNative(holder); | |
846 v8SetReturnValue(info, impl->anyAttribute().v8Value()); | |
847 } | |
848 | |
849 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | |
850 { | |
851 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
852 TestObjectV8Internal::anyAttributeAttributeGetter(info); | |
853 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
854 } | |
855 | |
856 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) | |
857 { | |
858 v8::Handle<v8::Object> holder = info.Holder(); | |
859 TestObject* impl = V8TestObject::toNative(holder); | |
860 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate(
))); | |
861 impl->setAnyAttribute(cppValue); | |
862 } | |
863 | |
864 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
865 { | |
866 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
867 TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info); | |
868 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
869 } | |
870 | |
871 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | |
872 { | |
873 v8::Handle<v8::Object> holder = info.Holder(); | |
874 TestObject* impl = V8TestObject::toNative(holder); | |
875 v8SetReturnValue(info, impl->promiseAttribute().v8Value()); | |
876 } | |
877 | |
878 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
879 { | |
880 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
881 TestObjectV8Internal::promiseAttributeAttributeGetter(info); | |
882 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
883 } | |
884 | |
885 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
886 { | |
887 v8::Handle<v8::Object> holder = info.Holder(); | |
888 TestObject* impl = V8TestObject::toNative(holder); | |
889 V8TRYCATCH_VOID(ScriptPromise, cppValue, ScriptPromise(v8Value, info.GetIsol
ate())); | |
890 impl->setPromiseAttribute(cppValue); | |
891 } | |
892 | |
893 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
894 { | |
895 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
896 TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info); | |
897 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
898 } | |
899 | |
900 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | |
901 { | |
902 v8::Handle<v8::Object> holder = info.Holder(); | |
903 TestObject* impl = V8TestObject::toNative(holder); | |
904 v8SetReturnValueFast(info, WTF::getPtr(impl->windowAttribute()), impl); | |
905 } | |
906 | |
907 static void windowAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
908 { | |
909 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
910 TestObjectV8Internal::windowAttributeAttributeGetter(info); | |
911 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
912 } | |
913 | |
914 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | |
915 { | |
916 v8::Handle<v8::Object> holder = info.Holder(); | |
917 TestObject* impl = V8TestObject::toNative(holder); | |
918 V8TRYCATCH_VOID(DOMWindow*, cppValue, toDOMWindow(v8Value, info.GetIsolate()
)); | |
919 impl->setWindowAttribute(WTF::getPtr(cppValue)); | |
920 } | |
921 | |
922 static void windowAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
923 { | |
924 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
925 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info); | |
926 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
927 } | |
928 | |
929 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | |
930 { | |
931 v8::Handle<v8::Object> holder = info.Holder(); | |
932 TestObject* impl = V8TestObject::toNative(holder); | |
933 v8SetReturnValueFast(info, WTF::getPtr(impl->documentAttribute()), impl); | |
934 } | |
935 | |
936 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | |
937 { | |
938 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
939 TestObjectV8Internal::documentAttributeAttributeGetter(info); | |
940 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
941 } | |
942 | |
943 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
944 { | |
945 v8::Handle<v8::Object> holder = info.Holder(); | |
946 TestObject* impl = V8TestObject::toNative(holder); | |
947 V8TRYCATCH_VOID(Document*, cppValue, V8Document::toNativeWithTypeCheck(info.
GetIsolate(), v8Value)); | |
948 impl->setDocumentAttribute(WTF::getPtr(cppValue)); | |
949 } | |
950 | |
951 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
952 { | |
953 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
954 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info); | |
955 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
956 } | |
957 | |
958 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | |
959 { | |
960 v8::Handle<v8::Object> holder = info.Holder(); | |
961 TestObject* impl = V8TestObject::toNative(holder); | |
962 v8SetReturnValueFast(info, WTF::getPtr(impl->documentFragmentAttribute()), i
mpl); | |
963 } | |
964 | |
965 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
966 { | |
967 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
968 TestObjectV8Internal::documentFragmentAttributeAttributeGetter(info); | |
969 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
970 } | |
971 | |
972 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | |
973 { | |
974 v8::Handle<v8::Object> holder = info.Holder(); | |
975 TestObject* impl = V8TestObject::toNative(holder); | |
976 V8TRYCATCH_VOID(DocumentFragment*, cppValue, V8DocumentFragment::toNativeWit
hTypeCheck(info.GetIsolate(), v8Value)); | |
977 impl->setDocumentFragmentAttribute(WTF::getPtr(cppValue)); | |
978 } | |
979 | |
980 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
981 { | |
982 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
983 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info
); | |
984 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
985 } | |
986 | |
987 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
988 { | |
989 v8::Handle<v8::Object> holder = info.Holder(); | |
990 TestObject* impl = V8TestObject::toNative(holder); | |
991 v8SetReturnValueFast(info, WTF::getPtr(impl->documentTypeAttribute()), impl)
; | |
992 } | |
993 | |
994 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
995 { | |
996 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
997 TestObjectV8Internal::documentTypeAttributeAttributeGetter(info); | |
998 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
999 } | |
1000 | |
1001 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
1002 { | |
1003 v8::Handle<v8::Object> holder = info.Holder(); | |
1004 TestObject* impl = V8TestObject::toNative(holder); | |
1005 V8TRYCATCH_VOID(DocumentType*, cppValue, V8DocumentType::toNativeWithTypeChe
ck(info.GetIsolate(), v8Value)); | |
1006 impl->setDocumentTypeAttribute(WTF::getPtr(cppValue)); | |
1007 } | |
1008 | |
1009 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1010 { | |
1011 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1012 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info); | |
1013 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1014 } | |
1015 | |
1016 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | |
1017 { | |
1018 v8::Handle<v8::Object> holder = info.Holder(); | |
1019 TestObject* impl = V8TestObject::toNative(holder); | |
1020 v8SetReturnValueFast(info, WTF::getPtr(impl->elementAttribute()), impl); | |
1021 } | |
1022 | |
1023 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | |
1024 { | |
1025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1026 TestObjectV8Internal::elementAttributeAttributeGetter(info); | |
1027 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1028 } | |
1029 | |
1030 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
1031 { | |
1032 v8::Handle<v8::Object> holder = info.Holder(); | |
1033 TestObject* impl = V8TestObject::toNative(holder); | |
1034 V8TRYCATCH_VOID(Element*, cppValue, V8Element::toNativeWithTypeCheck(info.Ge
tIsolate(), v8Value)); | |
1035 impl->setElementAttribute(WTF::getPtr(cppValue)); | |
1036 } | |
1037 | |
1038 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1039 { | |
1040 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1041 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info); | |
1042 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1043 } | |
1044 | |
1045 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
1046 { | |
1047 v8::Handle<v8::Object> holder = info.Holder(); | |
1048 TestObject* impl = V8TestObject::toNative(holder); | |
1049 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeAttribute()), impl); | |
1050 } | |
1051 | |
1052 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | |
1053 { | |
1054 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1055 TestObjectV8Internal::nodeAttributeAttributeGetter(info); | |
1056 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1057 } | |
1058 | |
1059 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
1060 { | |
1061 v8::Handle<v8::Object> holder = info.Holder(); | |
1062 TestObject* impl = V8TestObject::toNative(holder); | |
1063 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola
te(), v8Value)); | |
1064 impl->setNodeAttribute(WTF::getPtr(cppValue)); | |
1065 } | |
1066 | |
1067 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1068 { | |
1069 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1070 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); | |
1071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1072 } | |
1073 | |
1074 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
1075 { | |
1076 v8::Handle<v8::Object> holder = info.Holder(); | |
1077 TestObject* impl = V8TestObject::toNative(holder); | |
1078 v8SetReturnValueFast(info, WTF::getPtr(impl->shadowRootAttribute()), impl); | |
1079 } | |
1080 | |
1081 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
1082 { | |
1083 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1084 TestObjectV8Internal::shadowRootAttributeAttributeGetter(info); | |
1085 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1086 } | |
1087 | |
1088 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
1089 { | |
1090 v8::Handle<v8::Object> holder = info.Holder(); | |
1091 TestObject* impl = V8TestObject::toNative(holder); | |
1092 V8TRYCATCH_VOID(ShadowRoot*, cppValue, V8ShadowRoot::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); | |
1093 impl->setShadowRootAttribute(WTF::getPtr(cppValue)); | |
1094 } | |
1095 | |
1096 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1097 { | |
1098 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1099 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info); | |
1100 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1101 } | |
1102 | |
1103 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
1104 { | |
1105 v8::Handle<v8::Object> holder = info.Holder(); | |
1106 TestObject* impl = V8TestObject::toNative(holder); | |
1107 v8SetReturnValueFast(info, WTF::getPtr(impl->arrayBufferAttribute()), impl); | |
1108 } | |
1109 | |
1110 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
1111 { | |
1112 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1113 TestObjectV8Internal::arrayBufferAttributeAttributeGetter(info); | |
1114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1115 } | |
1116 | |
1117 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | |
1118 { | |
1119 v8::Handle<v8::Object> holder = info.Holder(); | |
1120 TestObject* impl = V8TestObject::toNative(holder); | |
1121 V8TRYCATCH_VOID(ArrayBuffer*, cppValue, v8Value->IsArrayBuffer() ? V8ArrayBu
ffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(v8Value)) : 0); | |
1122 impl->setArrayBufferAttribute(WTF::getPtr(cppValue)); | |
1123 } | |
1124 | |
1125 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1126 { | |
1127 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1128 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info); | |
1129 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1130 } | |
1131 | |
1132 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
1133 { | |
1134 v8::Handle<v8::Object> holder = info.Holder(); | |
1135 TestObject* impl = V8TestObject::toNative(holder); | |
1136 v8SetReturnValueFast(info, WTF::getPtr(impl->float32ArrayAttribute()), impl)
; | |
1137 } | |
1138 | |
1139 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
1140 { | |
1141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1142 TestObjectV8Internal::float32ArrayAttributeAttributeGetter(info); | |
1143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1144 } | |
1145 | |
1146 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
1147 { | |
1148 v8::Handle<v8::Object> holder = info.Holder(); | |
1149 TestObject* impl = V8TestObject::toNative(holder); | |
1150 V8TRYCATCH_VOID(Float32Array*, cppValue, v8Value->IsFloat32Array() ? V8Float
32Array::toNative(v8::Handle<v8::Float32Array>::Cast(v8Value)) : 0); | |
1151 impl->setFloat32ArrayAttribute(WTF::getPtr(cppValue)); | |
1152 } | |
1153 | |
1154 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1155 { | |
1156 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1157 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info); | |
1158 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1159 } | |
1160 | |
1161 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
1162 { | |
1163 v8::Handle<v8::Object> holder = info.Holder(); | |
1164 TestObject* impl = V8TestObject::toNative(holder); | |
1165 v8SetReturnValueFast(info, WTF::getPtr(impl->uint8ArrayAttribute()), impl); | |
1166 } | |
1167 | |
1168 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
1169 { | |
1170 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1171 TestObjectV8Internal::uint8ArrayAttributeAttributeGetter(info); | |
1172 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1173 } | |
1174 | |
1175 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
1176 { | |
1177 v8::Handle<v8::Object> holder = info.Holder(); | |
1178 TestObject* impl = V8TestObject::toNative(holder); | |
1179 V8TRYCATCH_VOID(Uint8Array*, cppValue, v8Value->IsUint8Array() ? V8Uint8Arra
y::toNative(v8::Handle<v8::Uint8Array>::Cast(v8Value)) : 0); | |
1180 impl->setUint8ArrayAttribute(WTF::getPtr(cppValue)); | |
1181 } | |
1182 | |
1183 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1184 { | |
1185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1186 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info); | |
1187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1188 } | |
1189 | |
1190 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
1191 { | |
1192 v8::Handle<v8::Object> holder = info.Holder(); | |
1193 TestObject* impl = V8TestObject::toNative(holder); | |
1194 v8SetReturnValueFast(info, WTF::getPtr(impl->self()), impl); | |
1195 } | |
1196 | |
1197 static void selfAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | |
1198 { | |
1199 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1200 TestObjectV8Internal::selfAttributeGetter(info); | |
1201 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1202 } | |
1203 | |
1204 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | |
1205 { | |
1206 v8::Handle<v8::Object> holder = info.Holder(); | |
1207 TestObject* impl = V8TestObject::toNative(holder); | |
1208 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetAttribute())
, impl); | |
1209 } | |
1210 | |
1211 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1212 { | |
1213 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1214 TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetter(info); | |
1215 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1216 } | |
1217 | |
1218 static void readonlyEventTargetOrNullAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | |
1219 { | |
1220 v8::Handle<v8::Object> holder = info.Holder(); | |
1221 TestObject* impl = V8TestObject::toNative(holder); | |
1222 bool isNull = false; | |
1223 RefPtr<EventTarget> v8Value = impl->readonlyEventTargetOrNullAttribute(isNul
l); | |
1224 if (isNull) { | |
1225 v8SetReturnValueNull(info); | |
1226 return; | |
1227 } | |
1228 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl); | |
1229 } | |
1230 | |
1231 static void readonlyEventTargetOrNullAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1232 { | |
1233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1234 TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetter(info
); | |
1235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1236 } | |
1237 | |
1238 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | |
1239 { | |
1240 v8::Handle<v8::Object> holder = info.Holder(); | |
1241 TestObject* impl = V8TestObject::toNative(holder); | |
1242 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyWindowAttribute()), imp
l); | |
1243 } | |
1244 | |
1245 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1246 { | |
1247 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1248 TestObjectV8Internal::readonlyWindowAttributeAttributeGetter(info); | |
1249 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1250 } | |
1251 | |
1252 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | |
1253 { | |
1254 v8::Handle<v8::Object> holder = info.Holder(); | |
1255 TestObject* impl = V8TestObject::toNative(holder); | |
1256 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlCollectionAttribute()), imp
l); | |
1257 } | |
1258 | |
1259 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1260 { | |
1261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1262 TestObjectV8Internal::htmlCollectionAttributeAttributeGetter(info); | |
1263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1264 } | |
1265 | |
1266 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
1267 { | |
1268 v8::Handle<v8::Object> holder = info.Holder(); | |
1269 TestObject* impl = V8TestObject::toNative(holder); | |
1270 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlElementAttribute()), impl); | |
1271 } | |
1272 | |
1273 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
1274 { | |
1275 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1276 TestObjectV8Internal::htmlElementAttributeAttributeGetter(info); | |
1277 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1278 } | |
1279 | |
1280 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
1281 { | |
1282 v8::Handle<v8::Object> holder = info.Holder(); | |
1283 TestObject* impl = V8TestObject::toNative(holder); | |
1284 v8SetReturnValue(info, v8Array(impl->stringArrayAttribute(), info.GetIsolate
())); | |
1285 } | |
1286 | |
1287 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
1288 { | |
1289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1290 TestObjectV8Internal::stringArrayAttributeAttributeGetter(info); | |
1291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1292 } | |
1293 | |
1294 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | |
1295 { | |
1296 v8::Handle<v8::Object> holder = info.Holder(); | |
1297 TestObject* impl = V8TestObject::toNative(holder); | |
1298 V8TRYCATCH_VOID(Vector<String>, cppValue, toNativeArray<String>(v8Value, 0,
info.GetIsolate())); | |
1299 impl->setStringArrayAttribute(cppValue); | |
1300 } | |
1301 | |
1302 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1303 { | |
1304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1305 TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info); | |
1306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1307 } | |
1308 | |
1309 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | |
1310 { | |
1311 v8::Handle<v8::Object> holder = info.Holder(); | |
1312 TestObject* impl = V8TestObject::toNative(holder); | |
1313 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayAttribute(), inf
o.GetIsolate())); | |
1314 } | |
1315 | |
1316 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1317 { | |
1318 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1319 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info); | |
1320 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1321 } | |
1322 | |
1323 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1324 { | |
1325 v8::Handle<v8::Object> holder = info.Holder(); | |
1326 TestObject* impl = V8TestObject::toNative(holder); | |
1327 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, cppValue, (toRefPtrNati
veArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(v8Value, 0, info.GetIsolate())
)); | |
1328 impl->setTestInterfaceEmptyArrayAttribute(cppValue); | |
1329 } | |
1330 | |
1331 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | |
1332 { | |
1333 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1334 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Valu
e, info); | |
1335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1336 } | |
1337 | |
1338 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
1339 { | |
1340 v8::Handle<v8::Object> holder = info.Holder(); | |
1341 TestObject* impl = V8TestObject::toNative(holder); | |
1342 v8SetReturnValue(info, v8Array(impl->floatArrayAttribute(), info.GetIsolate(
))); | |
1343 } | |
1344 | |
1345 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
1346 { | |
1347 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1348 TestObjectV8Internal::floatArrayAttributeAttributeGetter(info); | |
1349 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1350 } | |
1351 | |
1352 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
1353 { | |
1354 v8::Handle<v8::Object> holder = info.Holder(); | |
1355 TestObject* impl = V8TestObject::toNative(holder); | |
1356 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(v8Value, 0, in
fo.GetIsolate())); | |
1357 impl->setFloatArrayAttribute(cppValue); | |
1358 } | |
1359 | |
1360 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1361 { | |
1362 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1363 TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info); | |
1364 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1365 } | |
1366 | |
1367 static void stringOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | |
1368 { | |
1369 v8::Handle<v8::Object> holder = info.Holder(); | |
1370 TestObject* impl = V8TestObject::toNative(holder); | |
1371 bool isNull = false; | |
1372 String v8Value = impl->stringOrNullAttribute(isNull); | |
1373 if (isNull) { | |
1374 v8SetReturnValueNull(info); | |
1375 return; | |
1376 } | |
1377 v8SetReturnValueString(info, v8Value, info.GetIsolate()); | |
1378 } | |
1379 | |
1380 static void stringOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
1381 { | |
1382 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1383 TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info); | |
1384 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1385 } | |
1386 | |
1387 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | |
1388 { | |
1389 v8::Handle<v8::Object> holder = info.Holder(); | |
1390 TestObject* impl = V8TestObject::toNative(holder); | |
1391 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
1392 impl->setStringOrNullAttribute(cppValue); | |
1393 } | |
1394 | |
1395 static void stringOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1396 { | |
1397 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1398 TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info); | |
1399 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1400 } | |
1401 | |
1402 static void longOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | |
1403 { | |
1404 v8::Handle<v8::Object> holder = info.Holder(); | |
1405 TestObject* impl = V8TestObject::toNative(holder); | |
1406 bool isNull = false; | |
1407 int v8Value = impl->longOrNullAttribute(isNull); | |
1408 if (isNull) { | |
1409 v8SetReturnValueNull(info); | |
1410 return; | |
1411 } | |
1412 v8SetReturnValueInt(info, v8Value); | |
1413 } | |
1414 | |
1415 static void longOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
1416 { | |
1417 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1418 TestObjectV8Internal::longOrNullAttributeAttributeGetter(info); | |
1419 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1420 } | |
1421 | |
1422 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | |
1423 { | |
1424 v8::Handle<v8::Object> holder = info.Holder(); | |
1425 ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttr
ibute", "TestObject", holder, info.GetIsolate()); | |
1426 TestObject* impl = V8TestObject::toNative(holder); | |
1427 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
1428 impl->setLongOrNullAttribute(cppValue); | |
1429 } | |
1430 | |
1431 static void longOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1432 { | |
1433 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1434 TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info); | |
1435 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1436 } | |
1437 | |
1438 static void testInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | |
1439 { | |
1440 v8::Handle<v8::Object> holder = info.Holder(); | |
1441 TestObject* impl = V8TestObject::toNative(holder); | |
1442 bool isNull = false; | |
1443 RefPtr<TestInterfaceImplementation> v8Value = impl->testInterfaceOrNullAttri
bute(isNull); | |
1444 if (isNull) { | |
1445 v8SetReturnValueNull(info); | |
1446 return; | |
1447 } | |
1448 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl); | |
1449 } | |
1450 | |
1451 static void testInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1452 { | |
1453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1454 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetter(info); | |
1455 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1456 } | |
1457 | |
1458 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | |
1459 { | |
1460 v8::Handle<v8::Object> holder = info.Holder(); | |
1461 TestObject* impl = V8TestObject::toNative(holder); | |
1462 V8TRYCATCH_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toN
ativeWithTypeCheck(info.GetIsolate(), v8Value)); | |
1463 impl->setTestInterfaceOrNullAttribute(WTF::getPtr(cppValue)); | |
1464 } | |
1465 | |
1466 static void testInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1467 { | |
1468 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1469 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, i
nfo); | |
1470 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1471 } | |
1472 | |
1473 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | |
1474 { | |
1475 v8::Handle<v8::Object> holder = info.Holder(); | |
1476 TestObject* impl = V8TestObject::toNative(holder); | |
1477 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); | |
1478 } | |
1479 | |
1480 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | |
1481 { | |
1482 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1483 TestObjectV8Internal::testEnumAttributeAttributeGetter(info); | |
1484 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1485 } | |
1486 | |
1487 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | |
1488 { | 170 { |
1489 v8::Handle<v8::Object> holder = info.Holder(); | 171 v8::Handle<v8::Object> holder = info.Holder(); |
1490 TestObject* impl = V8TestObject::toNative(holder); | 172 TestObject* impl = V8TestObject::toNative(holder); |
1491 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | 173 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1492 String string = cppValue; | 174 String string = cppValue; |
1493 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 175 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
1494 return; | 176 return; |
1495 impl->setTestEnumAttribute(cppValue); | 177 impl->setEnumAttr(cppValue); |
1496 } | 178 } |
1497 | 179 |
1498 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 180 static void enumAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1499 { | 181 { |
1500 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 182 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1501 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info); | 183 TestObjectV8Internal::enumAttrAttributeSetter(v8Value, info); |
1502 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 184 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1503 } | 185 } |
1504 | 186 |
1505 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 187 static void readOnlyEnumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1506 { | 188 { |
1507 v8SetReturnValueString(info, TestObject::staticStringAttribute(), info.GetIs
olate()); | 189 v8::Handle<v8::Object> holder = info.Holder(); |
1508 } | 190 TestObject* impl = V8TestObject::toNative(holder); |
1509 | 191 v8SetReturnValueString(info, impl->readOnlyEnumAttr(), info.GetIsolate()); |
1510 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 192 } |
1511 { | 193 |
1512 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 194 static void readOnlyEnumAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1513 TestObjectV8Internal::staticStringAttributeAttributeGetter(info); | 195 { |
1514 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 196 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1515 } | 197 TestObjectV8Internal::readOnlyEnumAttrAttributeGetter(info); |
1516 | 198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1517 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 199 } |
1518 { | 200 |
| 201 static void byteAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
| 202 { |
| 203 v8::Handle<v8::Object> holder = info.Holder(); |
| 204 TestObject* impl = V8TestObject::toNative(holder); |
| 205 v8SetReturnValueInt(info, impl->byteAttr()); |
| 206 } |
| 207 |
| 208 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 209 { |
| 210 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 211 TestObjectV8Internal::byteAttrAttributeGetter(info); |
| 212 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 213 } |
| 214 |
| 215 static void byteAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
| 216 { |
| 217 v8::Handle<v8::Object> holder = info.Holder(); |
| 218 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttr", "Te
stObject", holder, info.GetIsolate()); |
| 219 TestObject* impl = V8TestObject::toNative(holder); |
| 220 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(v8Value, exceptionState), ex
ceptionState); |
| 221 impl->setByteAttr(cppValue); |
| 222 } |
| 223 |
| 224 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 225 { |
| 226 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 227 TestObjectV8Internal::byteAttrAttributeSetter(v8Value, info); |
| 228 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 229 } |
| 230 |
| 231 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
| 232 { |
| 233 v8::Handle<v8::Object> holder = info.Holder(); |
| 234 TestObject* impl = V8TestObject::toNative(holder); |
| 235 v8SetReturnValueUnsigned(info, impl->octetAttr()); |
| 236 } |
| 237 |
| 238 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 239 { |
| 240 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 241 TestObjectV8Internal::octetAttrAttributeGetter(info); |
| 242 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 243 } |
| 244 |
| 245 static void octetAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pro
pertyCallbackInfo<void>& info) |
| 246 { |
| 247 v8::Handle<v8::Object> holder = info.Holder(); |
| 248 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttr", "T
estObject", holder, info.GetIsolate()); |
| 249 TestObject* impl = V8TestObject::toNative(holder); |
| 250 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(v8Value, exceptionStat
e), exceptionState); |
| 251 impl->setOctetAttr(cppValue); |
| 252 } |
| 253 |
| 254 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 255 { |
| 256 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 257 TestObjectV8Internal::octetAttrAttributeSetter(v8Value, info); |
| 258 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 259 } |
| 260 |
| 261 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
| 262 { |
| 263 v8::Handle<v8::Object> holder = info.Holder(); |
| 264 TestObject* impl = V8TestObject::toNative(holder); |
| 265 v8SetReturnValueInt(info, impl->shortAttr()); |
| 266 } |
| 267 |
| 268 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 269 { |
| 270 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 271 TestObjectV8Internal::shortAttrAttributeGetter(info); |
| 272 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 273 } |
| 274 |
| 275 static void shortAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pro
pertyCallbackInfo<void>& info) |
| 276 { |
| 277 v8::Handle<v8::Object> holder = info.Holder(); |
| 278 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttr", "T
estObject", holder, info.GetIsolate()); |
| 279 TestObject* impl = V8TestObject::toNative(holder); |
| 280 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(v8Value, exceptionState), e
xceptionState); |
| 281 impl->setShortAttr(cppValue); |
| 282 } |
| 283 |
| 284 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 285 { |
| 286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 287 TestObjectV8Internal::shortAttrAttributeSetter(v8Value, info); |
| 288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 289 } |
| 290 |
| 291 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 292 { |
| 293 v8::Handle<v8::Object> holder = info.Holder(); |
| 294 TestObject* impl = V8TestObject::toNative(holder); |
| 295 v8SetReturnValueUnsigned(info, impl->unsignedShortAttr()); |
| 296 } |
| 297 |
| 298 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 299 { |
| 300 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 301 TestObjectV8Internal::unsignedShortAttrAttributeGetter(info); |
| 302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 303 } |
| 304 |
| 305 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 306 { |
| 307 v8::Handle<v8::Object> holder = info.Holder(); |
| 308 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttr", "TestObject", holder, info.GetIsolate()); |
| 309 TestObject* impl = V8TestObject::toNative(holder); |
| 310 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(v8Value, exceptionSta
te), exceptionState); |
| 311 impl->setUnsignedShortAttr(cppValue); |
| 312 } |
| 313 |
| 314 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 315 { |
| 316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 317 TestObjectV8Internal::unsignedShortAttrAttributeSetter(v8Value, info); |
| 318 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 319 } |
| 320 |
| 321 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
| 322 { |
| 323 v8::Handle<v8::Object> holder = info.Holder(); |
| 324 TestObject* impl = V8TestObject::toNative(holder); |
| 325 v8SetReturnValueInt(info, impl->longAttr()); |
| 326 } |
| 327 |
| 328 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 329 { |
| 330 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 331 TestObjectV8Internal::longAttrAttributeGetter(info); |
| 332 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 333 } |
| 334 |
| 335 static void longAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
| 336 { |
| 337 v8::Handle<v8::Object> holder = info.Holder(); |
| 338 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "Te
stObject", holder, info.GetIsolate()); |
| 339 TestObject* impl = V8TestObject::toNative(holder); |
| 340 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 341 impl->setLongAttr(cppValue); |
| 342 } |
| 343 |
| 344 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 345 { |
| 346 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 347 TestObjectV8Internal::longAttrAttributeSetter(v8Value, info); |
| 348 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 349 } |
| 350 |
| 351 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 352 { |
| 353 v8::Handle<v8::Object> holder = info.Holder(); |
| 354 TestObject* impl = V8TestObject::toNative(holder); |
| 355 v8SetReturnValue(info, static_cast<double>(impl->longLongAttr())); |
| 356 } |
| 357 |
| 358 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 359 { |
| 360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 361 TestObjectV8Internal::longLongAttrAttributeGetter(info); |
| 362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 363 } |
| 364 |
| 365 static void longLongAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 366 { |
| 367 v8::Handle<v8::Object> holder = info.Holder(); |
| 368 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttr",
"TestObject", holder, info.GetIsolate()); |
| 369 TestObject* impl = V8TestObject::toNative(holder); |
| 370 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(v8Value, exceptionSta
te), exceptionState); |
| 371 impl->setLongLongAttr(cppValue); |
| 372 } |
| 373 |
| 374 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 375 { |
| 376 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 377 TestObjectV8Internal::longLongAttrAttributeSetter(v8Value, info); |
| 378 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 379 } |
| 380 |
| 381 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 382 { |
| 383 v8::Handle<v8::Object> holder = info.Holder(); |
| 384 TestObject* impl = V8TestObject::toNative(holder); |
| 385 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttr())); |
| 386 } |
| 387 |
| 388 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 389 { |
| 390 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 391 TestObjectV8Internal::unsignedLongLongAttrAttributeGetter(info); |
| 392 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 393 } |
| 394 |
| 395 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 396 { |
| 397 v8::Handle<v8::Object> holder = info.Holder(); |
| 398 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestObject", holder, info.GetIsolate()); |
| 399 TestObject* impl = V8TestObject::toNative(holder); |
| 400 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(v8Value, ex
ceptionState), exceptionState); |
| 401 impl->setUnsignedLongLongAttr(cppValue); |
| 402 } |
| 403 |
| 404 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 405 { |
| 406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 407 TestObjectV8Internal::unsignedLongLongAttrAttributeSetter(v8Value, info); |
| 408 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 409 } |
| 410 |
| 411 static void stringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
| 412 { |
| 413 v8::Handle<v8::Object> holder = info.Holder(); |
| 414 TestObject* impl = V8TestObject::toNative(holder); |
| 415 v8SetReturnValueString(info, impl->stringAttr(), info.GetIsolate()); |
| 416 } |
| 417 |
| 418 static void stringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 419 { |
| 420 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 421 TestObjectV8Internal::stringAttrAttributeGetter(info); |
| 422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 423 } |
| 424 |
| 425 static void stringAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr
opertyCallbackInfo<void>& info) |
| 426 { |
| 427 v8::Handle<v8::Object> holder = info.Holder(); |
| 428 TestObject* impl = V8TestObject::toNative(holder); |
1519 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | 429 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1520 TestObject::setStaticStringAttribute(cppValue); | 430 impl->setStringAttr(cppValue); |
1521 } | 431 } |
1522 | 432 |
1523 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 433 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1524 { | 434 { |
1525 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 435 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1526 TestObjectV8Internal::staticStringAttributeAttributeSetter(v8Value, info); | 436 TestObjectV8Internal::stringAttrAttributeSetter(v8Value, info); |
1527 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 437 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1528 } | 438 } |
1529 | 439 |
1530 static void staticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 440 static void treatNullAsNullStringStringAttrAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
1531 { | 441 { |
1532 v8SetReturnValueInt(info, TestObject::staticLongAttribute()); | 442 v8::Handle<v8::Object> holder = info.Holder(); |
1533 } | 443 TestObject* impl = V8TestObject::toNative(holder); |
1534 | 444 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttr(), info.G
etIsolate()); |
1535 static void staticLongAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 445 } |
1536 { | 446 |
1537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 447 static void treatNullAsNullStringStringAttrAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1538 TestObjectV8Internal::staticLongAttributeAttributeGetter(info); | 448 { |
1539 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 449 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1540 } | 450 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeGetter(info); |
1541 | 451 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1542 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 452 } |
1543 { | 453 |
1544 ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttr
ibute", "TestObject", holder, info.GetIsolate()); | 454 static void treatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 455 { |
| 456 v8::Handle<v8::Object> holder = info.Holder(); |
| 457 TestObject* impl = V8TestObject::toNative(holder); |
| 458 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); |
| 459 impl->setTreatNullAsNullStringStringAttr(cppValue); |
| 460 } |
| 461 |
| 462 static void treatNullAsNullStringStringAttrAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 463 { |
| 464 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 465 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeSetter(v8Value
, info); |
| 466 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 467 } |
| 468 |
| 469 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 470 { |
| 471 v8::Handle<v8::Object> holder = info.Holder(); |
| 472 TestObject* impl = V8TestObject::toNative(holder); |
| 473 v8SetReturnValueString(info, impl->treatNullAsNullStringTreatUndefinedAsNull
StringStringAttr(), info.GetIsolate()); |
| 474 } |
| 475 |
| 476 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
| 477 { |
| 478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 479 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeGetter(info); |
| 480 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 481 } |
| 482 |
| 483 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 484 { |
| 485 v8::Handle<v8::Object> holder = info.Holder(); |
| 486 TestObject* impl = V8TestObject::toNative(holder); |
| 487 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, v8Value); |
| 488 impl->setTreatNullAsNullStringTreatUndefinedAsNullStringStringAttr(cppValue)
; |
| 489 } |
| 490 |
| 491 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
| 492 { |
| 493 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 494 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeSetter(v8Value, info); |
| 495 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 496 } |
| 497 |
| 498 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 499 { |
| 500 v8::Handle<v8::Object> holder = info.Holder(); |
| 501 TestObject* impl = V8TestObject::toNative(holder); |
| 502 EventListener* v8Value = impl->eventHandlerAttr(); |
| 503 v8SetReturnValue(info, v8Value ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(v8Value)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); |
| 504 } |
| 505 |
| 506 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 507 { |
| 508 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 509 TestObjectV8Internal::eventHandlerAttrAttributeGetter(info); |
| 510 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 511 } |
| 512 |
| 513 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 514 { |
| 515 v8::Handle<v8::Object> holder = info.Holder(); |
| 516 TestObject* impl = V8TestObject::toNative(holder); |
| 517 moveEventListenerToNewWrapper(holder, impl->eventHandlerAttr(), v8Value, V8T
estObject::eventListenerCacheIndex, info.GetIsolate()); |
| 518 impl->setEventHandlerAttr(V8EventListenerList::getEventListener(v8Value, tru
e, ListenerFindOrCreate)); |
| 519 } |
| 520 |
| 521 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 522 { |
| 523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 524 TestObjectV8Internal::eventHandlerAttrAttributeSetter(v8Value, info); |
| 525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 526 } |
| 527 |
| 528 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
| 529 { |
| 530 v8::Handle<v8::Object> holder = info.Holder(); |
| 531 TestObject* impl = V8TestObject::toNative(holder); |
| 532 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjAttr()), impl); |
| 533 } |
| 534 |
| 535 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 536 { |
| 537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 538 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
| 539 TestObjectV8Internal::testObjAttrAttributeGetter(info); |
| 540 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 541 } |
| 542 |
| 543 static void testObjAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
| 544 { |
| 545 v8::Handle<v8::Object> holder = info.Holder(); |
| 546 TestObject* impl = V8TestObject::toNative(holder); |
| 547 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
| 548 impl->setTestObjAttr(WTF::getPtr(cppValue)); |
| 549 } |
| 550 |
| 551 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 552 { |
| 553 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 554 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
| 555 TestObjectV8Internal::testObjAttrAttributeSetter(v8Value, info); |
| 556 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 557 } |
| 558 |
| 559 static void attrWithJSGetterAndSetterAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 560 { |
| 561 v8::Handle<v8::Object> holder = info.Holder(); |
| 562 TestObject* impl = V8TestObject::toNative(holder); |
| 563 v8SetReturnValueString(info, impl->attrWithJSGetterAndSetter(), info.GetIsol
ate()); |
| 564 } |
| 565 |
| 566 static void attrWithJSGetterAndSetterAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 567 { |
| 568 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 569 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeGetter(info); |
| 570 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 571 } |
| 572 |
| 573 static void attrWithJSGetterAndSetterAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 574 { |
| 575 v8::Handle<v8::Object> holder = info.Holder(); |
| 576 TestObject* impl = V8TestObject::toNative(holder); |
| 577 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 578 impl->setAttrWithJSGetterAndSetter(cppValue); |
| 579 } |
| 580 |
| 581 static void attrWithJSGetterAndSetterAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 582 { |
| 583 v8::Local<v8::Value> v8Value = info[0]; |
| 584 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 585 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeSetter(v8Value, info
); |
| 586 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 587 } |
| 588 |
| 589 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
| 590 { |
| 591 v8::Handle<v8::Object> holder = info.Holder(); |
| 592 TestObject* impl = V8TestObject::toNative(holder); |
| 593 v8SetReturnValueFast(info, WTF::getPtr(impl->xmlObjAttr()), impl); |
| 594 } |
| 595 |
| 596 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 597 { |
| 598 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 599 TestObjectV8Internal::XMLObjAttrAttributeGetter(info); |
| 600 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 601 } |
| 602 |
| 603 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr
opertyCallbackInfo<void>& info) |
| 604 { |
| 605 v8::Handle<v8::Object> holder = info.Holder(); |
| 606 TestObject* impl = V8TestObject::toNative(holder); |
| 607 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
| 608 impl->setXMLObjAttr(WTF::getPtr(cppValue)); |
| 609 } |
| 610 |
| 611 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 612 { |
| 613 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 614 TestObjectV8Internal::XMLObjAttrAttributeSetter(v8Value, info); |
| 615 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 616 } |
| 617 |
| 618 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 619 { |
| 620 v8::Handle<v8::Object> holder = info.Holder(); |
| 621 TestObject* impl = V8TestObject::toNative(holder); |
| 622 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedstri
ngattrAttr), info.GetIsolate()); |
| 623 } |
| 624 |
| 625 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 626 { |
| 627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 628 TestObjectV8Internal::reflectedStringAttrAttributeGetter(info); |
| 629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 630 } |
| 631 |
| 632 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 633 { |
| 634 v8::Handle<v8::Object> holder = info.Holder(); |
| 635 TestObject* impl = V8TestObject::toNative(holder); |
| 636 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 637 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 638 impl->setAttribute(HTMLNames::reflectedstringattrAttr, cppValue); |
| 639 } |
| 640 |
| 641 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 642 { |
| 643 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 644 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 645 TestObjectV8Internal::reflectedStringAttrAttributeSetter(v8Value, info); |
| 646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 647 } |
| 648 |
| 649 static void reflectedTreatNullAsNullStringStringAttrAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 650 { |
| 651 v8::Handle<v8::Object> holder = info.Holder(); |
| 652 TestObject* impl = V8TestObject::toNative(holder); |
| 653 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringstringattrAttr), info.GetIsolate()); |
| 654 } |
| 655 |
| 656 static void reflectedTreatNullAsNullStringStringAttrAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 657 { |
| 658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 659 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeGette
r(info); |
| 660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 661 } |
| 662 |
| 663 static void reflectedTreatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 664 { |
| 665 v8::Handle<v8::Object> holder = info.Holder(); |
| 666 TestObject* impl = V8TestObject::toNative(holder); |
| 667 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); |
| 668 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 669 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringstringattrAttr,
cppValue); |
| 670 } |
| 671 |
| 672 static void reflectedTreatNullAsNullStringStringAttrAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
| 673 { |
| 674 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 675 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 676 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeSette
r(v8Value, info); |
| 677 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 678 } |
| 679 |
| 680 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 681 { |
| 682 v8::Handle<v8::Object> holder = info.Holder(); |
| 683 TestObject* impl = V8TestObject::toNative(holder); |
| 684 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringtreatundefinedasnullstringstringattrAttr), info.GetIsolate()); |
| 685 } |
| 686 |
| 687 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 688 { |
| 689 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 690 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeGetter(info); |
| 691 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 692 } |
| 693 |
| 694 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>
& info) |
| 695 { |
| 696 v8::Handle<v8::Object> holder = info.Holder(); |
| 697 TestObject* impl = V8TestObject::toNative(holder); |
| 698 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, v8Value); |
| 699 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 700 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringstringattrAttr, cppValue); |
| 701 } |
| 702 |
| 703 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 704 { |
| 705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 706 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 707 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeSetter(v8Value, info); |
| 708 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 709 } |
| 710 |
| 711 static void reflectedIntegralAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 712 { |
| 713 v8::Handle<v8::Object> holder = info.Holder(); |
| 714 TestObject* impl = V8TestObject::toNative(holder); |
| 715 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectedint
egralattrAttr)); |
| 716 } |
| 717 |
| 718 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 719 { |
| 720 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 721 TestObjectV8Internal::reflectedIntegralAttrAttributeGetter(info); |
| 722 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 723 } |
| 724 |
| 725 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 726 { |
| 727 v8::Handle<v8::Object> holder = info.Holder(); |
| 728 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedInteg
ralAttr", "TestObject", holder, info.GetIsolate()); |
| 729 TestObject* impl = V8TestObject::toNative(holder); |
1545 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | 730 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
1546 TestObject::setStaticLongAttribute(cppValue); | 731 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1547 } | 732 impl->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue); |
1548 | 733 } |
1549 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 734 |
1550 { | 735 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1551 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 736 { |
1552 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info); | 737 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1553 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 738 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1554 } | 739 TestObjectV8Internal::reflectedIntegralAttrAttributeSetter(v8Value, info); |
1555 | 740 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1556 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 741 } |
1557 { | 742 |
1558 v8::Handle<v8::Object> holder = info.Holder(); | 743 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1559 TestObject* impl = V8TestObject::toNative(holder); | 744 { |
1560 EventListener* v8Value = impl->eventHandlerAttribute(); | 745 v8::Handle<v8::Object> holder = info.Holder(); |
1561 v8SetReturnValue(info, v8Value ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(v8Value)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); | 746 TestObject* impl = V8TestObject::toNative(holder); |
1562 } | 747 v8SetReturnValueUnsigned(info, std::max(0, impl->getIntegralAttribute(HTMLNa
mes::reflectedunsignedintegralattrAttr))); |
1563 | 748 } |
1564 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 749 |
1565 { | 750 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1566 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 751 { |
1567 TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info); | 752 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1568 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 753 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info); |
1569 } | 754 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1570 | 755 } |
1571 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 756 |
1572 { | 757 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
1573 v8::Handle<v8::Object> holder = info.Holder(); | 758 { |
1574 TestObject* impl = V8TestObject::toNative(holder); | 759 v8::Handle<v8::Object> holder = info.Holder(); |
1575 moveEventListenerToNewWrapper(holder, impl->eventHandlerAttribute(), v8Value
, V8TestObject::eventListenerCacheIndex, info.GetIsolate()); | 760 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedUnsig
nedIntegralAttr", "TestObject", holder, info.GetIsolate()); |
1576 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(v8Value
, true, ListenerFindOrCreate)); | 761 TestObject* impl = V8TestObject::toNative(holder); |
1577 } | 762 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(v8Value, exceptionSta
te), exceptionState); |
1578 | 763 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1579 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 764 impl->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrA
ttr, cppValue); |
1580 { | 765 } |
1581 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 766 |
1582 TestObjectV8Internal::eventHandlerAttributeAttributeSetter(v8Value, info); | 767 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
1583 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 768 { |
1584 } | 769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1585 | 770 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1586 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 771 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(v8Value,
info); |
1587 { | 772 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1588 v8::Handle<v8::Object> holder = info.Holder(); | 773 } |
1589 TestObject* impl = V8TestObject::toNative(holder); | 774 |
1590 v8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribu
te()); | 775 static void reflectedBooleanAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
1591 } | 776 { |
1592 | 777 v8::Handle<v8::Object> holder = info.Holder(); |
1593 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 778 TestObject* impl = V8TestObject::toNative(holder); |
1594 { | 779 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectedboolea
nattrAttr)); |
1595 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 780 } |
1596 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 781 |
1597 if (contextData && contextData->activityLogger()) | 782 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
1598 contextData->activityLogger()->log("TestObject.activityLoggingAccessForA
llWorldsLongAttribute", 0, 0, "Getter"); | 783 { |
1599 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eGetter(info); | 784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1600 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 785 TestObjectV8Internal::reflectedBooleanAttrAttributeGetter(info); |
1601 } | 786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1602 | 787 } |
1603 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 788 |
1604 { | 789 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
1605 v8::Handle<v8::Object> holder = info.Holder(); | 790 { |
1606 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 791 v8::Handle<v8::Object> holder = info.Holder(); |
| 792 TestObject* impl = V8TestObject::toNative(holder); |
| 793 V8TRYCATCH_VOID(bool, cppValue, v8Value->BooleanValue()); |
| 794 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 795 impl->setBooleanAttribute(HTMLNames::reflectedbooleanattrAttr, cppValue); |
| 796 } |
| 797 |
| 798 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 799 { |
| 800 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 801 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 802 TestObjectV8Internal::reflectedBooleanAttrAttributeSetter(v8Value, info); |
| 803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 804 } |
| 805 |
| 806 static void reflectedURLAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 807 { |
| 808 v8::Handle<v8::Object> holder = info.Holder(); |
| 809 TestObject* impl = V8TestObject::toNative(holder); |
| 810 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedurlat
trAttr), info.GetIsolate()); |
| 811 } |
| 812 |
| 813 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 814 { |
| 815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 816 TestObjectV8Internal::reflectedURLAttrAttributeGetter(info); |
| 817 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 818 } |
| 819 |
| 820 static void reflectedURLAttrAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 821 { |
| 822 v8::Handle<v8::Object> holder = info.Holder(); |
| 823 TestObject* impl = V8TestObject::toNative(holder); |
| 824 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 825 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 826 impl->setAttribute(HTMLNames::reflectedurlattrAttr, cppValue); |
| 827 } |
| 828 |
| 829 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 830 { |
| 831 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 832 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 833 TestObjectV8Internal::reflectedURLAttrAttributeSetter(v8Value, info); |
| 834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 835 } |
| 836 |
| 837 static void reflectedTreatNullAsNullStringURLAttrAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 838 { |
| 839 v8::Handle<v8::Object> holder = info.Holder(); |
| 840 TestObject* impl = V8TestObject::toNative(holder); |
| 841 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringurlattrAttr), info.GetIsolate()); |
| 842 } |
| 843 |
| 844 static void reflectedTreatNullAsNullStringURLAttrAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 845 { |
| 846 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 847 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeGetter(i
nfo); |
| 848 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 849 } |
| 850 |
| 851 static void reflectedTreatNullAsNullStringURLAttrAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 852 { |
| 853 v8::Handle<v8::Object> holder = info.Holder(); |
| 854 TestObject* impl = V8TestObject::toNative(holder); |
| 855 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); |
| 856 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 857 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringurlattrAttr, cpp
Value); |
| 858 } |
| 859 |
| 860 static void reflectedTreatNullAsNullStringURLAttrAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) |
| 861 { |
| 862 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 863 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 864 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeSetter(v
8Value, info); |
| 865 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 866 } |
| 867 |
| 868 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 869 { |
| 870 v8::Handle<v8::Object> holder = info.Holder(); |
| 871 TestObject* impl = V8TestObject::toNative(holder); |
| 872 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringtreatundefinedasnullstringurlattrAttr), info.GetIsolate()); |
| 873 } |
| 874 |
| 875 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 876 { |
| 877 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 878 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeGetter(info); |
| 879 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 880 } |
| 881 |
| 882 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
| 883 { |
| 884 v8::Handle<v8::Object> holder = info.Holder(); |
| 885 TestObject* impl = V8TestObject::toNative(holder); |
| 886 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, v8Value); |
| 887 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 888 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringurlattrAttr, cppValue); |
| 889 } |
| 890 |
| 891 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 892 { |
| 893 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 894 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 895 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeSetter(v8Value, info); |
| 896 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 897 } |
| 898 |
| 899 static void reflectedCustomStringAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 900 { |
| 901 v8::Handle<v8::Object> holder = info.Holder(); |
| 902 TestObject* impl = V8TestObject::toNative(holder); |
| 903 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
| 904 } |
| 905 |
| 906 static void reflectedCustomStringAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 907 { |
| 908 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 909 TestObjectV8Internal::reflectedCustomStringAttrAttributeGetter(info); |
| 910 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 911 } |
| 912 |
| 913 static void reflectedCustomStringAttrAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 914 { |
| 915 v8::Handle<v8::Object> holder = info.Holder(); |
| 916 TestObject* impl = V8TestObject::toNative(holder); |
| 917 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 918 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 919 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
| 920 } |
| 921 |
| 922 static void reflectedCustomStringAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 923 { |
| 924 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 925 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 926 TestObjectV8Internal::reflectedCustomStringAttrAttributeSetter(v8Value, info
); |
| 927 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 928 } |
| 929 |
| 930 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 931 { |
| 932 v8::Handle<v8::Object> holder = info.Holder(); |
| 933 TestObject* impl = V8TestObject::toNative(holder); |
| 934 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
| 935 } |
| 936 |
| 937 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 938 { |
| 939 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 940 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eGetter(info); |
| 941 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 942 } |
| 943 |
| 944 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 945 { |
| 946 v8::Handle<v8::Object> holder = info.Holder(); |
| 947 TestObject* impl = V8TestObject::toNative(holder); |
| 948 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); |
| 949 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 950 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
| 951 } |
| 952 |
| 953 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) |
| 954 { |
| 955 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 956 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 957 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eSetter(v8Value, info); |
| 958 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 959 } |
| 960 |
| 961 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 962 { |
| 963 v8::Handle<v8::Object> holder = info.Holder(); |
| 964 TestObject* impl = V8TestObject::toNative(holder); |
| 965 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
| 966 } |
| 967 |
| 968 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 969 { |
| 970 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 971 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeGetter(info); |
| 972 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 973 } |
| 974 |
| 975 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) |
| 976 { |
| 977 v8::Handle<v8::Object> holder = info.Holder(); |
| 978 TestObject* impl = V8TestObject::toNative(holder); |
| 979 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, v8Value); |
| 980 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 981 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
| 982 } |
| 983 |
| 984 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 985 { |
| 986 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 987 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 988 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeSetter(v8Value, info); |
| 989 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 990 } |
| 991 |
| 992 static void reflectedCustomIntegralAttrAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 993 { |
| 994 v8::Handle<v8::Object> holder = info.Holder(); |
| 995 TestObject* impl = V8TestObject::toNative(holder); |
| 996 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::customConten
tIntegralAttrAttr)); |
| 997 } |
| 998 |
| 999 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1000 { |
| 1001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1002 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeGetter(info); |
| 1003 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1004 } |
| 1005 |
| 1006 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 1007 { |
| 1008 v8::Handle<v8::Object> holder = info.Holder(); |
| 1009 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto
mIntegralAttr", "TestObject", holder, info.GetIsolate()); |
1607 TestObject* impl = V8TestObject::toNative(holder); | 1010 TestObject* impl = V8TestObject::toNative(holder); |
1608 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | 1011 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
1609 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue); | 1012 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1610 } | 1013 impl->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValu
e); |
1611 | 1014 } |
1612 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | 1015 |
1613 { | 1016 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1614 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1017 { |
1615 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 1018 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1616 if (contextData && contextData->activityLogger()) { | 1019 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1617 v8::Handle<v8::Value> loggerArg[] = { v8Value }; | 1020 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeSetter(v8Value, in
fo); |
1618 contextData->activityLogger()->log("TestObject.activityLoggingAccessForA
llWorldsLongAttribute", 1, &loggerArg[0], "Setter"); | 1021 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1619 } | 1022 } |
1620 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | 1023 |
1621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1024 static void reflectedCustomBooleanAttrAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
1622 } | 1025 { |
1623 | 1026 v8::Handle<v8::Object> holder = info.Holder(); |
1624 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 1027 TestObject* impl = V8TestObject::toNative(holder); |
1625 { | 1028 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::customContentBo
oleanAttrAttr)); |
1626 v8::Handle<v8::Object> holder = info.Holder(); | 1029 } |
1627 TestObject* impl = V8TestObject::toNative(holder); | 1030 |
1628 v8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribu
te()); | 1031 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1629 } | 1032 { |
1630 | 1033 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1631 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1034 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeGetter(info); |
1632 { | 1035 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1633 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1036 } |
1634 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 1037 |
1635 if (contextData && contextData->activityLogger()) | 1038 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
1636 contextData->activityLogger()->log("TestObject.activityLoggingGetterForA
llWorldsLongAttribute", 0, 0, "Getter"); | 1039 { |
1637 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eGetter(info); | 1040 v8::Handle<v8::Object> holder = info.Holder(); |
1638 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1041 TestObject* impl = V8TestObject::toNative(holder); |
1639 } | 1042 V8TRYCATCH_VOID(bool, cppValue, v8Value->BooleanValue()); |
1640 | 1043 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1641 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1044 impl->setBooleanAttribute(HTMLNames::customContentBooleanAttrAttr, cppValue)
; |
1642 { | 1045 } |
1643 v8::Handle<v8::Object> holder = info.Holder(); | 1046 |
1644 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | 1047 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1645 TestObject* impl = V8TestObject::toNative(holder); | 1048 { |
1646 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | 1049 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1647 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue); | 1050 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1648 } | 1051 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeSetter(v8Value, inf
o); |
1649 | 1052 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1650 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | 1053 } |
1651 { | 1054 |
1652 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1055 static void reflectedCustomURLAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1653 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | 1056 { |
1654 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1057 v8::Handle<v8::Object> holder = info.Holder(); |
1655 } | 1058 TestObject* impl = V8TestObject::toNative(holder); |
1656 | 1059 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
1657 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 1060 } |
1658 { | 1061 |
1659 v8::Handle<v8::Object> holder = info.Holder(); | 1062 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1660 TestObject* impl = V8TestObject::toNative(holder); | 1063 { |
1661 v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribu
te()); | 1064 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1662 } | 1065 TestObjectV8Internal::reflectedCustomURLAttrAttributeGetter(info); |
1663 | 1066 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1664 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1067 } |
1665 { | 1068 |
1666 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1069 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
1667 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eGetter(info); | 1070 { |
1668 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1071 v8::Handle<v8::Object> holder = info.Holder(); |
1669 } | 1072 TestObject* impl = V8TestObject::toNative(holder); |
1670 | |
1671 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1672 { | |
1673 v8::Handle<v8::Object> holder = info.Holder(); | |
1674 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
1675 TestObject* impl = V8TestObject::toNative(holder); | |
1676 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
1677 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue); | |
1678 } | |
1679 | |
1680 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) | |
1681 { | |
1682 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1683 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
1684 if (contextData && contextData->activityLogger()) { | |
1685 v8::Handle<v8::Value> loggerArg[] = { v8Value }; | |
1686 contextData->activityLogger()->log("TestObject.activityLoggingSetterForA
llWorldsLongAttribute", 1, &loggerArg[0], "Setter"); | |
1687 } | |
1688 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttribut
eSetter(v8Value, info); | |
1689 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1690 } | |
1691 | |
1692 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | |
1693 { | |
1694 v8::Handle<v8::Object> holder = info.Holder(); | |
1695 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedAttributeAnyAttribute"); | |
1696 TestObject* impl = V8TestObject::toNative(holder); | |
1697 if (!impl->isValueDirty()) { | |
1698 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | |
1699 if (!v8Value.IsEmpty()) { | |
1700 v8SetReturnValue(info, v8Value); | |
1701 return; | |
1702 } | |
1703 } | |
1704 ScriptValue v8Value = impl->cachedAttributeAnyAttribute(); | |
1705 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue.v8Value()); | |
1706 v8SetReturnValue(info, v8Value.v8Value()); | |
1707 } | |
1708 | |
1709 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1710 { | |
1711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1712 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info); | |
1713 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1714 } | |
1715 | |
1716 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | |
1717 { | |
1718 v8::Handle<v8::Object> holder = info.Holder(); | |
1719 TestObject* impl = V8TestObject::toNative(holder); | |
1720 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate(
))); | |
1721 impl->setCachedAttributeAnyAttribute(cppValue); | |
1722 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeAnyAttribute")); // Invalidate the cached valu
e. | |
1723 } | |
1724 | |
1725 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1726 { | |
1727 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1728 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetter(v8Value, in
fo); | |
1729 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1730 } | |
1731 | |
1732 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) | |
1733 { | |
1734 v8::Handle<v8::Object> holder = info.Holder(); | |
1735 TestObject* impl = V8TestObject::toNative(holder); | |
1736 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | |
1737 v8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(scriptCont
ext).v8Value()); | |
1738 } | |
1739 | |
1740 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1741 { | |
1742 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1743 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(in
fo); | |
1744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1745 } | |
1746 | |
1747 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1748 { | |
1749 v8::Handle<v8::Object> holder = info.Holder(); | |
1750 TestObject* impl = V8TestObject::toNative(holder); | |
1751 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate(
))); | |
1752 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | |
1753 impl->setCallWithExecutionContextAnyAttribute(scriptContext, cppValue); | |
1754 } | |
1755 | |
1756 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | |
1757 { | |
1758 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1759 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(v8
Value, info); | |
1760 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1761 } | |
1762 | |
1763 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | |
1764 { | |
1765 v8::Handle<v8::Object> holder = info.Holder(); | |
1766 TestObject* impl = V8TestObject::toNative(holder); | |
1767 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF
orNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); | |
1768 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check
SecurityForNodeReadonlyDocumentAttribute(), exceptionState)) { | |
1769 v8SetReturnValueNull(info); | |
1770 exceptionState.throwIfNeeded(); | |
1771 return; | |
1772 } | |
1773 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc
umentAttribute()), impl); | |
1774 } | |
1775 | |
1776 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1777 { | |
1778 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1779 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttribute
Getter(info); | |
1780 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1781 } | |
1782 | |
1783 #if ENABLE(CONDITION) | |
1784 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | |
1785 { | |
1786 v8::Handle<v8::Object> holder = info.Holder(); | |
1787 TestObject* impl = V8TestObject::toNative(holder); | |
1788 v8SetReturnValueInt(info, impl->conditionalLongAttribute()); | |
1789 } | |
1790 #endif // ENABLE(CONDITION) | |
1791 | |
1792 #if ENABLE(CONDITION) | |
1793 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1794 { | |
1795 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1796 TestObjectV8Internal::conditionalLongAttributeAttributeGetter(info); | |
1797 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1798 } | |
1799 #endif // ENABLE(CONDITION) | |
1800 | |
1801 #if ENABLE(CONDITION) | |
1802 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | |
1803 { | |
1804 v8::Handle<v8::Object> holder = info.Holder(); | |
1805 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon
gAttribute", "TestObject", holder, info.GetIsolate()); | |
1806 TestObject* impl = V8TestObject::toNative(holder); | |
1807 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
1808 impl->setConditionalLongAttribute(cppValue); | |
1809 } | |
1810 #endif // ENABLE(CONDITION) | |
1811 | |
1812 #if ENABLE(CONDITION) | |
1813 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1814 { | |
1815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1816 TestObjectV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info)
; | |
1817 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1818 } | |
1819 #endif // ENABLE(CONDITION) | |
1820 | |
1821 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
1822 static void conditionalAndLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | |
1823 { | |
1824 v8::Handle<v8::Object> holder = info.Holder(); | |
1825 TestObject* impl = V8TestObject::toNative(holder); | |
1826 v8SetReturnValueInt(info, impl->conditionalAndLongAttribute()); | |
1827 } | |
1828 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
1829 | |
1830 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
1831 static void conditionalAndLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1832 { | |
1833 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1834 TestObjectV8Internal::conditionalAndLongAttributeAttributeGetter(info); | |
1835 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1836 } | |
1837 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
1838 | |
1839 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
1840 static void conditionalAndLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | |
1841 { | |
1842 v8::Handle<v8::Object> holder = info.Holder(); | |
1843 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAnd
LongAttribute", "TestObject", holder, info.GetIsolate()); | |
1844 TestObject* impl = V8TestObject::toNative(holder); | |
1845 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
1846 impl->setConditionalAndLongAttribute(cppValue); | |
1847 } | |
1848 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
1849 | |
1850 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
1851 static void conditionalAndLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1852 { | |
1853 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1854 TestObjectV8Internal::conditionalAndLongAttributeAttributeSetter(v8Value, in
fo); | |
1855 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1856 } | |
1857 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
1858 | |
1859 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2) | |
1860 static void conditionalOrLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | |
1861 { | |
1862 v8::Handle<v8::Object> holder = info.Holder(); | |
1863 TestObject* impl = V8TestObject::toNative(holder); | |
1864 v8SetReturnValueInt(info, impl->conditionalOrLongAttribute()); | |
1865 } | |
1866 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2) | |
1867 | |
1868 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2) | |
1869 static void conditionalOrLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1870 { | |
1871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1872 TestObjectV8Internal::conditionalOrLongAttributeAttributeGetter(info); | |
1873 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1874 } | |
1875 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2) | |
1876 | |
1877 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2) | |
1878 static void conditionalOrLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | |
1879 { | |
1880 v8::Handle<v8::Object> holder = info.Holder(); | |
1881 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalOrL
ongAttribute", "TestObject", holder, info.GetIsolate()); | |
1882 TestObject* impl = V8TestObject::toNative(holder); | |
1883 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
1884 impl->setConditionalOrLongAttribute(cppValue); | |
1885 } | |
1886 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2) | |
1887 | |
1888 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2) | |
1889 static void conditionalOrLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1890 { | |
1891 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1892 TestObjectV8Internal::conditionalOrLongAttributeAttributeSetter(v8Value, inf
o); | |
1893 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1894 } | |
1895 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2) | |
1896 | |
1897 static void customObjectAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
1898 { | |
1899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1900 V8TestObject::customObjectAttributeAttributeGetterCustom(info); | |
1901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1902 } | |
1903 | |
1904 static void customObjectAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1905 { | |
1906 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1907 V8TestObject::customObjectAttributeAttributeSetterCustom(v8Value, info); | |
1908 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1909 } | |
1910 | |
1911 static void customGetterLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1912 { | |
1913 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1914 V8TestObject::customGetterLongAttributeAttributeGetterCustom(info); | |
1915 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1916 } | |
1917 | |
1918 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | |
1919 { | |
1920 v8::Handle<v8::Object> holder = info.Holder(); | |
1921 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | |
1922 TestObject* impl = V8TestObject::toNative(holder); | |
1923 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
1924 impl->setCustomGetterLongAttribute(cppValue); | |
1925 } | |
1926 | |
1927 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1928 { | |
1929 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1930 TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info
); | |
1931 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1932 } | |
1933 | |
1934 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1935 { | |
1936 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1937 V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCustom(info)
; | |
1938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1939 } | |
1940 | |
1941 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | |
1942 { | |
1943 v8::Handle<v8::Object> holder = info.Holder(); | |
1944 TestObject* impl = V8TestObject::toNative(holder); | |
1945 v8SetReturnValueInt(info, impl->customSetterLongAttribute()); | |
1946 } | |
1947 | |
1948 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1949 { | |
1950 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1951 TestObjectV8Internal::customSetterLongAttributeAttributeGetter(info); | |
1952 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1953 } | |
1954 | |
1955 static void customSetterLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1956 { | |
1957 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1958 V8TestObject::customSetterLongAttributeAttributeSetterCustom(v8Value, info); | |
1959 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1960 } | |
1961 | |
1962 #if ENABLE(CONDITION) | |
1963 static void customLongAttributeAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
1964 { | |
1965 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1966 V8TestObject::customLongAttributeAttributeGetterCustom(info); | |
1967 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1968 } | |
1969 #endif // ENABLE(CONDITION) | |
1970 | |
1971 #if ENABLE(CONDITION) | |
1972 static void customLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
1973 { | |
1974 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
1975 V8TestObject::customLongAttributeAttributeSetterCustom(v8Value, info); | |
1976 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1977 } | |
1978 #endif // ENABLE(CONDITION) | |
1979 | |
1980 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
1981 { | |
1982 v8::Handle<v8::Object> holder = info.Holder(); | |
1983 TestObject* impl = V8TestObject::toNative(holder); | |
1984 v8SetReturnValueInt(info, impl->customElementsCallbacksReadonlyLongAttribute
()); | |
1985 } | |
1986 | |
1987 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
1988 { | |
1989 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
1990 TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeG
etter(info); | |
1991 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
1992 } | |
1993 | |
1994 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | |
1995 { | |
1996 v8::Handle<v8::Object> holder = info.Holder(); | |
1997 TestObject* impl = V8TestObject::toNative(holder); | |
1998 v8SetReturnValueInt(info, impl->deprecatedLongAttribute()); | |
1999 } | |
2000 | |
2001 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2002 { | |
2003 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2004 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::LongAttribute); | |
2005 TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info); | |
2006 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2007 } | |
2008 | |
2009 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
2010 { | |
2011 v8::Handle<v8::Object> holder = info.Holder(); | |
2012 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLong
Attribute", "TestObject", holder, info.GetIsolate()); | |
2013 TestObject* impl = V8TestObject::toNative(holder); | |
2014 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2015 impl->setDeprecatedLongAttribute(cppValue); | |
2016 } | |
2017 | |
2018 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2019 { | |
2020 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2021 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::LongAttribute); | |
2022 TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info); | |
2023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2024 } | |
2025 | |
2026 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | |
2027 { | |
2028 v8::Handle<v8::Object> holder = info.Holder(); | |
2029 TestObject* impl = V8TestObject::toNative(holder); | |
2030 v8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); | |
2031 } | |
2032 | |
2033 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2034 { | |
2035 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2036 TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info); | |
2037 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2038 } | |
2039 | |
2040 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | |
2041 { | |
2042 v8::Handle<v8::Object> holder = info.Holder(); | |
2043 ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLo
ngAttribute", "TestObject", holder, info.GetIsolate()); | |
2044 TestObject* impl = V8TestObject::toNative(holder); | |
2045 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, EnforceRange, exce
ptionState), exceptionState); | |
2046 impl->setEnforceRangeLongAttribute(cppValue); | |
2047 } | |
2048 | |
2049 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2050 { | |
2051 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2052 TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info
); | |
2053 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2054 } | |
2055 | |
2056 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::FunctionCall
backInfo<v8::Value>& info) | |
2057 { | |
2058 v8::Handle<v8::Object> holder = info.Holder(); | |
2059 TestObject* impl = V8TestObject::toNative(holder); | |
2060 v8SetReturnValueInt(info, impl->exposeJSAccessorsLongAttribute()); | |
2061 } | |
2062 | |
2063 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
2064 { | |
2065 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2066 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(info); | |
2067 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2068 } | |
2069 | |
2070 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | |
2071 { | |
2072 v8::Handle<v8::Object> holder = info.Holder(); | |
2073 ExceptionState exceptionState(ExceptionState::SetterContext, "exposeJSAccess
orsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2074 TestObject* impl = V8TestObject::toNative(holder); | |
2075 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2076 impl->setExposeJSAccessorsLongAttribute(cppValue); | |
2077 } | |
2078 | |
2079 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
2080 { | |
2081 v8::Local<v8::Value> v8Value = info[0]; | |
2082 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2083 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeSetter(v8Value,
info); | |
2084 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2085 } | |
2086 | |
2087 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | |
2088 { | |
2089 v8::Handle<v8::Object> holder = info.Holder(); | |
2090 TestObject* impl = V8TestObject::toNative(holder); | |
2091 v8SetReturnValueInt(info, impl->implementedAsName()); | |
2092 } | |
2093 | |
2094 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2095 { | |
2096 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2097 TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info); | |
2098 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2099 } | |
2100 | |
2101 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | |
2102 { | |
2103 v8::Handle<v8::Object> holder = info.Holder(); | |
2104 ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsL
ongAttribute", "TestObject", holder, info.GetIsolate()); | |
2105 TestObject* impl = V8TestObject::toNative(holder); | |
2106 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2107 impl->setImplementedAsName(cppValue); | |
2108 } | |
2109 | |
2110 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2111 { | |
2112 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2113 TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, inf
o); | |
2114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2115 } | |
2116 | |
2117 static void customImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2118 { | |
2119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2120 V8TestObject::customImplementedAsLongAttributeAttributeGetterCustom(info); | |
2121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2122 } | |
2123 | |
2124 static void customImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | |
2125 { | |
2126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2127 V8TestObject::customImplementedAsLongAttributeAttributeSetterCustom(v8Value,
info); | |
2128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2129 } | |
2130 | |
2131 static void customGetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2132 { | |
2133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2134 V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(in
fo); | |
2135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2136 } | |
2137 | |
2138 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2139 { | |
2140 v8::Handle<v8::Object> holder = info.Holder(); | |
2141 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterIm
plementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2142 TestObject* impl = V8TestObject::toNative(holder); | |
2143 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2144 impl->setImplementedAsNameWithCustomGetter(cppValue); | |
2145 } | |
2146 | |
2147 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | |
2148 { | |
2149 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2150 TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(
v8Value, info); | |
2151 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2152 } | |
2153 | |
2154 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | |
2155 { | |
2156 v8::Handle<v8::Object> holder = info.Holder(); | |
2157 TestObject* impl = V8TestObject::toNative(holder); | |
2158 v8SetReturnValueInt(info, impl->implementedAsNameWithCustomGetter()); | |
2159 } | |
2160 | |
2161 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2162 { | |
2163 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2164 TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(
info); | |
2165 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2166 } | |
2167 | |
2168 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | |
2169 { | |
2170 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2171 V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCustom(v8
Value, info); | |
2172 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2173 } | |
2174 | |
2175 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | |
2176 { | |
2177 v8::Handle<v8::Object> holder = info.Holder(); | |
2178 TestObject* impl = V8TestObject::toNative(holder); | |
2179 v8SetReturnValueInt(info, impl->measureAsLongAttribute()); | |
2180 } | |
2181 | |
2182 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
2183 { | |
2184 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2185 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | |
2186 TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info); | |
2187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2188 } | |
2189 | |
2190 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
2191 { | |
2192 v8::Handle<v8::Object> holder = info.Holder(); | |
2193 ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongA
ttribute", "TestObject", holder, info.GetIsolate()); | |
2194 TestObject* impl = V8TestObject::toNative(holder); | |
2195 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2196 impl->setMeasureAsLongAttribute(cppValue); | |
2197 } | |
2198 | |
2199 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2200 { | |
2201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2202 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | |
2203 TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info); | |
2204 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2205 } | |
2206 | |
2207 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | |
2208 { | |
2209 v8::Handle<v8::Object> holder = info.Holder(); | |
2210 TestObject* impl = V8TestObject::toNative(holder); | |
2211 v8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); | |
2212 } | |
2213 | |
2214 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2215 { | |
2216 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2217 TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info); | |
2218 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2219 } | |
2220 | |
2221 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | |
2222 { | |
2223 v8::Handle<v8::Object> holder = info.Holder(); | |
2224 ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableL
ongAttribute", "TestObject", holder, info.GetIsolate()); | |
2225 TestObject* impl = V8TestObject::toNative(holder); | |
2226 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2227 impl->setNotEnumerableLongAttribute(cppValue); | |
2228 } | |
2229 | |
2230 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2231 { | |
2232 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2233 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, inf
o); | |
2234 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2235 } | |
2236 | |
2237 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | |
2238 { | |
2239 v8::Handle<v8::Object> holder = info.Holder(); | |
2240 TestObject* impl = V8TestObject::toNative(holder); | |
2241 v8SetReturnValueInt(info, impl->perContextEnabledLongAttribute()); | |
2242 } | |
2243 | |
2244 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2245 { | |
2246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2247 TestObjectV8Internal::perContextEnabledLongAttributeAttributeGetter(info); | |
2248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2249 } | |
2250 | |
2251 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
2252 { | |
2253 v8::Handle<v8::Object> holder = info.Holder(); | |
2254 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2255 TestObject* impl = V8TestObject::toNative(holder); | |
2256 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2257 impl->setPerContextEnabledLongAttribute(cppValue); | |
2258 } | |
2259 | |
2260 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | |
2261 { | |
2262 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2263 TestObjectV8Internal::perContextEnabledLongAttributeAttributeSetter(v8Value,
info); | |
2264 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2265 } | |
2266 | |
2267 static void perWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | |
2268 { | |
2269 v8::Handle<v8::Object> holder = info.Holder(); | |
2270 TestObject* impl = V8TestObject::toNative(holder); | |
2271 v8SetReturnValueInt(info, impl->perWorldBindingsLongAttribute()); | |
2272 } | |
2273 | |
2274 static void perWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2275 { | |
2276 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2277 TestObjectV8Internal::perWorldBindingsLongAttributeAttributeGetter(info); | |
2278 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2279 } | |
2280 | |
2281 static void perWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | |
2282 { | |
2283 v8::Handle<v8::Object> holder = info.Holder(); | |
2284 ExceptionState exceptionState(ExceptionState::SetterContext, "perWorldBindin
gsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2285 TestObject* impl = V8TestObject::toNative(holder); | |
2286 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2287 impl->setPerWorldBindingsLongAttribute(cppValue); | |
2288 } | |
2289 | |
2290 static void perWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | |
2291 { | |
2292 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2293 TestObjectV8Internal::perWorldBindingsLongAttributeAttributeSetter(v8Value,
info); | |
2294 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2295 } | |
2296 | |
2297 static void perWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::P
ropertyCallbackInfo<v8::Value>& info) | |
2298 { | |
2299 v8::Handle<v8::Object> holder = info.Holder(); | |
2300 TestObject* impl = V8TestObject::toNative(holder); | |
2301 v8SetReturnValueInt(info, impl->perWorldBindingsLongAttribute()); | |
2302 } | |
2303 | |
2304 static void perWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2305 { | |
2306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2307 TestObjectV8Internal::perWorldBindingsLongAttributeAttributeGetterForMainWor
ld(info); | |
2308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2309 } | |
2310 | |
2311 static void perWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2312 { | |
2313 v8::Handle<v8::Object> holder = info.Holder(); | |
2314 ExceptionState exceptionState(ExceptionState::SetterContext, "perWorldBindin
gsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2315 TestObject* impl = V8TestObject::toNative(holder); | |
2316 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2317 impl->setPerWorldBindingsLongAttribute(cppValue); | |
2318 } | |
2319 | |
2320 static void perWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8:
:Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) | |
2321 { | |
2322 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2323 TestObjectV8Internal::perWorldBindingsLongAttributeAttributeSetterForMainWor
ld(v8Value, info); | |
2324 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2325 } | |
2326 | |
2327 static void perWorldBindingsReadonlyLongAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | |
2328 { | |
2329 v8::Handle<v8::Object> holder = info.Holder(); | |
2330 TestObject* impl = V8TestObject::toNative(holder); | |
2331 v8SetReturnValueInt(info, impl->perWorldBindingsReadonlyLongAttribute()); | |
2332 } | |
2333 | |
2334 static void perWorldBindingsReadonlyLongAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2335 { | |
2336 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2337 TestObjectV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetter(i
nfo); | |
2338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2339 } | |
2340 | |
2341 static void perWorldBindingsReadonlyLongAttributeAttributeGetterForMainWorld(con
st v8::PropertyCallbackInfo<v8::Value>& info) | |
2342 { | |
2343 v8::Handle<v8::Object> holder = info.Holder(); | |
2344 TestObject* impl = V8TestObject::toNative(holder); | |
2345 v8SetReturnValueInt(info, impl->perWorldBindingsReadonlyLongAttribute()); | |
2346 } | |
2347 | |
2348 static void perWorldBindingsReadonlyLongAttributeAttributeGetterCallbackForMainW
orld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2349 { | |
2350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2351 TestObjectV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetterFo
rMainWorld(info); | |
2352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2353 } | |
2354 | |
2355 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
2356 { | |
2357 v8::Handle<v8::Object> holder = info.Holder(); | |
2358 TestObject* impl = V8TestObject::toNative(holder); | |
2359 RefPtr<TestInterfaceEmpty> result(impl->perWorldBindingsReadonlyTestInterfac
eEmptyAttribute()); | |
2360 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(
info.GetReturnValue(), result.get())) | |
2361 return; | |
2362 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate()
); | |
2363 if (!wrapper.IsEmpty()) { | |
2364 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); | |
2365 v8SetReturnValue(info, wrapper); | |
2366 } | |
2367 } | |
2368 | |
2369 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2370 { | |
2371 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2372 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetter(info); | |
2373 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2374 } | |
2375 | |
2376 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | |
2377 { | |
2378 v8::Handle<v8::Object> holder = info.Holder(); | |
2379 TestObject* impl = V8TestObject::toNative(holder); | |
2380 RefPtr<TestInterfaceEmpty> result(impl->perWorldBindingsReadonlyTestInterfac
eEmptyAttribute()); | |
2381 if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInte
rfaceEmpty>(info.GetReturnValue(), result.get())) | |
2382 return; | |
2383 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate()
); | |
2384 if (!wrapper.IsEmpty()) { | |
2385 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp
er); | |
2386 v8SetReturnValue(info, wrapper); | |
2387 } | |
2388 } | |
2389 | |
2390 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
2391 { | |
2392 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2393 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAtt
ributeGetterForMainWorld(info); | |
2394 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2395 } | |
2396 | |
2397 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
2398 { | |
2399 v8::Handle<v8::Object> holder = info.Holder(); | |
2400 TestObject* impl = V8TestObject::toNative(holder); | |
2401 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); | |
2402 } | |
2403 | |
2404 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2405 { | |
2406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2407 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
2408 if (contextData && contextData->activityLogger()) | |
2409 contextData->activityLogger()->log("TestObject.activityLoggingAccessPerW
orldBindingsLongAttribute", 0, 0, "Getter"); | |
2410 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetter(info); | |
2411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2412 } | |
2413 | |
2414 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2415 { | |
2416 v8::Handle<v8::Object> holder = info.Holder(); | |
2417 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2418 TestObject* impl = V8TestObject::toNative(holder); | |
2419 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2420 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | |
2421 } | |
2422 | |
2423 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | |
2424 { | |
2425 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2426 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
2427 if (contextData && contextData->activityLogger()) { | |
2428 v8::Handle<v8::Value> loggerArg[] = { v8Value }; | |
2429 contextData->activityLogger()->log("TestObject.activityLoggingAccessPerW
orldBindingsLongAttribute", 1, &loggerArg[0], "Setter"); | |
2430 } | |
2431 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); | |
2432 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2433 } | |
2434 | |
2435 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | |
2436 { | |
2437 v8::Handle<v8::Object> holder = info.Holder(); | |
2438 TestObject* impl = V8TestObject::toNative(holder); | |
2439 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt
ribute()); | |
2440 } | |
2441 | |
2442 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
2443 { | |
2444 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2445 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
2446 if (contextData && contextData->activityLogger()) | |
2447 contextData->activityLogger()->log("TestObject.activityLoggingAccessPerW
orldBindingsLongAttribute", 0, 0, "Getter"); | |
2448 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); | |
2449 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2450 } | |
2451 | |
2452 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | |
2453 { | |
2454 v8::Handle<v8::Object> holder = info.Holder(); | |
2455 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2456 TestObject* impl = V8TestObject::toNative(holder); | |
2457 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2458 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); | |
2459 } | |
2460 | |
2461 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
2462 { | |
2463 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2464 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
2465 if (contextData && contextData->activityLogger()) { | |
2466 v8::Handle<v8::Value> loggerArg[] = { v8Value }; | |
2467 contextData->activityLogger()->log("TestObject.activityLoggingAccessPerW
orldBindingsLongAttribute", 1, &loggerArg[0], "Setter"); | |
2468 } | |
2469 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); | |
2470 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2471 } | |
2472 | |
2473 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
2474 { | |
2475 v8::Handle<v8::Object> holder = info.Holder(); | |
2476 TestObject* impl = V8TestObject::toNative(holder); | |
2477 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | |
2478 } | |
2479 | |
2480 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8:
:Value>& info) | |
2481 { | |
2482 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2483 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
2484 if (contextData && contextData->activityLogger()) | |
2485 contextData->activityLogger()->log("TestObject.activityLoggingAccessForI
solatedWorldsPerWorldBindingsLongAttribute", 0, 0, "Getter"); | |
2486 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); | |
2487 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2488 } | |
2489 | |
2490 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | |
2491 { | |
2492 v8::Handle<v8::Object> holder = info.Holder(); | |
2493 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | |
2494 TestObject* impl = V8TestObject::toNative(holder); | |
2495 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2496 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | |
2497 } | |
2498 | |
2499 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | |
2500 { | |
2501 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2502 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
2503 if (contextData && contextData->activityLogger()) { | |
2504 v8::Handle<v8::Value> loggerArg[] = { v8Value }; | |
2505 contextData->activityLogger()->log("TestObject.activityLoggingAccessForI
solatedWorldsPerWorldBindingsLongAttribute", 1, &loggerArg[0], "Setter"); | |
2506 } | |
2507 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); | |
2508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2509 } | |
2510 | |
2511 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | |
2512 { | |
2513 v8::Handle<v8::Object> holder = info.Holder(); | |
2514 TestObject* impl = V8TestObject::toNative(holder); | |
2515 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | |
2516 } | |
2517 | |
2518 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall
backInfo<v8::Value>& info) | |
2519 { | |
2520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2521 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); | |
2522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2523 } | |
2524 | |
2525 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | |
2526 { | |
2527 v8::Handle<v8::Object> holder = info.Holder(); | |
2528 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | |
2529 TestObject* impl = V8TestObject::toNative(holder); | |
2530 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2531 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | |
2532 } | |
2533 | |
2534 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
2535 { | |
2536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2537 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); | |
2538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2539 } | |
2540 | |
2541 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
2542 { | |
2543 v8::Handle<v8::Object> holder = info.Holder(); | |
2544 TestObject* impl = V8TestObject::toNative(holder); | |
2545 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); | |
2546 } | |
2547 | |
2548 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2549 { | |
2550 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2551 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
2552 if (contextData && contextData->activityLogger()) | |
2553 contextData->activityLogger()->log("TestObject.activityLoggingGetterPerW
orldBindingsLongAttribute", 0, 0, "Getter"); | |
2554 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetter(info); | |
2555 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2556 } | |
2557 | |
2558 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2559 { | |
2560 v8::Handle<v8::Object> holder = info.Holder(); | |
2561 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2562 TestObject* impl = V8TestObject::toNative(holder); | |
2563 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2564 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | |
2565 } | |
2566 | |
2567 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | |
2568 { | |
2569 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2570 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetter(v8Value, info); | |
2571 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2572 } | |
2573 | |
2574 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterFor
MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | |
2575 { | |
2576 v8::Handle<v8::Object> holder = info.Holder(); | |
2577 TestObject* impl = V8TestObject::toNative(holder); | |
2578 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt
ribute()); | |
2579 } | |
2580 | |
2581 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal
lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
2582 { | |
2583 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2584 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
2585 if (contextData && contextData->activityLogger()) | |
2586 contextData->activityLogger()->log("TestObject.activityLoggingGetterPerW
orldBindingsLongAttribute", 0, 0, "Getter"); | |
2587 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteGetterForMainWorld(info); | |
2588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2589 } | |
2590 | |
2591 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor
MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | |
2592 { | |
2593 v8::Handle<v8::Object> holder = info.Holder(); | |
2594 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2595 TestObject* impl = V8TestObject::toNative(holder); | |
2596 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2597 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); | |
2598 } | |
2599 | |
2600 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal
lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
2601 { | |
2602 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2603 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttr
ibuteSetterForMainWorld(v8Value, info); | |
2604 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2605 } | |
2606 | |
2607 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
2608 { | |
2609 v8::Handle<v8::Object> holder = info.Holder(); | |
2610 TestObject* impl = V8TestObject::toNative(holder); | |
2611 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | |
2612 } | |
2613 | |
2614 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8:
:Value>& info) | |
2615 { | |
2616 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2617 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
2618 if (contextData && contextData->activityLogger()) | |
2619 contextData->activityLogger()->log("TestObject.activityLoggingGetterForI
solatedWorldsPerWorldBindingsLongAttribute", 0, 0, "Getter"); | |
2620 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetter(info); | |
2621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2622 } | |
2623 | |
2624 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | |
2625 { | |
2626 v8::Handle<v8::Object> holder = info.Holder(); | |
2627 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | |
2628 TestObject* impl = V8TestObject::toNative(holder); | |
2629 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2630 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | |
2631 } | |
2632 | |
2633 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | |
2634 { | |
2635 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2636 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetter(v8Value, info); | |
2637 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2638 } | |
2639 | |
2640 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | |
2641 { | |
2642 v8::Handle<v8::Object> holder = info.Holder(); | |
2643 TestObject* impl = V8TestObject::toNative(holder); | |
2644 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor
ldBindingsLongAttribute()); | |
2645 } | |
2646 | |
2647 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall
backInfo<v8::Value>& info) | |
2648 { | |
2649 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2650 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeGetterForMainWorld(info); | |
2651 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2652 } | |
2653 | |
2654 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | |
2655 { | |
2656 v8::Handle<v8::Object> holder = info.Holder(); | |
2657 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin
gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, in
fo.GetIsolate()); | |
2658 TestObject* impl = V8TestObject::toNative(holder); | |
2659 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2660 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute
(cppValue); | |
2661 } | |
2662 | |
2663 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA
ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
2664 { | |
2665 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2666 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindings
LongAttributeAttributeSetterForMainWorld(v8Value, info); | |
2667 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2668 } | |
2669 | |
2670 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | |
2671 { | |
2672 v8::Handle<v8::Object> holder = info.Holder(); | |
2673 TestObject* impl = V8TestObject::toNative(holder); | |
2674 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); | |
2675 } | |
2676 | |
2677 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | |
2678 { | |
2679 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2680 TestObjectV8Internal::locationAttributeGetter(info); | |
2681 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2682 } | |
2683 | |
2684 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) | |
2685 { | |
2686 v8::Handle<v8::Object> holder = info.Holder(); | |
2687 TestObject* proxyImpl = V8TestObject::toNative(holder); | |
2688 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); | |
2689 if (!impl) | |
2690 return; | |
2691 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | 1073 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
2692 impl->setHref(cppValue); | 1074 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
2693 } | 1075 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
2694 | 1076 } |
2695 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1077 |
2696 { | 1078 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1079 { |
2698 TestObjectV8Internal::locationAttributeSetter(v8Value, info); | 1080 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1081 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
2700 } | 1082 TestObjectV8Internal::reflectedCustomURLAttrAttributeSetter(v8Value, info); |
2701 | 1083 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2702 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1084 } |
2703 { | 1085 |
2704 v8::Handle<v8::Object> holder = info.Holder(); | 1086 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) |
2705 TestObject* impl = V8TestObject::toNative(holder); | 1087 { |
2706 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; | 1088 v8::Handle<v8::Object> holder = info.Holder(); |
2707 } | 1089 TestObject* impl = V8TestObject::toNative(holder); |
2708 | 1090 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
2709 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1091 } |
2710 { | 1092 |
2711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1093 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2712 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); | 1094 { |
2713 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1095 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2714 } | 1096 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeGe
tter(info); |
2715 | 1097 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2716 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 1098 } |
2717 { | 1099 |
2718 v8::Handle<v8::Object> holder = info.Holder(); | 1100 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetter(v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2719 TestObject* proxyImpl = V8TestObject::toNative(holder); | 1101 { |
2720 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException()); | 1102 v8::Handle<v8::Object> holder = info.Holder(); |
2721 if (!impl) | 1103 TestObject* impl = V8TestObject::toNative(holder); |
2722 return; | 1104 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); |
2723 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | 1105 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
2724 impl->setHrefThrows(cppValue); | 1106 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
2725 } | 1107 } |
2726 | 1108 |
2727 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1109 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn
fo<void>& info) |
2728 { | 1110 { |
2729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2730 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); | 1112 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
2731 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1113 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeSe
tter(v8Value, info); |
2732 } | 1114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2733 | 1115 } |
2734 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1116 |
2735 { | 1117 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
2736 v8::Handle<v8::Object> holder = info.Holder(); | 1118 { |
2737 TestObject* impl = V8TestObject::toNative(holder); | 1119 v8::Handle<v8::Object> holder = info.Holder(); |
2738 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithCallWith()), impl); | 1120 TestObject* impl = V8TestObject::toNative(holder); |
2739 } | 1121 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
2740 | 1122 } |
2741 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1123 |
2742 { | 1124 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v
8::Value>& info) |
2743 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1125 { |
2744 TestObjectV8Internal::locationWithCallWithAttributeGetter(info); | 1126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2745 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1127 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeGetter(info); |
2746 } | 1128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2747 | 1129 } |
2748 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 1130 |
2749 { | 1131 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
2750 v8::Handle<v8::Object> holder = info.Holder(); | 1132 { |
2751 TestObject* proxyImpl = V8TestObject::toNative(holder); | 1133 v8::Handle<v8::Object> holder = info.Holder(); |
2752 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithCallWith()); | 1134 TestObject* impl = V8TestObject::toNative(holder); |
2753 if (!impl) | 1135 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, v8Value); |
2754 return; | 1136 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
2755 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | 1137 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
2756 impl->setHrefCallWith(callingDOMWindow(info.GetIsolate()), enteredDOMWindow(
info.GetIsolate()), cppValue); | 1138 } |
2757 } | 1139 |
2758 | 1140 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
2759 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1141 { |
2760 { | 1142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2761 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1143 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
2762 TestObjectV8Internal::locationWithCallWithAttributeSetter(v8Value, info); | 1144 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeSetter(v8Value, info); |
2763 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2764 } | |
2765 | |
2766 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | |
2767 { | |
2768 v8::Handle<v8::Object> holder = info.Holder(); | |
2769 TestObject* impl = V8TestObject::toNative(holder); | |
2770 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithPerWorldBindings())
, impl); | |
2771 } | |
2772 | |
2773 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2774 { | |
2775 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2776 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info); | |
2777 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2778 } | |
2779 | |
2780 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | |
2781 { | |
2782 v8::Handle<v8::Object> holder = info.Holder(); | |
2783 TestObject* proxyImpl = V8TestObject::toNative(holder); | |
2784 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings(
)); | |
2785 if (!impl) | |
2786 return; | |
2787 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
2788 impl->setHref(cppValue); | |
2789 } | |
2790 | |
2791 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2792 { | |
2793 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2794 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetter(v8Value, i
nfo); | |
2795 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2796 } | |
2797 | |
2798 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | |
2799 { | |
2800 v8::Handle<v8::Object> holder = info.Holder(); | |
2801 TestObject* impl = V8TestObject::toNative(holder); | |
2802 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->locationWithPerWorldBin
dings())); | |
2803 } | |
2804 | |
2805 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2806 { | |
2807 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2808 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorl
d(info); | |
2809 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2810 } | |
2811 | |
2812 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2813 { | |
2814 v8::Handle<v8::Object> holder = info.Holder(); | |
2815 TestObject* proxyImpl = V8TestObject::toNative(holder); | |
2816 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings(
)); | |
2817 if (!impl) | |
2818 return; | |
2819 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
2820 impl->setHref(cppValue); | |
2821 } | |
2822 | |
2823 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) | |
2824 { | |
2825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2826 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorl
d(v8Value, info); | |
2827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2828 } | |
2829 | |
2830 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | |
2831 { | |
2832 v8::Handle<v8::Object> holder = info.Holder(); | |
2833 TestObject* impl = V8TestObject::toNative(holder); | |
2834 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result(impl->locatio
nWillBeGarbageCollected()); | |
2835 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceWillBeG
arbageCollected>(info.GetReturnValue(), result.get())) | |
2836 return; | |
2837 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate()
); | |
2838 if (!wrapper.IsEmpty()) { | |
2839 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "locationWillBeGarbageCollected"), wrapper); | |
2840 v8SetReturnValue(info, wrapper); | |
2841 } | |
2842 } | |
2843 | |
2844 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2845 { | |
2846 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2847 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetter(info); | |
2848 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2849 } | |
2850 | |
2851 static void locationWillBeGarbageCollectedAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) | |
2852 { | |
2853 v8::Handle<v8::Object> holder = info.Holder(); | |
2854 TestObject* proxyImpl = V8TestObject::toNative(holder); | |
2855 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = WTF::getPtr(p
roxyImpl->locationWillBeGarbageCollected()); | |
2856 if (!impl) | |
2857 return; | |
2858 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf
aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); | |
2859 impl->setAttr1(WTF::getPtr(cppValue)); | |
2860 } | |
2861 | |
2862 static void locationWillBeGarbageCollectedAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | |
2863 { | |
2864 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2865 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeSetter(v8Value,
info); | |
2866 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2867 } | |
2868 | |
2869 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | |
2870 { | |
2871 v8::Handle<v8::Object> holder = info.Holder(); | |
2872 TestObject* impl = V8TestObject::toNative(holder); | |
2873 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2874 int v8Value = impl->raisesExceptionLongAttribute(exceptionState); | |
2875 if (UNLIKELY(exceptionState.throwIfNeeded())) | |
2876 return; | |
2877 v8SetReturnValueInt(info, v8Value); | |
2878 } | |
2879 | |
2880 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2881 { | |
2882 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2883 TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info); | |
2884 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2885 } | |
2886 | |
2887 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | |
2888 { | |
2889 v8::Handle<v8::Object> holder = info.Holder(); | |
2890 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2891 TestObject* impl = V8TestObject::toNative(holder); | |
2892 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2893 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); | |
2894 exceptionState.throwIfNeeded(); | |
2895 } | |
2896 | |
2897 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2898 { | |
2899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2900 TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, i
nfo); | |
2901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2902 } | |
2903 | |
2904 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | |
2905 { | |
2906 v8::Handle<v8::Object> holder = info.Holder(); | |
2907 TestObject* impl = V8TestObject::toNative(holder); | |
2908 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2909 int v8Value = impl->raisesExceptionGetterLongAttribute(exceptionState); | |
2910 if (UNLIKELY(exceptionState.throwIfNeeded())) | |
2911 return; | |
2912 v8SetReturnValueInt(info, v8Value); | |
2913 } | |
2914 | |
2915 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2916 { | |
2917 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2918 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info
); | |
2919 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2920 } | |
2921 | |
2922 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2923 { | |
2924 v8::Handle<v8::Object> holder = info.Holder(); | |
2925 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nGetterLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2926 TestObject* impl = V8TestObject::toNative(holder); | |
2927 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2928 impl->setRaisesExceptionGetterLongAttribute(cppValue); | |
2929 } | |
2930 | |
2931 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | |
2932 { | |
2933 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2934 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Va
lue, info); | |
2935 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2936 } | |
2937 | |
2938 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | |
2939 { | |
2940 v8::Handle<v8::Object> holder = info.Holder(); | |
2941 TestObject* impl = V8TestObject::toNative(holder); | |
2942 v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); | |
2943 } | |
2944 | |
2945 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2946 { | |
2947 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2948 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info
); | |
2949 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2950 } | |
2951 | |
2952 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2953 { | |
2954 v8::Handle<v8::Object> holder = info.Holder(); | |
2955 ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesEx
ceptionLongAttribute", "TestObject", holder, info.GetIsolate()); | |
2956 TestObject* impl = V8TestObject::toNative(holder); | |
2957 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
2958 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); | |
2959 exceptionState.throwIfNeeded(); | |
2960 } | |
2961 | |
2962 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | |
2963 { | |
2964 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
2965 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Va
lue, info); | |
2966 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2967 } | |
2968 | |
2969 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | |
2970 { | |
2971 v8::Handle<v8::Object> holder = info.Holder(); | |
2972 TestObject* impl = V8TestObject::toNative(holder); | |
2973 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | |
2974 RefPtr<TestInterfaceEmpty> v8Value = impl->raisesExceptionTestInterfaceEmpty
Attribute(exceptionState); | |
2975 if (UNLIKELY(exceptionState.throwIfNeeded())) | |
2976 return; | |
2977 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl); | |
2978 } | |
2979 | |
2980 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
2981 { | |
2982 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
2983 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGet
ter(info); | |
2984 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
2985 } | |
2986 | |
2987 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
2988 { | |
2989 v8::Handle<v8::Object> holder = info.Holder(); | |
2990 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio
nTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); | |
2991 TestObject* impl = V8TestObject::toNative(holder); | |
2992 V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativ
eWithTypeCheck(info.GetIsolate(), v8Value)); | |
2993 impl->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), e
xceptionState); | |
2994 exceptionState.throwIfNeeded(); | |
2995 } | |
2996 | |
2997 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | |
2998 { | |
2999 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3000 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSet
ter(v8Value, info); | |
3001 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3002 } | |
3003 | |
3004 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
t v8::PropertyCallbackInfo<v8::Value>& info) | |
3005 { | |
3006 v8::Handle<v8::Object> holder = info.Holder(); | |
3007 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedAttributeRaisesExceptionGetterAnyAttribute"); | |
3008 TestObject* impl = V8TestObject::toNative(holder); | |
3009 if (!impl->isValueDirty()) { | |
3010 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | |
3011 if (!v8Value.IsEmpty()) { | |
3012 v8SetReturnValue(info, v8Value); | |
3013 return; | |
3014 } | |
3015 } | |
3016 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | |
3017 ScriptValue v8Value = impl->cachedAttributeRaisesExceptionGetterAnyAttribute
(exceptionState); | |
3018 if (UNLIKELY(exceptionState.throwIfNeeded())) | |
3019 return; | |
3020 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue.v8Value()); | |
3021 v8SetReturnValue(info, v8Value.v8Value()); | |
3022 } | |
3023 | |
3024 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb
ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3025 { | |
3026 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3027 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteGetter(info); | |
3028 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3029 } | |
3030 | |
3031 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3032 { | |
3033 v8::Handle<v8::Object> holder = info.Holder(); | |
3034 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttribut
eRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); | |
3035 TestObject* impl = V8TestObject::toNative(holder); | |
3036 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate(
))); | |
3037 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptio
nState); | |
3038 exceptionState.throwIfNeeded(); | |
3039 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute")); // Inval
idate the cached value. | |
3040 } | |
3041 | |
3042 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb
ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb
ackInfo<void>& info) | |
3043 { | |
3044 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3045 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib
uteSetter(v8Value, info); | |
3046 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3047 } | |
3048 | |
3049 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | |
3050 { | |
3051 v8::Handle<v8::Object> holder = info.Holder(); | |
3052 TestObject* impl = V8TestObject::toNative(holder); | |
3053 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lecttestinterfaceattributeAttr)), impl); | |
3054 } | |
3055 | |
3056 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3057 { | |
3058 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3059 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); | |
3060 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3061 } | |
3062 | |
3063 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | |
3064 { | |
3065 v8::Handle<v8::Object> holder = info.Holder(); | |
3066 TestObject* impl = V8TestObject::toNative(holder); | |
3067 V8TRYCATCH_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toN
ativeWithTypeCheck(info.GetIsolate(), v8Value)); | |
3068 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3069 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr
(cppValue)); | |
3070 } | |
3071 | |
3072 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | |
3073 { | |
3074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3075 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3076 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8Value,
info); | |
3077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3078 } | |
3079 | |
3080 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::
PropertyCallbackInfo<v8::Value>& info) | |
3081 { | |
3082 v8::Handle<v8::Object> holder = info.Holder(); | |
3083 TestObject* impl = V8TestObject::toNative(holder); | |
3084 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref
lectedNameAttributeAttr)), impl); | |
3085 } | |
3086 | |
3087 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8
::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3088 { | |
3089 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3090 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGet
ter(info); | |
3091 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3092 } | |
3093 | |
3094 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3095 { | |
3096 v8::Handle<v8::Object> holder = info.Holder(); | |
3097 TestObject* impl = V8TestObject::toNative(holder); | |
3098 V8TRYCATCH_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toN
ativeWithTypeCheck(info.GetIsolate(), v8Value)); | |
3099 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3100 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppVal
ue)); | |
3101 } | |
3102 | |
3103 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8
::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | |
3104 { | |
3105 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3106 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3107 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSet
ter(v8Value, info); | |
3108 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3109 } | |
3110 | |
3111 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | |
3112 { | |
3113 v8::Handle<v8::Object> holder = info.Holder(); | |
3114 TestObject* impl = V8TestObject::toNative(holder); | |
3115 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectbooleana
ttributeAttr)); | |
3116 } | |
3117 | |
3118 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3119 { | |
3120 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3121 TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info); | |
3122 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3123 } | |
3124 | |
3125 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
3126 { | |
3127 v8::Handle<v8::Object> holder = info.Holder(); | |
3128 TestObject* impl = V8TestObject::toNative(holder); | |
3129 V8TRYCATCH_VOID(bool, cppValue, v8Value->BooleanValue()); | |
3130 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3131 impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); | |
3132 } | |
3133 | |
3134 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3135 { | |
3136 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3137 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3138 TestObjectV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info); | |
3139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3140 } | |
3141 | |
3142 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | |
3143 { | |
3144 v8::Handle<v8::Object> holder = info.Holder(); | |
3145 TestObject* impl = V8TestObject::toNative(holder); | |
3146 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectlonga
ttributeAttr)); | |
3147 } | |
3148 | |
3149 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | |
3150 { | |
3151 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3152 TestObjectV8Internal::reflectLongAttributeAttributeGetter(info); | |
3153 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3154 } | |
3155 | |
3156 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | |
3157 { | |
3158 v8::Handle<v8::Object> holder = info.Holder(); | |
3159 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAtt
ribute", "TestObject", holder, info.GetIsolate()); | |
3160 TestObject* impl = V8TestObject::toNative(holder); | |
3161 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
3162 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3163 impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); | |
3164 } | |
3165 | |
3166 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3167 { | |
3168 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3169 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3170 TestObjectV8Internal::reflectLongAttributeAttributeSetter(v8Value, info); | |
3171 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3172 } | |
3173 | |
3174 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | |
3175 { | |
3176 v8::Handle<v8::Object> holder = info.Holder(); | |
3177 TestObject* impl = V8TestObject::toNative(holder); | |
3178 v8SetReturnValueUnsigned(info, std::max(0, impl->fastGetAttribute(HTMLNames:
:reflectunsignedshortattributeAttr))); | |
3179 } | |
3180 | |
3181 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3182 { | |
3183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3184 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info); | |
3185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3186 } | |
3187 | |
3188 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) | |
3189 { | |
3190 v8::Handle<v8::Object> holder = info.Holder(); | |
3191 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dShortAttribute", "TestObject", holder, info.GetIsolate()); | |
3192 TestObject* impl = V8TestObject::toNative(holder); | |
3193 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(v8Value, exceptionSta
te), exceptionState); | |
3194 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3195 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); | |
3196 } | |
3197 | |
3198 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) | |
3199 { | |
3200 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3201 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3202 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8Value,
info); | |
3203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3204 } | |
3205 | |
3206 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | |
3207 { | |
3208 v8::Handle<v8::Object> holder = info.Holder(); | |
3209 TestObject* impl = V8TestObject::toNative(holder); | |
3210 v8SetReturnValueUnsigned(info, std::max(0, impl->getIntegralAttribute(HTMLNa
mes::reflectunsignedlongattributeAttr))); | |
3211 } | |
3212 | |
3213 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3214 { | |
3215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3216 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info); | |
3217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3218 } | |
3219 | |
3220 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V
alue, const v8::PropertyCallbackInfo<void>& info) | |
3221 { | |
3222 v8::Handle<v8::Object> holder = info.Holder(); | |
3223 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne
dLongAttribute", "TestObject", holder, info.GetIsolate()); | |
3224 TestObject* impl = V8TestObject::toNative(holder); | |
3225 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(v8Value, exceptionSta
te), exceptionState); | |
3226 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3227 impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAt
tr, cppValue); | |
3228 } | |
3229 | |
3230 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::St
ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3231 { | |
3232 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3233 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3234 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Value, i
nfo); | |
3235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3236 } | |
3237 | |
3238 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
3239 { | |
3240 v8::Handle<v8::Object> holder = info.Holder(); | |
3241 TestObject* impl = V8TestObject::toNative(holder); | |
3242 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); | |
3243 } | |
3244 | |
3245 static void idAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyC
allbackInfo<v8::Value>& info) | |
3246 { | |
3247 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3248 TestObjectV8Internal::idAttributeGetter(info); | |
3249 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3250 } | |
3251 | |
3252 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCa
llbackInfo<void>& info) | |
3253 { | |
3254 v8::Handle<v8::Object> holder = info.Holder(); | |
3255 TestObject* impl = V8TestObject::toNative(holder); | |
3256 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
3257 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3258 impl->setAttribute(HTMLNames::idAttr, cppValue); | |
3259 } | |
3260 | |
3261 static void idAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3262 { | |
3263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3264 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3265 TestObjectV8Internal::idAttributeSetter(v8Value, info); | |
3266 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3267 } | |
3268 | |
3269 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | |
3270 { | |
3271 v8::Handle<v8::Object> holder = info.Holder(); | |
3272 TestObject* impl = V8TestObject::toNative(holder); | |
3273 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); | |
3274 } | |
3275 | |
3276 static void nameAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | |
3277 { | |
3278 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3279 TestObjectV8Internal::nameAttributeGetter(info); | |
3280 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3281 } | |
3282 | |
3283 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property
CallbackInfo<void>& info) | |
3284 { | |
3285 v8::Handle<v8::Object> holder = info.Holder(); | |
3286 TestObject* impl = V8TestObject::toNative(holder); | |
3287 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
3288 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3289 impl->setAttribute(HTMLNames::nameAttr, cppValue); | |
3290 } | |
3291 | |
3292 static void nameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3293 { | |
3294 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3295 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3296 TestObjectV8Internal::nameAttributeSetter(v8Value, info); | |
3297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3298 } | |
3299 | |
3300 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) | |
3301 { | |
3302 v8::Handle<v8::Object> holder = info.Holder(); | |
3303 TestObject* impl = V8TestObject::toNative(holder); | |
3304 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); | |
3305 } | |
3306 | |
3307 static void classAttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) | |
3308 { | |
3309 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3310 TestObjectV8Internal::classAttributeGetter(info); | |
3311 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3312 } | |
3313 | |
3314 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) | |
3315 { | |
3316 v8::Handle<v8::Object> holder = info.Holder(); | |
3317 TestObject* impl = V8TestObject::toNative(holder); | |
3318 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
3319 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3320 impl->setAttribute(HTMLNames::classAttr, cppValue); | |
3321 } | |
3322 | |
3323 static void classAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3324 { | |
3325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3326 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3327 TestObjectV8Internal::classAttributeSetter(v8Value, info); | |
3328 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3329 } | |
3330 | |
3331 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | |
3332 { | |
3333 v8::Handle<v8::Object> holder = info.Holder(); | |
3334 TestObject* impl = V8TestObject::toNative(holder); | |
3335 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); | |
3336 } | |
3337 | |
3338 static void reflectedIdAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | |
3339 { | |
3340 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3341 TestObjectV8Internal::reflectedIdAttributeGetter(info); | |
3342 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3343 } | |
3344 | |
3345 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) | |
3346 { | |
3347 v8::Handle<v8::Object> holder = info.Holder(); | |
3348 TestObject* impl = V8TestObject::toNative(holder); | |
3349 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
3350 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3351 impl->setAttribute(HTMLNames::idAttr, cppValue); | |
3352 } | |
3353 | |
3354 static void reflectedIdAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3355 { | |
3356 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3357 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3358 TestObjectV8Internal::reflectedIdAttributeSetter(v8Value, info); | |
3359 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3360 } | |
3361 | |
3362 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | |
3363 { | |
3364 v8::Handle<v8::Object> holder = info.Holder(); | |
3365 TestObject* impl = V8TestObject::toNative(holder); | |
3366 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); | |
3367 } | |
3368 | |
3369 static void reflectedNameAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | |
3370 { | |
3371 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3372 TestObjectV8Internal::reflectedNameAttributeGetter(info); | |
3373 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3374 } | |
3375 | |
3376 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8:
:PropertyCallbackInfo<void>& info) | |
3377 { | |
3378 v8::Handle<v8::Object> holder = info.Holder(); | |
3379 TestObject* impl = V8TestObject::toNative(holder); | |
3380 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
3381 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3382 impl->setAttribute(HTMLNames::nameAttr, cppValue); | |
3383 } | |
3384 | |
3385 static void reflectedNameAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3386 { | |
3387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3388 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3389 TestObjectV8Internal::reflectedNameAttributeSetter(v8Value, info); | |
3390 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3391 } | |
3392 | |
3393 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | |
3394 { | |
3395 v8::Handle<v8::Object> holder = info.Holder(); | |
3396 TestObject* impl = V8TestObject::toNative(holder); | |
3397 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); | |
3398 } | |
3399 | |
3400 static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | |
3401 { | |
3402 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3403 TestObjectV8Internal::reflectedClassAttributeGetter(info); | |
3404 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3405 } | |
3406 | |
3407 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | |
3408 { | |
3409 v8::Handle<v8::Object> holder = info.Holder(); | |
3410 TestObject* impl = V8TestObject::toNative(holder); | |
3411 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
3412 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3413 impl->setAttribute(HTMLNames::classAttr, cppValue); | |
3414 } | |
3415 | |
3416 static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3417 { | |
3418 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3419 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
3420 TestObjectV8Internal::reflectedClassAttributeSetter(v8Value, info); | |
3421 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1145 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3422 } | 1146 } |
3423 | 1147 |
3424 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 1148 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
3425 { | 1149 { |
3426 v8::Handle<v8::Object> holder = info.Holder(); | 1150 v8::Handle<v8::Object> holder = info.Holder(); |
3427 TestObject* impl = V8TestObject::toNative(holder); | 1151 TestObject* impl = V8TestObject::toNative(holder); |
3428 String v8Value = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattribute
Attr); | 1152 String v8Value = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattribute
Attr); |
3429 if (v8Value.isEmpty()) { | 1153 if (v8Value.isEmpty()) { |
3430 ; | 1154 ; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3500 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1224 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3501 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1225 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
3502 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, info); | 1226 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, info); |
3503 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1227 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3504 } | 1228 } |
3505 | 1229 |
3506 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1230 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
3507 { | 1231 { |
3508 v8::Handle<v8::Object> holder = info.Holder(); | 1232 v8::Handle<v8::Object> holder = info.Holder(); |
3509 TestObject* impl = V8TestObject::toNative(holder); | 1233 TestObject* impl = V8TestObject::toNative(holder); |
3510 String v8Value = impl->fastGetAttribute(HTMLNames::otherAttr); | 1234 String v8Value = impl->fastGetAttribute(HTMLNames::OtherAttr); |
3511 if (v8Value.isEmpty()) { | 1235 if (v8Value.isEmpty()) { |
3512 ; | 1236 ; |
3513 } else if (equalIgnoringCase(v8Value, "Value1")) { | 1237 } else if (equalIgnoringCase(v8Value, "Value1")) { |
3514 v8Value = "Value1"; | 1238 v8Value = "Value1"; |
3515 } else if (equalIgnoringCase(v8Value, "Value2")) { | 1239 } else if (equalIgnoringCase(v8Value, "Value2")) { |
3516 v8Value = "Value2"; | 1240 v8Value = "Value2"; |
3517 } else { | 1241 } else { |
3518 v8Value = ""; | 1242 v8Value = ""; |
3519 } | 1243 } |
3520 v8SetReturnValueString(info, v8Value, info.GetIsolate()); | 1244 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
3521 } | 1245 } |
3522 | 1246 |
3523 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1247 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
3524 { | 1248 { |
3525 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3526 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); | 1250 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); |
3527 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3528 } | 1252 } |
3529 | 1253 |
3530 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 1254 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
3531 { | 1255 { |
3532 v8::Handle<v8::Object> holder = info.Holder(); | 1256 v8::Handle<v8::Object> holder = info.Holder(); |
3533 TestObject* impl = V8TestObject::toNative(holder); | 1257 TestObject* impl = V8TestObject::toNative(holder); |
3534 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | 1258 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
3535 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1259 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
3536 impl->setAttribute(HTMLNames::otherAttr, cppValue); | 1260 impl->setAttribute(HTMLNames::OtherAttr, cppValue); |
3537 } | 1261 } |
3538 | 1262 |
3539 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1263 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3540 { | 1264 { |
3541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1265 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3542 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1266 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
3543 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Value, in
fo); | 1267 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Value, in
fo); |
3544 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1268 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3545 } | 1269 } |
3546 | 1270 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3621 } | 1345 } |
3622 | 1346 |
3623 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) | 1347 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) |
3624 { | 1348 { |
3625 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1349 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3626 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1350 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
3627 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(v8Value, info); | 1351 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(v8Value, info); |
3628 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3629 } | 1353 } |
3630 | 1354 |
| 1355 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 1356 { |
| 1357 v8::Handle<v8::Object> holder = info.Holder(); |
| 1358 TestObject* impl = V8TestObject::toNative(holder); |
| 1359 String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithinvalidandmiss
ingdefaultattributeAttr); |
| 1360 if (v8Value.isEmpty()) { |
| 1361 v8Value = "left"; |
| 1362 } else if (equalIgnoringCase(v8Value, "left")) { |
| 1363 v8Value = "left"; |
| 1364 } else if (equalIgnoringCase(v8Value, "right")) { |
| 1365 v8Value = "right"; |
| 1366 } else { |
| 1367 v8Value = "left"; |
| 1368 } |
| 1369 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
| 1370 } |
| 1371 |
| 1372 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1373 { |
| 1374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1375 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeG
etter(info); |
| 1376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1377 } |
| 1378 |
| 1379 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1380 { |
| 1381 v8::Handle<v8::Object> holder = info.Holder(); |
| 1382 TestObject* impl = V8TestObject::toNative(holder); |
| 1383 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 1384 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 1385 impl->setAttribute(HTMLNames::limitedwithinvalidandmissingdefaultattributeAt
tr, cppValue); |
| 1386 } |
| 1387 |
| 1388 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
| 1389 { |
| 1390 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1391 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 1392 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeS
etter(v8Value, info); |
| 1393 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1394 } |
| 1395 |
3631 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1396 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
3632 { | 1397 { |
3633 v8::Handle<v8::Object> holder = info.Holder(); | 1398 v8::Handle<v8::Object> holder = info.Holder(); |
3634 TestObject* impl = V8TestObject::toNative(holder); | 1399 TestObject* impl = V8TestObject::toNative(holder); |
3635 String v8Value = impl->fastGetAttribute(HTMLNames::corssettingattributeAttr)
; | 1400 String v8Value = impl->fastGetAttribute(HTMLNames::corssettingattributeAttr)
; |
3636 if (v8Value.isNull()) { | 1401 if (v8Value.isNull()) { |
3637 ; | 1402 ; |
3638 } else if (v8Value.isEmpty()) { | 1403 } else if (v8Value.isEmpty()) { |
3639 v8Value = "anonymous"; | 1404 v8Value = "anonymous"; |
3640 } else if (equalIgnoringCase(v8Value, "anonymous")) { | 1405 } else if (equalIgnoringCase(v8Value, "anonymous")) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3677 v8SetReturnValueString(info, v8Value, info.GetIsolate()); | 1442 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
3678 } | 1443 } |
3679 | 1444 |
3680 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1445 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
3681 { | 1446 { |
3682 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1447 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3683 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); | 1448 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); |
3684 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1449 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3685 } | 1450 } |
3686 | 1451 |
3687 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 1452 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
3688 { | 1453 { |
3689 v8::Handle<v8::Object> holder = info.Holder(); | 1454 v8::Handle<v8::Object> holder = info.Holder(); |
3690 TestObject* impl = V8TestObject::toNative(holder); | 1455 TestObject* impl = V8TestObject::toNative(holder); |
3691 v8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute()); | 1456 v8SetReturnValueFast(info, WTF::getPtr(impl->typedArrayAttr()), impl); |
3692 } | 1457 } |
3693 | 1458 |
3694 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1459 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
3695 { | 1460 { |
3696 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1461 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3697 TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info); | 1462 TestObjectV8Internal::typedArrayAttrAttributeGetter(info); |
3698 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1463 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3699 } | 1464 } |
3700 | 1465 |
3701 static void locationReplaceableAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1466 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
3702 { | 1467 { |
3703 v8::Handle<v8::Object> holder = info.Holder(); | 1468 v8::Handle<v8::Object> holder = info.Holder(); |
3704 TestObject* impl = V8TestObject::toNative(holder); | 1469 TestObject* impl = V8TestObject::toNative(holder); |
3705 v8SetReturnValueFast(info, WTF::getPtr(impl->locationReplaceable()), impl); | 1470 V8TRYCATCH_VOID(Float32Array*, cppValue, v8Value->IsFloat32Array() ? V8Float
32Array::toNative(v8::Handle<v8::Float32Array>::Cast(v8Value)) : 0); |
3706 } | 1471 impl->setTypedArrayAttr(WTF::getPtr(cppValue)); |
3707 | 1472 } |
3708 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 1473 |
3709 { | 1474 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3710 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1475 { |
3711 TestObjectV8Internal::locationReplaceableAttributeGetter(info); | 1476 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3712 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1477 TestObjectV8Internal::typedArrayAttrAttributeSetter(v8Value, info); |
3713 } | 1478 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3714 | 1479 } |
3715 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) | 1480 |
| 1481 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 1482 { |
| 1483 v8::Handle<v8::Object> holder = info.Holder(); |
| 1484 TestObject* impl = V8TestObject::toNative(holder); |
| 1485 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestObject", holder, info.GetIsolate()); |
| 1486 int v8Value = impl->attrWithGetterException(exceptionState); |
| 1487 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 1488 return; |
| 1489 v8SetReturnValueInt(info, v8Value); |
| 1490 } |
| 1491 |
| 1492 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1493 { |
| 1494 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1495 TestObjectV8Internal::attrWithGetterExceptionAttributeGetter(info); |
| 1496 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1497 } |
| 1498 |
| 1499 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 1500 { |
| 1501 v8::Handle<v8::Object> holder = info.Holder(); |
| 1502 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestObject", holder, info.GetIsolate()); |
| 1503 TestObject* impl = V8TestObject::toNative(holder); |
| 1504 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 1505 impl->setAttrWithGetterException(cppValue); |
| 1506 } |
| 1507 |
| 1508 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1509 { |
| 1510 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1511 TestObjectV8Internal::attrWithGetterExceptionAttributeSetter(v8Value, info); |
| 1512 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1513 } |
| 1514 |
| 1515 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 1516 { |
| 1517 v8::Handle<v8::Object> holder = info.Holder(); |
| 1518 TestObject* impl = V8TestObject::toNative(holder); |
| 1519 v8SetReturnValueInt(info, impl->attrWithSetterException()); |
| 1520 } |
| 1521 |
| 1522 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1523 { |
| 1524 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1525 TestObjectV8Internal::attrWithSetterExceptionAttributeGetter(info); |
| 1526 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1527 } |
| 1528 |
| 1529 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 1530 { |
| 1531 v8::Handle<v8::Object> holder = info.Holder(); |
| 1532 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestObject", holder, info.GetIsolate()); |
| 1533 TestObject* impl = V8TestObject::toNative(holder); |
| 1534 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 1535 impl->setAttrWithSetterException(cppValue, exceptionState); |
| 1536 exceptionState.throwIfNeeded(); |
| 1537 } |
| 1538 |
| 1539 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1540 { |
| 1541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1542 TestObjectV8Internal::attrWithSetterExceptionAttributeSetter(v8Value, info); |
| 1543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1544 } |
| 1545 |
| 1546 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 1547 { |
| 1548 v8::Handle<v8::Object> holder = info.Holder(); |
| 1549 TestObject* impl = V8TestObject::toNative(holder); |
| 1550 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestObject", holder, info.GetIsolate()); |
| 1551 String v8Value = impl->stringAttrWithGetterException(exceptionState); |
| 1552 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 1553 return; |
| 1554 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
| 1555 } |
| 1556 |
| 1557 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1558 { |
| 1559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1560 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); |
| 1561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1562 } |
| 1563 |
| 1564 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 1565 { |
| 1566 v8::Handle<v8::Object> holder = info.Holder(); |
| 1567 TestObject* impl = V8TestObject::toNative(holder); |
| 1568 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 1569 impl->setStringAttrWithGetterException(cppValue); |
| 1570 } |
| 1571 |
| 1572 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 1573 { |
| 1574 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1575 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeSetter(v8Value,
info); |
| 1576 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1577 } |
| 1578 |
| 1579 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 1580 { |
| 1581 v8::Handle<v8::Object> holder = info.Holder(); |
| 1582 TestObject* impl = V8TestObject::toNative(holder); |
| 1583 v8SetReturnValueString(info, impl->stringAttrWithSetterException(), info.Get
Isolate()); |
| 1584 } |
| 1585 |
| 1586 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1587 { |
| 1588 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1589 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); |
| 1590 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1591 } |
| 1592 |
| 1593 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 1594 { |
| 1595 v8::Handle<v8::Object> holder = info.Holder(); |
| 1596 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestObject", holder, info.GetIsolate()); |
| 1597 TestObject* impl = V8TestObject::toNative(holder); |
| 1598 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
| 1599 impl->setStringAttrWithSetterException(cppValue, exceptionState); |
| 1600 exceptionState.throwIfNeeded(); |
| 1601 } |
| 1602 |
| 1603 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 1604 { |
| 1605 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1606 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeSetter(v8Value,
info); |
| 1607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1608 } |
| 1609 |
| 1610 static void customAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 1611 { |
| 1612 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1613 V8TestObject::customAttrAttributeGetterCustom(info); |
| 1614 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1615 } |
| 1616 |
| 1617 static void customAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1618 { |
| 1619 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1620 V8TestObject::customAttrAttributeSetterCustom(v8Value, info); |
| 1621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1622 } |
| 1623 |
| 1624 static void withExecutionContextAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 1625 { |
| 1626 v8::Handle<v8::Object> holder = info.Holder(); |
| 1627 TestObject* impl = V8TestObject::toNative(holder); |
| 1628 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
| 1629 v8SetReturnValueFast(info, WTF::getPtr(impl->withExecutionContextAttribute(s
criptContext)), impl); |
| 1630 } |
| 1631 |
| 1632 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1633 { |
| 1634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1635 TestObjectV8Internal::withExecutionContextAttributeAttributeGetter(info); |
| 1636 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1637 } |
| 1638 |
| 1639 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 1640 { |
| 1641 v8::Handle<v8::Object> holder = info.Holder(); |
| 1642 TestObject* impl = V8TestObject::toNative(holder); |
| 1643 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
| 1644 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
| 1645 impl->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue))
; |
| 1646 } |
| 1647 |
| 1648 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 1649 { |
| 1650 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1651 TestObjectV8Internal::withExecutionContextAttributeAttributeSetter(v8Value,
info); |
| 1652 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1653 } |
| 1654 |
| 1655 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 1656 { |
| 1657 v8::Handle<v8::Object> holder = info.Holder(); |
| 1658 TestObject* impl = V8TestObject::toNative(holder); |
| 1659 v8SetReturnValueFast(info, WTF::getPtr(impl->withActiveWindowAndFirstWindowA
ttribute()), impl); |
| 1660 } |
| 1661 |
| 1662 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1663 { |
| 1664 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1665 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter
(info); |
| 1666 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1667 } |
| 1668 |
| 1669 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1670 { |
| 1671 v8::Handle<v8::Object> holder = info.Holder(); |
| 1672 TestObject* impl = V8TestObject::toNative(holder); |
| 1673 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
| 1674 impl->setWithActiveWindowAndFirstWindowAttribute(callingDOMWindow(info.GetIs
olate()), enteredDOMWindow(info.GetIsolate()), WTF::getPtr(cppValue)); |
| 1675 } |
| 1676 |
| 1677 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v
oid>& info) |
| 1678 { |
| 1679 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1680 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter
(v8Value, info); |
| 1681 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1682 } |
| 1683 |
| 1684 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 1685 { |
| 1686 v8::Handle<v8::Object> holder = info.Holder(); |
| 1687 TestObject* impl = V8TestObject::toNative(holder); |
| 1688 ExceptionState exceptionState(ExceptionState::GetterContext, "withScriptStat
eAttributeRaises", "TestObject", holder, info.GetIsolate()); |
| 1689 RefPtr<TestObject> v8Value = impl->withScriptStateAttributeRaises(exceptionS
tate); |
| 1690 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 1691 return; |
| 1692 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl); |
| 1693 } |
| 1694 |
| 1695 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1696 { |
| 1697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1698 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeGetter(info); |
| 1699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1700 } |
| 1701 |
| 1702 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1703 { |
| 1704 v8::Handle<v8::Object> holder = info.Holder(); |
| 1705 TestObject* impl = V8TestObject::toNative(holder); |
| 1706 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
| 1707 impl->setWithScriptStateAttributeRaises(WTF::getPtr(cppValue)); |
| 1708 } |
| 1709 |
| 1710 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 1711 { |
| 1712 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1713 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeSetter(v8Value,
info); |
| 1714 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1715 } |
| 1716 |
| 1717 static void enforcedRangeByteAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1718 { |
| 1719 v8::Handle<v8::Object> holder = info.Holder(); |
| 1720 TestObject* impl = V8TestObject::toNative(holder); |
| 1721 v8SetReturnValueInt(info, impl->enforcedRangeByteAttr()); |
| 1722 } |
| 1723 |
| 1724 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1725 { |
| 1726 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1727 TestObjectV8Internal::enforcedRangeByteAttrAttributeGetter(info); |
| 1728 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1729 } |
| 1730 |
| 1731 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1732 { |
| 1733 v8::Handle<v8::Object> holder = info.Holder(); |
| 1734 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeB
yteAttr", "TestObject", holder, info.GetIsolate()); |
| 1735 TestObject* impl = V8TestObject::toNative(holder); |
| 1736 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(v8Value, EnforceRange, excep
tionState), exceptionState); |
| 1737 impl->setEnforcedRangeByteAttr(cppValue); |
| 1738 } |
| 1739 |
| 1740 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1741 { |
| 1742 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1743 TestObjectV8Internal::enforcedRangeByteAttrAttributeSetter(v8Value, info); |
| 1744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1745 } |
| 1746 |
| 1747 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 1748 { |
| 1749 v8::Handle<v8::Object> holder = info.Holder(); |
| 1750 TestObject* impl = V8TestObject::toNative(holder); |
| 1751 v8SetReturnValueUnsigned(info, impl->enforcedRangeOctetAttr()); |
| 1752 } |
| 1753 |
| 1754 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1755 { |
| 1756 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1757 TestObjectV8Internal::enforcedRangeOctetAttrAttributeGetter(info); |
| 1758 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1759 } |
| 1760 |
| 1761 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 1762 { |
| 1763 v8::Handle<v8::Object> holder = info.Holder(); |
| 1764 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeO
ctetAttr", "TestObject", holder, info.GetIsolate()); |
| 1765 TestObject* impl = V8TestObject::toNative(holder); |
| 1766 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(v8Value, EnforceRange,
exceptionState), exceptionState); |
| 1767 impl->setEnforcedRangeOctetAttr(cppValue); |
| 1768 } |
| 1769 |
| 1770 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1771 { |
| 1772 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1773 TestObjectV8Internal::enforcedRangeOctetAttrAttributeSetter(v8Value, info); |
| 1774 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1775 } |
| 1776 |
| 1777 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 1778 { |
| 1779 v8::Handle<v8::Object> holder = info.Holder(); |
| 1780 TestObject* impl = V8TestObject::toNative(holder); |
| 1781 v8SetReturnValueInt(info, impl->enforcedRangeShortAttr()); |
| 1782 } |
| 1783 |
| 1784 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1785 { |
| 1786 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1787 TestObjectV8Internal::enforcedRangeShortAttrAttributeGetter(info); |
| 1788 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1789 } |
| 1790 |
| 1791 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 1792 { |
| 1793 v8::Handle<v8::Object> holder = info.Holder(); |
| 1794 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeS
hortAttr", "TestObject", holder, info.GetIsolate()); |
| 1795 TestObject* impl = V8TestObject::toNative(holder); |
| 1796 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(v8Value, EnforceRange, exce
ptionState), exceptionState); |
| 1797 impl->setEnforcedRangeShortAttr(cppValue); |
| 1798 } |
| 1799 |
| 1800 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1801 { |
| 1802 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1803 TestObjectV8Internal::enforcedRangeShortAttrAttributeSetter(v8Value, info); |
| 1804 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1805 } |
| 1806 |
| 1807 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 1808 { |
| 1809 v8::Handle<v8::Object> holder = info.Holder(); |
| 1810 TestObject* impl = V8TestObject::toNative(holder); |
| 1811 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedShortAttr()); |
| 1812 } |
| 1813 |
| 1814 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1815 { |
| 1816 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1817 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info); |
| 1818 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1819 } |
| 1820 |
| 1821 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1822 { |
| 1823 v8::Handle<v8::Object> holder = info.Holder(); |
| 1824 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedShortAttr", "TestObject", holder, info.GetIsolate()); |
| 1825 TestObject* impl = V8TestObject::toNative(holder); |
| 1826 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(v8Value, EnforceRange
, exceptionState), exceptionState); |
| 1827 impl->setEnforcedRangeUnsignedShortAttr(cppValue); |
| 1828 } |
| 1829 |
| 1830 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
| 1831 { |
| 1832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1833 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(v8Value,
info); |
| 1834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1835 } |
| 1836 |
| 1837 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 1838 { |
| 1839 v8::Handle<v8::Object> holder = info.Holder(); |
| 1840 TestObject* impl = V8TestObject::toNative(holder); |
| 1841 v8SetReturnValueInt(info, impl->enforcedRangeLongAttr()); |
| 1842 } |
| 1843 |
| 1844 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1845 { |
| 1846 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1847 TestObjectV8Internal::enforcedRangeLongAttrAttributeGetter(info); |
| 1848 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1849 } |
| 1850 |
| 1851 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 1852 { |
| 1853 v8::Handle<v8::Object> holder = info.Holder(); |
| 1854 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongAttr", "TestObject", holder, info.GetIsolate()); |
| 1855 TestObject* impl = V8TestObject::toNative(holder); |
| 1856 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, EnforceRange, exce
ptionState), exceptionState); |
| 1857 impl->setEnforcedRangeLongAttr(cppValue); |
| 1858 } |
| 1859 |
| 1860 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1861 { |
| 1862 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1863 TestObjectV8Internal::enforcedRangeLongAttrAttributeSetter(v8Value, info); |
| 1864 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1865 } |
| 1866 |
| 1867 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 1868 { |
| 1869 v8::Handle<v8::Object> holder = info.Holder(); |
| 1870 TestObject* impl = V8TestObject::toNative(holder); |
| 1871 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedLongAttr()); |
| 1872 } |
| 1873 |
| 1874 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1875 { |
| 1876 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1877 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info); |
| 1878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1879 } |
| 1880 |
| 1881 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 1882 { |
| 1883 v8::Handle<v8::Object> holder = info.Holder(); |
| 1884 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongAttr", "TestObject", holder, info.GetIsolate()); |
| 1885 TestObject* impl = V8TestObject::toNative(holder); |
| 1886 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(v8Value, EnforceRange
, exceptionState), exceptionState); |
| 1887 impl->setEnforcedRangeUnsignedLongAttr(cppValue); |
| 1888 } |
| 1889 |
| 1890 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 1891 { |
| 1892 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1893 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(v8Value,
info); |
| 1894 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1895 } |
| 1896 |
| 1897 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 1898 { |
| 1899 v8::Handle<v8::Object> holder = info.Holder(); |
| 1900 TestObject* impl = V8TestObject::toNative(holder); |
| 1901 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeLongLongAttr()
)); |
| 1902 } |
| 1903 |
| 1904 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1905 { |
| 1906 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1907 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeGetter(info); |
| 1908 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1909 } |
| 1910 |
| 1911 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 1912 { |
| 1913 v8::Handle<v8::Object> holder = info.Holder(); |
| 1914 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongLongAttr", "TestObject", holder, info.GetIsolate()); |
| 1915 TestObject* impl = V8TestObject::toNative(holder); |
| 1916 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(v8Value, EnforceRange
, exceptionState), exceptionState); |
| 1917 impl->setEnforcedRangeLongLongAttr(cppValue); |
| 1918 } |
| 1919 |
| 1920 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1921 { |
| 1922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1923 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeSetter(v8Value, info
); |
| 1924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1925 } |
| 1926 |
| 1927 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) |
| 1928 { |
| 1929 v8::Handle<v8::Object> holder = info.Holder(); |
| 1930 TestObject* impl = V8TestObject::toNative(holder); |
| 1931 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeUnsignedLongLo
ngAttr())); |
| 1932 } |
| 1933 |
| 1934 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v
8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1935 { |
| 1936 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1937 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info)
; |
| 1938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1939 } |
| 1940 |
| 1941 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1942 { |
| 1943 v8::Handle<v8::Object> holder = info.Holder(); |
| 1944 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongLongAttr", "TestObject", holder, info.GetIsolate()); |
| 1945 TestObject* impl = V8TestObject::toNative(holder); |
| 1946 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(v8Value, En
forceRange, exceptionState), exceptionState); |
| 1947 impl->setEnforcedRangeUnsignedLongLongAttr(cppValue); |
| 1948 } |
| 1949 |
| 1950 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v
8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 1951 { |
| 1952 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1953 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(v8Val
ue, info); |
| 1954 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1955 } |
| 1956 |
| 1957 #if ENABLE(Condition1) |
| 1958 static void conditionalAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 1959 { |
| 1960 v8::Handle<v8::Object> holder = info.Holder(); |
| 1961 TestObject* impl = V8TestObject::toNative(holder); |
| 1962 v8SetReturnValueInt(info, impl->conditionalAttr1()); |
| 1963 } |
| 1964 #endif // ENABLE(Condition1) |
| 1965 |
| 1966 #if ENABLE(Condition1) |
| 1967 static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 1968 { |
| 1969 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1970 TestObjectV8Internal::conditionalAttr1AttributeGetter(info); |
| 1971 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1972 } |
| 1973 #endif // ENABLE(Condition1) |
| 1974 |
| 1975 #if ENABLE(Condition1) |
| 1976 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 1977 { |
| 1978 v8::Handle<v8::Object> holder = info.Holder(); |
| 1979 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r1", "TestObject", holder, info.GetIsolate()); |
| 1980 TestObject* impl = V8TestObject::toNative(holder); |
| 1981 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 1982 impl->setConditionalAttr1(cppValue); |
| 1983 } |
| 1984 #endif // ENABLE(Condition1) |
| 1985 |
| 1986 #if ENABLE(Condition1) |
| 1987 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 1988 { |
| 1989 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1990 TestObjectV8Internal::conditionalAttr1AttributeSetter(v8Value, info); |
| 1991 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1992 } |
| 1993 #endif // ENABLE(Condition1) |
| 1994 |
| 1995 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 1996 static void conditionalAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 1997 { |
| 1998 v8::Handle<v8::Object> holder = info.Holder(); |
| 1999 TestObject* impl = V8TestObject::toNative(holder); |
| 2000 v8SetReturnValueInt(info, impl->conditionalAttr2()); |
| 2001 } |
| 2002 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 2003 |
| 2004 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 2005 static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2006 { |
| 2007 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2008 TestObjectV8Internal::conditionalAttr2AttributeGetter(info); |
| 2009 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2010 } |
| 2011 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 2012 |
| 2013 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 2014 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 2015 { |
| 2016 v8::Handle<v8::Object> holder = info.Holder(); |
| 2017 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r2", "TestObject", holder, info.GetIsolate()); |
| 2018 TestObject* impl = V8TestObject::toNative(holder); |
| 2019 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2020 impl->setConditionalAttr2(cppValue); |
| 2021 } |
| 2022 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 2023 |
| 2024 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 2025 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2026 { |
| 2027 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2028 TestObjectV8Internal::conditionalAttr2AttributeSetter(v8Value, info); |
| 2029 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2030 } |
| 2031 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 2032 |
| 2033 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
| 2034 static void conditionalAttr3AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 2035 { |
| 2036 v8::Handle<v8::Object> holder = info.Holder(); |
| 2037 TestObject* impl = V8TestObject::toNative(holder); |
| 2038 v8SetReturnValueInt(info, impl->conditionalAttr3()); |
| 2039 } |
| 2040 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
| 2041 |
| 2042 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
| 2043 static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2044 { |
| 2045 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2046 TestObjectV8Internal::conditionalAttr3AttributeGetter(info); |
| 2047 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2048 } |
| 2049 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
| 2050 |
| 2051 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
| 2052 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 2053 { |
| 2054 v8::Handle<v8::Object> holder = info.Holder(); |
| 2055 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r3", "TestObject", holder, info.GetIsolate()); |
| 2056 TestObject* impl = V8TestObject::toNative(holder); |
| 2057 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2058 impl->setConditionalAttr3(cppValue); |
| 2059 } |
| 2060 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
| 2061 |
| 2062 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
| 2063 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2064 { |
| 2065 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2066 TestObjectV8Internal::conditionalAttr3AttributeSetter(v8Value, info); |
| 2067 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2068 } |
| 2069 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
| 2070 |
| 2071 static void cachedAttribute1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 2072 { |
| 2073 v8::Handle<v8::Object> holder = info.Holder(); |
| 2074 TestObject* impl = V8TestObject::toNative(holder); |
| 2075 v8SetReturnValue(info, impl->cachedAttribute1().v8Value()); |
| 2076 } |
| 2077 |
| 2078 static void cachedAttribute1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2079 { |
| 2080 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2081 TestObjectV8Internal::cachedAttribute1AttributeGetter(info); |
| 2082 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2083 } |
| 2084 |
| 2085 static void cachedAttribute2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 2086 { |
| 2087 v8::Handle<v8::Object> holder = info.Holder(); |
| 2088 TestObject* impl = V8TestObject::toNative(holder); |
| 2089 v8SetReturnValue(info, impl->cachedAttribute2().v8Value()); |
| 2090 } |
| 2091 |
| 2092 static void cachedAttribute2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2093 { |
| 2094 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2095 TestObjectV8Internal::cachedAttribute2AttributeGetter(info); |
| 2096 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2097 } |
| 2098 |
| 2099 static void cachedDirtyableAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
| 2100 { |
| 2101 v8::Handle<v8::Object> holder = info.Holder(); |
| 2102 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttribute"); |
| 2103 TestObject* impl = V8TestObject::toNative(holder); |
| 2104 if (!impl->isValueDirty()) { |
| 2105 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); |
| 2106 if (!v8Value.IsEmpty()) { |
| 2107 v8SetReturnValue(info, v8Value); |
| 2108 return; |
| 2109 } |
| 2110 } |
| 2111 ScriptValue v8Value = impl->cachedDirtyableAttribute(); |
| 2112 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue.v8Value()); |
| 2113 v8SetReturnValue(info, v8Value.v8Value()); |
| 2114 } |
| 2115 |
| 2116 static void cachedDirtyableAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2117 { |
| 2118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2119 TestObjectV8Internal::cachedDirtyableAttributeAttributeGetter(info); |
| 2120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2121 } |
| 2122 |
| 2123 static void cachedDirtyableAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
| 2124 { |
| 2125 v8::Handle<v8::Object> holder = info.Holder(); |
| 2126 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttributeRaises"); |
| 2127 TestObject* impl = V8TestObject::toNative(holder); |
| 2128 if (!impl->isValueDirty()) { |
| 2129 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); |
| 2130 if (!v8Value.IsEmpty()) { |
| 2131 v8SetReturnValue(info, v8Value); |
| 2132 return; |
| 2133 } |
| 2134 } |
| 2135 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedDirtyabl
eAttributeRaises", "TestObject", holder, info.GetIsolate()); |
| 2136 ScriptValue v8Value = impl->cachedDirtyableAttributeRaises(exceptionState); |
| 2137 if (UNLIKELY(exceptionState.throwIfNeeded())) |
| 2138 return; |
| 2139 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue.v8Value()); |
| 2140 v8SetReturnValue(info, v8Value.v8Value()); |
| 2141 } |
| 2142 |
| 2143 static void cachedDirtyableAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2144 { |
| 2145 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2146 TestObjectV8Internal::cachedDirtyableAttributeRaisesAttributeGetter(info); |
| 2147 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2148 } |
| 2149 |
| 2150 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
| 2151 { |
| 2152 v8::Handle<v8::Object> holder = info.Holder(); |
| 2153 TestObject* impl = V8TestObject::toNative(holder); |
| 2154 v8SetReturnValue(info, impl->anyAttribute().v8Value()); |
| 2155 } |
| 2156 |
| 2157 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 2158 { |
| 2159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2160 TestObjectV8Internal::anyAttributeAttributeGetter(info); |
| 2161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2162 } |
| 2163 |
| 2164 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
| 2165 { |
| 2166 v8::Handle<v8::Object> holder = info.Holder(); |
| 2167 TestObject* impl = V8TestObject::toNative(holder); |
| 2168 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate(
))); |
| 2169 impl->setAnyAttribute(cppValue); |
| 2170 } |
| 2171 |
| 2172 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2173 { |
| 2174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2175 TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info); |
| 2176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2177 } |
| 2178 |
| 2179 static void callbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 2180 { |
| 2181 v8::Handle<v8::Object> holder = info.Holder(); |
| 2182 TestObject* impl = V8TestObject::toNative(holder); |
| 2183 v8SetReturnValue(info, impl->callbackFunctionAttribute().v8Value()); |
| 2184 } |
| 2185 |
| 2186 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2187 { |
| 2188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2189 TestObjectV8Internal::callbackFunctionAttributeAttributeGetter(info); |
| 2190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2191 } |
| 2192 |
| 2193 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 2194 { |
| 2195 v8::Handle<v8::Object> holder = info.Holder(); |
| 2196 TestObject* impl = V8TestObject::toNative(holder); |
| 2197 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate(
))); |
| 2198 impl->setCallbackFunctionAttribute(cppValue); |
| 2199 } |
| 2200 |
| 2201 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2202 { |
| 2203 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2204 TestObjectV8Internal::callbackFunctionAttributeAttributeSetter(v8Value, info
); |
| 2205 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2206 } |
| 2207 |
| 2208 static void enabledAtRuntimeAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 2209 { |
| 2210 v8::Handle<v8::Object> holder = info.Holder(); |
| 2211 TestObject* impl = V8TestObject::toNative(holder); |
| 2212 v8SetReturnValueInt(info, impl->enabledAtRuntimeAttr()); |
| 2213 } |
| 2214 |
| 2215 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2216 { |
| 2217 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2218 TestObjectV8Internal::enabledAtRuntimeAttrAttributeGetter(info); |
| 2219 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2220 } |
| 2221 |
| 2222 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 2223 { |
| 2224 v8::Handle<v8::Object> holder = info.Holder(); |
| 2225 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRunti
meAttr", "TestObject", holder, info.GetIsolate()); |
| 2226 TestObject* impl = V8TestObject::toNative(holder); |
| 2227 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2228 impl->setEnabledAtRuntimeAttr(cppValue); |
| 2229 } |
| 2230 |
| 2231 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2232 { |
| 2233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2234 TestObjectV8Internal::enabledAtRuntimeAttrAttributeSetter(v8Value, info); |
| 2235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2236 } |
| 2237 |
| 2238 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 2239 { |
| 2240 v8::Handle<v8::Object> holder = info.Holder(); |
| 2241 TestObject* impl = V8TestObject::toNative(holder); |
| 2242 v8SetReturnValueInt(info, impl->enabledPerContextAttr()); |
| 2243 } |
| 2244 |
| 2245 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2246 { |
| 2247 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2248 TestObjectV8Internal::enabledPerContextAttrAttributeGetter(info); |
| 2249 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2250 } |
| 2251 |
| 2252 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 2253 { |
| 2254 v8::Handle<v8::Object> holder = info.Holder(); |
| 2255 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerCont
extAttr", "TestObject", holder, info.GetIsolate()); |
| 2256 TestObject* impl = V8TestObject::toNative(holder); |
| 2257 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2258 impl->setEnabledPerContextAttr(cppValue); |
| 2259 } |
| 2260 |
| 2261 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2262 { |
| 2263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2264 TestObjectV8Internal::enabledPerContextAttrAttributeSetter(v8Value, info); |
| 2265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2266 } |
| 2267 |
| 2268 static void floatArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
| 2269 { |
| 2270 v8::Handle<v8::Object> holder = info.Holder(); |
| 2271 TestObject* impl = V8TestObject::toNative(holder); |
| 2272 v8SetReturnValue(info, v8Array(impl->floatArray(), info.GetIsolate())); |
| 2273 } |
| 2274 |
| 2275 static void floatArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 2276 { |
| 2277 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2278 TestObjectV8Internal::floatArrayAttributeGetter(info); |
| 2279 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2280 } |
| 2281 |
| 2282 static void floatArrayAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr
opertyCallbackInfo<void>& info) |
| 2283 { |
| 2284 v8::Handle<v8::Object> holder = info.Holder(); |
| 2285 TestObject* impl = V8TestObject::toNative(holder); |
| 2286 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(v8Value, 0, in
fo.GetIsolate())); |
| 2287 impl->setFloatArray(cppValue); |
| 2288 } |
| 2289 |
| 2290 static void floatArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2291 { |
| 2292 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2293 TestObjectV8Internal::floatArrayAttributeSetter(v8Value, info); |
| 2294 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2295 } |
| 2296 |
| 2297 static void doubleArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
| 2298 { |
| 2299 v8::Handle<v8::Object> holder = info.Holder(); |
| 2300 TestObject* impl = V8TestObject::toNative(holder); |
| 2301 v8SetReturnValue(info, v8Array(impl->doubleArray(), info.GetIsolate())); |
| 2302 } |
| 2303 |
| 2304 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 2305 { |
| 2306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2307 TestObjectV8Internal::doubleArrayAttributeGetter(info); |
| 2308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2309 } |
| 2310 |
| 2311 static void doubleArrayAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
| 2312 { |
| 2313 v8::Handle<v8::Object> holder = info.Holder(); |
| 2314 TestObject* impl = V8TestObject::toNative(holder); |
| 2315 V8TRYCATCH_VOID(Vector<double>, cppValue, toNativeArray<double>(v8Value, 0,
info.GetIsolate())); |
| 2316 impl->setDoubleArray(cppValue); |
| 2317 } |
| 2318 |
| 2319 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2320 { |
| 2321 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2322 TestObjectV8Internal::doubleArrayAttributeSetter(v8Value, info); |
| 2323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2324 } |
| 2325 |
| 2326 static void messagePortArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 2327 { |
| 2328 v8::Handle<v8::Object> holder = info.Holder(); |
| 2329 TestObject* impl = V8TestObject::toNative(holder); |
| 2330 v8SetReturnValue(info, v8Array(impl->messagePortArray(), info.GetIsolate()))
; |
| 2331 } |
| 2332 |
| 2333 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2334 { |
| 2335 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2336 TestObjectV8Internal::messagePortArrayAttributeGetter(info); |
| 2337 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2338 } |
| 2339 |
| 2340 static void messagePortArrayAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 2341 { |
| 2342 v8::Handle<v8::Object> holder = info.Holder(); |
| 2343 TestObject* impl = V8TestObject::toNative(holder); |
| 2344 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, cppValue, (toRefPtrNativeArray
<MessagePort, V8MessagePort>(v8Value, 0, info.GetIsolate()))); |
| 2345 impl->setMessagePortArray(cppValue); |
| 2346 } |
| 2347 |
| 2348 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2349 { |
| 2350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2351 TestObjectV8Internal::messagePortArrayAttributeSetter(v8Value, info); |
| 2352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2353 } |
| 2354 |
| 2355 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 2356 { |
| 2357 v8::Handle<v8::Object> holder = info.Holder(); |
| 2358 TestObject* impl = V8TestObject::toNative(holder); |
| 2359 ExceptionState exceptionState(ExceptionState::GetterContext, "contentDocumen
t", "TestObject", holder, info.GetIsolate()); |
| 2360 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->conte
ntDocument(), exceptionState)) { |
| 2361 v8SetReturnValueNull(info); |
| 2362 exceptionState.throwIfNeeded(); |
| 2363 return; |
| 2364 } |
| 2365 v8SetReturnValueFast(info, WTF::getPtr(impl->contentDocument()), impl); |
| 2366 } |
| 2367 |
| 2368 static void contentDocumentAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2369 { |
| 2370 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2371 TestObjectV8Internal::contentDocumentAttributeGetter(info); |
| 2372 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2373 } |
| 2374 |
| 2375 static void strawberryAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
| 2376 { |
| 2377 v8::Handle<v8::Object> holder = info.Holder(); |
| 2378 TestObject* impl = V8TestObject::toNative(holder); |
| 2379 v8SetReturnValueInt(info, impl->blueberry()); |
| 2380 } |
| 2381 |
| 2382 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 2383 { |
| 2384 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2385 TestObjectV8Internal::strawberryAttributeGetter(info); |
| 2386 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2387 } |
| 2388 |
| 2389 static void strawberryAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr
opertyCallbackInfo<void>& info) |
| 2390 { |
| 2391 v8::Handle<v8::Object> holder = info.Holder(); |
| 2392 ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", "
TestObject", holder, info.GetIsolate()); |
| 2393 TestObject* impl = V8TestObject::toNative(holder); |
| 2394 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2395 impl->setBlueberry(cppValue); |
| 2396 } |
| 2397 |
| 2398 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2399 { |
| 2400 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2401 TestObjectV8Internal::strawberryAttributeSetter(v8Value, info); |
| 2402 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2403 } |
| 2404 |
| 2405 static void strictFloatAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
| 2406 { |
| 2407 v8::Handle<v8::Object> holder = info.Holder(); |
| 2408 TestObject* impl = V8TestObject::toNative(holder); |
| 2409 v8SetReturnValue(info, impl->strictFloat()); |
| 2410 } |
| 2411 |
| 2412 static void strictFloatAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 2413 { |
| 2414 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2415 TestObjectV8Internal::strictFloatAttributeGetter(info); |
| 2416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2417 } |
| 2418 |
| 2419 static void strictFloatAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
| 2420 { |
| 2421 v8::Handle<v8::Object> holder = info.Holder(); |
| 2422 TestObject* impl = V8TestObject::toNative(holder); |
| 2423 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue()))
; |
| 2424 impl->setStrictFloat(cppValue); |
| 2425 } |
| 2426 |
| 2427 static void strictFloatAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2428 { |
| 2429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2430 TestObjectV8Internal::strictFloatAttributeSetter(v8Value, info); |
| 2431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2432 } |
| 2433 |
| 2434 static void replaceableAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 2435 { |
| 2436 v8::Handle<v8::Object> holder = info.Holder(); |
| 2437 TestObject* impl = V8TestObject::toNative(holder); |
| 2438 v8SetReturnValueInt(info, impl->replaceableAttribute()); |
| 2439 } |
| 2440 |
| 2441 static void replaceableAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2442 { |
| 2443 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2444 TestObjectV8Internal::replaceableAttributeAttributeGetter(info); |
| 2445 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2446 } |
| 2447 |
| 2448 static void nullableDoubleAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 2449 { |
| 2450 v8::Handle<v8::Object> holder = info.Holder(); |
| 2451 TestObject* impl = V8TestObject::toNative(holder); |
| 2452 bool isNull = false; |
| 2453 double v8Value = impl->nullableDoubleAttribute(isNull); |
| 2454 if (isNull) { |
| 2455 v8SetReturnValueNull(info); |
| 2456 return; |
| 2457 } |
| 2458 v8SetReturnValue(info, v8Value); |
| 2459 } |
| 2460 |
| 2461 static void nullableDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2462 { |
| 2463 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2464 TestObjectV8Internal::nullableDoubleAttributeAttributeGetter(info); |
| 2465 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2466 } |
| 2467 |
| 2468 static void nullableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 2469 { |
| 2470 v8::Handle<v8::Object> holder = info.Holder(); |
| 2471 TestObject* impl = V8TestObject::toNative(holder); |
| 2472 bool isNull = false; |
| 2473 int v8Value = impl->nullableLongAttribute(isNull); |
| 2474 if (isNull) { |
| 2475 v8SetReturnValueNull(info); |
| 2476 return; |
| 2477 } |
| 2478 v8SetReturnValueInt(info, v8Value); |
| 2479 } |
| 2480 |
| 2481 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2482 { |
| 2483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2484 TestObjectV8Internal::nullableLongAttributeAttributeGetter(info); |
| 2485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2486 } |
| 2487 |
| 2488 static void nullableBooleanAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
| 2489 { |
| 2490 v8::Handle<v8::Object> holder = info.Holder(); |
| 2491 TestObject* impl = V8TestObject::toNative(holder); |
| 2492 bool isNull = false; |
| 2493 bool v8Value = impl->nullableBooleanAttribute(isNull); |
| 2494 if (isNull) { |
| 2495 v8SetReturnValueNull(info); |
| 2496 return; |
| 2497 } |
| 2498 v8SetReturnValueBool(info, v8Value); |
| 2499 } |
| 2500 |
| 2501 static void nullableBooleanAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2502 { |
| 2503 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2504 TestObjectV8Internal::nullableBooleanAttributeAttributeGetter(info); |
| 2505 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2506 } |
| 2507 |
| 2508 static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 2509 { |
| 2510 v8::Handle<v8::Object> holder = info.Holder(); |
| 2511 TestObject* impl = V8TestObject::toNative(holder); |
| 2512 bool isNull = false; |
| 2513 String v8Value = impl->nullableStringAttribute(isNull); |
| 2514 if (isNull) { |
| 2515 v8SetReturnValueNull(info); |
| 2516 return; |
| 2517 } |
| 2518 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
| 2519 } |
| 2520 |
| 2521 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2522 { |
| 2523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2524 TestObjectV8Internal::nullableStringAttributeAttributeGetter(info); |
| 2525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2526 } |
| 2527 |
| 2528 static void nullableLongSettableAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 2529 { |
| 2530 v8::Handle<v8::Object> holder = info.Holder(); |
| 2531 TestObject* impl = V8TestObject::toNative(holder); |
| 2532 bool isNull = false; |
| 2533 int v8Value = impl->nullableLongSettableAttribute(isNull); |
| 2534 if (isNull) { |
| 2535 v8SetReturnValueNull(info); |
| 2536 return; |
| 2537 } |
| 2538 v8SetReturnValueInt(info, v8Value); |
| 2539 } |
| 2540 |
| 2541 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2542 { |
| 2543 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2544 TestObjectV8Internal::nullableLongSettableAttributeAttributeGetter(info); |
| 2545 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2546 } |
| 2547 |
| 2548 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 2549 { |
| 2550 v8::Handle<v8::Object> holder = info.Holder(); |
| 2551 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSe
ttableAttribute", "TestObject", holder, info.GetIsolate()); |
| 2552 TestObject* impl = V8TestObject::toNative(holder); |
| 2553 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2554 impl->setNullableLongSettableAttribute(cppValue); |
| 2555 } |
| 2556 |
| 2557 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 2558 { |
| 2559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2560 TestObjectV8Internal::nullableLongSettableAttributeAttributeSetter(v8Value,
info); |
| 2561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2562 } |
| 2563 |
| 2564 static void perWorldReadOnlyAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 2565 { |
| 2566 v8::Handle<v8::Object> holder = info.Holder(); |
| 2567 TestObject* impl = V8TestObject::toNative(holder); |
| 2568 RefPtr<TestObject> result(impl->perWorldReadOnlyAttribute()); |
| 2569 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) |
| 2570 return; |
| 2571 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate()
); |
| 2572 if (!wrapper.IsEmpty()) { |
| 2573 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldReadOnlyAttribute"), wrapper); |
| 2574 v8SetReturnValue(info, wrapper); |
| 2575 } |
| 2576 } |
| 2577 |
| 2578 static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2579 { |
| 2580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2581 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetter(info); |
| 2582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2583 } |
| 2584 |
| 2585 static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 2586 { |
| 2587 v8::Handle<v8::Object> holder = info.Holder(); |
| 2588 TestObject* impl = V8TestObject::toNative(holder); |
| 2589 RefPtr<TestObject> result(impl->perWorldReadOnlyAttribute()); |
| 2590 if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObje
ct>(info.GetReturnValue(), result.get())) |
| 2591 return; |
| 2592 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate()
); |
| 2593 if (!wrapper.IsEmpty()) { |
| 2594 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(
info.GetIsolate(), "perWorldReadOnlyAttribute"), wrapper); |
| 2595 v8SetReturnValue(info, wrapper); |
| 2596 } |
| 2597 } |
| 2598 |
| 2599 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2600 { |
| 2601 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2602 TestObjectV8Internal::perWorldReadOnlyAttributeAttributeGetterForMainWorld(i
nfo); |
| 2603 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2604 } |
| 2605 |
| 2606 static void perWorldAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
| 2607 { |
| 2608 v8::Handle<v8::Object> holder = info.Holder(); |
| 2609 TestObject* impl = V8TestObject::toNative(holder); |
| 2610 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldAttribute()), impl); |
| 2611 } |
| 2612 |
| 2613 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
| 2614 { |
| 2615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2616 TestObjectV8Internal::perWorldAttributeAttributeGetter(info); |
| 2617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2618 } |
| 2619 |
| 2620 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
| 2621 { |
| 2622 v8::Handle<v8::Object> holder = info.Holder(); |
| 2623 TestObject* impl = V8TestObject::toNative(holder); |
| 2624 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
| 2625 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); |
| 2626 } |
| 2627 |
| 2628 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2629 { |
| 2630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2631 TestObjectV8Internal::perWorldAttributeAttributeSetter(v8Value, info); |
| 2632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2633 } |
| 2634 |
| 2635 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
| 2636 { |
| 2637 v8::Handle<v8::Object> holder = info.Holder(); |
| 2638 TestObject* impl = V8TestObject::toNative(holder); |
| 2639 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldAttribute())); |
| 2640 } |
| 2641 |
| 2642 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2643 { |
| 2644 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2645 TestObjectV8Internal::perWorldAttributeAttributeGetterForMainWorld(info); |
| 2646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2647 } |
| 2648 |
| 2649 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
| 2650 { |
| 2651 v8::Handle<v8::Object> holder = info.Holder(); |
| 2652 TestObject* impl = V8TestObject::toNative(holder); |
| 2653 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
| 2654 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); |
| 2655 } |
| 2656 |
| 2657 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
| 2658 { |
| 2659 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2660 TestObjectV8Internal::perWorldAttributeAttributeSetterForMainWorld(v8Value,
info); |
| 2661 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2662 } |
| 2663 |
| 2664 static void activityLoggedAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 2665 { |
| 2666 v8::Handle<v8::Object> holder = info.Holder(); |
| 2667 TestObject* impl = V8TestObject::toNative(holder); |
| 2668 v8SetReturnValueInt(info, impl->activityLoggedAttr1()); |
| 2669 } |
| 2670 |
| 2671 static void activityLoggedAttr1AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2672 { |
| 2673 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2674 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2675 if (contextData && contextData->activityLogger()) |
| 2676 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); |
| 2677 TestObjectV8Internal::activityLoggedAttr1AttributeGetter(info); |
| 2678 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2679 } |
| 2680 |
| 2681 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 2682 { |
| 2683 v8::Handle<v8::Object> holder = info.Holder(); |
| 2684 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr1", "TestObject", holder, info.GetIsolate()); |
| 2685 TestObject* impl = V8TestObject::toNative(holder); |
| 2686 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2687 impl->setActivityLoggedAttr1(cppValue); |
| 2688 } |
| 2689 |
| 2690 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2691 { |
| 2692 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2693 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2694 if (contextData && contextData->activityLogger()) { |
| 2695 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
| 2696 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); |
| 2697 } |
| 2698 TestObjectV8Internal::activityLoggedAttr1AttributeSetter(v8Value, info); |
| 2699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2700 } |
| 2701 |
| 2702 static void activityLoggedAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 2703 { |
| 2704 v8::Handle<v8::Object> holder = info.Holder(); |
| 2705 TestObject* impl = V8TestObject::toNative(holder); |
| 2706 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); |
| 2707 } |
| 2708 |
| 2709 static void activityLoggedAttr2AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 2710 { |
| 2711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2712 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2713 if (contextData && contextData->activityLogger()) |
| 2714 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
| 2715 TestObjectV8Internal::activityLoggedAttr2AttributeGetter(info); |
| 2716 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2717 } |
| 2718 |
| 2719 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
| 2720 { |
| 2721 v8::Handle<v8::Object> holder = info.Holder(); |
| 2722 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", holder, info.GetIsolate()); |
| 2723 TestObject* impl = V8TestObject::toNative(holder); |
| 2724 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2725 impl->setActivityLoggedAttr2(cppValue); |
| 2726 } |
| 2727 |
| 2728 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2729 { |
| 2730 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2731 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2732 if (contextData && contextData->activityLogger()) { |
| 2733 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
| 2734 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
| 2735 } |
| 2736 TestObjectV8Internal::activityLoggedAttr2AttributeSetter(v8Value, info); |
| 2737 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2738 } |
| 2739 |
| 2740 static void activityLoggedAttr2AttributeGetterForMainWorld(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 2741 { |
| 2742 v8::Handle<v8::Object> holder = info.Holder(); |
| 2743 TestObject* impl = V8TestObject::toNative(holder); |
| 2744 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); |
| 2745 } |
| 2746 |
| 2747 static void activityLoggedAttr2AttributeGetterCallbackForMainWorld(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2748 { |
| 2749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2750 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2751 if (contextData && contextData->activityLogger()) |
| 2752 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
| 2753 TestObjectV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info); |
| 2754 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2755 } |
| 2756 |
| 2757 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2758 { |
| 2759 v8::Handle<v8::Object> holder = info.Holder(); |
| 2760 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", holder, info.GetIsolate()); |
| 2761 TestObject* impl = V8TestObject::toNative(holder); |
| 2762 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2763 impl->setActivityLoggedAttr2(cppValue); |
| 2764 } |
| 2765 |
| 2766 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
| 2767 { |
| 2768 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2769 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2770 if (contextData && contextData->activityLogger()) { |
| 2771 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
| 2772 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
| 2773 } |
| 2774 TestObjectV8Internal::activityLoggedAttr2AttributeSetterForMainWorld(v8Value
, info); |
| 2775 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2776 } |
| 2777 |
| 2778 static void activityLoggedInIsolatedWorldsAttrAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
| 2779 { |
| 2780 v8::Handle<v8::Object> holder = info.Holder(); |
| 2781 TestObject* impl = V8TestObject::toNative(holder); |
| 2782 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); |
| 2783 } |
| 2784 |
| 2785 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2786 { |
| 2787 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2788 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2789 if (contextData && contextData->activityLogger()) |
| 2790 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); |
| 2791 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info
); |
| 2792 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2793 } |
| 2794 |
| 2795 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2796 { |
| 2797 v8::Handle<v8::Object> holder = info.Holder(); |
| 2798 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", holder, info.GetIsolate()); |
| 2799 TestObject* impl = V8TestObject::toNative(holder); |
| 2800 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2801 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); |
| 2802 } |
| 2803 |
| 2804 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 2805 { |
| 2806 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2807 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2808 if (contextData && contextData->activityLogger()) { |
| 2809 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
| 2810 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); |
| 2811 } |
| 2812 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetter(v8Va
lue, info); |
| 2813 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2814 } |
| 2815 |
| 2816 static void activityLoggedInIsolatedWorldsAttrAttributeGetterForMainWorld(const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 2817 { |
| 2818 v8::Handle<v8::Object> holder = info.Holder(); |
| 2819 TestObject* impl = V8TestObject::toNative(holder); |
| 2820 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); |
| 2821 } |
| 2822 |
| 2823 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl
d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2824 { |
| 2825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2826 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMa
inWorld(info); |
| 2827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2828 } |
| 2829 |
| 2830 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2831 { |
| 2832 v8::Handle<v8::Object> holder = info.Holder(); |
| 2833 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", holder, info.GetIsolate()); |
| 2834 TestObject* impl = V8TestObject::toNative(holder); |
| 2835 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2836 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); |
| 2837 } |
| 2838 |
| 2839 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl
d(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) |
| 2840 { |
| 2841 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2842 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMa
inWorld(v8Value, info); |
| 2843 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2844 } |
| 2845 |
| 2846 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 2847 { |
| 2848 v8::Handle<v8::Object> holder = info.Holder(); |
| 2849 TestObject* impl = V8TestObject::toNative(holder); |
| 2850 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter1()); |
| 2851 } |
| 2852 |
| 2853 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2854 { |
| 2855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2856 TestObjectV8Internal::activityLoggedAttrSetter1AttributeGetter(info); |
| 2857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2858 } |
| 2859 |
| 2860 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 2861 { |
| 2862 v8::Handle<v8::Object> holder = info.Holder(); |
| 2863 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter1", "TestObject", holder, info.GetIsolate()); |
| 2864 TestObject* impl = V8TestObject::toNative(holder); |
| 2865 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2866 impl->setActivityLoggedAttrSetter1(cppValue); |
| 2867 } |
| 2868 |
| 2869 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2870 { |
| 2871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2872 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2873 if (contextData && contextData->activityLogger()) { |
| 2874 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
| 2875 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); |
| 2876 } |
| 2877 TestObjectV8Internal::activityLoggedAttrSetter1AttributeSetter(v8Value, info
); |
| 2878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2879 } |
| 2880 |
| 2881 static void activityLoggedAttrSetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 2882 { |
| 2883 v8::Handle<v8::Object> holder = info.Holder(); |
| 2884 TestObject* impl = V8TestObject::toNative(holder); |
| 2885 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); |
| 2886 } |
| 2887 |
| 2888 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2889 { |
| 2890 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2891 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetter(info); |
| 2892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2893 } |
| 2894 |
| 2895 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 2896 { |
| 2897 v8::Handle<v8::Object> holder = info.Holder(); |
| 2898 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", holder, info.GetIsolate()); |
| 2899 TestObject* impl = V8TestObject::toNative(holder); |
| 2900 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2901 impl->setActivityLoggedAttrSetter2(cppValue); |
| 2902 } |
| 2903 |
| 2904 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2905 { |
| 2906 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2907 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2908 if (contextData && contextData->activityLogger()) { |
| 2909 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
| 2910 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
| 2911 } |
| 2912 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetter(v8Value, info
); |
| 2913 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2914 } |
| 2915 |
| 2916 static void activityLoggedAttrSetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 2917 { |
| 2918 v8::Handle<v8::Object> holder = info.Holder(); |
| 2919 TestObject* impl = V8TestObject::toNative(holder); |
| 2920 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); |
| 2921 } |
| 2922 |
| 2923 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2924 { |
| 2925 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2926 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(i
nfo); |
| 2927 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2928 } |
| 2929 |
| 2930 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2931 { |
| 2932 v8::Handle<v8::Object> holder = info.Holder(); |
| 2933 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", holder, info.GetIsolate()); |
| 2934 TestObject* impl = V8TestObject::toNative(holder); |
| 2935 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2936 impl->setActivityLoggedAttrSetter2(cppValue); |
| 2937 } |
| 2938 |
| 2939 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) |
| 2940 { |
| 2941 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2942 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2943 if (contextData && contextData->activityLogger()) { |
| 2944 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
| 2945 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
| 2946 } |
| 2947 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetterForMainWorld(v
8Value, info); |
| 2948 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2949 } |
| 2950 |
| 2951 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 2952 { |
| 2953 v8::Handle<v8::Object> holder = info.Holder(); |
| 2954 TestObject* impl = V8TestObject::toNative(holder); |
| 2955 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); |
| 2956 } |
| 2957 |
| 2958 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2959 { |
| 2960 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2961 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
r(info); |
| 2962 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2963 } |
| 2964 |
| 2965 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 2966 { |
| 2967 v8::Handle<v8::Object> holder = info.Holder(); |
| 2968 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", holder, info.GetIsolate()); |
| 2969 TestObject* impl = V8TestObject::toNative(holder); |
| 2970 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 2971 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); |
| 2972 } |
| 2973 |
| 2974 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
| 2975 { |
| 2976 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2977 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 2978 if (contextData && contextData->activityLogger()) { |
| 2979 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
| 2980 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); |
| 2981 } |
| 2982 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
r(v8Value, info); |
| 2983 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2984 } |
| 2985 |
| 2986 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2987 { |
| 2988 v8::Handle<v8::Object> holder = info.Holder(); |
| 2989 TestObject* impl = V8TestObject::toNative(holder); |
| 2990 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); |
| 2991 } |
| 2992 |
| 2993 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2994 { |
| 2995 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2996 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
rForMainWorld(info); |
| 2997 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 2998 } |
| 2999 |
| 3000 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld(
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3001 { |
| 3002 v8::Handle<v8::Object> holder = info.Holder(); |
| 3003 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", holder, info.GetIsolate()); |
| 3004 TestObject* impl = V8TestObject::toNative(holder); |
| 3005 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 3006 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); |
| 3007 } |
| 3008 |
| 3009 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyC
allbackInfo<void>& info) |
| 3010 { |
| 3011 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3012 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
rForMainWorld(v8Value, info); |
| 3013 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3014 } |
| 3015 |
| 3016 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 3017 { |
| 3018 v8::Handle<v8::Object> holder = info.Holder(); |
| 3019 TestObject* impl = V8TestObject::toNative(holder); |
| 3020 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter1()); |
| 3021 } |
| 3022 |
| 3023 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3024 { |
| 3025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3026 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 3027 if (contextData && contextData->activityLogger()) |
| 3028 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); |
| 3029 TestObjectV8Internal::activityLoggedAttrGetter1AttributeGetter(info); |
| 3030 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3031 } |
| 3032 |
| 3033 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 3034 { |
| 3035 v8::Handle<v8::Object> holder = info.Holder(); |
| 3036 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter1", "TestObject", holder, info.GetIsolate()); |
| 3037 TestObject* impl = V8TestObject::toNative(holder); |
| 3038 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 3039 impl->setActivityLoggedAttrGetter1(cppValue); |
| 3040 } |
| 3041 |
| 3042 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3043 { |
| 3044 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3045 TestObjectV8Internal::activityLoggedAttrGetter1AttributeSetter(v8Value, info
); |
| 3046 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3047 } |
| 3048 |
| 3049 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 3050 { |
| 3051 v8::Handle<v8::Object> holder = info.Holder(); |
| 3052 TestObject* impl = V8TestObject::toNative(holder); |
| 3053 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); |
| 3054 } |
| 3055 |
| 3056 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3057 { |
| 3058 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3059 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 3060 if (contextData && contextData->activityLogger()) |
| 3061 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
| 3062 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetter(info); |
| 3063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3064 } |
| 3065 |
| 3066 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
| 3067 { |
| 3068 v8::Handle<v8::Object> holder = info.Holder(); |
| 3069 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", holder, info.GetIsolate()); |
| 3070 TestObject* impl = V8TestObject::toNative(holder); |
| 3071 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 3072 impl->setActivityLoggedAttrGetter2(cppValue); |
| 3073 } |
| 3074 |
| 3075 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3076 { |
| 3077 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3078 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetter(v8Value, info
); |
| 3079 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3080 } |
| 3081 |
| 3082 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 3083 { |
| 3084 v8::Handle<v8::Object> holder = info.Holder(); |
| 3085 TestObject* impl = V8TestObject::toNative(holder); |
| 3086 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); |
| 3087 } |
| 3088 |
| 3089 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3090 { |
| 3091 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3092 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 3093 if (contextData && contextData->activityLogger()) |
| 3094 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
| 3095 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(i
nfo); |
| 3096 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3097 } |
| 3098 |
| 3099 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3100 { |
| 3101 v8::Handle<v8::Object> holder = info.Holder(); |
| 3102 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", holder, info.GetIsolate()); |
| 3103 TestObject* impl = V8TestObject::toNative(holder); |
| 3104 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 3105 impl->setActivityLoggedAttrGetter2(cppValue); |
| 3106 } |
| 3107 |
| 3108 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) |
| 3109 { |
| 3110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3111 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(v
8Value, info); |
| 3112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3113 } |
| 3114 |
| 3115 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 3116 { |
| 3117 v8::Handle<v8::Object> holder = info.Holder(); |
| 3118 TestObject* impl = V8TestObject::toNative(holder); |
| 3119 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); |
| 3120 } |
| 3121 |
| 3122 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3123 { |
| 3124 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3125 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 3126 if (contextData && contextData->activityLogger()) |
| 3127 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); |
| 3128 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
r(info); |
| 3129 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3130 } |
| 3131 |
| 3132 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3133 { |
| 3134 v8::Handle<v8::Object> holder = info.Holder(); |
| 3135 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", holder, info.GetIsolate()); |
| 3136 TestObject* impl = V8TestObject::toNative(holder); |
| 3137 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 3138 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); |
| 3139 } |
| 3140 |
| 3141 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
| 3142 { |
| 3143 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3144 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
r(v8Value, info); |
| 3145 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3146 } |
| 3147 |
| 3148 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3149 { |
| 3150 v8::Handle<v8::Object> holder = info.Holder(); |
| 3151 TestObject* impl = V8TestObject::toNative(holder); |
| 3152 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); |
| 3153 } |
| 3154 |
| 3155 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3156 { |
| 3157 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3158 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
rForMainWorld(info); |
| 3159 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3160 } |
| 3161 |
| 3162 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld(
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3163 { |
| 3164 v8::Handle<v8::Object> holder = info.Holder(); |
| 3165 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", holder, info.GetIsolate()); |
| 3166 TestObject* impl = V8TestObject::toNative(holder); |
| 3167 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 3168 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); |
| 3169 } |
| 3170 |
| 3171 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyC
allbackInfo<void>& info) |
| 3172 { |
| 3173 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3174 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
rForMainWorld(v8Value, info); |
| 3175 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3176 } |
| 3177 |
| 3178 static void deprecatedStaticReadOnlyAttrAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
| 3179 { |
| 3180 v8SetReturnValueInt(info, TestObject::deprecatedStaticReadOnlyAttr()); |
| 3181 } |
| 3182 |
| 3183 static void deprecatedStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3184 { |
| 3185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3186 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticReadonlyAttribute); |
| 3187 TestObjectV8Internal::deprecatedStaticReadOnlyAttrAttributeGetter(info); |
| 3188 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3189 } |
| 3190 |
| 3191 static void deprecatedStaticAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 3192 { |
| 3193 v8SetReturnValueInt(info, TestObject::deprecatedStaticAttr()); |
| 3194 } |
| 3195 |
| 3196 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| 3197 { |
| 3198 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3199 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); |
| 3200 TestObjectV8Internal::deprecatedStaticAttrAttributeGetter(info); |
| 3201 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3202 } |
| 3203 |
| 3204 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
| 3205 { |
| 3206 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedStat
icAttr", "TestObject", holder, info.GetIsolate()); |
| 3207 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 3208 TestObject::setDeprecatedStaticAttr(cppValue); |
| 3209 } |
| 3210 |
| 3211 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3212 { |
| 3213 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3214 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); |
| 3215 TestObjectV8Internal::deprecatedStaticAttrAttributeSetter(v8Value, info); |
| 3216 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3217 } |
| 3218 |
| 3219 static void deprecatedReadonlyAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 3220 { |
| 3221 v8::Handle<v8::Object> holder = info.Holder(); |
| 3222 TestObject* impl = V8TestObject::toNative(holder); |
| 3223 v8SetReturnValueInt(info, impl->deprecatedReadonlyAttr()); |
| 3224 } |
| 3225 |
| 3226 static void deprecatedReadonlyAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3227 { |
| 3228 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3229 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::ReadonlyAttribute); |
| 3230 TestObjectV8Internal::deprecatedReadonlyAttrAttributeGetter(info); |
| 3231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3232 } |
| 3233 |
| 3234 static void deprecatedAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 3235 { |
| 3236 v8::Handle<v8::Object> holder = info.Holder(); |
| 3237 TestObject* impl = V8TestObject::toNative(holder); |
| 3238 v8SetReturnValueInt(info, impl->deprecatedAttr()); |
| 3239 } |
| 3240 |
| 3241 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 3242 { |
| 3243 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3244 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); |
| 3245 TestObjectV8Internal::deprecatedAttrAttributeGetter(info); |
| 3246 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3247 } |
| 3248 |
| 3249 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 3250 { |
| 3251 v8::Handle<v8::Object> holder = info.Holder(); |
| 3252 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr
", "TestObject", holder, info.GetIsolate()); |
| 3253 TestObject* impl = V8TestObject::toNative(holder); |
| 3254 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
| 3255 impl->setDeprecatedAttr(cppValue); |
| 3256 } |
| 3257 |
| 3258 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 3259 { |
| 3260 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3261 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); |
| 3262 TestObjectV8Internal::deprecatedAttrAttributeSetter(v8Value, info); |
| 3263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3264 } |
| 3265 |
| 3266 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
| 3267 { |
| 3268 v8::Handle<v8::Object> holder = info.Holder(); |
| 3269 TestObject* impl = V8TestObject::toNative(holder); |
| 3270 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); |
| 3271 } |
| 3272 |
| 3273 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 3274 { |
| 3275 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3276 TestObjectV8Internal::locationAttributeGetter(info); |
| 3277 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3278 } |
| 3279 |
| 3280 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
3716 { | 3281 { |
3717 v8::Handle<v8::Object> holder = info.Holder(); | 3282 v8::Handle<v8::Object> holder = info.Holder(); |
3718 TestObject* proxyImpl = V8TestObject::toNative(holder); | 3283 TestObject* proxyImpl = V8TestObject::toNative(holder); |
3719 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationReplaceable()); | 3284 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); |
3720 if (!impl) | 3285 if (!impl) |
3721 return; | 3286 return; |
3722 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | 3287 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
3723 impl->setHref(cppValue); | 3288 impl->setHref(cppValue); |
3724 } | 3289 } |
3725 | 3290 |
3726 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3291 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3727 { | 3292 { |
3728 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3729 TestObjectV8Internal::locationReplaceableAttributeSetter(v8Value, info); | 3294 TestObjectV8Internal::locationAttributeSetter(v8Value, info); |
3730 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3731 } | 3296 } |
3732 | 3297 |
3733 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 3298 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
3734 { | 3299 { |
3735 v8::Handle<v8::Object> holder = info.Holder(); | 3300 v8::Handle<v8::Object> holder = info.Holder(); |
3736 TestObject* impl = V8TestObject::toNative(holder); | 3301 TestObject* impl = V8TestObject::toNative(holder); |
3737 v8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); | 3302 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; |
3738 } | 3303 } |
3739 | 3304 |
3740 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3305 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
3741 { | 3306 { |
3742 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3307 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3743 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info); | 3308 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); |
3744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3745 } | 3310 } |
3746 | 3311 |
3747 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 3312 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
3748 { | 3313 { |
3749 v8::Handle<v8::Object> holder = info.Holder(); | 3314 v8::Handle<v8::Object> holder = info.Holder(); |
3750 ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabled
LongAttribute", "TestObject", holder, info.GetIsolate()); | 3315 TestObject* proxyImpl = V8TestObject::toNative(holder); |
3751 TestObject* impl = V8TestObject::toNative(holder); | 3316 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException()); |
3752 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | 3317 if (!impl) |
3753 impl->setRuntimeEnabledLongAttribute(cppValue); | 3318 return; |
3754 } | |
3755 | |
3756 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3757 { | |
3758 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3759 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, in
fo); | |
3760 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3761 } | |
3762 | |
3763 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
3764 { | |
3765 v8::Handle<v8::Object> holder = info.Holder(); | |
3766 TestObject* impl = V8TestObject::toNative(holder); | |
3767 v8SetReturnValueInt(info, impl->perContextEnabledRuntimeEnabledLongAttribute
()); | |
3768 } | |
3769 | |
3770 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3771 { | |
3772 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3773 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeG
etter(info); | |
3774 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3775 } | |
3776 | |
3777 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3778 { | |
3779 v8::Handle<v8::Object> holder = info.Holder(); | |
3780 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab
ledRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | |
3781 TestObject* impl = V8TestObject::toNative(holder); | |
3782 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
3783 impl->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue); | |
3784 } | |
3785 | |
3786 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | |
3787 { | |
3788 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3789 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeS
etter(v8Value, info); | |
3790 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3791 } | |
3792 | |
3793 #if ENABLE(CONDITION) | |
3794 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::Prop
ertyCallbackInfo<v8::Value>& info) | |
3795 { | |
3796 v8::Handle<v8::Object> holder = info.Holder(); | |
3797 TestObject* impl = V8TestObject::toNative(holder); | |
3798 v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute()); | |
3799 } | |
3800 #endif // ENABLE(CONDITION) | |
3801 | |
3802 #if ENABLE(CONDITION) | |
3803 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3804 { | |
3805 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3806 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetter(
info); | |
3807 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3808 } | |
3809 #endif // ENABLE(CONDITION) | |
3810 | |
3811 #if ENABLE(CONDITION) | |
3812 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3813 { | |
3814 v8::Handle<v8::Object> holder = info.Holder(); | |
3815 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalRun
timeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); | |
3816 TestObject* impl = V8TestObject::toNative(holder); | |
3817 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
3818 impl->setConditionalRuntimeEnabledLongAttribute(cppValue); | |
3819 } | |
3820 #endif // ENABLE(CONDITION) | |
3821 | |
3822 #if ENABLE(CONDITION) | |
3823 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Lo
cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | |
3824 { | |
3825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3826 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetter(
v8Value, info); | |
3827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3828 } | |
3829 #endif // ENABLE(CONDITION) | |
3830 | |
3831 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
er(const v8::PropertyCallbackInfo<v8::Value>& info) | |
3832 { | |
3833 v8::Handle<v8::Object> holder = info.Holder(); | |
3834 TestObject* impl = V8TestObject::toNative(holder); | |
3835 v8SetReturnValueString(info, impl->setterCallWithActiveWindowAndFirstWindowS
tringAttribute(), info.GetIsolate()); | |
3836 } | |
3837 | |
3838 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett
erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf
o) | |
3839 { | |
3840 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3841 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeGetter(info); | |
3842 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3843 } | |
3844 | |
3845 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3846 { | |
3847 v8::Handle<v8::Object> holder = info.Holder(); | |
3848 TestObject* impl = V8TestObject::toNative(holder); | |
3849 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | 3319 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
3850 impl->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(callingDOMW
indow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue); | 3320 impl->setHrefThrows(cppValue); |
3851 } | 3321 } |
3852 | 3322 |
3853 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett
erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper
tyCallbackInfo<void>& info) | 3323 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3854 { | 3324 { |
3855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3856 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttribut
eAttributeSetter(v8Value, info); | 3326 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); |
3857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3858 } | |
3859 | |
3860 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v
8::PropertyCallbackInfo<v8::Value>& info) | |
3861 { | |
3862 v8::Handle<v8::Object> holder = info.Holder(); | |
3863 TestObject* impl = V8TestObject::toNative(holder); | |
3864 v8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttri
bute(), info.GetIsolate()); | |
3865 } | |
3866 | |
3867 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3868 { | |
3869 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3870 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Getter(info); | |
3871 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3872 } | |
3873 | |
3874 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3875 { | |
3876 v8::Handle<v8::Object> holder = info.Holder(); | |
3877 TestObject* impl = V8TestObject::toNative(holder); | |
3878 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
3879 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | |
3880 impl->setSetterCallWithExecutionContextStringAttribute(scriptContext, cppVal
ue); | |
3881 } | |
3882 | |
3883 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback
(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback
Info<void>& info) | |
3884 { | |
3885 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3886 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttribute
Setter(v8Value, info); | |
3887 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3888 } | |
3889 | |
3890 static void strictTypeCheckingFloatAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | |
3891 { | |
3892 v8::Handle<v8::Object> holder = info.Holder(); | |
3893 TestObject* impl = V8TestObject::toNative(holder); | |
3894 v8SetReturnValue(info, impl->strictTypeCheckingFloatAttribute()); | |
3895 } | |
3896 | |
3897 static void strictTypeCheckingFloatAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3898 { | |
3899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3900 TestObjectV8Internal::strictTypeCheckingFloatAttributeAttributeGetter(info); | |
3901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3902 } | |
3903 | |
3904 static void strictTypeCheckingFloatAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3905 { | |
3906 v8::Handle<v8::Object> holder = info.Holder(); | |
3907 TestObject* impl = V8TestObject::toNative(holder); | |
3908 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue()))
; | |
3909 impl->setStrictTypeCheckingFloatAttribute(cppValue); | |
3910 } | |
3911 | |
3912 static void strictTypeCheckingFloatAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | |
3913 { | |
3914 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3915 TestObjectV8Internal::strictTypeCheckingFloatAttributeAttributeSetter(v8Valu
e, info); | |
3916 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3917 } | |
3918 | |
3919 static void strictTypeCheckingTestInterfaceAttributeAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | |
3920 { | |
3921 v8::Handle<v8::Object> holder = info.Holder(); | |
3922 TestObject* impl = V8TestObject::toNative(holder); | |
3923 v8SetReturnValueFast(info, WTF::getPtr(impl->strictTypeCheckingTestInterface
Attribute()), impl); | |
3924 } | |
3925 | |
3926 static void strictTypeCheckingTestInterfaceAttributeAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3927 { | |
3928 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3929 TestObjectV8Internal::strictTypeCheckingTestInterfaceAttributeAttributeGette
r(info); | |
3930 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3931 } | |
3932 | |
3933 static void strictTypeCheckingTestInterfaceAttributeAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3934 { | |
3935 v8::Handle<v8::Object> holder = info.Holder(); | |
3936 ExceptionState exceptionState(ExceptionState::SetterContext, "strictTypeChec
kingTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); | |
3937 if (!isUndefinedOrNull(v8Value) && !V8TestInterface::hasInstance(v8Value, in
fo.GetIsolate())) { | |
3938 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | |
3939 exceptionState.throwIfNeeded(); | |
3940 return; | |
3941 } | |
3942 TestObject* impl = V8TestObject::toNative(holder); | |
3943 V8TRYCATCH_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toN
ativeWithTypeCheck(info.GetIsolate(), v8Value)); | |
3944 impl->setStrictTypeCheckingTestInterfaceAttribute(WTF::getPtr(cppValue)); | |
3945 } | |
3946 | |
3947 static void strictTypeCheckingTestInterfaceAttributeAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) | |
3948 { | |
3949 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3950 TestObjectV8Internal::strictTypeCheckingTestInterfaceAttributeAttributeSette
r(v8Value, info); | |
3951 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3952 } | |
3953 | |
3954 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Proper
tyCallbackInfo<v8::Value>& info) | |
3955 { | |
3956 v8::Handle<v8::Object> holder = info.Holder(); | |
3957 TestObject* impl = V8TestObject::toNative(holder); | |
3958 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), i
nfo.GetIsolate()); | |
3959 } | |
3960 | |
3961 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Loca
l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3962 { | |
3963 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3964 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(in
fo); | |
3965 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3966 } | |
3967 | |
3968 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3969 { | |
3970 v8::Handle<v8::Object> holder = info.Holder(); | |
3971 TestObject* impl = V8TestObject::toNative(holder); | |
3972 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); | |
3973 impl->setTreatNullAsNullStringStringAttribute(cppValue); | |
3974 } | |
3975 | |
3976 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Loca
l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void
>& info) | |
3977 { | |
3978 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
3979 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8
Value, info); | |
3980 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3981 } | |
3982 | |
3983 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
3984 { | |
3985 v8::Handle<v8::Object> holder = info.Holder(); | |
3986 TestObject* impl = V8TestObject::toNative(holder); | |
3987 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Attribute(), info.GetIsolate()); | |
3988 } | |
3989 | |
3990 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
3991 { | |
3992 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
3993 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeG
etter(info); | |
3994 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
3995 } | |
3996 | |
3997 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
3998 { | |
3999 v8::Handle<v8::Object> holder = info.Holder(); | |
4000 TestObject* impl = V8TestObject::toNative(holder); | |
4001 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
4002 impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue); | |
4003 } | |
4004 | |
4005 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | |
4006 { | |
4007 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4008 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeS
etter(v8Value, info); | |
4009 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4010 } | |
4011 | |
4012 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(con
st v8::PropertyCallbackInfo<v8::Value>& info) | |
4013 { | |
4014 v8::Handle<v8::Object> holder = info.Holder(); | |
4015 TestObject* impl = V8TestObject::toNative(holder); | |
4016 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringAttribute(), info.GetIsolate()); | |
4017 } | |
4018 | |
4019 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCall
back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
4020 { | |
4021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
4022 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteGetter(info); | |
4023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4024 } | |
4025 | |
4026 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4027 { | |
4028 v8::Handle<v8::Object> holder = info.Holder(); | |
4029 TestObject* impl = V8TestObject::toNative(holder); | |
4030 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
4031 impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue); | |
4032 } | |
4033 | |
4034 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCall
back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall
backInfo<void>& info) | |
4035 { | |
4036 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4037 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttri
buteSetter(v8Value, info); | |
4038 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4039 } | |
4040 | |
4041 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | |
4042 { | |
4043 v8::Handle<v8::Object> holder = info.Holder(); | |
4044 TestObject* impl = V8TestObject::toNative(holder); | |
4045 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattri
buteAttr), info.GetIsolate()); | |
4046 } | |
4047 | |
4048 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | |
4049 { | |
4050 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
4051 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); | |
4052 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4053 } | |
4054 | |
4055 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | |
4056 { | |
4057 v8::Handle<v8::Object> holder = info.Holder(); | |
4058 TestObject* impl = V8TestObject::toNative(holder); | |
4059 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
4060 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
4061 impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue); | |
4062 } | |
4063 | |
4064 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4065 { | |
4066 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4067 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
4068 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); | |
4069 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4070 } | |
4071 | |
4072 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | |
4073 { | |
4074 v8::Handle<v8::Object> holder = info.Holder(); | |
4075 TestObject* impl = V8TestObject::toNative(holder); | |
4076 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectUrlAttr
ibuteAttr), info.GetIsolate()); | |
4077 } | |
4078 | |
4079 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | |
4080 { | |
4081 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
4082 TestObjectV8Internal::urlStringAttributeAttributeGetter(info); | |
4083 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4084 } | |
4085 | |
4086 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | |
4087 { | |
4088 v8::Handle<v8::Object> holder = info.Holder(); | |
4089 TestObject* impl = V8TestObject::toNative(holder); | |
4090 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); | |
4091 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
4092 impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue); | |
4093 } | |
4094 | |
4095 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4096 { | |
4097 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4098 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
4099 TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); | |
4100 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4101 } | |
4102 | |
4103 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | |
4104 { | |
4105 v8::Handle<v8::Object> holder = V8TestObject::findInstanceInPrototypeChain(i
nfo.This(), info.GetIsolate()); | |
4106 if (holder.IsEmpty()) | |
4107 return; | |
4108 TestObject* impl = V8TestObject::toNative(holder); | |
4109 v8SetReturnValueInt(info, impl->unforgeableLongAttribute()); | |
4110 } | |
4111 | |
4112 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
4113 { | |
4114 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
4115 TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info); | |
4116 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4117 } | |
4118 | |
4119 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value
, const v8::PropertyCallbackInfo<void>& info) | |
4120 { | |
4121 v8::Handle<v8::Object> holder = info.Holder(); | |
4122 ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLon
gAttribute", "TestObject", holder, info.GetIsolate()); | |
4123 TestObject* impl = V8TestObject::toNative(holder); | |
4124 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); | |
4125 impl->setUnforgeableLongAttribute(cppValue); | |
4126 } | |
4127 | |
4128 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::String
>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4129 { | |
4130 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4131 TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info)
; | |
4132 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4133 } | |
4134 | |
4135 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | |
4136 { | |
4137 v8::Handle<v8::Object> holder = info.Holder(); | |
4138 TestObject* impl = V8TestObject::toNative(holder); | |
4139 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | |
4140 } | |
4141 | |
4142 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
4143 { | |
4144 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
4145 TestObjectV8Internal::testInterfaceAttributeAttributeGetter(info); | |
4146 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4147 } | |
4148 | |
4149 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | |
4150 { | |
4151 v8::Handle<v8::Object> holder = info.Holder(); | |
4152 TestObject* impl = V8TestObject::toNative(holder); | |
4153 V8TRYCATCH_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toN
ativeWithTypeCheck(info.GetIsolate(), v8Value)); | |
4154 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | |
4155 } | |
4156 | |
4157 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4158 { | |
4159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4160 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); | |
4161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4162 } | |
4163 | |
4164 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | |
4165 { | |
4166 v8::Handle<v8::Object> holder = info.Holder(); | |
4167 TestObject* impl = V8TestObject::toNative(holder); | |
4168 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle
ctedAttribute()), impl); | |
4169 } | |
4170 | |
4171 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
4172 { | |
4173 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
4174 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeG
etter(info); | |
4175 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4176 } | |
4177 | |
4178 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4179 { | |
4180 v8::Handle<v8::Object> holder = info.Holder(); | |
4181 TestObject* impl = V8TestObject::toNative(holder); | |
4182 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf
aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); | |
4183 impl->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue))
; | |
4184 } | |
4185 | |
4186 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | |
4187 { | |
4188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4189 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeS
etter(v8Value, info); | |
4190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4191 } | |
4192 | |
4193 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | |
4194 { | |
4195 v8::Handle<v8::Object> holder = info.Holder(); | |
4196 TestObject* impl = V8TestObject::toNative(holder); | |
4197 bool isNull = false; | |
4198 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> v8Value = impl->test
InterfaceWillBeGarbageCollectedOrNullAttribute(isNull); | |
4199 if (isNull) { | |
4200 v8SetReturnValueNull(info); | |
4201 return; | |
4202 } | |
4203 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl); | |
4204 } | |
4205 | |
4206 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
4207 { | |
4208 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
4209 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteGetter(info); | |
4210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4211 } | |
4212 | |
4213 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | |
4214 { | |
4215 v8::Handle<v8::Object> holder = info.Holder(); | |
4216 TestObject* impl = V8TestObject::toNative(holder); | |
4217 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf
aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value)); | |
4218 impl->setTestInterfaceWillBeGarbageCollectedOrNullAttribute(WTF::getPtr(cppV
alue)); | |
4219 } | |
4220 | |
4221 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | |
4222 { | |
4223 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
4224 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttr
ibuteSetter(v8Value, info); | |
4225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3327 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4226 } | 3328 } |
4227 | 3329 |
4228 static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 3330 static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) |
4229 { | 3331 { |
4230 v8::Handle<v8::Value> data = info.Data(); | 3332 v8::Handle<v8::Value> data = info.Data(); |
4231 ASSERT(data->IsExternal()); | 3333 ASSERT(data->IsExternal()); |
4232 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 3334 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
4233 if (!perContextData) | 3335 if (!perContextData) |
4234 return; | 3336 return; |
4235 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 3337 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
4236 } | 3338 } |
4237 | 3339 |
4238 static void testInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::
Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) | 3340 static void TestSubObjMeasuredConstructorGetterCallback(v8::Local<v8::String> pr
operty, const v8::PropertyCallbackInfo<v8::Value>& info) |
4239 { | 3341 { |
4240 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
4241 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::deprecatedTestInterfaceEmptyConstructorAttribute); | 3343 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
4242 TestObjectV8Internal::TestObjectConstructorGetter(property, info); | 3344 TestObjectV8Internal::TestObjectConstructorGetter(property, info); |
4243 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4244 } | 3346 } |
4245 | 3347 |
4246 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructo
rGetterCallback(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v
8::Value>& info) | 3348 static void deprecatedConstructorConstructorGetterCallback(v8::Local<v8::String>
property, const v8::PropertyCallbackInfo<v8::Value>& info) |
4247 { | 3349 { |
4248 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
4249 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Fe
atureName); | 3351 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::ConstructorAttribute); |
4250 TestObjectV8Internal::TestObjectConstructorGetter(property, info); | 3352 TestObjectV8Internal::TestObjectConstructorGetter(property, info); |
4251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4252 } | 3354 } |
4253 | 3355 |
4254 static void TestObjectReplaceableAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3356 static void TestObjectReplaceableAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
4255 { | 3357 { |
4256 info.This()->ForceSet(name, v8Value); | 3358 info.This()->ForceSet(name, v8Value); |
4257 } | 3359 } |
4258 | 3360 |
4259 static void TestObjectReplaceableAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 3361 static void TestObjectReplaceableAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
4260 { | 3362 { |
4261 TestObjectV8Internal::TestObjectReplaceableAttributeSetter(name, v8Value, in
fo); | 3363 TestObjectV8Internal::TestObjectReplaceableAttributeSetter(name, v8Value, in
fo); |
4262 } | 3364 } |
4263 | 3365 |
4264 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 3366 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
4265 { | 3367 { |
4266 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3368 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4267 impl->voidMethod(); | 3369 impl->voidMethod(); |
4268 } | 3370 } |
4269 | 3371 |
4270 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3372 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4271 { | 3373 { |
4272 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4273 TestObjectV8Internal::voidMethodMethod(info); | 3375 TestObjectV8Internal::voidMethodMethod(info); |
4274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4275 } | 3377 } |
4276 | 3378 |
4277 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 3379 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4278 { | 3380 { |
4279 TestObject::staticVoidMethod(); | 3381 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodW
ithArgs", "TestObject", info.Holder(), info.GetIsolate()); |
4280 } | 3382 if (UNLIKELY(info.Length() < 3)) { |
4281 | 3383 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); |
4282 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
4283 { | |
4284 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4285 TestObjectV8Internal::staticVoidMethodMethod(info); | |
4286 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4287 } | |
4288 | |
4289 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
4290 { | |
4291 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4292 v8SetReturnValue(info, v8DateOrNull(impl->dateMethod(), info.GetIsolate())); | |
4293 } | |
4294 | |
4295 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4296 { | |
4297 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4298 TestObjectV8Internal::dateMethodMethod(info); | |
4299 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4300 } | |
4301 | |
4302 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
4303 { | |
4304 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4305 v8SetReturnValueString(info, impl->stringMethod(), info.GetIsolate()); | |
4306 } | |
4307 | |
4308 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
4309 { | |
4310 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4311 TestObjectV8Internal::stringMethodMethod(info); | |
4312 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4313 } | |
4314 | |
4315 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
4316 { | |
4317 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4318 v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampMethod(
))); | |
4319 } | |
4320 | |
4321 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
4322 { | |
4323 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4324 TestObjectV8Internal::readonlyDOMTimeStampMethodMethod(info); | |
4325 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4326 } | |
4327 | |
4328 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
4329 { | |
4330 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4331 v8SetReturnValueBool(info, impl->booleanMethod()); | |
4332 } | |
4333 | |
4334 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
4335 { | |
4336 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4337 TestObjectV8Internal::booleanMethodMethod(info); | |
4338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4339 } | |
4340 | |
4341 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
4342 { | |
4343 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4344 v8SetReturnValueInt(info, impl->byteMethod()); | |
4345 } | |
4346 | |
4347 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4348 { | |
4349 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4350 TestObjectV8Internal::byteMethodMethod(info); | |
4351 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4352 } | |
4353 | |
4354 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
4355 { | |
4356 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4357 v8SetReturnValue(info, impl->doubleMethod()); | |
4358 } | |
4359 | |
4360 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
4361 { | |
4362 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4363 TestObjectV8Internal::doubleMethodMethod(info); | |
4364 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4365 } | |
4366 | |
4367 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
4368 { | |
4369 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4370 v8SetReturnValue(info, impl->floatMethod()); | |
4371 } | |
4372 | |
4373 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4374 { | |
4375 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4376 TestObjectV8Internal::floatMethodMethod(info); | |
4377 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4378 } | |
4379 | |
4380 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
4381 { | |
4382 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4383 v8SetReturnValueInt(info, impl->longMethod()); | |
4384 } | |
4385 | |
4386 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4387 { | |
4388 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4389 TestObjectV8Internal::longMethodMethod(info); | |
4390 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4391 } | |
4392 | |
4393 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) | |
4394 { | |
4395 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4396 v8SetReturnValue(info, static_cast<double>(impl->longLongMethod())); | |
4397 } | |
4398 | |
4399 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
4400 { | |
4401 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4402 TestObjectV8Internal::longLongMethodMethod(info); | |
4403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4404 } | |
4405 | |
4406 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
4407 { | |
4408 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4409 v8SetReturnValueUnsigned(info, impl->octetMethod()); | |
4410 } | |
4411 | |
4412 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4413 { | |
4414 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4415 TestObjectV8Internal::octetMethodMethod(info); | |
4416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4417 } | |
4418 | |
4419 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
4420 { | |
4421 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4422 v8SetReturnValueInt(info, impl->shortMethod()); | |
4423 } | |
4424 | |
4425 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4426 { | |
4427 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4428 TestObjectV8Internal::shortMethodMethod(info); | |
4429 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4430 } | |
4431 | |
4432 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4433 { | |
4434 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4435 v8SetReturnValueUnsigned(info, impl->unsignedLongMethod()); | |
4436 } | |
4437 | |
4438 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
4439 { | |
4440 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4441 TestObjectV8Internal::unsignedLongMethodMethod(info); | |
4442 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4443 } | |
4444 | |
4445 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
4446 { | |
4447 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4448 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongMethod())); | |
4449 } | |
4450 | |
4451 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
4452 { | |
4453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4454 TestObjectV8Internal::unsignedLongLongMethodMethod(info); | |
4455 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4456 } | |
4457 | |
4458 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4459 { | |
4460 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4461 v8SetReturnValueUnsigned(info, impl->unsignedShortMethod()); | |
4462 } | |
4463 | |
4464 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
4465 { | |
4466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4467 TestObjectV8Internal::unsignedShortMethodMethod(info); | |
4468 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4469 } | |
4470 | |
4471 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
4472 { | |
4473 if (UNLIKELY(info.Length() < 1)) { | |
4474 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDateArg", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | |
4475 return; | |
4476 } | |
4477 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4478 V8TRYCATCH_VOID(double, dateArg, toCoreDate(info[0])); | |
4479 impl->voidMethodDateArg(dateArg); | |
4480 } | |
4481 | |
4482 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
4483 { | |
4484 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4485 TestObjectV8Internal::voidMethodDateArgMethod(info); | |
4486 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4487 } | |
4488 | |
4489 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4490 { | |
4491 if (UNLIKELY(info.Length() < 1)) { | |
4492 throwTypeError(ExceptionMessages::failedToExecute("voidMethodStringArg",
"TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Ge
tIsolate()); | |
4493 return; | |
4494 } | |
4495 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4496 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; | |
4497 impl->voidMethodStringArg(stringArg); | |
4498 } | |
4499 | |
4500 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
4501 { | |
4502 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4503 TestObjectV8Internal::voidMethodStringArgMethod(info); | |
4504 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4505 } | |
4506 | |
4507 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
4508 { | |
4509 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
OMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate()); | |
4510 if (UNLIKELY(info.Length() < 1)) { | |
4511 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
4512 exceptionState.throwIfNeeded(); | |
4513 return; | |
4514 } | |
4515 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4516 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, domTimeStampArg, toUInt64(info
[0], exceptionState), exceptionState); | |
4517 impl->voidMethodDOMTimeStampArg(domTimeStampArg); | |
4518 } | |
4519 | |
4520 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
4521 { | |
4522 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4523 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info); | |
4524 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4525 } | |
4526 | |
4527 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
4528 { | |
4529 if (UNLIKELY(info.Length() < 1)) { | |
4530 throwTypeError(ExceptionMessages::failedToExecute("voidMethodBooleanArg"
, "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G
etIsolate()); | |
4531 return; | |
4532 } | |
4533 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4534 V8TRYCATCH_VOID(bool, booleanArg, info[0]->BooleanValue()); | |
4535 impl->voidMethodBooleanArg(booleanArg); | |
4536 } | |
4537 | |
4538 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
4539 { | |
4540 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4541 TestObjectV8Internal::voidMethodBooleanArgMethod(info); | |
4542 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4543 } | |
4544 | |
4545 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
4546 { | |
4547 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
yteArg", "TestObject", info.Holder(), info.GetIsolate()); | |
4548 if (UNLIKELY(info.Length() < 1)) { | |
4549 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
4550 exceptionState.throwIfNeeded(); | |
4551 return; | |
4552 } | |
4553 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4554 V8TRYCATCH_EXCEPTION_VOID(int, byteArg, toInt8(info[0], exceptionState), exc
eptionState); | |
4555 impl->voidMethodByteArg(byteArg); | |
4556 } | |
4557 | |
4558 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
4559 { | |
4560 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4561 TestObjectV8Internal::voidMethodByteArgMethod(info); | |
4562 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4563 } | |
4564 | |
4565 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4566 { | |
4567 if (UNLIKELY(info.Length() < 1)) { | |
4568 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDoubleArg",
"TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Ge
tIsolate()); | |
4569 return; | |
4570 } | |
4571 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4572 V8TRYCATCH_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue(
))); | |
4573 impl->voidMethodDoubleArg(doubleArg); | |
4574 } | |
4575 | |
4576 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
4577 { | |
4578 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4579 TestObjectV8Internal::voidMethodDoubleArgMethod(info); | |
4580 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4581 } | |
4582 | |
4583 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4584 { | |
4585 if (UNLIKELY(info.Length() < 1)) { | |
4586 throwTypeError(ExceptionMessages::failedToExecute("voidMethodFloatArg",
"TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Get
Isolate()); | |
4587 return; | |
4588 } | |
4589 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4590 V8TRYCATCH_VOID(float, floatArg, static_cast<float>(info[0]->NumberValue()))
; | |
4591 impl->voidMethodFloatArg(floatArg); | |
4592 } | |
4593 | |
4594 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
4595 { | |
4596 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4597 TestObjectV8Internal::voidMethodFloatArgMethod(info); | |
4598 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4599 } | |
4600 | |
4601 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
4602 { | |
4603 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
4604 if (UNLIKELY(info.Length() < 1)) { | |
4605 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
4606 exceptionState.throwIfNeeded(); | 3384 exceptionState.throwIfNeeded(); |
4607 return; | 3385 return; |
4608 } | 3386 } |
4609 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3387 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4610 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3388 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4611 impl->voidMethodLongArg(longArg); | 3389 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
4612 } | 3390 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[2])); |
4613 | 3391 impl->voidMethodWithArgs(longArg, strArg, objArg); |
4614 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 3392 } |
| 3393 |
| 3394 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
4615 { | 3395 { |
4616 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3396 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4617 TestObjectV8Internal::voidMethodLongArgMethod(info); | 3397 TestObjectV8Internal::voidMethodWithArgsMethod(info); |
4618 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3398 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4619 } | 3399 } |
4620 | 3400 |
4621 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 3401 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
4622 { | 3402 { |
4623 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
4624 if (UNLIKELY(info.Length() < 1)) { | |
4625 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
4626 exceptionState.throwIfNeeded(); | |
4627 return; | |
4628 } | |
4629 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3403 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4630 V8TRYCATCH_EXCEPTION_VOID(long long, longLongArg, toInt64(info[0], exception
State), exceptionState); | 3404 v8SetReturnValueInt(info, impl->longMethod()); |
4631 impl->voidMethodLongLongArg(longLongArg); | 3405 } |
4632 } | 3406 |
4633 | 3407 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4634 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
4635 { | 3408 { |
4636 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3409 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4637 TestObjectV8Internal::voidMethodLongLongArgMethod(info); | 3410 TestObjectV8Internal::longMethodMethod(info); |
4638 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4639 } | 3412 } |
4640 | 3413 |
4641 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3414 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
4642 { | 3415 { |
4643 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ctetArg", "TestObject", info.Holder(), info.GetIsolate()); | 3416 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodW
ithArgs", "TestObject", info.Holder(), info.GetIsolate()); |
4644 if (UNLIKELY(info.Length() < 1)) { | 3417 if (UNLIKELY(info.Length() < 3)) { |
4645 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3418 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); |
4646 exceptionState.throwIfNeeded(); | |
4647 return; | |
4648 } | |
4649 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4650 V8TRYCATCH_EXCEPTION_VOID(unsigned, octetArg, toUInt8(info[0], exceptionStat
e), exceptionState); | |
4651 impl->voidMethodOctetArg(octetArg); | |
4652 } | |
4653 | |
4654 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
4655 { | |
4656 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4657 TestObjectV8Internal::voidMethodOctetArgMethod(info); | |
4658 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4659 } | |
4660 | |
4661 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
4662 { | |
4663 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
hortArg", "TestObject", info.Holder(), info.GetIsolate()); | |
4664 if (UNLIKELY(info.Length() < 1)) { | |
4665 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
4666 exceptionState.throwIfNeeded(); | |
4667 return; | |
4668 } | |
4669 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4670 V8TRYCATCH_EXCEPTION_VOID(int, shortArg, toInt16(info[0], exceptionState), e
xceptionState); | |
4671 impl->voidMethodShortArg(shortArg); | |
4672 } | |
4673 | |
4674 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
4675 { | |
4676 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4677 TestObjectV8Internal::voidMethodShortArgMethod(info); | |
4678 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4679 } | |
4680 | |
4681 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
4682 { | |
4683 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
4684 if (UNLIKELY(info.Length() < 1)) { | |
4685 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
4686 exceptionState.throwIfNeeded(); | |
4687 return; | |
4688 } | |
4689 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4690 V8TRYCATCH_EXCEPTION_VOID(unsigned, unsignedLongArg, toUInt32(info[0], excep
tionState), exceptionState); | |
4691 impl->voidMethodUnsignedLongArg(unsignedLongArg); | |
4692 } | |
4693 | |
4694 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
4695 { | |
4696 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4697 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info); | |
4698 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4699 } | |
4700 | |
4701 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
4702 { | |
4703 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
4704 if (UNLIKELY(info.Length() < 1)) { | |
4705 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
4706 exceptionState.throwIfNeeded(); | |
4707 return; | |
4708 } | |
4709 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4710 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, unsignedLongLongArg, toUInt64(
info[0], exceptionState), exceptionState); | |
4711 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg); | |
4712 } | |
4713 | |
4714 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
4715 { | |
4716 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4717 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info); | |
4718 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4719 } | |
4720 | |
4721 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
4722 { | |
4723 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); | |
4724 if (UNLIKELY(info.Length() < 1)) { | |
4725 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
4726 exceptionState.throwIfNeeded(); | |
4727 return; | |
4728 } | |
4729 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4730 V8TRYCATCH_EXCEPTION_VOID(unsigned, unsignedShortArg, toUInt16(info[0], exce
ptionState), exceptionState); | |
4731 impl->voidMethodUnsignedShortArg(unsignedShortArg); | |
4732 } | |
4733 | |
4734 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
4735 { | |
4736 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4737 TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info); | |
4738 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4739 } | |
4740 | |
4741 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
4742 { | |
4743 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4744 v8SetReturnValue(info, impl->testInterfaceEmptyMethod()); | |
4745 } | |
4746 | |
4747 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
4748 { | |
4749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4750 TestObjectV8Internal::testInterfaceEmptyMethodMethod(info); | |
4751 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4752 } | |
4753 | |
4754 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
4755 { | |
4756 if (UNLIKELY(info.Length() < 1)) { | |
4757 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa
ceEmptyArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length(
))), info.GetIsolate()); | |
4758 return; | |
4759 } | |
4760 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4761 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
4762 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); | |
4763 } | |
4764 | |
4765 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | |
4766 { | |
4767 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4768 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); | |
4769 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4770 } | |
4771 | |
4772 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
4773 { | |
4774 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); | |
4775 if (UNLIKELY(info.Length() < 2)) { | |
4776 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | |
4777 exceptionState.throwIfNeeded(); | 3419 exceptionState.throwIfNeeded(); |
4778 return; | 3420 return; |
4779 } | 3421 } |
4780 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3422 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4781 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3423 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
4782 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[1])); | 3424 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
4783 impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg)
; | 3425 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[2])); |
4784 } | 3426 v8SetReturnValueInt(info, impl->longMethodWithArgs(longArg, strArg, objArg))
; |
4785 | 3427 } |
4786 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 3428 |
| 3429 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
4787 { | 3430 { |
4788 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3431 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4789 TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info); | 3432 TestObjectV8Internal::longMethodWithArgsMethod(info); |
4790 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3433 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4791 } | 3434 } |
4792 | 3435 |
4793 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 3436 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
4794 { | 3437 { |
4795 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3438 TestObject* impl = V8TestObject::toNative(info.Holder()); |
4796 v8SetReturnValue(info, impl->voidCallbackFunctionMethod().v8Value()); | 3439 v8SetReturnValue(info, impl->objMethod()); |
4797 } | 3440 } |
4798 | 3441 |
4799 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 3442 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4800 { | 3443 { |
4801 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3444 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4802 TestObjectV8Internal::voidCallbackFunctionMethodMethod(info); | 3445 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
4803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3446 TestObjectV8Internal::objMethodMethod(info); |
4804 } | 3447 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
4805 | 3448 } |
4806 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 3449 |
4807 { | 3450 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4808 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3451 { |
4809 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgMethod().v8Val
ue()); | 3452 ExceptionState exceptionState(ExceptionState::ExecutionContext, "objMethodWi
thArgs", "TestObject", info.Holder(), info.GetIsolate()); |
4810 } | 3453 if (UNLIKELY(info.Length() < 3)) { |
4811 | 3454 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); |
4812 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
4813 { | |
4814 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4815 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info); | |
4816 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4817 } | |
4818 | |
4819 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
4820 { | |
4821 if (UNLIKELY(info.Length() < 1)) { | |
4822 throwTypeError(ExceptionMessages::failedToExecute("voidMethodVoidCallbac
kFunctionArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Lengt
h())), info.GetIsolate()); | |
4823 return; | |
4824 } | |
4825 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4826 V8TRYCATCH_VOID(ScriptValue, voidCallbackFunctionArg, ScriptValue(info[0], i
nfo.GetIsolate())); | |
4827 impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg); | |
4828 } | |
4829 | |
4830 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | |
4831 { | |
4832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4833 TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info); | |
4834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4835 } | |
4836 | |
4837 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::Function
CallbackInfo<v8::Value>& info) | |
4838 { | |
4839 if (UNLIKELY(info.Length() < 1)) { | |
4840 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAnyCallback
FunctionOptionalAnyArg", "TestObject", ExceptionMessages::notEnoughArguments(1,
info.Length())), info.GetIsolate()); | |
4841 return; | |
4842 } | |
4843 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4844 V8TRYCATCH_VOID(ScriptValue, anyCallbackFunctionOptionalAnyArgArg, ScriptVal
ue(info[0], info.GetIsolate())); | |
4845 impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptiona
lAnyArgArg); | |
4846 } | |
4847 | |
4848 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | |
4849 { | |
4850 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4851 TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info
); | |
4852 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4853 } | |
4854 | |
4855 static void compareHowMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
4856 { | |
4857 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4858 v8SetReturnValue(info, impl->compareHowMethod()); | |
4859 } | |
4860 | |
4861 static void compareHowMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
4862 { | |
4863 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4864 TestObjectV8Internal::compareHowMethodMethod(info); | |
4865 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4866 } | |
4867 | |
4868 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
4869 { | |
4870 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4871 v8SetReturnValue(info, impl->anyMethod().v8Value()); | |
4872 } | |
4873 | |
4874 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
4875 { | |
4876 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4877 TestObjectV8Internal::anyMethodMethod(info); | |
4878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4879 } | |
4880 | |
4881 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
4882 { | |
4883 if (UNLIKELY(info.Length() < 1)) { | |
4884 throwTypeError(ExceptionMessages::failedToExecute("voidMethodCompareHowA
rg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | |
4885 return; | |
4886 } | |
4887 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4888 V8TRYCATCH_VOID(Range::CompareHow, compareHowArg, static_cast<Range::Compare
How>(info[0]->Int32Value())); | |
4889 impl->voidMethodCompareHowArg(compareHowArg); | |
4890 } | |
4891 | |
4892 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
4893 { | |
4894 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4895 TestObjectV8Internal::voidMethodCompareHowArgMethod(info); | |
4896 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4897 } | |
4898 | |
4899 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
4900 { | |
4901 if (UNLIKELY(info.Length() < 1)) { | |
4902 throwTypeError(ExceptionMessages::failedToExecute("voidMethodEventTarget
Arg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in
fo.GetIsolate()); | |
4903 return; | |
4904 } | |
4905 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4906 V8TRYCATCH_VOID(EventTarget*, eventTargetArg, V8DOMWrapper::isDOMWrapper(inf
o[0]) ? toWrapperTypeInfo(v8::Handle<v8::Object>::Cast(info[0]))->toEventTarget(
v8::Handle<v8::Object>::Cast(info[0])) : 0); | |
4907 impl->voidMethodEventTargetArg(eventTargetArg); | |
4908 } | |
4909 | |
4910 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
4911 { | |
4912 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4913 TestObjectV8Internal::voidMethodEventTargetArgMethod(info); | |
4914 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4915 } | |
4916 | |
4917 static void voidMethodMediaQueryListListenerArgMethod(const v8::FunctionCallback
Info<v8::Value>& info) | |
4918 { | |
4919 if (UNLIKELY(info.Length() < 1)) { | |
4920 throwTypeError(ExceptionMessages::failedToExecute("voidMethodMediaQueryL
istListenerArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len
gth())), info.GetIsolate()); | |
4921 return; | |
4922 } | |
4923 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4924 V8TRYCATCH_VOID(RefPtrWillBeRawPtr<MediaQueryListListener>, mediaQueryListLi
stenerArg, MediaQueryListListener::create(ScriptValue(info[0], info.GetIsolate()
))); | |
4925 impl->voidMethodMediaQueryListListenerArg(mediaQueryListListenerArg); | |
4926 } | |
4927 | |
4928 static void voidMethodMediaQueryListListenerArgMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | |
4929 { | |
4930 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4931 TestObjectV8Internal::voidMethodMediaQueryListListenerArgMethod(info); | |
4932 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4933 } | |
4934 | |
4935 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
4936 { | |
4937 if (UNLIKELY(info.Length() < 1)) { | |
4938 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAnyArg", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); | |
4939 return; | |
4940 } | |
4941 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4942 V8TRYCATCH_VOID(ScriptValue, anyArg, ScriptValue(info[0], info.GetIsolate())
); | |
4943 impl->voidMethodAnyArg(anyArg); | |
4944 } | |
4945 | |
4946 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
4947 { | |
4948 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4949 TestObjectV8Internal::voidMethodAnyArgMethod(info); | |
4950 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4951 } | |
4952 | |
4953 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
4954 { | |
4955 if (UNLIKELY(info.Length() < 1)) { | |
4956 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAttrArg", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | |
4957 return; | |
4958 } | |
4959 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4960 V8TRYCATCH_VOID(Attr*, attrArg, V8Attr::toNativeWithTypeCheck(info.GetIsolat
e(), info[0])); | |
4961 impl->voidMethodAttrArg(attrArg); | |
4962 } | |
4963 | |
4964 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
4965 { | |
4966 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4967 TestObjectV8Internal::voidMethodAttrArgMethod(info); | |
4968 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4969 } | |
4970 | |
4971 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
4972 { | |
4973 if (UNLIKELY(info.Length() < 1)) { | |
4974 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentArg
", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.
GetIsolate()); | |
4975 return; | |
4976 } | |
4977 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4978 V8TRYCATCH_VOID(Document*, documentArg, V8Document::toNativeWithTypeCheck(in
fo.GetIsolate(), info[0])); | |
4979 impl->voidMethodDocumentArg(documentArg); | |
4980 } | |
4981 | |
4982 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
4983 { | |
4984 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
4985 TestObjectV8Internal::voidMethodDocumentArgMethod(info); | |
4986 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
4987 } | |
4988 | |
4989 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
4990 { | |
4991 if (UNLIKELY(info.Length() < 1)) { | |
4992 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentTyp
eArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), i
nfo.GetIsolate()); | |
4993 return; | |
4994 } | |
4995 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
4996 V8TRYCATCH_VOID(DocumentType*, documentTypeArg, V8DocumentType::toNativeWith
TypeCheck(info.GetIsolate(), info[0])); | |
4997 impl->voidMethodDocumentTypeArg(documentTypeArg); | |
4998 } | |
4999 | |
5000 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
5001 { | |
5002 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5003 TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info); | |
5004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5005 } | |
5006 | |
5007 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
5008 { | |
5009 if (UNLIKELY(info.Length() < 1)) { | |
5010 throwTypeError(ExceptionMessages::failedToExecute("voidMethodElementArg"
, "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G
etIsolate()); | |
5011 return; | |
5012 } | |
5013 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5014 V8TRYCATCH_VOID(Element*, elementArg, V8Element::toNativeWithTypeCheck(info.
GetIsolate(), info[0])); | |
5015 impl->voidMethodElementArg(elementArg); | |
5016 } | |
5017 | |
5018 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
5019 { | |
5020 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5021 TestObjectV8Internal::voidMethodElementArgMethod(info); | |
5022 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5023 } | |
5024 | |
5025 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
5026 { | |
5027 if (UNLIKELY(info.Length() < 1)) { | |
5028 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeArg", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | |
5029 return; | |
5030 } | |
5031 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5032 V8TRYCATCH_VOID(Node*, nodeArg, V8Node::toNativeWithTypeCheck(info.GetIsolat
e(), info[0])); | |
5033 impl->voidMethodNodeArg(nodeArg); | |
5034 } | |
5035 | |
5036 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
5037 { | |
5038 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5039 TestObjectV8Internal::voidMethodNodeArgMethod(info); | |
5040 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5041 } | |
5042 | |
5043 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
5044 { | |
5045 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5046 v8SetReturnValue(info, impl->arrayBufferMethod()); | |
5047 } | |
5048 | |
5049 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
5050 { | |
5051 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5052 TestObjectV8Internal::arrayBufferMethodMethod(info); | |
5053 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5054 } | |
5055 | |
5056 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
5057 { | |
5058 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5059 v8SetReturnValue(info, impl->arrayBufferViewMethod()); | |
5060 } | |
5061 | |
5062 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
5063 { | |
5064 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5065 TestObjectV8Internal::arrayBufferViewMethodMethod(info); | |
5066 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5067 } | |
5068 | |
5069 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
5070 { | |
5071 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5072 v8SetReturnValue(info, impl->float32ArrayMethod()); | |
5073 } | |
5074 | |
5075 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
5076 { | |
5077 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5078 TestObjectV8Internal::float32ArrayMethodMethod(info); | |
5079 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5080 } | |
5081 | |
5082 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
5083 { | |
5084 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5085 v8SetReturnValue(info, impl->int32ArrayMethod()); | |
5086 } | |
5087 | |
5088 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
5089 { | |
5090 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5091 TestObjectV8Internal::int32ArrayMethodMethod(info); | |
5092 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5093 } | |
5094 | |
5095 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
5096 { | |
5097 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5098 v8SetReturnValue(info, impl->uint8ArrayMethod()); | |
5099 } | |
5100 | |
5101 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
5102 { | |
5103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5104 TestObjectV8Internal::uint8ArrayMethodMethod(info); | |
5105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5106 } | |
5107 | |
5108 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
5109 { | |
5110 if (UNLIKELY(info.Length() < 1)) { | |
5111 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayBuffer
Arg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in
fo.GetIsolate()); | |
5112 return; | |
5113 } | |
5114 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5115 V8TRYCATCH_VOID(ArrayBuffer*, arrayBufferArg, info[0]->IsArrayBuffer() ? V8A
rrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0); | |
5116 impl->voidMethodArrayBufferArg(arrayBufferArg); | |
5117 } | |
5118 | |
5119 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
5120 { | |
5121 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5122 TestObjectV8Internal::voidMethodArrayBufferArgMethod(info); | |
5123 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5124 } | |
5125 | |
5126 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
5127 { | |
5128 if (UNLIKELY(info.Length() < 1)) { | |
5129 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayBuffer
OrNullArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()
)), info.GetIsolate()); | |
5130 return; | |
5131 } | |
5132 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5133 V8TRYCATCH_VOID(ArrayBuffer*, arrayBufferArg, info[0]->IsArrayBuffer() ? V8A
rrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0); | |
5134 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg); | |
5135 } | |
5136 | |
5137 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
5138 { | |
5139 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5140 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info); | |
5141 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5142 } | |
5143 | |
5144 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
5145 { | |
5146 if (UNLIKELY(info.Length() < 1)) { | |
5147 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayBuffer
ViewArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()))
, info.GetIsolate()); | |
5148 return; | |
5149 } | |
5150 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5151 V8TRYCATCH_VOID(ArrayBufferView*, arrayBufferViewArg, info[0]->IsArrayBuffer
View() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[
0])) : 0); | |
5152 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg); | |
5153 } | |
5154 | |
5155 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
5156 { | |
5157 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5158 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info); | |
5159 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5160 } | |
5161 | |
5162 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
5163 { | |
5164 if (UNLIKELY(info.Length() < 1)) { | |
5165 throwTypeError(ExceptionMessages::failedToExecute("voidMethodFloat32Arra
yArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), i
nfo.GetIsolate()); | |
5166 return; | |
5167 } | |
5168 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5169 V8TRYCATCH_VOID(Float32Array*, float32ArrayArg, info[0]->IsFloat32Array() ?
V8Float32Array::toNative(v8::Handle<v8::Float32Array>::Cast(info[0])) : 0); | |
5170 impl->voidMethodFloat32ArrayArg(float32ArrayArg); | |
5171 } | |
5172 | |
5173 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
5174 { | |
5175 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5176 TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info); | |
5177 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5178 } | |
5179 | |
5180 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
5181 { | |
5182 if (UNLIKELY(info.Length() < 1)) { | |
5183 throwTypeError(ExceptionMessages::failedToExecute("voidMethodInt32ArrayA
rg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | |
5184 return; | |
5185 } | |
5186 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5187 V8TRYCATCH_VOID(Int32Array*, int32ArrayArg, info[0]->IsInt32Array() ? V8Int3
2Array::toNative(v8::Handle<v8::Int32Array>::Cast(info[0])) : 0); | |
5188 impl->voidMethodInt32ArrayArg(int32ArrayArg); | |
5189 } | |
5190 | |
5191 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
5192 { | |
5193 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5194 TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info); | |
5195 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5196 } | |
5197 | |
5198 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
5199 { | |
5200 if (UNLIKELY(info.Length() < 1)) { | |
5201 throwTypeError(ExceptionMessages::failedToExecute("voidMethodUint8ArrayA
rg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | |
5202 return; | |
5203 } | |
5204 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5205 V8TRYCATCH_VOID(Uint8Array*, uint8ArrayArg, info[0]->IsUint8Array() ? V8Uint
8Array::toNative(v8::Handle<v8::Uint8Array>::Cast(info[0])) : 0); | |
5206 impl->voidMethodUint8ArrayArg(uint8ArrayArg); | |
5207 } | |
5208 | |
5209 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
5210 { | |
5211 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5212 TestObjectV8Internal::voidMethodUint8ArrayArgMethod(info); | |
5213 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5214 } | |
5215 | |
5216 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | |
5217 { | |
5218 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5219 v8SetReturnValue(info, v8Array(impl->longArrayMethod(), info.GetIsolate())); | |
5220 } | |
5221 | |
5222 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
5223 { | |
5224 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5225 TestObjectV8Internal::longArrayMethodMethod(info); | |
5226 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5227 } | |
5228 | |
5229 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
5230 { | |
5231 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5232 v8SetReturnValue(info, v8Array(impl->stringArrayMethod(), info.GetIsolate())
); | |
5233 } | |
5234 | |
5235 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
5236 { | |
5237 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5238 TestObjectV8Internal::stringArrayMethodMethod(info); | |
5239 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5240 } | |
5241 | |
5242 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
5243 { | |
5244 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5245 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayMethod(), info.G
etIsolate())); | |
5246 } | |
5247 | |
5248 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
5249 { | |
5250 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5251 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info); | |
5252 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5253 } | |
5254 | |
5255 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
5256 { | |
5257 if (UNLIKELY(info.Length() < 1)) { | |
5258 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayLongAr
g", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info
.GetIsolate()); | |
5259 return; | |
5260 } | |
5261 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5262 V8TRYCATCH_VOID(Vector<int>, arrayLongArg, toNativeArray<int>(info[0], 1, in
fo.GetIsolate())); | |
5263 impl->voidMethodArrayLongArg(arrayLongArg); | |
5264 } | |
5265 | |
5266 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
5267 { | |
5268 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5269 TestObjectV8Internal::voidMethodArrayLongArgMethod(info); | |
5270 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5271 } | |
5272 | |
5273 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
5274 { | |
5275 if (UNLIKELY(info.Length() < 1)) { | |
5276 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayString
Arg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in
fo.GetIsolate()); | |
5277 return; | |
5278 } | |
5279 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5280 V8TRYCATCH_VOID(Vector<String>, arrayStringArg, toNativeArray<String>(info[0
], 1, info.GetIsolate())); | |
5281 impl->voidMethodArrayStringArg(arrayStringArg); | |
5282 } | |
5283 | |
5284 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
5285 { | |
5286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5287 TestObjectV8Internal::voidMethodArrayStringArgMethod(info); | |
5288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5289 } | |
5290 | |
5291 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
5292 { | |
5293 if (UNLIKELY(info.Length() < 1)) { | |
5294 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayTestIn
terfaceEmptyArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Le
ngth())), info.GetIsolate()); | |
5295 return; | |
5296 } | |
5297 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5298 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, arrayTestInterfaceEmpty
Arg, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1,
info.GetIsolate()))); | |
5299 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); | |
5300 } | |
5301 | |
5302 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
5303 { | |
5304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5305 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info); | |
5306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5307 } | |
5308 | |
5309 static void longSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
5310 { | |
5311 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5312 v8SetReturnValue(info, v8Array(impl->longSequenceMethod(), info.GetIsolate()
)); | |
5313 } | |
5314 | |
5315 static void longSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
5316 { | |
5317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5318 TestObjectV8Internal::longSequenceMethodMethod(info); | |
5319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5320 } | |
5321 | |
5322 static void stringSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
5323 { | |
5324 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5325 v8SetReturnValue(info, v8Array(impl->stringSequenceMethod(), info.GetIsolate
())); | |
5326 } | |
5327 | |
5328 static void stringSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
5329 { | |
5330 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5331 TestObjectV8Internal::stringSequenceMethodMethod(info); | |
5332 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5333 } | |
5334 | |
5335 static void testInterfaceEmptySequenceMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
5336 { | |
5337 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5338 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptySequenceMethod(), inf
o.GetIsolate())); | |
5339 } | |
5340 | |
5341 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
5342 { | |
5343 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5344 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info); | |
5345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5346 } | |
5347 | |
5348 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
5349 { | |
5350 if (UNLIKELY(info.Length() < 1)) { | |
5351 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceLon
gArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), i
nfo.GetIsolate()); | |
5352 return; | |
5353 } | |
5354 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5355 V8TRYCATCH_VOID(Vector<int>, longSequenceArg, toNativeArray<int>(info[0], 1,
info.GetIsolate())); | |
5356 impl->voidMethodSequenceLongArg(longSequenceArg); | |
5357 } | |
5358 | |
5359 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
5360 { | |
5361 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5362 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info); | |
5363 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5364 } | |
5365 | |
5366 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
5367 { | |
5368 if (UNLIKELY(info.Length() < 1)) { | |
5369 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceStr
ingArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())),
info.GetIsolate()); | |
5370 return; | |
5371 } | |
5372 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5373 V8TRYCATCH_VOID(Vector<String>, stringSequenceArg, toNativeArray<String>(inf
o[0], 1, info.GetIsolate())); | |
5374 impl->voidMethodSequenceStringArg(stringSequenceArg); | |
5375 } | |
5376 | |
5377 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
5378 { | |
5379 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5380 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info); | |
5381 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5382 } | |
5383 | |
5384 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
5385 { | |
5386 if (UNLIKELY(info.Length() < 1)) { | |
5387 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceTes
tInterfaceEmptyArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info
.Length())), info.GetIsolate()); | |
5388 return; | |
5389 } | |
5390 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5391 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, testInterfaceEmptySeque
nceArg, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0],
1, info.GetIsolate()))); | |
5392 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg)
; | |
5393 } | |
5394 | |
5395 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
5396 { | |
5397 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5398 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info); | |
5399 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5400 } | |
5401 | |
5402 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
5403 { | |
5404 if (UNLIKELY(info.Length() < 1)) { | |
5405 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa
ceEmptyOrNullArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.L
ength())), info.GetIsolate()); | |
5406 return; | |
5407 } | |
5408 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5409 V8TRYCATCH_VOID(TestInterfaceEmpty*, nullableTestInterfaceEmptyArg, V8TestIn
terfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
5410 impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg); | |
5411 } | |
5412 | |
5413 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
5414 { | |
5415 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5416 TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info); | |
5417 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5418 } | |
5419 | |
5420 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
5421 { | |
5422 if (UNLIKELY(info.Length() < 1)) { | |
5423 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbac
kInterfaceArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Leng
th())), info.GetIsolate()); | |
5424 return; | |
5425 } | |
5426 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5427 if (info.Length() <= 0 || !info[0]->IsFunction()) { | |
5428 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbac
kInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a fun
ction."), info.GetIsolate()); | |
5429 return; | |
5430 } | |
5431 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInter
face::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(in
fo.GetIsolate())); | |
5432 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release())
; | |
5433 } | |
5434 | |
5435 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
5436 { | |
5437 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5438 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); | |
5439 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5440 } | |
5441 | |
5442 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
5443 { | |
5444 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5445 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg; | |
5446 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | |
5447 if (!info[0]->IsFunction()) { | |
5448 throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptiona
lTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1
is not a function."), info.GetIsolate()); | |
5449 return; | |
5450 } | |
5451 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::H
andle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate())); | |
5452 } | |
5453 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa
ceArg.release()); | |
5454 } | |
5455 | |
5456 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | |
5457 { | |
5458 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5459 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info)
; | |
5460 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5461 } | |
5462 | |
5463 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
5464 { | |
5465 if (UNLIKELY(info.Length() < 1)) { | |
5466 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbac
kInterfaceOrNullArg", "TestObject", ExceptionMessages::notEnoughArguments(1, inf
o.Length())), info.GetIsolate()); | |
5467 return; | |
5468 } | |
5469 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5470 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { | |
5471 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbac
kInterfaceOrNullArg", "TestObject", "The callback provided as parameter 1 is not
a function."), info.GetIsolate()); | |
5472 return; | |
5473 } | |
5474 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = info[0]->IsNull() ?
nullptr : V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0
]), currentExecutionContext(info.GetIsolate())); | |
5475 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg.rele
ase()); | |
5476 } | |
5477 | |
5478 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | |
5479 { | |
5480 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5481 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info); | |
5482 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5483 } | |
5484 | |
5485 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) | |
5486 { | |
5487 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5488 v8SetReturnValueString(info, impl->testEnumMethod(), info.GetIsolate()); | |
5489 } | |
5490 | |
5491 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
5492 { | |
5493 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5494 TestObjectV8Internal::testEnumMethodMethod(info); | |
5495 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5496 } | |
5497 | |
5498 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
5499 { | |
5500 if (UNLIKELY(info.Length() < 1)) { | |
5501 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestEnumArg
", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.
GetIsolate()); | |
5502 return; | |
5503 } | |
5504 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5505 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, testEnumTypeArg, in
fo[0]); | |
5506 String string = testEnumTypeArg; | |
5507 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { | |
5508 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestEnumArg
", "TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), i
nfo.GetIsolate()); | |
5509 return; | |
5510 } | |
5511 impl->voidMethodTestEnumArg(testEnumTypeArg); | |
5512 } | |
5513 | |
5514 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
5515 { | |
5516 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5517 TestObjectV8Internal::voidMethodTestEnumArgMethod(info); | |
5518 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5519 } | |
5520 | |
5521 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
5522 { | |
5523 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5524 v8SetReturnValue(info, impl->dictionaryMethod()); | |
5525 } | |
5526 | |
5527 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
5528 { | |
5529 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5530 TestObjectV8Internal::dictionaryMethodMethod(info); | |
5531 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5532 } | |
5533 | |
5534 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
5535 { | |
5536 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5537 v8SetReturnValue(info, impl->nodeFilterMethod()); | |
5538 } | |
5539 | |
5540 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
5541 { | |
5542 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5543 TestObjectV8Internal::nodeFilterMethodMethod(info); | |
5544 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5545 } | |
5546 | |
5547 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
5548 { | |
5549 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5550 v8SetReturnValue(info, impl->promiseMethod().v8Value()); | |
5551 } | |
5552 | |
5553 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
5554 { | |
5555 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5556 TestObjectV8Internal::promiseMethodMethod(info); | |
5557 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5558 } | |
5559 | |
5560 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
5561 { | |
5562 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5563 v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serialize
dScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIso
late()))); | |
5564 } | |
5565 | |
5566 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
5567 { | |
5568 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5569 TestObjectV8Internal::serializedScriptValueMethodMethod(info); | |
5570 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5571 } | |
5572 | |
5573 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
5574 { | |
5575 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5576 v8SetReturnValue(info, impl->xPathNSResolverMethod()); | |
5577 } | |
5578 | |
5579 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
5580 { | |
5581 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5582 TestObjectV8Internal::xPathNSResolverMethodMethod(info); | |
5583 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5584 } | |
5585 | |
5586 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
5587 { | |
5588 if (UNLIKELY(info.Length() < 1)) { | |
5589 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryA
rg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | |
5590 return; | |
5591 } | |
5592 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5593 V8TRYCATCH_VOID(Dictionary, dictionaryArg, Dictionary(info[0], info.GetIsola
te())); | |
5594 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | |
5595 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryA
rg", "TestObject", "parameter 1 ('dictionaryArg') is not an object."), info.GetI
solate()); | |
5596 return; | |
5597 } | |
5598 impl->voidMethodDictionaryArg(dictionaryArg); | |
5599 } | |
5600 | |
5601 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
5602 { | |
5603 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5604 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); | |
5605 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5606 } | |
5607 | |
5608 static void voidMethodEventListenerArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
5609 { | |
5610 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE
ventListenerArg", "TestObject", info.Holder(), info.GetIsolate()); | |
5611 if (UNLIKELY(info.Length() < 1)) { | |
5612 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
5613 exceptionState.throwIfNeeded(); | |
5614 return; | |
5615 } | |
5616 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5617 RefPtr<EventListener> eventListenerArg = V8EventListenerList::getEventListen
er(info[1], false, ListenerFindOrCreate); | |
5618 impl->voidMethodEventListenerArg(eventListenerArg); | |
5619 if (listener && !impl->toNode()) | |
5620 removeHiddenValueFromArray(info.Holder(), info[1], V8TestObject::eventLi
stenerCacheIndex, info.GetIsolate()); | |
5621 } | |
5622 | |
5623 static void voidMethodEventListenerArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
5624 { | |
5625 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5626 TestObjectV8Internal::voidMethodEventListenerArgMethod(info); | |
5627 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5628 } | |
5629 | |
5630 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
5631 { | |
5632 if (UNLIKELY(info.Length() < 1)) { | |
5633 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeFilterA
rg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | |
5634 return; | |
5635 } | |
5636 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5637 V8TRYCATCH_VOID(RefPtr<NodeFilter>, nodeFilterArg, toNodeFilter(info[0], inf
o.GetIsolate())); | |
5638 impl->voidMethodNodeFilterArg(nodeFilterArg.release()); | |
5639 } | |
5640 | |
5641 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
5642 { | |
5643 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5644 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info); | |
5645 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5646 } | |
5647 | |
5648 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
5649 { | |
5650 if (UNLIKELY(info.Length() < 1)) { | |
5651 throwTypeError(ExceptionMessages::failedToExecute("voidMethodPromiseArg"
, "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G
etIsolate()); | |
5652 return; | |
5653 } | |
5654 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5655 V8TRYCATCH_VOID(ScriptPromise, promiseArg, ScriptPromise(info[0], info.GetIs
olate())); | |
5656 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) { | |
5657 throwTypeError(ExceptionMessages::failedToExecute("voidMethodPromiseArg"
, "TestObject", "parameter 1 ('promiseArg') is not an object."), info.GetIsolate
()); | |
5658 return; | |
5659 } | |
5660 impl->voidMethodPromiseArg(promiseArg); | |
5661 } | |
5662 | |
5663 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
5664 { | |
5665 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5666 TestObjectV8Internal::voidMethodPromiseArgMethod(info); | |
5667 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5668 } | |
5669 | |
5670 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
5671 { | |
5672 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); | |
5673 if (UNLIKELY(info.Length() < 1)) { | |
5674 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
5675 exceptionState.throwIfNeeded(); | |
5676 return; | |
5677 } | |
5678 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5679 RefPtr<SerializedScriptValue> serializedScriptValueArg = SerializedScriptVal
ue::create(info[0], 0, 0, exceptionState, info.GetIsolate()); | |
5680 if (exceptionState.throwIfNeeded()) | |
5681 return; | |
5682 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); | |
5683 } | |
5684 | |
5685 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
5686 { | |
5687 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5688 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); | |
5689 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5690 } | |
5691 | |
5692 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
5693 { | |
5694 if (UNLIKELY(info.Length() < 1)) { | |
5695 throwTypeError(ExceptionMessages::failedToExecute("voidMethodXPathNSReso
lverArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()))
, info.GetIsolate()); | |
5696 return; | |
5697 } | |
5698 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5699 V8TRYCATCH_VOID(RefPtrWillBeRawPtr<XPathNSResolver>, xPathNSResolverArg, toX
PathNSResolver(info[0], info.GetIsolate())); | |
5700 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg.release()); | |
5701 } | |
5702 | |
5703 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
5704 { | |
5705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5706 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); | |
5707 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5708 } | |
5709 | |
5710 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
5711 { | |
5712 if (UNLIKELY(info.Length() < 1)) { | |
5713 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryS
equenceArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length(
))), info.GetIsolate()); | |
5714 return; | |
5715 } | |
5716 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5717 V8TRYCATCH_VOID(Vector<Dictionary>, dictionarySequenceArg, toNativeArray<Dic
tionary>(info[0], 1, info.GetIsolate())); | |
5718 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg); | |
5719 } | |
5720 | |
5721 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | |
5722 { | |
5723 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5724 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info); | |
5725 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5726 } | |
5727 | |
5728 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
5729 { | |
5730 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
tringArgLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
5731 if (UNLIKELY(info.Length() < 2)) { | |
5732 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | |
5733 exceptionState.throwIfNeeded(); | |
5734 return; | |
5735 } | |
5736 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5737 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; | |
5738 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); | |
5739 impl->voidMethodStringArgLongArg(stringArg, longArg); | |
5740 } | |
5741 | |
5742 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
5743 { | |
5744 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5745 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info); | |
5746 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5747 } | |
5748 | |
5749 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
5750 { | |
5751 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5752 if (UNLIKELY(info.Length() <= 0)) { | |
5753 impl->voidMethodOptionalStringArg(); | |
5754 return; | |
5755 } | |
5756 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, optionalStringArg,
info[0]); | |
5757 impl->voidMethodOptionalStringArg(optionalStringArg); | |
5758 } | |
5759 | |
5760 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
5761 { | |
5762 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5763 TestObjectV8Internal::voidMethodOptionalStringArgMethod(info); | |
5764 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5765 } | |
5766 | |
5767 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
5768 { | |
5769 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5770 if (UNLIKELY(info.Length() <= 0)) { | |
5771 impl->voidMethodOptionalTestInterfaceEmptyArg(); | |
5772 return; | |
5773 } | |
5774 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmptyArg, V8TestIn
terfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
5775 impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg)
; | |
5776 } | |
5777 | |
5778 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
5779 { | |
5780 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5781 TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info); | |
5782 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5783 } | |
5784 | |
5785 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
5786 { | |
5787 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
5788 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5789 if (UNLIKELY(info.Length() <= 0)) { | |
5790 impl->voidMethodOptionalLongArg(); | |
5791 return; | |
5792 } | |
5793 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt
ate), exceptionState); | |
5794 impl->voidMethodOptionalLongArg(optionalLongArg); | |
5795 } | |
5796 | |
5797 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
5798 { | |
5799 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5800 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info); | |
5801 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5802 } | |
5803 | |
5804 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
5805 { | |
5806 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
5807 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5808 if (UNLIKELY(info.Length() <= 0)) { | |
5809 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), info.G
etIsolate()); | |
5810 return; | |
5811 } | |
5812 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt
ate), exceptionState); | |
5813 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongA
rg), info.GetIsolate()); | |
5814 } | |
5815 | |
5816 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
5817 { | |
5818 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5819 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info); | |
5820 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5821 } | |
5822 | |
5823 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
5824 { | |
5825 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfa
ceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
5826 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5827 if (UNLIKELY(info.Length() <= 0)) { | |
5828 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg()); | |
5829 return; | |
5830 } | |
5831 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt
ate), exceptionState); | |
5832 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optiona
lLongArg)); | |
5833 } | |
5834 | |
5835 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
5836 { | |
5837 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5838 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info); | |
5839 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5840 } | |
5841 | |
5842 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
5843 { | |
5844 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
5845 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5846 if (UNLIKELY(info.Length() <= 0)) { | |
5847 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg()); | |
5848 return; | |
5849 } | |
5850 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt
ate), exceptionState); | |
5851 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg)); | |
5852 } | |
5853 | |
5854 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
5855 { | |
5856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5857 TestObjectV8Internal::longMethodOptionalLongArgMethod(info); | |
5858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5859 } | |
5860 | |
5861 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
5862 { | |
5863 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
5864 if (UNLIKELY(info.Length() < 1)) { | |
5865 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
5866 exceptionState.throwIfNeeded(); | 3455 exceptionState.throwIfNeeded(); |
5867 return; | 3456 return; |
5868 } | 3457 } |
5869 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3458 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5870 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3459 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
5871 if (UNLIKELY(info.Length() <= 1)) { | 3460 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
5872 impl->voidMethodLongArgOptionalLongArg(longArg); | 3461 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[2])); |
| 3462 v8SetReturnValue(info, impl->objMethodWithArgs(longArg, strArg, objArg)); |
| 3463 } |
| 3464 |
| 3465 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 3466 { |
| 3467 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3468 TestObjectV8Internal::objMethodWithArgsMethod(info); |
| 3469 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3470 } |
| 3471 |
| 3472 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 3473 { |
| 3474 if (UNLIKELY(info.Length() < 1)) { |
| 3475 throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg
", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.
GetIsolate()); |
5873 return; | 3476 return; |
5874 } | 3477 } |
5875 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[1], exceptionSt
ate), exceptionState); | 3478 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5876 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg); | 3479 V8TRYCATCH_VOID(Vector<RefPtr<TestInterface> >, sequenceArg, (toRefPtrNative
Array<TestInterface, V8TestInterface>(info[0], 1, info.GetIsolate()))); |
5877 } | 3480 impl->methodWithSequenceArg(sequenceArg); |
5878 | 3481 } |
5879 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 3482 |
| 3483 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
5880 { | 3484 { |
5881 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3485 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5882 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info); | 3486 TestObjectV8Internal::methodWithSequenceArgMethod(info); |
5883 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3487 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5884 } | 3488 } |
5885 | 3489 |
5886 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | 3490 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
5887 { | 3491 { |
5888 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol
ate()); | 3492 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodRetur
ningSequence", "TestObject", info.Holder(), info.GetIsolate()); |
5889 if (UNLIKELY(info.Length() < 1)) { | 3493 if (UNLIKELY(info.Length() < 1)) { |
5890 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3494 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
5891 exceptionState.throwIfNeeded(); | 3495 exceptionState.throwIfNeeded(); |
5892 return; | |
5893 } | |
5894 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5895 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | |
5896 if (UNLIKELY(info.Length() <= 1)) { | |
5897 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg); | |
5898 return; | |
5899 } | |
5900 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg1, toInt32(info[1], exceptionS
tate), exceptionState); | |
5901 if (UNLIKELY(info.Length() <= 2)) { | |
5902 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalL
ongArg1); | |
5903 return; | |
5904 } | |
5905 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg2, toInt32(info[2], exceptionS
tate), exceptionState); | |
5906 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongA
rg1, optionalLongArg2); | |
5907 } | |
5908 | |
5909 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
5910 { | |
5911 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5912 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(
info); | |
5913 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5914 } | |
5915 | |
5916 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
5917 { | |
5918 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola
te()); | |
5919 if (UNLIKELY(info.Length() < 1)) { | |
5920 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
5921 exceptionState.throwIfNeeded(); | |
5922 return; | 3496 return; |
5923 } | 3497 } |
5924 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3498 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5925 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3499 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
5926 if (UNLIKELY(info.Length() <= 1)) { | 3500 v8SetReturnValue(info, v8Array(impl->methodReturningSequence(longArg), info.
GetIsolate())); |
5927 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); | 3501 } |
5928 return; | 3502 |
5929 } | 3503 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
5930 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInter
faceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[1])); | 3504 { |
5931 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn
terfaceEmpty); | 3505 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5932 } | 3506 TestObjectV8Internal::methodReturningSequenceMethod(info); |
5933 | 3507 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5934 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 3508 } |
5935 { | 3509 |
5936 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3510 static void methodWithEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
5937 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i
nfo); | 3511 { |
5938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3512 if (UNLIKELY(info.Length() < 1)) { |
5939 } | 3513 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
5940 | 3514 return; |
5941 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 3515 } |
5942 { | 3516 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5943 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola
te()); | 3517 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, enumArg, info[0]); |
5944 if (UNLIKELY(info.Length() < 1)) { | 3518 String string = enumArg; |
5945 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3519 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { |
5946 exceptionState.throwIfNeeded(); | 3520 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnumArg", "
TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), info.
GetIsolate()); |
5947 return; | 3521 return; |
5948 } | 3522 } |
5949 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3523 impl->methodWithEnumArg(enumArg); |
5950 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInter
faceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 3524 } |
5951 if (UNLIKELY(info.Length() <= 1)) { | 3525 |
5952 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfa
ceEmpty); | 3526 static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
5953 return; | 3527 { |
5954 } | 3528 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5955 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); | 3529 TestObjectV8Internal::methodWithEnumArgMethod(info); |
5956 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm
pty, longArg); | 3530 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5957 } | 3531 } |
5958 | 3532 |
5959 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 3533 static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
5960 { | 3534 { |
5961 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3535 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodThatR
equiresAllArgsAndThrows", "TestObject", info.Holder(), info.GetIsolate()); |
5962 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i
nfo); | |
5963 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5964 } | |
5965 | |
5966 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
5967 { | |
5968 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5969 V8TRYCATCH_VOID(Dictionary, optionalDictionaryArg, Dictionary(info[0], info.
GetIsolate())); | |
5970 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg.isO
bject()) { | |
5971 throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptionalDic
tionaryArg", "TestObject", "parameter 1 ('optionalDictionaryArg') is not an obje
ct."), info.GetIsolate()); | |
5972 return; | |
5973 } | |
5974 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); | |
5975 } | |
5976 | |
5977 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | |
5978 { | |
5979 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5980 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); | |
5981 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5982 } | |
5983 | |
5984 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
5985 { | |
5986 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
5987 V8TRYCATCH_VOID(Vector<String>, variadicStringArgs, toNativeArguments<String
>(info, 0)); | |
5988 impl->voidMethodVariadicStringArg(variadicStringArgs); | |
5989 } | |
5990 | |
5991 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
5992 { | |
5993 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
5994 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info); | |
5995 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
5996 } | |
5997 | |
5998 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
5999 { | |
6000 if (UNLIKELY(info.Length() < 1)) { | |
6001 throwTypeError(ExceptionMessages::failedToExecute("voidMethodStringArgVa
riadicStringArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Le
ngth())), info.GetIsolate()); | |
6002 return; | |
6003 } | |
6004 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6005 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; | |
6006 V8TRYCATCH_VOID(Vector<String>, variadicStringArgs, toNativeArguments<String
>(info, 1)); | |
6007 impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs); | |
6008 } | |
6009 | |
6010 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
6011 { | |
6012 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6013 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info); | |
6014 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6015 } | |
6016 | |
6017 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
6018 { | |
6019 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6020 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; | |
6021 for (int i = 0; i < info.Length(); ++i) { | |
6022 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { | |
6023 throwTypeError(ExceptionMessages::failedToExecute("voidMethodVariadi
cTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfac
eEmpty'."), info.GetIsolate()); | |
6024 return; | |
6025 } | |
6026 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8:
:Handle<v8::Object>::Cast(info[i]))); | |
6027 } | |
6028 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs
); | |
6029 } | |
6030 | |
6031 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
6032 { | |
6033 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6034 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); | |
6035 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6036 } | |
6037 | |
6038 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | |
6039 { | |
6040 if (UNLIKELY(info.Length() < 1)) { | |
6041 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa
ceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", ExceptionMessages::notEn
oughArguments(1, info.Length())), info.GetIsolate()); | |
6042 return; | |
6043 } | |
6044 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6045 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
6046 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; | |
6047 for (int i = 1; i < info.Length(); ++i) { | |
6048 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { | |
6049 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInt
erfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", "parameter 2 is not
of type 'TestInterfaceEmpty'."), info.GetIsolate()); | |
6050 return; | |
6051 } | |
6052 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8:
:Handle<v8::Object>::Cast(info[i]))); | |
6053 } | |
6054 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter
faceEmptyArg, variadicTestInterfaceEmptyArgs); | |
6055 } | |
6056 | |
6057 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) | |
6058 { | |
6059 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6060 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEm
ptyArgMethod(info); | |
6061 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6062 } | |
6063 | |
6064 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
6065 { | |
6066 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6067 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > v
ariadicTestInterfaceWillBeGarbageCollectedArg; | |
6068 for (int i = 0; i < info.Length(); ++i) { | |
6069 if (!V8TestInterfaceWillBeGarbageCollected::hasInstance(info[i], info.Ge
tIsolate())) { | |
6070 throwTypeError(ExceptionMessages::failedToExecute("voidMethodVariadi
cTestInterfaceWillBeGarbageCollectedArg", "TestObject", "parameter 1 is not of t
ype 'TestInterfaceWillBeGarbageCollected'."), info.GetIsolate()); | |
6071 return; | |
6072 } | |
6073 variadicTestInterfaceWillBeGarbageCollectedArg.append(V8TestInterfaceWil
lBeGarbageCollected::toNative(v8::Handle<v8::Object>::Cast(info[i]))); | |
6074 } | |
6075 impl->voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(variadicTestI
nterfaceWillBeGarbageCollectedArg); | |
6076 } | |
6077 | |
6078 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | |
6079 { | |
6080 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6081 TestObjectV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedA
rgMethod(info); | |
6082 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6083 } | |
6084 | |
6085 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6086 { | |
6087 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | |
6088 if (UNLIKELY(info.Length() < 1)) { | |
6089 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6090 exceptionState.throwIfNeeded(); | |
6091 return; | |
6092 } | |
6093 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6094 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | |
6095 impl->overloadedMethodA(longArg); | |
6096 } | |
6097 | |
6098 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6099 { | |
6100 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | |
6101 if (UNLIKELY(info.Length() < 2)) { | 3536 if (UNLIKELY(info.Length() < 2)) { |
6102 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | 3537 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
6103 exceptionState.throwIfNeeded(); | 3538 exceptionState.throwIfNeeded(); |
6104 return; | 3539 return; |
6105 } | 3540 } |
6106 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3541 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6107 V8TRYCATCH_EXCEPTION_VOID(int, longArg1, toInt32(info[0], exceptionState), e
xceptionState); | 3542 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
6108 V8TRYCATCH_EXCEPTION_VOID(int, longArg2, toInt32(info[1], exceptionState), e
xceptionState); | 3543 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[1])); |
6109 impl->overloadedMethodA(longArg1, longArg2); | 3544 RefPtr<TestObject> result = impl->methodThatRequiresAllArgsAndThrows(strArg,
objArg, exceptionState); |
6110 } | 3545 if (exceptionState.throwIfNeeded()) |
6111 | 3546 return; |
6112 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 3547 v8SetReturnValue(info, result.release()); |
6113 { | 3548 } |
6114 if (((info.Length() == 1))) { | 3549 |
6115 overloadedMethodA1Method(info); | 3550 static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
6116 return; | 3551 { |
6117 } | 3552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6118 if (((info.Length() == 2))) { | 3553 TestObjectV8Internal::methodThatRequiresAllArgsAndThrowsMethod(info); |
6119 overloadedMethodA2Method(info); | 3554 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6120 return; | 3555 } |
6121 } | 3556 |
6122 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); | 3557 static void methodQueryListListenerMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
6123 if (UNLIKELY(info.Length() < 1)) { | 3558 { |
6124 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3559 if (UNLIKELY(info.Length() < 1)) { |
6125 exceptionState.throwIfNeeded(); | 3560 throwTypeError(ExceptionMessages::failedToExecute("methodQueryListListen
er", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); |
6126 return; | 3561 return; |
6127 } | 3562 } |
6128 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 3563 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6129 exceptionState.throwIfNeeded(); | 3564 V8TRYCATCH_VOID(RefPtrWillBeRawPtr<MediaQueryListListener>, listener, MediaQ
ueryListListener::create(ScriptValue(info[0], info.GetIsolate()))); |
6130 } | 3565 impl->methodQueryListListener(listener); |
6131 | 3566 } |
6132 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 3567 |
6133 { | 3568 static void methodQueryListListenerMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
6134 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3569 { |
6135 TestObjectV8Internal::overloadedMethodAMethod(info); | 3570 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6136 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3571 TestObjectV8Internal::methodQueryListListenerMethod(info); |
6137 } | 3572 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6138 | 3573 } |
6139 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3574 |
6140 { | 3575 static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
6141 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | 3576 { |
6142 if (UNLIKELY(info.Length() < 1)) { | 3577 ExceptionState exceptionState(ExceptionState::ExecutionContext, "serializedV
alue", "TestObject", info.Holder(), info.GetIsolate()); |
6143 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3578 if (UNLIKELY(info.Length() < 1)) { |
6144 exceptionState.throwIfNeeded(); | 3579 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
6145 return; | 3580 exceptionState.throwIfNeeded(); |
6146 } | 3581 return; |
6147 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3582 } |
6148 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3583 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6149 impl->overloadedMethodB(longArg); | 3584 RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(
info[0], 0, 0, exceptionState, info.GetIsolate()); |
6150 } | 3585 if (exceptionState.throwIfNeeded()) |
6151 | 3586 return; |
6152 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3587 impl->serializedValue(serializedArg); |
6153 { | 3588 } |
6154 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | 3589 |
6155 if (UNLIKELY(info.Length() < 1)) { | 3590 static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
6156 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3591 { |
6157 exceptionState.throwIfNeeded(); | 3592 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6158 return; | 3593 TestObjectV8Internal::serializedValueMethod(info); |
6159 } | 3594 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6160 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3595 } |
6161 V8TRYCATCH_EXCEPTION_VOID(int, longArg1, toInt32(info[0], exceptionState), e
xceptionState); | 3596 |
6162 if (UNLIKELY(info.Length() <= 1)) { | 3597 static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
6163 impl->overloadedMethodB(longArg1); | 3598 { |
6164 return; | 3599 if (UNLIKELY(info.Length() < 1)) { |
6165 } | 3600 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test
Object", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsola
te()); |
6166 V8TRYCATCH_EXCEPTION_VOID(int, longArg2, toInt32(info[1], exceptionState), e
xceptionState); | 3601 return; |
6167 impl->overloadedMethodB(longArg1, longArg2); | 3602 } |
6168 } | 3603 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6169 | 3604 V8TRYCATCH_VOID(Dictionary, oo, Dictionary(info[0], info.GetIsolate())); |
6170 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 3605 if (!oo.isUndefinedOrNull() && !oo.isObject()) { |
6171 { | 3606 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test
Object", "parameter 1 ('oo') is not an object."), info.GetIsolate()); |
6172 if (((info.Length() == 1))) { | 3607 return; |
6173 overloadedMethodB1Method(info); | 3608 } |
6174 return; | 3609 V8TRYCATCH_VOID(Dictionary, ooo, Dictionary(info[1], info.GetIsolate())); |
6175 } | 3610 if (!ooo.isUndefinedOrNull() && !ooo.isObject()) { |
6176 if (((info.Length() == 1)) || ((info.Length() == 2))) { | 3611 throwTypeError(ExceptionMessages::failedToExecute("optionsObject", "Test
Object", "parameter 2 ('ooo') is not an object."), info.GetIsolate()); |
6177 overloadedMethodB2Method(info); | 3612 return; |
6178 return; | 3613 } |
6179 } | 3614 impl->optionsObject(oo, ooo); |
6180 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | 3615 } |
6181 if (UNLIKELY(info.Length() < 1)) { | 3616 |
6182 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3617 static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
6183 exceptionState.throwIfNeeded(); | 3618 { |
6184 return; | 3619 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6185 } | 3620 TestObjectV8Internal::optionsObjectMethod(info); |
6186 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 3621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6187 exceptionState.throwIfNeeded(); | 3622 } |
6188 } | 3623 |
6189 | 3624 static void optionsObjectListMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
6190 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 3625 { |
6191 { | 3626 if (UNLIKELY(info.Length() < 1)) { |
6192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3627 throwTypeError(ExceptionMessages::failedToExecute("optionsObjectList", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
6193 TestObjectV8Internal::overloadedMethodBMethod(info); | 3628 return; |
6194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3629 } |
6195 } | 3630 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6196 | 3631 V8TRYCATCH_VOID(Vector<Dictionary>, list, toNativeArray<Dictionary>(info[0],
1, info.GetIsolate())); |
6197 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3632 impl->optionsObjectList(list); |
6198 { | 3633 } |
6199 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); | 3634 |
6200 if (UNLIKELY(info.Length() < 1)) { | 3635 static void optionsObjectListMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
6201 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3636 { |
6202 exceptionState.throwIfNeeded(); | 3637 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6203 return; | 3638 TestObjectV8Internal::optionsObjectListMethod(info); |
6204 } | 3639 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6205 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3640 } |
6206 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3641 |
6207 impl->overloadedMethodC(longArg); | 3642 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
6208 } | 3643 { |
6209 | 3644 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
xception", "TestObject", info.Holder(), info.GetIsolate()); |
6210 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3645 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6211 { | 3646 impl->methodWithException(exceptionState); |
6212 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); | 3647 if (exceptionState.throwIfNeeded()) |
6213 if (UNLIKELY(info.Length() < 1)) { | 3648 return; |
6214 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3649 } |
6215 exceptionState.throwIfNeeded(); | 3650 |
6216 return; | 3651 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
6217 } | 3652 { |
6218 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3653 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6219 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 3654 TestObjectV8Internal::methodWithExceptionMethod(info); |
6220 V8TRYCATCH_VOID(Vector<int>, longArgs, toNativeArguments<int>(info, 1)); | 3655 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6221 impl->overloadedMethodC(longArg, longArgs); | 3656 } |
6222 } | 3657 |
6223 | 3658 static void customMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
6224 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 3659 { |
6225 { | 3660 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6226 if (((info.Length() == 1))) { | 3661 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Cu
stomTestFeature); |
6227 overloadedMethodC1Method(info); | 3662 V8TestObject::customMethodMethodCustom(info); |
6228 return; | 3663 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6229 } | 3664 } |
6230 if () { | 3665 |
6231 overloadedMethodC2Method(info); | 3666 static void customMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
6232 return; | 3667 { |
6233 } | 3668 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6234 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); | 3669 V8TestObject::customMethodWithArgsMethodCustom(info); |
6235 if (UNLIKELY(info.Length() < 1)) { | 3670 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6236 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3671 } |
6237 exceptionState.throwIfNeeded(); | 3672 |
6238 return; | 3673 static void withScriptStateVoidMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
6239 } | |
6240 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
6241 exceptionState.throwIfNeeded(); | |
6242 } | |
6243 | |
6244 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
6245 { | |
6246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6247 TestObjectV8Internal::overloadedMethodCMethod(info); | |
6248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6249 } | |
6250 | |
6251 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6252 { | |
6253 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); | |
6254 if (UNLIKELY(info.Length() < 1)) { | |
6255 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6256 exceptionState.throwIfNeeded(); | |
6257 return; | |
6258 } | |
6259 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6260 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | |
6261 impl->overloadedMethodD(longArg); | |
6262 } | |
6263 | |
6264 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6265 { | |
6266 if (UNLIKELY(info.Length() < 1)) { | |
6267 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodD", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | |
6268 return; | |
6269 } | |
6270 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6271 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
6272 impl->overloadedMethodD(testInterfaceEmptyArg); | |
6273 } | |
6274 | |
6275 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
6276 { | |
6277 if (((info.Length() == 1))) { | |
6278 overloadedMethodD1Method(info); | |
6279 return; | |
6280 } | |
6281 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate())))) { | |
6282 overloadedMethodD2Method(info); | |
6283 return; | |
6284 } | |
6285 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObject", info.Holder(), info.GetIsolate()); | |
6286 if (UNLIKELY(info.Length() < 1)) { | |
6287 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6288 exceptionState.throwIfNeeded(); | |
6289 return; | |
6290 } | |
6291 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
6292 exceptionState.throwIfNeeded(); | |
6293 } | |
6294 | |
6295 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
6296 { | |
6297 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6298 TestObjectV8Internal::overloadedMethodDMethod(info); | |
6299 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6300 } | |
6301 | |
6302 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6303 { | |
6304 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObject", info.Holder(), info.GetIsolate()); | |
6305 if (UNLIKELY(info.Length() < 1)) { | |
6306 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6307 exceptionState.throwIfNeeded(); | |
6308 return; | |
6309 } | |
6310 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6311 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | |
6312 impl->overloadedMethodE(longArg); | |
6313 } | |
6314 | |
6315 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6316 { | |
6317 if (UNLIKELY(info.Length() < 1)) { | |
6318 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodE", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | |
6319 return; | |
6320 } | |
6321 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6322 V8TRYCATCH_VOID(Vector<int>, longArrayArg, toNativeArray<int>(info[0], 1, in
fo.GetIsolate())); | |
6323 impl->overloadedMethodE(longArrayArg); | |
6324 } | |
6325 | |
6326 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
6327 { | |
6328 if (((info.Length() == 1))) { | |
6329 overloadedMethodE1Method(info); | |
6330 return; | |
6331 } | |
6332 if (((info.Length() == 1) && (info[0]->IsArray()))) { | |
6333 overloadedMethodE2Method(info); | |
6334 return; | |
6335 } | |
6336 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObject", info.Holder(), info.GetIsolate()); | |
6337 if (UNLIKELY(info.Length() < 1)) { | |
6338 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6339 exceptionState.throwIfNeeded(); | |
6340 return; | |
6341 } | |
6342 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
6343 exceptionState.throwIfNeeded(); | |
6344 } | |
6345 | |
6346 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
6347 { | |
6348 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6349 TestObjectV8Internal::overloadedMethodEMethod(info); | |
6350 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6351 } | |
6352 | |
6353 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6354 { | |
6355 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodF", "TestObject", info.Holder(), info.GetIsolate()); | |
6356 if (UNLIKELY(info.Length() < 1)) { | |
6357 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6358 exceptionState.throwIfNeeded(); | |
6359 return; | |
6360 } | |
6361 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6362 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | |
6363 impl->overloadedMethodF(longArg); | |
6364 } | |
6365 | |
6366 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6367 { | |
6368 if (UNLIKELY(info.Length() < 1)) { | |
6369 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodF", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | |
6370 return; | |
6371 } | |
6372 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6373 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyNullableArg, V8TestIn
terfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
6374 impl->overloadedMethodF(testInterfaceEmptyNullableArg); | |
6375 } | |
6376 | |
6377 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
6378 { | |
6379 if (((info.Length() == 1))) { | |
6380 overloadedMethodF1Method(info); | |
6381 return; | |
6382 } | |
6383 if (((info.Length() == 1) && (info[0]->IsNull() || V8TestInterfaceEmpty::has
Instance(info[0], info.GetIsolate())))) { | |
6384 overloadedMethodF2Method(info); | |
6385 return; | |
6386 } | |
6387 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodF", "TestObject", info.Holder(), info.GetIsolate()); | |
6388 if (UNLIKELY(info.Length() < 1)) { | |
6389 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6390 exceptionState.throwIfNeeded(); | |
6391 return; | |
6392 } | |
6393 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
6394 exceptionState.throwIfNeeded(); | |
6395 } | |
6396 | |
6397 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
6398 { | |
6399 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6400 TestObjectV8Internal::overloadedMethodFMethod(info); | |
6401 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6402 } | |
6403 | |
6404 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6405 { | |
6406 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6407 impl->overloadedMethodG(); | |
6408 } | |
6409 | |
6410 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6411 { | |
6412 if (UNLIKELY(info.Length() < 1)) { | |
6413 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodG", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | |
6414 return; | |
6415 } | |
6416 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6417 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strictTypeCheckingS
tringArg, info[0]); | |
6418 impl->overloadedMethodG(strictTypeCheckingStringArg); | |
6419 } | |
6420 | |
6421 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
6422 { | |
6423 if (((info.Length() == 0))) { | |
6424 overloadedMethodG1Method(info); | |
6425 return; | |
6426 } | |
6427 if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || info[0]->IsStrin
g() || info[0]->IsObject()))) { | |
6428 overloadedMethodG2Method(info); | |
6429 return; | |
6430 } | |
6431 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodG", "Test
Object", "No function was found that matched the signature provided."), info.Get
Isolate()); | |
6432 } | |
6433 | |
6434 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
6435 { | |
6436 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6437 TestObjectV8Internal::overloadedMethodGMethod(info); | |
6438 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6439 } | |
6440 | |
6441 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6442 { | |
6443 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6444 impl->overloadedMethodH(); | |
6445 } | |
6446 | |
6447 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6448 { | |
6449 if (UNLIKELY(info.Length() < 1)) { | |
6450 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | |
6451 return; | |
6452 } | |
6453 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6454 if (info.Length() <= 0 || !info[0]->IsFunction()) { | |
6455 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "
TestObject", "The callback provided as parameter 1 is not a function."), info.Ge
tIsolate()); | |
6456 return; | |
6457 } | |
6458 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInter
face::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(in
fo.GetIsolate())); | |
6459 impl->overloadedMethodH(testCallbackInterfaceArg.release()); | |
6460 } | |
6461 | |
6462 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
6463 { | |
6464 if (((info.Length() == 0))) { | |
6465 overloadedMethodH1Method(info); | |
6466 return; | |
6467 } | |
6468 if (((info.Length() == 1) && (info[0]->IsNull() || info[0]->IsFunction())))
{ | |
6469 overloadedMethodH2Method(info); | |
6470 return; | |
6471 } | |
6472 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "Test
Object", "No function was found that matched the signature provided."), info.Get
Isolate()); | |
6473 } | |
6474 | |
6475 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
6476 { | |
6477 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6478 TestObjectV8Internal::overloadedMethodHMethod(info); | |
6479 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6480 } | |
6481 | |
6482 static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6483 { | |
6484 if (UNLIKELY(info.Length() < 1)) { | |
6485 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodI", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | |
6486 return; | |
6487 } | |
6488 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6489 V8TRYCATCH_VOID(Dictionary, dictionaryArg, Dictionary(info[0], info.GetIsola
te())); | |
6490 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | |
6491 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodI", "
TestObject", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate
()); | |
6492 return; | |
6493 } | |
6494 impl->overloadedMethodI(dictionaryArg); | |
6495 } | |
6496 | |
6497 static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
6498 { | |
6499 if (UNLIKELY(info.Length() < 1)) { | |
6500 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodI", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); | |
6501 return; | |
6502 } | |
6503 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6504 V8TRYCATCH_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue(
))); | |
6505 impl->overloadedMethodI(doubleArg); | |
6506 } | |
6507 | |
6508 static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | |
6509 { | |
6510 if (((info.Length() == 1) && (info[0]->IsObject()))) { | |
6511 overloadedMethodI1Method(info); | |
6512 return; | |
6513 } | |
6514 if (((info.Length() == 1))) { | |
6515 overloadedMethodI2Method(info); | |
6516 return; | |
6517 } | |
6518 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodI", "TestObject", info.Holder(), info.GetIsolate()); | |
6519 if (UNLIKELY(info.Length() < 1)) { | |
6520 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6521 exceptionState.throwIfNeeded(); | |
6522 return; | |
6523 } | |
6524 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
6525 exceptionState.throwIfNeeded(); | |
6526 } | |
6527 | |
6528 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
6529 { | |
6530 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6531 TestObjectV8Internal::overloadedMethodIMethod(info); | |
6532 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6533 } | |
6534 | |
6535 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
6536 { | |
6537 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6538 impl->overloadedPerWorldBindingsMethod(); | |
6539 } | |
6540 | |
6541 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
6542 { | |
6543 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6544 impl->overloadedPerWorldBindingsMethod(); | |
6545 } | |
6546 | |
6547 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
6548 { | |
6549 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
6550 if (UNLIKELY(info.Length() < 1)) { | |
6551 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6552 exceptionState.throwIfNeeded(); | |
6553 return; | |
6554 } | |
6555 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6556 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | |
6557 impl->overloadedPerWorldBindingsMethod(longArg); | |
6558 } | |
6559 | |
6560 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
6561 { | |
6562 if (((info.Length() == 0))) { | |
6563 overloadedPerWorldBindingsMethod1Method(info); | |
6564 return; | |
6565 } | |
6566 if (((info.Length() == 1))) { | |
6567 overloadedPerWorldBindingsMethod2Method(info); | |
6568 return; | |
6569 } | |
6570 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBinding
sMethod", "TestObject", "No function was found that matched the signature provid
ed."), info.GetIsolate()); | |
6571 } | |
6572 | |
6573 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
6574 { | |
6575 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6576 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info); | |
6577 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6578 } | |
6579 | |
6580 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
6581 { | |
6582 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
6583 if (UNLIKELY(info.Length() < 1)) { | |
6584 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6585 exceptionState.throwIfNeeded(); | |
6586 return; | |
6587 } | |
6588 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6589 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | |
6590 impl->overloadedPerWorldBindingsMethod(longArg); | |
6591 } | |
6592 | |
6593 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
6594 { | |
6595 if (((info.Length() == 0))) { | |
6596 overloadedPerWorldBindingsMethod1MethodForMainWorld(info); | |
6597 return; | |
6598 } | |
6599 if (((info.Length() == 1))) { | |
6600 overloadedPerWorldBindingsMethod2MethodForMainWorld(info); | |
6601 return; | |
6602 } | |
6603 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBinding
sMethod", "TestObject", "No function was found that matched the signature provid
ed."), info.GetIsolate()); | |
6604 } | |
6605 | |
6606 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) | |
6607 { | |
6608 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6609 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(inf
o); | |
6610 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6611 } | |
6612 | |
6613 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
6614 { | |
6615 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
6616 if (UNLIKELY(info.Length() < 1)) { | |
6617 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6618 exceptionState.throwIfNeeded(); | |
6619 return; | |
6620 } | |
6621 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | |
6622 TestObject::overloadedStaticMethod(longArg); | |
6623 } | |
6624 | |
6625 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
6626 { | |
6627 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
6628 if (UNLIKELY(info.Length() < 2)) { | |
6629 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); | |
6630 exceptionState.throwIfNeeded(); | |
6631 return; | |
6632 } | |
6633 V8TRYCATCH_EXCEPTION_VOID(int, longArg1, toInt32(info[0], exceptionState), e
xceptionState); | |
6634 V8TRYCATCH_EXCEPTION_VOID(int, longArg2, toInt32(info[1], exceptionState), e
xceptionState); | |
6635 TestObject::overloadedStaticMethod(longArg1, longArg2); | |
6636 } | |
6637 | |
6638 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
6639 { | |
6640 if (((info.Length() == 1))) { | |
6641 overloadedStaticMethod1Method(info); | |
6642 return; | |
6643 } | |
6644 if (((info.Length() == 2))) { | |
6645 overloadedStaticMethod2Method(info); | |
6646 return; | |
6647 } | |
6648 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
6649 if (UNLIKELY(info.Length() < 1)) { | |
6650 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6651 exceptionState.throwIfNeeded(); | |
6652 return; | |
6653 } | |
6654 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | |
6655 exceptionState.throwIfNeeded(); | |
6656 } | |
6657 | |
6658 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
6659 { | |
6660 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6661 TestObjectV8Internal::overloadedStaticMethodMethod(info); | |
6662 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6663 } | |
6664 | |
6665 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
6666 { | |
6667 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); | |
6668 if (UNLIKELY(info.Length() < 1)) { | |
6669 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6670 exceptionState.throwIfNeeded(); | |
6671 return; | |
6672 } | |
6673 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6674 unsigned clampUnsignedShortArg = 0; | |
6675 V8TRYCATCH_VOID(double, clampUnsignedShortArgNativeValue, info[0]->NumberVal
ue()); | |
6676 if (!std::isnan(clampUnsignedShortArgNativeValue)) | |
6677 clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortArgNat
iveValue); | |
6678 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); | |
6679 } | |
6680 | |
6681 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | |
6682 { | |
6683 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6684 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info); | |
6685 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6686 } | |
6687 | |
6688 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
6689 { | |
6690 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC
lampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
6691 if (UNLIKELY(info.Length() < 1)) { | |
6692 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6693 exceptionState.throwIfNeeded(); | |
6694 return; | |
6695 } | |
6696 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6697 unsigned clampUnsignedLongArg = 0; | |
6698 V8TRYCATCH_VOID(double, clampUnsignedLongArgNativeValue, info[0]->NumberValu
e()); | |
6699 if (!std::isnan(clampUnsignedLongArgNativeValue)) | |
6700 clampUnsignedLongArg = clampTo<unsigned long>(clampUnsignedLongArgNative
Value); | |
6701 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); | |
6702 } | |
6703 | |
6704 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
6705 { | |
6706 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6707 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info); | |
6708 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6709 } | |
6710 | |
6711 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
6712 { | |
6713 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6714 V8TRYCATCH_VOID(TestInterfaceEmpty*, defaultUndefinedTestInterfaceEmptyArg,
V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
6715 impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestIn
terfaceEmptyArg); | |
6716 } | |
6717 | |
6718 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
6719 { | |
6720 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6721 TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(
info); | |
6722 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6723 } | |
6724 | |
6725 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
6726 { | |
6727 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultUndefinedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
6728 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6729 V8TRYCATCH_EXCEPTION_VOID(int, defaultUndefinedLongArg, toInt32(info[0], exc
eptionState), exceptionState); | |
6730 impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); | |
6731 } | |
6732 | |
6733 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | |
6734 { | |
6735 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6736 TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info); | |
6737 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6738 } | |
6739 | |
6740 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallback
Info<v8::Value>& info) | |
6741 { | |
6742 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6743 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedStr
ingArg, info[0]); | |
6744 impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg); | |
6745 } | |
6746 | |
6747 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | |
6748 { | |
6749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6750 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info); | |
6751 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6752 } | |
6753 | |
6754 static void voidMethodDefaultNullStringStringArgMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
6755 { | |
6756 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6757 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringSt
ringArg, argumentOrNull(info, 0)); | |
6758 impl->voidMethodDefaultNullStringStringArg(defaultNullStringStringArg); | |
6759 } | |
6760 | |
6761 static void voidMethodDefaultNullStringStringArgMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
6762 { | |
6763 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6764 TestObjectV8Internal::voidMethodDefaultNullStringStringArgMethod(info); | |
6765 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6766 } | |
6767 | |
6768 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
6769 { | |
6770 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE
nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
6771 if (UNLIKELY(info.Length() < 1)) { | |
6772 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | |
6773 exceptionState.throwIfNeeded(); | |
6774 return; | |
6775 } | |
6776 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6777 V8TRYCATCH_EXCEPTION_VOID(int, enforceRangeLongArg, toInt32(info[0], Enforce
Range, exceptionState), exceptionState); | |
6778 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg); | |
6779 } | |
6780 | |
6781 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
6782 { | |
6783 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6784 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info); | |
6785 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6786 } | |
6787 | |
6788 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
6789 { | |
6790 if (UNLIKELY(info.Length() < 1)) { | |
6791 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTreatNullAs
NullStringStringArg", "TestObject", ExceptionMessages::notEnoughArguments(1, inf
o.Length())), info.GetIsolate()); | |
6792 return; | |
6793 } | |
6794 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6795 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, treatN
ullAsNullStringStringArg, info[0]); | |
6796 impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringAr
g); | |
6797 } | |
6798 | |
6799 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | |
6800 { | |
6801 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6802 TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info); | |
6803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6804 } | |
6805 | |
6806 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe
thod(const v8::FunctionCallbackInfo<v8::Value>& info) | |
6807 { | |
6808 if (UNLIKELY(info.Length() < 1)) { | |
6809 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTreatNullAs
NullStringTreatUndefinedAsNullStringStringArg", "TestObject", ExceptionMessages:
:notEnoughArguments(1, info.Length())), info.GetIsolate()); | |
6810 return; | |
6811 } | |
6812 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6813 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, treatNullAsNullStringStringArg, info[0]); | |
6814 impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(tre
atNullAsNullStringStringArg); | |
6815 } | |
6816 | |
6817 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe
thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | |
6818 { | |
6819 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6820 TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStr
ingStringArgMethod(info); | |
6821 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6822 } | |
6823 | |
6824 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | |
6825 { | |
6826 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
6827 impl->activityLoggingAccessForAllWorldsMethod(); | |
6828 } | |
6829 | |
6830 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
6831 { | |
6832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6833 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
6834 if (contextData && contextData->activityLogger()) { | |
6835 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | |
6836 contextData->activityLogger()->log("TestObject.activityLoggingAccessForA
llWorldsMethod", info.Length(), loggerArgs.data(), "Method"); | |
6837 } | |
6838 TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info); | |
6839 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6840 } | |
6841 | |
6842 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
6843 { | 3674 { |
6844 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3675 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6845 ScriptState* currentState = ScriptState::current(); | 3676 ScriptState* currentState = ScriptState::current(); |
6846 if (!currentState) | 3677 if (!currentState) |
6847 return; | 3678 return; |
6848 ScriptState& state = *currentState; | 3679 ScriptState& state = *currentState; |
6849 impl->callWithScriptStateVoidMethod(&state); | 3680 impl->withScriptStateVoid(&state); |
6850 if (state.hadException()) { | 3681 if (state.hadException()) { |
6851 v8::Local<v8::Value> exception = state.exception(); | 3682 v8::Local<v8::Value> exception = state.exception(); |
6852 state.clearException(); | 3683 state.clearException(); |
6853 throwError(exception, info.GetIsolate()); | 3684 throwError(exception, info.GetIsolate()); |
6854 return; | 3685 return; |
6855 } | 3686 } |
6856 } | 3687 } |
6857 | 3688 |
6858 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 3689 static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
6859 { | 3690 { |
6860 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3691 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6861 TestObjectV8Internal::callWithScriptStateVoidMethodMethod(info); | 3692 TestObjectV8Internal::withScriptStateVoidMethod(info); |
6862 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3693 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6863 } | 3694 } |
6864 | 3695 |
6865 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | 3696 static void withScriptStateObjMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
6866 { | 3697 { |
6867 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3698 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6868 ScriptState* currentState = ScriptState::current(); | 3699 ScriptState* currentState = ScriptState::current(); |
6869 if (!currentState) | 3700 if (!currentState) |
6870 return; | 3701 return; |
6871 ScriptState& state = *currentState; | 3702 ScriptState& state = *currentState; |
6872 int result = impl->callWithScriptStateLongMethod(&state); | 3703 RefPtr<TestObject> result = impl->withScriptStateObj(&state); |
6873 if (state.hadException()) { | 3704 if (state.hadException()) { |
6874 v8::Local<v8::Value> exception = state.exception(); | 3705 v8::Local<v8::Value> exception = state.exception(); |
6875 state.clearException(); | 3706 state.clearException(); |
6876 throwError(exception, info.GetIsolate()); | 3707 throwError(exception, info.GetIsolate()); |
6877 return; | 3708 return; |
6878 } | 3709 } |
6879 v8SetReturnValueInt(info, result); | 3710 v8SetReturnValue(info, result.release()); |
6880 } | 3711 } |
6881 | 3712 |
6882 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 3713 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
6883 { | 3714 { |
6884 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3715 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6885 TestObjectV8Internal::callWithScriptStateLongMethodMethod(info); | 3716 TestObjectV8Internal::withScriptStateObjMethod(info); |
6886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3717 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6887 } | 3718 } |
6888 | 3719 |
6889 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 3720 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) |
6890 { | 3721 { |
6891 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3722 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withScriptS
tateVoidException", "TestObject", info.Holder(), info.GetIsolate()); |
6892 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | |
6893 impl->callWithExecutionContextVoidMethod(scriptContext); | |
6894 } | |
6895 | |
6896 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | |
6897 { | |
6898 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
6899 TestObjectV8Internal::callWithExecutionContextVoidMethodMethod(info); | |
6900 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
6901 } | |
6902 | |
6903 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::Functi
onCallbackInfo<v8::Value>& info) | |
6904 { | |
6905 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3723 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6906 ScriptState* currentState = ScriptState::current(); | 3724 ScriptState* currentState = ScriptState::current(); |
6907 if (!currentState) | 3725 if (!currentState) |
6908 return; | 3726 return; |
6909 ScriptState& state = *currentState; | 3727 ScriptState& state = *currentState; |
6910 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 3728 impl->withScriptStateVoidException(&state, exceptionState); |
6911 impl->callWithScriptStateExecutionContextVoidMethod(&state, scriptContext); | 3729 if (exceptionState.throwIfNeeded()) |
| 3730 return; |
6912 if (state.hadException()) { | 3731 if (state.hadException()) { |
6913 v8::Local<v8::Value> exception = state.exception(); | 3732 v8::Local<v8::Value> exception = state.exception(); |
6914 state.clearException(); | 3733 state.clearException(); |
6915 throwError(exception, info.GetIsolate()); | 3734 throwError(exception, info.GetIsolate()); |
6916 return; | 3735 return; |
6917 } | 3736 } |
6918 } | 3737 } |
6919 | 3738 |
6920 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 3739 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
6921 { | 3740 { |
6922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3741 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6923 TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(in
fo); | 3742 TestObjectV8Internal::withScriptStateVoidExceptionMethod(info); |
6924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3743 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6925 } | 3744 } |
6926 | 3745 |
6927 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) | 3746 static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
6928 { | 3747 { |
| 3748 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withScriptS
tateObjException", "TestObject", info.Holder(), info.GetIsolate()); |
6929 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3749 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6930 ScriptState* currentState = ScriptState::current(); | 3750 ScriptState* currentState = ScriptState::current(); |
6931 if (!currentState) | 3751 if (!currentState) |
6932 return; | 3752 return; |
6933 ScriptState& state = *currentState; | 3753 ScriptState& state = *currentState; |
6934 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 0)); | 3754 RefPtr<TestObject> result = impl->withScriptStateObjException(&state, except
ionState); |
6935 impl->callWithScriptStateScriptArgumentsVoidMethod(&state, scriptArguments.r
elease()); | 3755 if (exceptionState.throwIfNeeded()) |
| 3756 return; |
6936 if (state.hadException()) { | 3757 if (state.hadException()) { |
6937 v8::Local<v8::Value> exception = state.exception(); | 3758 v8::Local<v8::Value> exception = state.exception(); |
6938 state.clearException(); | 3759 state.clearException(); |
6939 throwError(exception, info.GetIsolate()); | 3760 throwError(exception, info.GetIsolate()); |
6940 return; | 3761 return; |
6941 } | 3762 } |
6942 } | 3763 v8SetReturnValue(info, result.release()); |
6943 | 3764 } |
6944 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 3765 |
6945 { | 3766 static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
6946 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3767 { |
6947 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(inf
o); | 3768 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6948 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3769 TestObjectV8Internal::withScriptStateObjExceptionMethod(info); |
6949 } | 3770 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6950 | 3771 } |
6951 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
(const v8::FunctionCallbackInfo<v8::Value>& info) | 3772 |
6952 { | 3773 static void withExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
6953 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3774 { |
6954 if (UNLIKELY(info.Length() <= 0)) { | 3775 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6955 ScriptState* currentState = ScriptState::current(); | 3776 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
6956 if (!currentState) | 3777 impl->withExecutionContext(scriptContext); |
6957 return; | 3778 } |
6958 ScriptState& state = *currentState; | 3779 |
6959 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 1)); | 3780 static void withExecutionContextMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
6960 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(&st
ate, scriptArguments.release()); | 3781 { |
6961 if (state.hadException()) { | 3782 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6962 v8::Local<v8::Value> exception = state.exception(); | 3783 TestObjectV8Internal::withExecutionContextMethod(info); |
6963 state.clearException(); | 3784 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6964 throwError(exception, info.GetIsolate()); | 3785 } |
6965 return; | 3786 |
6966 } | 3787 static void withExecutionContextAndScriptStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
6967 return; | 3788 { |
6968 } | 3789 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6969 V8TRYCATCH_VOID(bool, optionalBooleanArg, info[0]->BooleanValue()); | |
6970 ScriptState* currentState = ScriptState::current(); | 3790 ScriptState* currentState = ScriptState::current(); |
6971 if (!currentState) | 3791 if (!currentState) |
6972 return; | 3792 return; |
6973 ScriptState& state = *currentState; | 3793 ScriptState& state = *currentState; |
6974 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 1)); | 3794 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
6975 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(&state,
scriptArguments.release(), optionalBooleanArg); | 3795 impl->withExecutionContextAndScriptState(&state, scriptContext); |
6976 if (state.hadException()) { | 3796 if (state.hadException()) { |
6977 v8::Local<v8::Value> exception = state.exception(); | 3797 v8::Local<v8::Value> exception = state.exception(); |
6978 state.clearException(); | 3798 state.clearException(); |
6979 throwError(exception, info.GetIsolate()); | 3799 throwError(exception, info.GetIsolate()); |
6980 return; | 3800 return; |
6981 } | 3801 } |
6982 } | 3802 } |
6983 | 3803 |
6984 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
Callback(const v8::FunctionCallbackInfo<v8::Value>& info) | 3804 static void withExecutionContextAndScriptStateMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
6985 { | 3805 { |
6986 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3806 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
6987 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo
oleanArgMethod(info); | 3807 TestObjectV8Internal::withExecutionContextAndScriptStateMethod(info); |
6988 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3808 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
6989 } | 3809 } |
6990 | 3810 |
6991 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 3811 static void withExecutionContextAndScriptStateObjExceptionMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
6992 { | 3812 { |
6993 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3813 ExceptionState exceptionState(ExceptionState::ExecutionContext, "withExecuti
onContextAndScriptStateObjException", "TestObject", info.Holder(), info.GetIsola
te()); |
6994 impl->callWithActiveWindow(callingDOMWindow(info.GetIsolate())); | 3814 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6995 } | 3815 ScriptState* currentState = ScriptState::current(); |
6996 | 3816 if (!currentState) |
6997 static void callWithActiveWindowMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 3817 return; |
6998 { | 3818 ScriptState& state = *currentState; |
6999 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3819 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
7000 TestObjectV8Internal::callWithActiveWindowMethod(info); | 3820 RefPtr<TestObject> result = impl->withExecutionContextAndScriptStateObjExcep
tion(&state, scriptContext, exceptionState); |
7001 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7002 } | |
7003 | |
7004 static void callWithActiveWindowScriptWindowMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
7005 { | |
7006 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7007 impl->callWithActiveWindowScriptWindow(callingDOMWindow(info.GetIsolate()),
enteredDOMWindow(info.GetIsolate())); | |
7008 } | |
7009 | |
7010 static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
7011 { | |
7012 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7013 TestObjectV8Internal::callWithActiveWindowScriptWindowMethod(info); | |
7014 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7015 } | |
7016 | |
7017 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
7018 { | |
7019 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7020 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check
SecurityForNodeVoidMethod(exceptionState), exceptionState)) { | |
7021 v8SetReturnValueNull(info); | |
7022 exceptionState.throwIfNeeded(); | |
7023 return; | |
7024 } | |
7025 impl->checkSecurityForNodeVoidMethod(); | |
7026 } | |
7027 | |
7028 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
7029 { | |
7030 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7031 TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info); | |
7032 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7033 } | |
7034 | |
7035 #if ENABLE(CONDITION) | |
7036 static void conditionalConditionVoidMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
7037 { | |
7038 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7039 impl->conditionalConditionVoidMethod(); | |
7040 } | |
7041 #endif // ENABLE(CONDITION) | |
7042 | |
7043 #if ENABLE(CONDITION) | |
7044 static void conditionalConditionVoidMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
7045 { | |
7046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7047 TestObjectV8Internal::conditionalConditionVoidMethodMethod(info); | |
7048 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7049 } | |
7050 #endif // ENABLE(CONDITION) | |
7051 | |
7052 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
7053 static void conditionalCondition1AndCondition2VoidMethodMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
7054 { | |
7055 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7056 impl->conditionalCondition1AndCondition2VoidMethod(); | |
7057 } | |
7058 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
7059 | |
7060 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
7061 static void conditionalCondition1AndCondition2VoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | |
7062 { | |
7063 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7064 TestObjectV8Internal::conditionalCondition1AndCondition2VoidMethodMethod(inf
o); | |
7065 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7066 } | |
7067 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
7068 | |
7069 #if ENABLE(CONDITION) | |
7070 static void conditionalConditionStaticVoidMethodMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) | |
7071 { | |
7072 TestObject::conditionalConditionStaticVoidMethod(); | |
7073 } | |
7074 #endif // ENABLE(CONDITION) | |
7075 | |
7076 #if ENABLE(CONDITION) | |
7077 static void conditionalConditionStaticVoidMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
7078 { | |
7079 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7080 TestObjectV8Internal::conditionalConditionStaticVoidMethodMethod(info); | |
7081 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7082 } | |
7083 #endif // ENABLE(CONDITION) | |
7084 | |
7085 static void customVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
7086 { | |
7087 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7088 V8TestObject::customVoidMethodMethodCustom(info); | |
7089 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7090 } | |
7091 | |
7092 #if ENABLE(CONDITION) | |
7093 static void conditionalConditionCustomVoidMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | |
7094 { | |
7095 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7096 V8TestObject::conditionalConditionCustomVoidMethodMethodCustom(info); | |
7097 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7098 } | |
7099 #endif // ENABLE(CONDITION) | |
7100 | |
7101 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
7102 { | |
7103 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7104 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | |
7105 impl->customElementCallbacksVoidMethod(); | |
7106 } | |
7107 | |
7108 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
7109 { | |
7110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7111 TestObjectV8Internal::customElementCallbacksVoidMethodMethod(info); | |
7112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7113 } | |
7114 | |
7115 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | |
7116 { | |
7117 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7118 impl->deprecatedVoidMethod(); | |
7119 } | |
7120 | |
7121 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | |
7122 { | |
7123 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7124 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::voidMethod); | |
7125 TestObjectV8Internal::deprecatedVoidMethodMethod(info); | |
7126 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7127 } | |
7128 | |
7129 static void doNotCheckSignatureVoidMethodMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
7130 { | |
7131 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7132 impl->doNotCheckSignatureVoidMethod(); | |
7133 } | |
7134 | |
7135 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | |
7136 { | |
7137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7138 TestObjectV8Internal::doNotCheckSignatureVoidMethodMethod(info); | |
7139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7140 } | |
7141 | |
7142 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
7143 { | |
7144 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7145 impl->implementedAsMethodName(); | |
7146 } | |
7147 | |
7148 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
7149 { | |
7150 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7151 TestObjectV8Internal::implementedAsVoidMethodMethod(info); | |
7152 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7153 } | |
7154 | |
7155 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
7156 { | |
7157 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7158 impl->measureAsVoidMethod(); | |
7159 } | |
7160 | |
7161 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
7162 { | |
7163 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7164 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | |
7165 TestObjectV8Internal::measureAsVoidMethodMethod(info); | |
7166 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7167 } | |
7168 | |
7169 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | |
7170 { | |
7171 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7172 impl->notEnumerableVoidMethod(); | |
7173 } | |
7174 | |
7175 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | |
7176 { | |
7177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7178 TestObjectV8Internal::notEnumerableVoidMethodMethod(info); | |
7179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7180 } | |
7181 | |
7182 static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | |
7183 { | |
7184 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7185 impl->perContextEnabledVoidMethod(); | |
7186 } | |
7187 | |
7188 static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | |
7189 { | |
7190 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7191 TestObjectV8Internal::perContextEnabledVoidMethodMethod(info); | |
7192 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7193 } | |
7194 | |
7195 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | |
7196 { | |
7197 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7198 impl->perWorldBindingsVoidMethod(); | |
7199 } | |
7200 | |
7201 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | |
7202 { | |
7203 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7204 TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info); | |
7205 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7206 } | |
7207 | |
7208 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallb
ackInfo<v8::Value>& info) | |
7209 { | |
7210 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7211 impl->perWorldBindingsVoidMethod(); | |
7212 } | |
7213 | |
7214 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
7215 { | |
7216 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7217 TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info); | |
7218 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7219 } | |
7220 | |
7221 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
7222 { | |
7223 if (UNLIKELY(info.Length() < 1)) { | |
7224 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidM
ethodTestInterfaceEmptyArg", "TestObject", ExceptionMessages::notEnoughArguments
(1, info.Length())), info.GetIsolate()); | |
7225 return; | |
7226 } | |
7227 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7228 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
7229 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg)
; | |
7230 } | |
7231 | |
7232 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
7233 { | |
7234 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7235 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(
info); | |
7236 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7237 } | |
7238 | |
7239 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | |
7240 { | |
7241 if (UNLIKELY(info.Length() < 1)) { | |
7242 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidM
ethodTestInterfaceEmptyArg", "TestObject", ExceptionMessages::notEnoughArguments
(1, info.Length())), info.GetIsolate()); | |
7243 return; | |
7244 } | |
7245 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7246 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
7247 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg)
; | |
7248 } | |
7249 | |
7250 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain
World(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7251 { | |
7252 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7253 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodF
orMainWorld(info); | |
7254 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7255 } | |
7256 | |
7257 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) | |
7258 { | |
7259 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7260 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); | |
7261 } | |
7262 | |
7263 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | |
7264 { | |
7265 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7266 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
7267 if (contextData && contextData->activityLogger()) { | |
7268 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | |
7269 contextData->activityLogger()->log("TestObject.activityLoggingForAllWorl
dsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data(), "Method"); | |
7270 } | |
7271 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethod(info); | |
7272 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7273 } | |
7274 | |
7275 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWo
rld(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7276 { | |
7277 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7278 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); | |
7279 } | |
7280 | |
7281 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackF
orMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7282 { | |
7283 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7284 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
7285 if (contextData && contextData->activityLogger()) { | |
7286 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | |
7287 contextData->activityLogger()->log("TestObject.activityLoggingForAllWorl
dsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data(), "Method"); | |
7288 } | |
7289 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM
ethodForMainWorld(info); | |
7290 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7291 } | |
7292 | |
7293 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) | |
7294 { | |
7295 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7296 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); | |
7297 } | |
7298 | |
7299 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7300 { | |
7301 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7302 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | |
7303 if (contextData && contextData->activityLogger()) { | |
7304 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | |
7305 contextData->activityLogger()->log("TestObject.activityLoggingForIsolate
dWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data(), "Method"); | |
7306 } | |
7307 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethod(info); | |
7308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7309 } | |
7310 | |
7311 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForM
ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7312 { | |
7313 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7314 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); | |
7315 } | |
7316 | |
7317 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7318 { | |
7319 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7320 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethodForMainWorld(info); | |
7321 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7322 } | |
7323 | |
7324 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
7325 { | |
7326 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | |
7327 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7328 impl->raisesExceptionVoidMethod(exceptionState); | |
7329 if (exceptionState.throwIfNeeded()) | 3821 if (exceptionState.throwIfNeeded()) |
7330 return; | 3822 return; |
7331 } | 3823 if (state.hadException()) { |
7332 | 3824 v8::Local<v8::Value> exception = state.exception(); |
7333 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 3825 state.clearException(); |
7334 { | 3826 throwError(exception, info.GetIsolate()); |
7335 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3827 return; |
7336 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); | 3828 } |
7337 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3829 v8SetReturnValue(info, result.release()); |
7338 } | 3830 } |
7339 | 3831 |
7340 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 3832 static void withExecutionContextAndScriptStateObjExceptionMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
7341 { | 3833 { |
7342 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); | 3834 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7343 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3835 TestObjectV8Internal::withExecutionContextAndScriptStateObjExceptionMethod(i
nfo); |
7344 String result = impl->raisesExceptionStringMethod(exceptionState); | 3836 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7345 if (exceptionState.throwIfNeeded()) | 3837 } |
7346 return; | 3838 |
7347 v8SetReturnValueString(info, result, info.GetIsolate()); | 3839 static void withExecutionContextAndScriptStateWithSpacesMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) |
7348 } | 3840 { |
7349 | 3841 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7350 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 3842 ScriptState* currentState = ScriptState::current(); |
7351 { | 3843 if (!currentState) |
7352 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3844 return; |
7353 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); | 3845 ScriptState& state = *currentState; |
7354 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3846 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
7355 } | 3847 RefPtr<TestObject> result = impl->withExecutionContextAndScriptStateWithSpac
es(&state, scriptContext); |
7356 | 3848 if (state.hadException()) { |
7357 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 3849 v8::Local<v8::Value> exception = state.exception(); |
7358 { | 3850 state.clearException(); |
7359 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 3851 throwError(exception, info.GetIsolate()); |
| 3852 return; |
| 3853 } |
| 3854 v8SetReturnValue(info, result.release()); |
| 3855 } |
| 3856 |
| 3857 static void withExecutionContextAndScriptStateWithSpacesMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 3858 { |
| 3859 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3860 TestObjectV8Internal::withExecutionContextAndScriptStateWithSpacesMethod(inf
o); |
| 3861 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3862 } |
| 3863 |
| 3864 static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 3865 { |
| 3866 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 3867 impl->withActiveWindowAndFirstWindow(callingDOMWindow(info.GetIsolate()), en
teredDOMWindow(info.GetIsolate())); |
| 3868 } |
| 3869 |
| 3870 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 3871 { |
| 3872 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3873 TestObjectV8Internal::withActiveWindowAndFirstWindowMethod(info); |
| 3874 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3875 } |
| 3876 |
| 3877 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 3878 { |
| 3879 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithO
ptionalArg", "TestObject", info.Holder(), info.GetIsolate()); |
7360 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3880 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7361 if (UNLIKELY(info.Length() <= 0)) { | 3881 if (UNLIKELY(info.Length() <= 0)) { |
7362 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); | 3882 impl->methodWithOptionalArg(); |
7363 if (exceptionState.throwIfNeeded()) | 3883 return; |
7364 return; | 3884 } |
7365 return; | 3885 V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[0], exceptionState), except
ionState); |
7366 } | 3886 impl->methodWithOptionalArg(opt); |
7367 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt
ate), exceptionState); | 3887 } |
7368 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta
te); | 3888 |
7369 if (exceptionState.throwIfNeeded()) | 3889 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
7370 return; | 3890 { |
7371 } | 3891 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7372 | 3892 TestObjectV8Internal::methodWithOptionalArgMethod(info); |
7373 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 3893 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7374 { | 3894 } |
7375 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3895 |
7376 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); | 3896 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
7377 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3897 { |
7378 } | 3898 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN
onOptionalArgAndOptionalArg", "TestObject", info.Holder(), info.GetIsolate()); |
7379 | 3899 if (UNLIKELY(info.Length() < 1)) { |
7380 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 3900 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
7381 { | 3901 exceptionState.throwIfNeeded(); |
7382 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); | 3902 return; |
7383 if (UNLIKELY(info.Length() < 1)) { | 3903 } |
7384 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 3904 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7385 exceptionState.throwIfNeeded(); | 3905 V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exc
eptionState); |
| 3906 if (UNLIKELY(info.Length() <= 1)) { |
| 3907 impl->methodWithNonOptionalArgAndOptionalArg(nonOpt); |
| 3908 return; |
| 3909 } |
| 3910 V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[1], exceptionState), except
ionState); |
| 3911 impl->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); |
| 3912 } |
| 3913 |
| 3914 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 3915 { |
| 3916 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3917 TestObjectV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(info); |
| 3918 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3919 } |
| 3920 |
| 3921 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 3922 { |
| 3923 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN
onOptionalArgAndTwoOptionalArgs", "TestObject", info.Holder(), info.GetIsolate()
); |
| 3924 if (UNLIKELY(info.Length() < 1)) { |
| 3925 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 3926 exceptionState.throwIfNeeded(); |
| 3927 return; |
| 3928 } |
| 3929 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 3930 V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exc
eptionState); |
| 3931 if (UNLIKELY(info.Length() <= 1)) { |
| 3932 impl->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); |
| 3933 return; |
| 3934 } |
| 3935 V8TRYCATCH_EXCEPTION_VOID(int, opt1, toInt32(info[1], exceptionState), excep
tionState); |
| 3936 if (UNLIKELY(info.Length() <= 2)) { |
| 3937 impl->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); |
| 3938 return; |
| 3939 } |
| 3940 V8TRYCATCH_EXCEPTION_VOID(int, opt2, toInt32(info[2], exceptionState), excep
tionState); |
| 3941 impl->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); |
| 3942 } |
| 3943 |
| 3944 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
| 3945 { |
| 3946 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3947 TestObjectV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(info)
; |
| 3948 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3949 } |
| 3950 |
| 3951 static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 3952 { |
| 3953 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 3954 if (UNLIKELY(info.Length() <= 0)) { |
| 3955 impl->methodWithOptionalString(); |
| 3956 return; |
| 3957 } |
| 3958 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); |
| 3959 impl->methodWithOptionalString(str); |
| 3960 } |
| 3961 |
| 3962 static void methodWithOptionalStringMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 3963 { |
| 3964 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3965 TestObjectV8Internal::methodWithOptionalStringMethod(info); |
| 3966 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3967 } |
| 3968 |
| 3969 static void methodWithOptionalStringIsUndefinedMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
| 3970 { |
| 3971 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 3972 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); |
| 3973 impl->methodWithOptionalStringIsUndefined(str); |
| 3974 } |
| 3975 |
| 3976 static void methodWithOptionalStringIsUndefinedMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
| 3977 { |
| 3978 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3979 TestObjectV8Internal::methodWithOptionalStringIsUndefinedMethod(info); |
| 3980 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3981 } |
| 3982 |
| 3983 static void methodWithOptionalStringIsNullStringMethod(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 3984 { |
| 3985 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 3986 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, argumentOrNull
(info, 0)); |
| 3987 impl->methodWithOptionalStringIsNullString(str); |
| 3988 } |
| 3989 |
| 3990 static void methodWithOptionalStringIsNullStringMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 3991 { |
| 3992 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3993 TestObjectV8Internal::methodWithOptionalStringIsNullStringMethod(info); |
| 3994 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3995 } |
| 3996 |
| 3997 static void methodWithCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 3998 { |
| 3999 if (UNLIKELY(info.Length() < 1)) { |
| 4000 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackInt
erfaceArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()
)), info.GetIsolate()); |
7386 return; | 4001 return; |
7387 } | 4002 } |
7388 TestObject* impl = V8TestObject::toNative(info.Holder()); | 4003 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7389 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 4004 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
7390 exceptionState.throwTypeError("The callback provided as parameter 1 is n
ot a function."); | 4005 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackInt
erfaceArg", "TestObject", "The callback provided as parameter 1 is not a functio
n."), info.GetIsolate()); |
7391 exceptionState.throwIfNeeded(); | 4006 return; |
7392 return; | 4007 } |
7393 } | 4008 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c
reate(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetI
solate())); |
7394 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInter
face::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(in
fo.GetIsolate())); | 4009 impl->methodWithCallbackInterfaceArg(callbackInterface.release()); |
7395 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg.release(), exceptionState); | 4010 } |
7396 if (exceptionState.throwIfNeeded()) | 4011 |
7397 return; | 4012 static void methodWithCallbackInterfaceArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
7398 } | 4013 { |
7399 | 4014 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7400 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 4015 TestObjectV8Internal::methodWithCallbackInterfaceArgMethod(info); |
7401 { | 4016 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7402 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4017 } |
7403 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); | 4018 |
7404 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4019 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) |
7405 } | 4020 { |
7406 | 4021 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN
onCallbackArgAndCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsol
ate()); |
7407 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 4022 if (UNLIKELY(info.Length() < 2)) { |
7408 { | 4023 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
7409 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); | 4024 exceptionState.throwIfNeeded(); |
7410 TestObject* impl = V8TestObject::toNative(info.Holder()); | 4025 return; |
7411 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg; | 4026 } |
| 4027 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4028 V8TRYCATCH_EXCEPTION_VOID(int, nonCallback, toInt32(info[0], exceptionState)
, exceptionState); |
| 4029 if (info.Length() <= 1 || !info[1]->IsFunction()) { |
| 4030 exceptionState.throwTypeError("The callback provided as parameter 2 is n
ot a function."); |
| 4031 exceptionState.throwIfNeeded(); |
| 4032 return; |
| 4033 } |
| 4034 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c
reate(v8::Handle<v8::Function>::Cast(info[1]), currentExecutionContext(info.GetI
solate())); |
| 4035 impl->methodWithNonCallbackArgAndCallbackInterfaceArg(nonCallback, callbackI
nterface.release()); |
| 4036 } |
| 4037 |
| 4038 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 4039 { |
| 4040 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4041 TestObjectV8Internal::methodWithNonCallbackArgAndCallbackInterfaceArgMethod(
info); |
| 4042 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4043 } |
| 4044 |
| 4045 static void methodWithCallbackInterfaceAndOptionalArgMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
| 4046 { |
| 4047 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4048 OwnPtr<TestCallbackInterface> callbackInterface; |
7412 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | 4049 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { |
7413 if (!info[0]->IsFunction()) { | 4050 if (!info[0]->IsFunction()) { |
7414 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 4051 throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbac
kInterfaceAndOptionalArg", "TestObject", "The callback provided as parameter 1 i
s not a function."), info.GetIsolate()); |
7415 exceptionState.throwIfNeeded(); | |
7416 return; | 4052 return; |
7417 } | 4053 } |
7418 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::H
andle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate())); | 4054 callbackInterface = V8TestCallbackInterface::create(v8::Handle<v8::Funct
ion>::Cast(info[0]), currentExecutionContext(info.GetIsolate())); |
7419 } | 4055 } |
7420 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg.release(), exceptionState); | 4056 impl->methodWithCallbackInterfaceAndOptionalArg(callbackInterface.release())
; |
| 4057 } |
| 4058 |
| 4059 static void methodWithCallbackInterfaceAndOptionalArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
| 4060 { |
| 4061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4062 TestObjectV8Internal::methodWithCallbackInterfaceAndOptionalArgMethod(info); |
| 4063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4064 } |
| 4065 |
| 4066 static void methodWithNullableCallbackInterfaceArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 4067 { |
| 4068 if (UNLIKELY(info.Length() < 1)) { |
| 4069 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal
lbackInterfaceArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.
Length())), info.GetIsolate()); |
| 4070 return; |
| 4071 } |
| 4072 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4073 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { |
| 4074 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCal
lbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a
function."), info.GetIsolate()); |
| 4075 return; |
| 4076 } |
| 4077 OwnPtr<TestCallbackInterface> callbackInterface = info[0]->IsNull() ? nullpt
r : V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), cur
rentExecutionContext(info.GetIsolate())); |
| 4078 impl->methodWithNullableCallbackInterfaceArg(callbackInterface.release()); |
| 4079 } |
| 4080 |
| 4081 static void methodWithNullableCallbackInterfaceArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 4082 { |
| 4083 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4084 TestObjectV8Internal::methodWithNullableCallbackInterfaceArgMethod(info); |
| 4085 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4086 } |
| 4087 |
| 4088 static void staticMethodWithCallbackAndOptionalArgMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 4089 { |
| 4090 OwnPtr<TestCallbackInterface> callbackInterface; |
| 4091 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { |
| 4092 if (!info[0]->IsFunction()) { |
| 4093 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithC
allbackAndOptionalArg", "TestObject", "The callback provided as parameter 1 is n
ot a function."), info.GetIsolate()); |
| 4094 return; |
| 4095 } |
| 4096 callbackInterface = V8TestCallbackInterface::create(v8::Handle<v8::Funct
ion>::Cast(info[0]), currentExecutionContext(info.GetIsolate())); |
| 4097 } |
| 4098 TestObject::staticMethodWithCallbackAndOptionalArg(callbackInterface.release
()); |
| 4099 } |
| 4100 |
| 4101 static void staticMethodWithCallbackAndOptionalArgMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 4102 { |
| 4103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4104 TestObjectV8Internal::staticMethodWithCallbackAndOptionalArgMethod(info); |
| 4105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4106 } |
| 4107 |
| 4108 static void staticMethodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 4109 { |
| 4110 if (UNLIKELY(info.Length() < 1)) { |
| 4111 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallb
ackArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())),
info.GetIsolate()); |
| 4112 return; |
| 4113 } |
| 4114 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
| 4115 throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallb
ackArg", "TestObject", "The callback provided as parameter 1 is not a function."
), info.GetIsolate()); |
| 4116 return; |
| 4117 } |
| 4118 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c
reate(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetI
solate())); |
| 4119 TestObject::staticMethodWithCallbackArg(callbackInterface.release()); |
| 4120 } |
| 4121 |
| 4122 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 4123 { |
| 4124 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4125 TestObjectV8Internal::staticMethodWithCallbackArgMethod(info); |
| 4126 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4127 } |
| 4128 |
| 4129 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 4130 { |
| 4131 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt8", "TestObject", info.Holder(), info.GetIsolate()); |
| 4132 if (UNLIKELY(info.Length() < 1)) { |
| 4133 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4134 exceptionState.throwIfNeeded(); |
| 4135 return; |
| 4136 } |
| 4137 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4138 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt8(info[0], EnforceRange, exceptio
nState), exceptionState); |
| 4139 impl->methodWithEnforceRangeInt8(value); |
| 4140 } |
| 4141 |
| 4142 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 4143 { |
| 4144 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4145 TestObjectV8Internal::methodWithEnforceRangeInt8Method(info); |
| 4146 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4147 } |
| 4148 |
| 4149 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 4150 { |
| 4151 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt8", "TestObject", info.Holder(), info.GetIsolate()); |
| 4152 if (UNLIKELY(info.Length() < 1)) { |
| 4153 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4154 exceptionState.throwIfNeeded(); |
| 4155 return; |
| 4156 } |
| 4157 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4158 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt8(info[0], EnforceRange, ex
ceptionState), exceptionState); |
| 4159 impl->methodWithEnforceRangeUInt8(value); |
| 4160 } |
| 4161 |
| 4162 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 4163 { |
| 4164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4165 TestObjectV8Internal::methodWithEnforceRangeUInt8Method(info); |
| 4166 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4167 } |
| 4168 |
| 4169 static void methodWithEnforceRangeInt16Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 4170 { |
| 4171 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt16", "TestObject", info.Holder(), info.GetIsolate()); |
| 4172 if (UNLIKELY(info.Length() < 1)) { |
| 4173 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4174 exceptionState.throwIfNeeded(); |
| 4175 return; |
| 4176 } |
| 4177 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4178 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt16(info[0], EnforceRange, excepti
onState), exceptionState); |
| 4179 impl->methodWithEnforceRangeInt16(value); |
| 4180 } |
| 4181 |
| 4182 static void methodWithEnforceRangeInt16MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 4183 { |
| 4184 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4185 TestObjectV8Internal::methodWithEnforceRangeInt16Method(info); |
| 4186 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4187 } |
| 4188 |
| 4189 static void methodWithEnforceRangeUInt16Method(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 4190 { |
| 4191 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt16", "TestObject", info.Holder(), info.GetIsolate()); |
| 4192 if (UNLIKELY(info.Length() < 1)) { |
| 4193 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4194 exceptionState.throwIfNeeded(); |
| 4195 return; |
| 4196 } |
| 4197 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4198 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt16(info[0], EnforceRange, e
xceptionState), exceptionState); |
| 4199 impl->methodWithEnforceRangeUInt16(value); |
| 4200 } |
| 4201 |
| 4202 static void methodWithEnforceRangeUInt16MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 4203 { |
| 4204 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4205 TestObjectV8Internal::methodWithEnforceRangeUInt16Method(info); |
| 4206 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4207 } |
| 4208 |
| 4209 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 4210 { |
| 4211 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt32", "TestObject", info.Holder(), info.GetIsolate()); |
| 4212 if (UNLIKELY(info.Length() < 1)) { |
| 4213 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4214 exceptionState.throwIfNeeded(); |
| 4215 return; |
| 4216 } |
| 4217 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4218 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt32(info[0], EnforceRange, excepti
onState), exceptionState); |
| 4219 impl->methodWithEnforceRangeInt32(value); |
| 4220 } |
| 4221 |
| 4222 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 4223 { |
| 4224 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4225 TestObjectV8Internal::methodWithEnforceRangeInt32Method(info); |
| 4226 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4227 } |
| 4228 |
| 4229 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 4230 { |
| 4231 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt32", "TestObject", info.Holder(), info.GetIsolate()); |
| 4232 if (UNLIKELY(info.Length() < 1)) { |
| 4233 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4234 exceptionState.throwIfNeeded(); |
| 4235 return; |
| 4236 } |
| 4237 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4238 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt32(info[0], EnforceRange, e
xceptionState), exceptionState); |
| 4239 impl->methodWithEnforceRangeUInt32(value); |
| 4240 } |
| 4241 |
| 4242 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 4243 { |
| 4244 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4245 TestObjectV8Internal::methodWithEnforceRangeUInt32Method(info); |
| 4246 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4247 } |
| 4248 |
| 4249 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 4250 { |
| 4251 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeInt64", "TestObject", info.Holder(), info.GetIsolate()); |
| 4252 if (UNLIKELY(info.Length() < 1)) { |
| 4253 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4254 exceptionState.throwIfNeeded(); |
| 4255 return; |
| 4256 } |
| 4257 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4258 V8TRYCATCH_EXCEPTION_VOID(long long, value, toInt64(info[0], EnforceRange, e
xceptionState), exceptionState); |
| 4259 impl->methodWithEnforceRangeInt64(value); |
| 4260 } |
| 4261 |
| 4262 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 4263 { |
| 4264 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4265 TestObjectV8Internal::methodWithEnforceRangeInt64Method(info); |
| 4266 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4267 } |
| 4268 |
| 4269 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 4270 { |
| 4271 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE
nforceRangeUInt64", "TestObject", info.Holder(), info.GetIsolate()); |
| 4272 if (UNLIKELY(info.Length() < 1)) { |
| 4273 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4274 exceptionState.throwIfNeeded(); |
| 4275 return; |
| 4276 } |
| 4277 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4278 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, value, toUInt64(info[0], Enfor
ceRange, exceptionState), exceptionState); |
| 4279 impl->methodWithEnforceRangeUInt64(value); |
| 4280 } |
| 4281 |
| 4282 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 4283 { |
| 4284 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4285 TestObjectV8Internal::methodWithEnforceRangeUInt64Method(info); |
| 4286 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4287 } |
| 4288 |
| 4289 #if ENABLE(Condition1) |
| 4290 static void conditionalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4291 { |
| 4292 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4293 v8SetReturnValueString(info, impl->conditionalMethod1(), info.GetIsolate()); |
| 4294 } |
| 4295 #endif // ENABLE(Condition1) |
| 4296 |
| 4297 #if ENABLE(Condition1) |
| 4298 static void conditionalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 4299 { |
| 4300 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4301 TestObjectV8Internal::conditionalMethod1Method(info); |
| 4302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4303 } |
| 4304 #endif // ENABLE(Condition1) |
| 4305 |
| 4306 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 4307 static void conditionalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4308 { |
| 4309 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4310 impl->conditionalMethod2(); |
| 4311 } |
| 4312 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 4313 |
| 4314 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 4315 static void conditionalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 4316 { |
| 4317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4318 TestObjectV8Internal::conditionalMethod2Method(info); |
| 4319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4320 } |
| 4321 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 4322 |
| 4323 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 4324 static void conditionalMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4325 { |
| 4326 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4327 impl->conditionalMethod3(); |
| 4328 } |
| 4329 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 4330 |
| 4331 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 4332 static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 4333 { |
| 4334 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4335 TestObjectV8Internal::conditionalMethod3Method(info); |
| 4336 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4337 } |
| 4338 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 4339 |
| 4340 static void callbackFunctionReturnValueMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 4341 { |
| 4342 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4343 v8SetReturnValue(info, impl->callbackFunctionReturnValue().v8Value()); |
| 4344 } |
| 4345 |
| 4346 static void callbackFunctionReturnValueMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 4347 { |
| 4348 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4349 TestObjectV8Internal::callbackFunctionReturnValueMethod(info); |
| 4350 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4351 } |
| 4352 |
| 4353 static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 4354 { |
| 4355 if (UNLIKELY(info.Length() < 1)) { |
| 4356 throwTypeError(ExceptionMessages::failedToExecute("callbackFunctionArgum
ent", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in
fo.GetIsolate()); |
| 4357 return; |
| 4358 } |
| 4359 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4360 V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(info[0], info.GetIsolate(
))); |
| 4361 impl->callbackFunctionArgument(function); |
| 4362 } |
| 4363 |
| 4364 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 4365 { |
| 4366 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4367 TestObjectV8Internal::callbackFunctionArgumentMethod(info); |
| 4368 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4369 } |
| 4370 |
| 4371 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 4372 { |
| 4373 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 4374 if (UNLIKELY(info.Length() < 1)) { |
| 4375 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4376 exceptionState.throwIfNeeded(); |
| 4377 return; |
| 4378 } |
| 4379 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4380 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 4381 impl->overloadedMethod(longArg); |
| 4382 } |
| 4383 |
| 4384 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 4385 { |
| 4386 if (UNLIKELY(info.Length() < 1)) { |
| 4387 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); |
| 4388 return; |
| 4389 } |
| 4390 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4391 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
| 4392 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", "The callback provided as parameter 1 is not a function."), info.Get
Isolate()); |
| 4393 return; |
| 4394 } |
| 4395 OwnPtr<TestCallbackInterface> callbackInterfaceArg = V8TestCallbackInterface
::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.G
etIsolate())); |
| 4396 impl->overloadedMethod(callbackInterfaceArg.release()); |
| 4397 } |
| 4398 |
| 4399 static void overloadedMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 4400 { |
| 4401 if (UNLIKELY(info.Length() < 1)) { |
| 4402 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); |
| 4403 return; |
| 4404 } |
| 4405 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4406 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[0])); |
| 4407 impl->overloadedMethod(objArg); |
| 4408 } |
| 4409 |
| 4410 static void overloadedMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 4411 { |
| 4412 if (UNLIKELY(info.Length() < 1)) { |
| 4413 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); |
| 4414 return; |
| 4415 } |
| 4416 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4417 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(info[0], 1,
info.GetIsolate())); |
| 4418 impl->overloadedMethod(arrayArg); |
| 4419 } |
| 4420 |
| 4421 static void overloadedMethod5Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 4422 { |
| 4423 if (UNLIKELY(info.Length() < 1)) { |
| 4424 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T
estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs
olate()); |
| 4425 return; |
| 4426 } |
| 4427 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4428 V8TRYCATCH_VOID(Vector<unsigned>, sequenceArg, toNativeArray<unsigned>(info[
0], 1, info.GetIsolate())); |
| 4429 impl->overloadedMethod(sequenceArg); |
| 4430 } |
| 4431 |
| 4432 static void overloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 4433 { |
| 4434 if (((info.Length() == 1))) { |
| 4435 overloadedMethod1Method(info); |
| 4436 return; |
| 4437 } |
| 4438 if (((info.Length() == 1) && (info[0]->IsNull() || info[0]->IsFunction())))
{ |
| 4439 overloadedMethod2Method(info); |
| 4440 return; |
| 4441 } |
| 4442 if (((info.Length() == 1) && (V8TestObject::hasInstance(info[0], info.GetIso
late())))) { |
| 4443 overloadedMethod3Method(info); |
| 4444 return; |
| 4445 } |
| 4446 if (((info.Length() == 1) && (info[0]->IsArray()))) { |
| 4447 overloadedMethod4Method(info); |
| 4448 return; |
| 4449 } |
| 4450 if (((info.Length() == 1) && (info[0]->IsArray()))) { |
| 4451 overloadedMethod5Method(info); |
| 4452 return; |
| 4453 } |
| 4454 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 4455 if (UNLIKELY(info.Length() < 1)) { |
| 4456 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4457 exceptionState.throwIfNeeded(); |
| 4458 return; |
| 4459 } |
| 4460 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 4461 exceptionState.throwIfNeeded(); |
| 4462 } |
| 4463 |
| 4464 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 4465 { |
| 4466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4467 TestObjectV8Internal::overloadedMethodMethod(info); |
| 4468 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4469 } |
| 4470 |
| 4471 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4472 { |
| 4473 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); |
| 4474 if (UNLIKELY(info.Length() < 1)) { |
| 4475 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4476 exceptionState.throwIfNeeded(); |
| 4477 return; |
| 4478 } |
| 4479 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4480 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[0])); |
| 4481 if (UNLIKELY(info.Length() <= 1)) { |
| 4482 impl->overloadedMethodA(objArg); |
| 4483 return; |
| 4484 } |
| 4485 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
| 4486 impl->overloadedMethodA(objArg, longArg); |
| 4487 } |
| 4488 |
| 4489 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4490 { |
| 4491 if (UNLIKELY(info.Length() < 2)) { |
| 4492 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", "
TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetI
solate()); |
| 4493 return; |
| 4494 } |
| 4495 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4496 V8TRYCATCH_VOID(TestObject*, objArg, V8TestObject::toNativeWithTypeCheck(inf
o.GetIsolate(), info[0])); |
| 4497 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); |
| 4498 impl->overloadedMethodA(objArg, strArg); |
| 4499 } |
| 4500 |
| 4501 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 4502 { |
| 4503 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())))) { |
| 4504 overloadedMethodA1Method(info); |
| 4505 return; |
| 4506 } |
| 4507 if (((info.Length() == 2) && (info[0]->IsNull() || V8TestObject::hasInstance
(info[0], info.GetIsolate())))) { |
| 4508 overloadedMethodA2Method(info); |
| 4509 return; |
| 4510 } |
| 4511 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObject", info.Holder(), info.GetIsolate()); |
| 4512 if (UNLIKELY(info.Length() < 1)) { |
| 4513 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4514 exceptionState.throwIfNeeded(); |
| 4515 return; |
| 4516 } |
| 4517 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 4518 exceptionState.throwIfNeeded(); |
| 4519 } |
| 4520 |
| 4521 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 4522 { |
| 4523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4524 TestObjectV8Internal::overloadedMethodAMethod(info); |
| 4525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4526 } |
| 4527 |
| 4528 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4529 { |
| 4530 if (UNLIKELY(info.Length() < 1)) { |
| 4531 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
| 4532 return; |
| 4533 } |
| 4534 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4535 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
| 4536 impl->overloadedMethodB(strArg); |
| 4537 } |
| 4538 |
| 4539 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4540 { |
| 4541 if (UNLIKELY(info.Length() < 1)) { |
| 4542 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
| 4543 return; |
| 4544 } |
| 4545 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4546 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
| 4547 impl->overloadedMethodB(strArg); |
| 4548 } |
| 4549 |
| 4550 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 4551 { |
| 4552 if (((info.Length() == 1))) { |
| 4553 overloadedMethodB1Method(info); |
| 4554 return; |
| 4555 } |
| 4556 if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || info[0]->IsStrin
g() || info[0]->IsObject()))) { |
| 4557 overloadedMethodB2Method(info); |
| 4558 return; |
| 4559 } |
| 4560 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); |
| 4561 if (UNLIKELY(info.Length() < 1)) { |
| 4562 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4563 exceptionState.throwIfNeeded(); |
| 4564 return; |
| 4565 } |
| 4566 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 4567 exceptionState.throwIfNeeded(); |
| 4568 } |
| 4569 |
| 4570 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 4571 { |
| 4572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4573 TestObjectV8Internal::overloadedMethodBMethod(info); |
| 4574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4575 } |
| 4576 |
| 4577 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4578 { |
| 4579 if (UNLIKELY(info.Length() < 1)) { |
| 4580 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
| 4581 return; |
| 4582 } |
| 4583 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4584 V8TRYCATCH_VOID(Dictionary, dictionaryArg, Dictionary(info[0], info.GetIsola
te())); |
| 4585 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { |
| 4586 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "
TestObject", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate
()); |
| 4587 return; |
| 4588 } |
| 4589 impl->overloadedMethodC(dictionaryArg); |
| 4590 } |
| 4591 |
| 4592 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4593 { |
| 4594 if (UNLIKELY(info.Length() < 1)) { |
| 4595 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "
TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI
solate()); |
| 4596 return; |
| 4597 } |
| 4598 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4599 V8TRYCATCH_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue(
))); |
| 4600 impl->overloadedMethodC(doubleArg); |
| 4601 } |
| 4602 |
| 4603 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 4604 { |
| 4605 if (((info.Length() == 1) && (info[0]->IsObject()))) { |
| 4606 overloadedMethodC1Method(info); |
| 4607 return; |
| 4608 } |
| 4609 if (((info.Length() == 1))) { |
| 4610 overloadedMethodC2Method(info); |
| 4611 return; |
| 4612 } |
| 4613 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObject", info.Holder(), info.GetIsolate()); |
| 4614 if (UNLIKELY(info.Length() < 1)) { |
| 4615 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4616 exceptionState.throwIfNeeded(); |
| 4617 return; |
| 4618 } |
| 4619 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 4620 exceptionState.throwIfNeeded(); |
| 4621 } |
| 4622 |
| 4623 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 4624 { |
| 4625 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4626 TestObjectV8Internal::overloadedMethodCMethod(info); |
| 4627 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4628 } |
| 4629 |
| 4630 static void classMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 4631 { |
| 4632 TestObject::classMethod(); |
| 4633 } |
| 4634 |
| 4635 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4636 { |
| 4637 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4638 TestObjectV8Internal::classMethodMethod(info); |
| 4639 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4640 } |
| 4641 |
| 4642 static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 4643 { |
| 4644 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod
WithOptional", "TestObject", info.Holder(), info.GetIsolate()); |
| 4645 if (UNLIKELY(info.Length() <= 0)) { |
| 4646 v8SetReturnValueInt(info, TestObject::classMethodWithOptional()); |
| 4647 return; |
| 4648 } |
| 4649 V8TRYCATCH_EXCEPTION_VOID(int, arg, toInt32(info[0], exceptionState), except
ionState); |
| 4650 v8SetReturnValueInt(info, TestObject::classMethodWithOptional(arg)); |
| 4651 } |
| 4652 |
| 4653 static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 4654 { |
| 4655 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4656 TestObjectV8Internal::classMethodWithOptionalMethod(info); |
| 4657 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4658 } |
| 4659 |
| 4660 static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 4661 { |
| 4662 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4663 V8TestObject::classMethod2MethodCustom(info); |
| 4664 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4665 } |
| 4666 |
| 4667 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 4668 { |
| 4669 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod
WithClamp", "TestObject", info.Holder(), info.GetIsolate()); |
| 4670 if (UNLIKELY(info.Length() < 2)) { |
| 4671 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
| 4672 exceptionState.throwIfNeeded(); |
| 4673 return; |
| 4674 } |
| 4675 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4676 unsigned objArgsShort = 0; |
| 4677 V8TRYCATCH_VOID(double, objArgsShortNativeValue, info[0]->NumberValue()); |
| 4678 if (!std::isnan(objArgsShortNativeValue)) |
| 4679 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); |
| 4680 unsigned objArgsLong = 0; |
| 4681 V8TRYCATCH_VOID(double, objArgsLongNativeValue, info[1]->NumberValue()); |
| 4682 if (!std::isnan(objArgsLongNativeValue)) |
| 4683 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); |
| 4684 impl->classMethodWithClamp(objArgsShort, objArgsLong); |
| 4685 } |
| 4686 |
| 4687 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 4688 { |
| 4689 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4690 TestObjectV8Internal::classMethodWithClampMethod(info); |
| 4691 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4692 } |
| 4693 |
| 4694 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 4695 { |
| 4696 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledAtRu
ntimeMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 4697 if (UNLIKELY(info.Length() < 1)) { |
| 4698 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4699 exceptionState.throwIfNeeded(); |
| 4700 return; |
| 4701 } |
| 4702 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4703 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 4704 impl->enabledAtRuntimeMethod(longArg); |
| 4705 } |
| 4706 |
| 4707 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 4708 { |
| 4709 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4710 TestObjectV8Internal::enabledAtRuntimeMethodMethod(info); |
| 4711 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4712 } |
| 4713 |
| 4714 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 4715 { |
| 4716 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledPerC
ontextMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 4717 if (UNLIKELY(info.Length() < 1)) { |
| 4718 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4719 exceptionState.throwIfNeeded(); |
| 4720 return; |
| 4721 } |
| 4722 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4723 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 4724 impl->enabledPerContextMethod(longArg); |
| 4725 } |
| 4726 |
| 4727 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 4728 { |
| 4729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4730 TestObjectV8Internal::enabledPerContextMethodMethod(info); |
| 4731 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4732 } |
| 4733 |
| 4734 static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 4735 { |
| 4736 if (UNLIKELY(info.Length() < 1)) { |
| 4737 throwTypeError(ExceptionMessages::failedToExecute("methodWithUnsignedLon
gSequence", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()
)), info.GetIsolate()); |
| 4738 return; |
| 4739 } |
| 4740 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4741 V8TRYCATCH_VOID(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsign
ed>(info[0], 1, info.GetIsolate())); |
| 4742 impl->methodWithUnsignedLongSequence(unsignedLongSequence); |
| 4743 } |
| 4744 |
| 4745 static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 4746 { |
| 4747 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4748 TestObjectV8Internal::methodWithUnsignedLongSequenceMethod(info); |
| 4749 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4750 } |
| 4751 |
| 4752 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4753 { |
| 4754 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArray
Function", "TestObject", info.Holder(), info.GetIsolate()); |
| 4755 if (UNLIKELY(info.Length() < 1)) { |
| 4756 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4757 exceptionState.throwIfNeeded(); |
| 4758 return; |
| 4759 } |
| 4760 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4761 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(info[0], 1, in
fo.GetIsolate())); |
| 4762 Vector<String> result = impl->stringArrayFunction(values, exceptionState); |
7421 if (exceptionState.throwIfNeeded()) | 4763 if (exceptionState.throwIfNeeded()) |
7422 return; | 4764 return; |
7423 } | 4765 v8SetReturnValue(info, v8Array(result, info.GetIsolate())); |
7424 | 4766 } |
7425 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 4767 |
7426 { | 4768 static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
7427 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4769 { |
7428 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); | 4770 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7429 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4771 TestObjectV8Internal::stringArrayFunctionMethod(info); |
7430 } | 4772 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7431 | 4773 } |
7432 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) | 4774 |
7433 { | 4775 static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
7434 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | 4776 { |
7435 TestObject* impl = V8TestObject::toNative(info.Holder()); | 4777 ExceptionState exceptionState(ExceptionState::ExecutionContext, "domStringLi
stFunction", "TestObject", info.Holder(), info.GetIsolate()); |
7436 RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyV
oidMethod(exceptionState); | 4778 if (UNLIKELY(info.Length() < 1)) { |
| 4779 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4780 exceptionState.throwIfNeeded(); |
| 4781 return; |
| 4782 } |
| 4783 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4784 V8TRYCATCH_VOID(DOMStringList*, values, V8DOMStringList::toNativeWithTypeChe
ck(info.GetIsolate(), info[0])); |
| 4785 RefPtr<DOMStringList> result = impl->domStringListFunction(values, exception
State); |
7437 if (exceptionState.throwIfNeeded()) | 4786 if (exceptionState.throwIfNeeded()) |
7438 return; | 4787 return; |
7439 v8SetReturnValue(info, result.release()); | 4788 v8SetReturnValue(info, result.release()); |
7440 } | 4789 } |
7441 | 4790 |
7442 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 4791 static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
7443 { | 4792 { |
7444 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4793 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7445 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); | 4794 TestObjectV8Internal::domStringListFunctionMethod(info); |
7446 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4795 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7447 } | 4796 } |
7448 | 4797 |
7449 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 4798 static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
7450 { | 4799 { |
7451 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); | 4800 if (UNLIKELY(info.Length() < 1)) { |
7452 if (UNLIKELY(info.Length() < 1)) { | 4801 throwTypeError(ExceptionMessages::failedToExecute("convert1", "TestObjec
t", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate())
; |
7453 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 4802 return; |
7454 exceptionState.throwIfNeeded(); | 4803 } |
| 4804 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4805 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::toNativeWithTypeCheck(info.Get
Isolate(), info[0])); |
| 4806 impl->convert1(value); |
| 4807 } |
| 4808 |
| 4809 static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 4810 { |
| 4811 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4812 TestObjectV8Internal::convert1Method(info); |
| 4813 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4814 } |
| 4815 |
| 4816 static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 4817 { |
| 4818 if (UNLIKELY(info.Length() < 1)) { |
| 4819 throwTypeError(ExceptionMessages::failedToExecute("convert2", "TestObjec
t", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate())
; |
| 4820 return; |
| 4821 } |
| 4822 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4823 V8TRYCATCH_VOID(TestNode*, value, V8TestNode::toNativeWithTypeCheck(info.Get
Isolate(), info[0])); |
| 4824 impl->convert2(value); |
| 4825 } |
| 4826 |
| 4827 static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 4828 { |
| 4829 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4830 TestObjectV8Internal::convert2Method(info); |
| 4831 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4832 } |
| 4833 |
| 4834 static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 4835 { |
| 4836 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4837 impl->banana(); |
| 4838 } |
| 4839 |
| 4840 static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 4841 { |
| 4842 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4843 TestObjectV8Internal::orangeMethod(info); |
| 4844 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4845 } |
| 4846 |
| 4847 static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 4848 { |
| 4849 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictFunct
ion", "TestObject", info.Holder(), info.GetIsolate()); |
| 4850 if (UNLIKELY(info.Length() < 3)) { |
| 4851 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); |
| 4852 exceptionState.throwIfNeeded(); |
| 4853 return; |
| 4854 } |
| 4855 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4856 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); |
| 4857 V8TRYCATCH_VOID(float, a, static_cast<float>(info[1]->NumberValue())); |
| 4858 V8TRYCATCH_EXCEPTION_VOID(int, b, toInt32(info[2], exceptionState), exceptio
nState); |
| 4859 bool result = impl->strictFunction(str, a, b, exceptionState); |
| 4860 if (exceptionState.throwIfNeeded()) |
| 4861 return; |
| 4862 v8SetReturnValueBool(info, result); |
| 4863 } |
| 4864 |
| 4865 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 4866 { |
| 4867 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4868 TestObjectV8Internal::strictFunctionMethod(info); |
| 4869 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4870 } |
| 4871 |
| 4872 static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 4873 { |
| 4874 if (UNLIKELY(info.Length() < 1)) { |
| 4875 throwTypeError(ExceptionMessages::failedToExecute("variadicStringMethod"
, "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G
etIsolate()); |
| 4876 return; |
| 4877 } |
| 4878 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4879 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, head, info[0]); |
| 4880 V8TRYCATCH_VOID(Vector<String>, tail, toNativeArguments<String>(info, 1)); |
| 4881 impl->variadicStringMethod(head, tail); |
| 4882 } |
| 4883 |
| 4884 static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 4885 { |
| 4886 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4887 TestObjectV8Internal::variadicStringMethodMethod(info); |
| 4888 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4889 } |
| 4890 |
| 4891 static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 4892 { |
| 4893 if (UNLIKELY(info.Length() < 1)) { |
| 4894 throwTypeError(ExceptionMessages::failedToExecute("variadicDoubleMethod"
, "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G
etIsolate()); |
| 4895 return; |
| 4896 } |
| 4897 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4898 V8TRYCATCH_VOID(double, head, static_cast<double>(info[0]->NumberValue())); |
| 4899 V8TRYCATCH_VOID(Vector<double>, tail, toNativeArguments<double>(info, 1)); |
| 4900 impl->variadicDoubleMethod(head, tail); |
| 4901 } |
| 4902 |
| 4903 static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 4904 { |
| 4905 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4906 TestObjectV8Internal::variadicDoubleMethodMethod(info); |
| 4907 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4908 } |
| 4909 |
| 4910 static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 4911 { |
| 4912 if (UNLIKELY(info.Length() < 1)) { |
| 4913 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMethod",
"TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Get
Isolate()); |
| 4914 return; |
| 4915 } |
| 4916 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4917 V8TRYCATCH_VOID(Node*, head, V8Node::toNativeWithTypeCheck(info.GetIsolate()
, info[0])); |
| 4918 Vector<RefPtr<Node> > tail; |
| 4919 for (int i = 1; i < info.Length(); ++i) { |
| 4920 if (!V8Node::hasInstance(info[i], info.GetIsolate())) { |
| 4921 throwTypeError(ExceptionMessages::failedToExecute("variadicNodeMetho
d", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate()); |
| 4922 return; |
| 4923 } |
| 4924 tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(info[i]))); |
| 4925 } |
| 4926 impl->variadicNodeMethod(head, tail); |
| 4927 } |
| 4928 |
| 4929 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 4930 { |
| 4931 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4932 TestObjectV8Internal::variadicNodeMethodMethod(info); |
| 4933 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4934 } |
| 4935 |
| 4936 static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 4937 { |
| 4938 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4939 impl->perWorldMethod(); |
| 4940 } |
| 4941 |
| 4942 static void perWorldMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 4943 { |
| 4944 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4945 TestObjectV8Internal::perWorldMethodMethod(info); |
| 4946 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4947 } |
| 4948 |
| 4949 static void perWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 4950 { |
| 4951 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4952 impl->perWorldMethod(); |
| 4953 } |
| 4954 |
| 4955 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 4956 { |
| 4957 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4958 TestObjectV8Internal::perWorldMethodMethodForMainWorld(info); |
| 4959 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4960 } |
| 4961 |
| 4962 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 4963 { |
| 4964 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 4965 if (UNLIKELY(info.Length() < 1)) { |
| 4966 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4967 exceptionState.throwIfNeeded(); |
| 4968 return; |
| 4969 } |
| 4970 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4971 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 4972 impl->overloadedPerWorldMethod(longArg); |
| 4973 } |
| 4974 |
| 4975 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 4976 { |
| 4977 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 4978 if (UNLIKELY(info.Length() < 1)) { |
| 4979 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 4980 exceptionState.throwIfNeeded(); |
| 4981 return; |
| 4982 } |
| 4983 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4984 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 4985 impl->overloadedPerWorldMethod(longArg); |
| 4986 } |
| 4987 |
| 4988 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 4989 { |
| 4990 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 4991 if (UNLIKELY(info.Length() < 2)) { |
| 4992 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
| 4993 exceptionState.throwIfNeeded(); |
| 4994 return; |
| 4995 } |
| 4996 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 4997 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
| 4998 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
| 4999 impl->overloadedPerWorldMethod(strArg, longArg); |
| 5000 } |
| 5001 |
| 5002 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 5003 { |
| 5004 if (((info.Length() == 1))) { |
| 5005 overloadedPerWorldMethod1Method(info); |
| 5006 return; |
| 5007 } |
| 5008 if (((info.Length() == 2))) { |
| 5009 overloadedPerWorldMethod2Method(info); |
| 5010 return; |
| 5011 } |
| 5012 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5013 if (UNLIKELY(info.Length() < 1)) { |
| 5014 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5015 exceptionState.throwIfNeeded(); |
| 5016 return; |
| 5017 } |
| 5018 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 5019 exceptionState.throwIfNeeded(); |
| 5020 } |
| 5021 |
| 5022 static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 5023 { |
| 5024 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5025 TestObjectV8Internal::overloadedPerWorldMethodMethod(info); |
| 5026 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5027 } |
| 5028 |
| 5029 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| 5030 { |
| 5031 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5032 if (UNLIKELY(info.Length() < 2)) { |
| 5033 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
| 5034 exceptionState.throwIfNeeded(); |
| 5035 return; |
| 5036 } |
| 5037 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5038 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
| 5039 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
| 5040 impl->overloadedPerWorldMethod(strArg, longArg); |
| 5041 } |
| 5042 |
| 5043 static void overloadedPerWorldMethodMethodForMainWorld(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
| 5044 { |
| 5045 if (((info.Length() == 1))) { |
| 5046 overloadedPerWorldMethod1MethodForMainWorld(info); |
| 5047 return; |
| 5048 } |
| 5049 if (((info.Length() == 2))) { |
| 5050 overloadedPerWorldMethod2MethodForMainWorld(info); |
| 5051 return; |
| 5052 } |
| 5053 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP
erWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5054 if (UNLIKELY(info.Length() < 1)) { |
| 5055 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5056 exceptionState.throwIfNeeded(); |
| 5057 return; |
| 5058 } |
| 5059 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 5060 exceptionState.throwIfNeeded(); |
| 5061 } |
| 5062 |
| 5063 static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 5064 { |
| 5065 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5066 TestObjectV8Internal::overloadedPerWorldMethodMethodForMainWorld(info); |
| 5067 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5068 } |
| 5069 |
| 5070 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 5071 { |
| 5072 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedMethod1", "TestObject", info.Holder(), info.GetIsolate()); |
| 5073 if (UNLIKELY(info.Length() < 1)) { |
| 5074 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5075 exceptionState.throwIfNeeded(); |
7455 return; | 5076 return; |
7456 } | 5077 } |
7457 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5078 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7458 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 5079 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
7459 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 5080 impl->activityLoggedMethod1(longArg); |
7460 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(scriptContext
, longArg, exceptionState); | 5081 } |
| 5082 |
| 5083 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 5084 { |
| 5085 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5086 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 5087 if (contextData && contextData->activityLogger()) { |
| 5088 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
| 5089 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", i
nfo.Length(), loggerArgs.data(), "Method"); |
| 5090 } |
| 5091 TestObjectV8Internal::activityLoggedMethod1Method(info); |
| 5092 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5093 } |
| 5094 |
| 5095 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 5096 { |
| 5097 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedMethod2", "TestObject", info.Holder(), info.GetIsolate()); |
| 5098 if (UNLIKELY(info.Length() < 1)) { |
| 5099 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5100 exceptionState.throwIfNeeded(); |
| 5101 return; |
| 5102 } |
| 5103 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5104 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 5105 impl->activityLoggedMethod2(longArg); |
| 5106 } |
| 5107 |
| 5108 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 5109 { |
| 5110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5111 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 5112 if (contextData && contextData->activityLogger()) { |
| 5113 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
| 5114 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i
nfo.Length(), loggerArgs.data(), "Method"); |
| 5115 } |
| 5116 TestObjectV8Internal::activityLoggedMethod2Method(info); |
| 5117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5118 } |
| 5119 |
| 5120 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 5121 { |
| 5122 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedMethod2", "TestObject", info.Holder(), info.GetIsolate()); |
| 5123 if (UNLIKELY(info.Length() < 1)) { |
| 5124 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5125 exceptionState.throwIfNeeded(); |
| 5126 return; |
| 5127 } |
| 5128 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5129 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 5130 impl->activityLoggedMethod2(longArg); |
| 5131 } |
| 5132 |
| 5133 static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCa
llbackInfo<v8::Value>& info) |
| 5134 { |
| 5135 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5136 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 5137 if (contextData && contextData->activityLogger()) { |
| 5138 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
| 5139 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i
nfo.Length(), loggerArgs.data(), "Method"); |
| 5140 } |
| 5141 TestObjectV8Internal::activityLoggedMethod2MethodForMainWorld(info); |
| 5142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5143 } |
| 5144 |
| 5145 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
| 5146 { |
| 5147 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5148 if (UNLIKELY(info.Length() < 1)) { |
| 5149 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5150 exceptionState.throwIfNeeded(); |
| 5151 return; |
| 5152 } |
| 5153 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5154 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 5155 impl->activityLoggedInIsolatedWorldMethod(longArg); |
| 5156 } |
| 5157 |
| 5158 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
| 5159 { |
| 5160 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5161 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 5162 if (contextData && contextData->activityLogger()) { |
| 5163 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
| 5164 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldMethod", info.Length(), loggerArgs.data(), "Method"); |
| 5165 } |
| 5166 TestObjectV8Internal::activityLoggedInIsolatedWorldMethodMethod(info); |
| 5167 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5168 } |
| 5169 |
| 5170 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 5171 { |
| 5172 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog
gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5173 if (UNLIKELY(info.Length() < 1)) { |
| 5174 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5175 exceptionState.throwIfNeeded(); |
| 5176 return; |
| 5177 } |
| 5178 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5179 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 5180 impl->activityLoggedInIsolatedWorldMethod(longArg); |
| 5181 } |
| 5182 |
| 5183 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 5184 { |
| 5185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5186 TestObjectV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(
info); |
| 5187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5188 } |
| 5189 |
| 5190 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 5191 { |
| 5192 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5193 if (UNLIKELY(info.Length() < 1)) { |
| 5194 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5195 exceptionState.throwIfNeeded(); |
| 5196 return; |
| 5197 } |
| 5198 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5199 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 5200 impl->overloadedActivityLoggedMethod(longArg); |
| 5201 } |
| 5202 |
| 5203 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function
CallbackInfo<v8::Value>& info) |
| 5204 { |
| 5205 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5206 if (UNLIKELY(info.Length() < 1)) { |
| 5207 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5208 exceptionState.throwIfNeeded(); |
| 5209 return; |
| 5210 } |
| 5211 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5212 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 5213 impl->overloadedActivityLoggedMethod(longArg); |
| 5214 } |
| 5215 |
| 5216 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 5217 { |
| 5218 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5219 if (UNLIKELY(info.Length() < 2)) { |
| 5220 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
| 5221 exceptionState.throwIfNeeded(); |
| 5222 return; |
| 5223 } |
| 5224 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5225 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
| 5226 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
| 5227 impl->overloadedActivityLoggedMethod(strArg, longArg); |
| 5228 } |
| 5229 |
| 5230 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 5231 { |
| 5232 if (((info.Length() == 1))) { |
| 5233 overloadedActivityLoggedMethod1Method(info); |
| 5234 return; |
| 5235 } |
| 5236 if (((info.Length() == 2))) { |
| 5237 overloadedActivityLoggedMethod2Method(info); |
| 5238 return; |
| 5239 } |
| 5240 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5241 if (UNLIKELY(info.Length() < 1)) { |
| 5242 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5243 exceptionState.throwIfNeeded(); |
| 5244 return; |
| 5245 } |
| 5246 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 5247 exceptionState.throwIfNeeded(); |
| 5248 } |
| 5249 |
| 5250 static void overloadedActivityLoggedMethodMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 5251 { |
| 5252 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5253 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 5254 if (contextData && contextData->activityLogger()) { |
| 5255 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
| 5256 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM
ethod", info.Length(), loggerArgs.data(), "Method"); |
| 5257 } |
| 5258 TestObjectV8Internal::overloadedActivityLoggedMethodMethod(info); |
| 5259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5260 } |
| 5261 |
| 5262 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function
CallbackInfo<v8::Value>& info) |
| 5263 { |
| 5264 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5265 if (UNLIKELY(info.Length() < 2)) { |
| 5266 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
| 5267 exceptionState.throwIfNeeded(); |
| 5268 return; |
| 5269 } |
| 5270 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5271 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
| 5272 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
| 5273 impl->overloadedActivityLoggedMethod(strArg, longArg); |
| 5274 } |
| 5275 |
| 5276 static void overloadedActivityLoggedMethodMethodForMainWorld(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 5277 { |
| 5278 if (((info.Length() == 1))) { |
| 5279 overloadedActivityLoggedMethod1MethodForMainWorld(info); |
| 5280 return; |
| 5281 } |
| 5282 if (((info.Length() == 2))) { |
| 5283 overloadedActivityLoggedMethod2MethodForMainWorld(info); |
| 5284 return; |
| 5285 } |
| 5286 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA
ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| 5287 if (UNLIKELY(info.Length() < 1)) { |
| 5288 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 5289 exceptionState.throwIfNeeded(); |
| 5290 return; |
| 5291 } |
| 5292 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 5293 exceptionState.throwIfNeeded(); |
| 5294 } |
| 5295 |
| 5296 static void overloadedActivityLoggedMethodMethodCallbackForMainWorld(const v8::F
unctionCallbackInfo<v8::Value>& info) |
| 5297 { |
| 5298 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5299 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 5300 if (contextData && contextData->activityLogger()) { |
| 5301 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
| 5302 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM
ethod", info.Length(), loggerArgs.data(), "Method"); |
| 5303 } |
| 5304 TestObjectV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(info)
; |
| 5305 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5306 } |
| 5307 |
| 5308 static void deprecatedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 5309 { |
| 5310 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5311 impl->deprecatedMethod(); |
| 5312 } |
| 5313 |
| 5314 static void deprecatedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 5315 { |
| 5316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5317 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Method); |
| 5318 TestObjectV8Internal::deprecatedMethodMethod(info); |
| 5319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5320 } |
| 5321 |
| 5322 static void deprecatedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 5323 { |
| 5324 TestObject::deprecatedStaticMethod(); |
| 5325 } |
| 5326 |
| 5327 static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 5328 { |
| 5329 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5330 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticMethod); |
| 5331 TestObjectV8Internal::deprecatedStaticMethodMethod(info); |
| 5332 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5333 } |
| 5334 |
| 5335 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 5336 { |
| 5337 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5338 RefPtr<Node> result = impl->anonymousIndexedGetter(index); |
| 5339 if (!result) |
| 5340 return; |
| 5341 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl); |
| 5342 } |
| 5343 |
| 5344 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
| 5345 { |
| 5346 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); |
| 5347 TestObjectV8Internal::indexedPropertyGetter(index, info); |
| 5348 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5349 } |
| 5350 |
| 5351 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 5352 { |
| 5353 if (info.Holder()->HasRealNamedProperty(name)) |
| 5354 return; |
| 5355 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 5356 return; |
| 5357 |
| 5358 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5359 AtomicString propertyName = toCoreAtomicString(name); |
| 5360 String result = impl->anonymousNamedGetter(propertyName); |
| 5361 if (result.isNull()) |
| 5362 return; |
| 5363 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 5364 } |
| 5365 |
| 5366 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 5367 { |
| 5368 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| 5369 TestObjectV8Internal::namedPropertyGetter(name, info); |
| 5370 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5371 } |
| 5372 |
| 5373 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) |
| 5374 { |
| 5375 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5376 AtomicString propertyName = toCoreAtomicString(name); |
| 5377 v8::String::Utf8Value namedProperty(name); |
| 5378 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestObject", info.Holder(), info.GetIsolate()); |
| 5379 bool result = impl->namedPropertyQuery(propertyName, exceptionState); |
7461 if (exceptionState.throwIfNeeded()) | 5380 if (exceptionState.throwIfNeeded()) |
7462 return; | 5381 return; |
7463 } | 5382 if (!result) |
7464 | 5383 return; |
7465 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 5384 v8SetReturnValueInt(info, v8::None); |
7466 { | 5385 } |
7467 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5386 |
7468 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA
rgMethod(info); | 5387 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Integer>& info) |
7469 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5388 { |
7470 } | 5389 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
7471 | 5390 TestObjectV8Internal::namedPropertyQuery(name, info); |
7472 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 5391 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7473 { | 5392 } |
7474 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5393 |
7475 impl->readOnlyVoidMethod(); | 5394 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) |
7476 } | 5395 { |
7477 | 5396 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7478 static void readOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 5397 v8::Isolate* isolate = info.GetIsolate(); |
7479 { | 5398 Vector<String> names; |
7480 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5399 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestObjec
t", info.Holder(), isolate); |
7481 TestObjectV8Internal::readOnlyVoidMethodMethod(info); | 5400 impl->namedPropertyEnumerator(names, exceptionState); |
7482 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5401 if (exceptionState.throwIfNeeded()) |
7483 } | 5402 return; |
7484 | 5403 v8::Handle<v8::Array> v8names = v8::Array::New(isolate, names.size()); |
7485 static void notEnumerableReadOnlyVoidMethodMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 5404 for (size_t i = 0; i < names.size(); ++i) |
7486 { | 5405 v8names->Set(v8::Integer::New(isolate, i), v8String(isolate, names[i])); |
7487 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5406 v8SetReturnValue(info, v8names); |
7488 impl->notEnumerableReadOnlyVoidMethod(); | 5407 } |
7489 } | 5408 |
7490 | 5409 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) |
7491 static void notEnumerableReadOnlyVoidMethodMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 5410 { |
7492 { | 5411 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
7493 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5412 TestObjectV8Internal::namedPropertyEnumerator(info); |
7494 TestObjectV8Internal::notEnumerableReadOnlyVoidMethodMethod(info); | |
7495 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7496 } | |
7497 | |
7498 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
7499 { | |
7500 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7501 impl->runtimeEnabledVoidMethod(); | |
7502 } | |
7503 | |
7504 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | |
7505 { | |
7506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7507 TestObjectV8Internal::runtimeEnabledVoidMethodMethod(info); | |
7508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7509 } | |
7510 | |
7511 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | |
7512 { | |
7513 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7514 impl->perWorldBindingsRuntimeEnabledVoidMethod(); | |
7515 } | |
7516 | |
7517 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | |
7518 { | |
7519 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7520 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info); | |
7521 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7522 } | |
7523 | |
7524 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) | |
7525 { | |
7526 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7527 impl->perWorldBindingsRuntimeEnabledVoidMethod(); | |
7528 } | |
7529 | |
7530 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | |
7531 { | |
7532 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7533 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainW
orld(info); | |
7534 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7535 } | |
7536 | |
7537 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | |
7538 { | |
7539 if (UNLIKELY(info.Length() < 1)) { | |
7540 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodTestInterfaceEmptyArg", "TestObject", ExceptionMessages::notEnoughArgumen
ts(1, info.Length())), info.GetIsolate()); | |
7541 return; | |
7542 } | |
7543 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7544 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge
tIsolate())) { | |
7545 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestIn
terfaceEmpty'."), info.GetIsolate()); | |
7546 return; | |
7547 } | |
7548 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
7549 impl->strictTypeCheckingVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyAr
g); | |
7550 } | |
7551 | |
7552 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | |
7553 { | |
7554 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7555 TestObjectV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMetho
d(info); | |
7556 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7557 } | |
7558 | |
7559 static void strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
7560 { | |
7561 if (UNLIKELY(info.Length() < 1)) { | |
7562 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodTestInterfaceEmptyOrNullArg", "TestObject", ExceptionMessages::notEnoughA
rguments(1, info.Length())), info.GetIsolate()); | |
7563 return; | |
7564 } | |
7565 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7566 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8TestInterfaceEmpt
y::hasInstance(info[0], info.GetIsolate())) { | |
7567 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodTestInterfaceEmptyOrNullArg", "TestObject", "parameter 1 is not of type '
TestInterfaceEmpty'."), info.GetIsolate()); | |
7568 return; | |
7569 } | |
7570 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
7571 impl->strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullArg(testInterfaceE
mptyArg); | |
7572 } | |
7573 | |
7574 static void strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullArgMethodCallbac
k(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7575 { | |
7576 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7577 TestObjectV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullAr
gMethod(info); | |
7578 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7579 } | |
7580 | |
7581 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCa
llbackInfo<v8::Value>& info) | |
7582 { | |
7583 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7584 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString
Method(), info.GetIsolate()); | |
7585 } | |
7586 | |
7587 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | |
7588 { | |
7589 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7590 TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info); | |
7591 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7592 } | |
7593 | |
7594 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | |
7595 { | |
7596 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7597 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef
inedStringMethod(), info.GetIsolate()); | |
7598 } | |
7599 | |
7600 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | |
7601 { | |
7602 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7603 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethod(i
nfo); | |
7604 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7605 } | |
7606 | |
7607 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
7608 { | |
7609 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7610 impl->unforgeableVoidMethod(); | |
7611 } | |
7612 | |
7613 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | |
7614 { | |
7615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7616 TestObjectV8Internal::unforgeableVoidMethodMethod(info); | |
7617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7618 } | |
7619 | |
7620 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
7621 { | |
7622 if (UNLIKELY(info.Length() < 1)) { | |
7623 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa
ceWillBeGarbageCollectedSequenceArg", "TestObject", ExceptionMessages::notEnough
Arguments(1, info.Length())), info.GetIsolate()); | |
7624 return; | |
7625 } | |
7626 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7627 V8TRYCATCH_VOID(WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarba
geCollected> >, testInterfaceWillBeGarbageCollectedSequenceArg, (toMemberNativeA
rray<TestInterfaceWillBeGarbageCollected, V8TestInterfaceWillBeGarbageCollected>
(info[0], 1, info.GetIsolate()))); | |
7628 impl->voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(testInterface
WillBeGarbageCollectedSequenceArg); | |
7629 } | |
7630 | |
7631 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | |
7632 { | |
7633 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7634 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceA
rgMethod(info); | |
7635 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
7636 } | |
7637 | |
7638 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(const v8
::FunctionCallbackInfo<v8::Value>& info) | |
7639 { | |
7640 if (UNLIKELY(info.Length() < 1)) { | |
7641 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa
ceWillBeGarbageCollectedArrayArg", "TestObject", ExceptionMessages::notEnoughArg
uments(1, info.Length())), info.GetIsolate()); | |
7642 return; | |
7643 } | |
7644 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
7645 V8TRYCATCH_VOID(WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarba
geCollected> >, testInterfaceWillBeGarbageCollectedArrayArg, (toMemberNativeArra
y<TestInterfaceWillBeGarbageCollected, V8TestInterfaceWillBeGarbageCollected>(in
fo[0], 1, info.GetIsolate()))); | |
7646 impl->voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(testInterfaceWil
lBeGarbageCollectedArrayArg); | |
7647 } | |
7648 | |
7649 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) | |
7650 { | |
7651 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
7652 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgM
ethod(info); | |
7653 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5413 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7654 } | 5414 } |
7655 | 5415 |
7656 } // namespace TestObjectV8Internal | 5416 } // namespace TestObjectV8Internal |
7657 | 5417 |
7658 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[]
= { | 5418 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[]
= { |
7659 {"readonlyStringAttribute", TestObjectV8Internal::readonlyStringAttributeAtt
ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5419 {"readOnlyLongAttr", TestObjectV8Internal::readOnlyLongAttrAttributeGetterCa
llback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:
:PropertyAttribute>(v8::None), 0 /* on instance */}, |
7660 {"readonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::readonlyTestIn
terfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Access
Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins
tance */}, | 5420 {"readOnlyStringAttr", TestObjectV8Internal::readOnlyStringAttrAttributeGett
erCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast
<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7661 {"readonlyLongAttribute", TestObjectV8Internal::readonlyLongAttributeAttribu
teGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5421 {"readOnlyTestObjectAttr", TestObjectV8Internal::readOnlyTestObjectAttrAttri
buteGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), sta
tic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7662 {"dateAttribute", TestObjectV8Internal::dateAttributeAttributeGetterCallback
, TestObjectV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, 0 /* on instance */}, | 5422 {"TestSubObj", TestObjectV8Internal::TestObjectConstructorGetter, TestObject
V8Internal::TestObjectReplaceableAttributeSetterCallback, 0, 0, const_cast<Wrapp
erTypeInfo*>(&V8TestSubObj::wrapperTypeInfo), static_cast<v8::AccessControl>(v8:
:DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */
}, |
7663 {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCall
back, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, sta
tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8:
:None), 0 /* on instance */}, | 5423 {"enumAttr", TestObjectV8Internal::enumAttrAttributeGetterCallback, TestObje
ctV8Internal::enumAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta
nce */}, |
7664 {"domTimeStampAttribute", TestObjectV8Internal::domTimeStampAttributeAttribu
teGetterCallback, TestObjectV8Internal::domTimeStampAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, | 5424 {"readOnlyEnumAttr", TestObjectV8Internal::readOnlyEnumAttrAttributeGetterCa
llback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:
:PropertyAttribute>(v8::None), 0 /* on instance */}, |
7665 {"booleanAttribute", TestObjectV8Internal::booleanAttributeAttributeGetterCa
llback, TestObjectV8Internal::booleanAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, | 5425 {"byteAttr", TestObjectV8Internal::byteAttrAttributeGetterCallback, TestObje
ctV8Internal::byteAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta
nce */}, |
7666 {"byteAttribute", TestObjectV8Internal::byteAttributeAttributeGetterCallback
, TestObjectV8Internal::byteAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, 0 /* on instance */}, | 5426 {"octetAttr", TestObjectV8Internal::octetAttrAttributeGetterCallback, TestOb
jectV8Internal::octetAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces
sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on in
stance */}, |
7667 {"doubleAttribute", TestObjectV8Internal::doubleAttributeAttributeGetterCall
back, TestObjectV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, 0, sta
tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8:
:None), 0 /* on instance */}, | 5427 {"shortAttr", TestObjectV8Internal::shortAttrAttributeGetterCallback, TestOb
jectV8Internal::shortAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces
sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on in
stance */}, |
7668 {"floatAttribute", TestObjectV8Internal::floatAttributeAttributeGetterCallba
ck, TestObjectV8Internal::floatAttributeAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}, | 5428 {"unsignedShortAttr", TestObjectV8Internal::unsignedShortAttrAttributeGetter
Callback, TestObjectV8Internal::unsignedShortAttrAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut
e>(v8::None), 0 /* on instance */}, |
7669 {"longAttribute", TestObjectV8Internal::longAttributeAttributeGetterCallback
, TestObjectV8Internal::longAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, 0 /* on instance */}, | 5429 {"longAttr", TestObjectV8Internal::longAttrAttributeGetterCallback, TestObje
ctV8Internal::longAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta
nce */}, |
7670 {"longLongAttribute", TestObjectV8Internal::longLongAttributeAttributeGetter
Callback, TestObjectV8Internal::longLongAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut
e>(v8::None), 0 /* on instance */}, | 5430 {"longLongAttr", TestObjectV8Internal::longLongAttrAttributeGetterCallback,
TestObjectV8Internal::longLongAttrAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0
/* on instance */}, |
7671 {"octetAttribute", TestObjectV8Internal::octetAttributeAttributeGetterCallba
ck, TestObjectV8Internal::octetAttributeAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}, | 5431 {"unsignedLongLongAttr", TestObjectV8Internal::unsignedLongLongAttrAttribute
GetterCallback, TestObjectV8Internal::unsignedLongLongAttrAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), 0 /* on instance */}, |
7672 {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallba
ck, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}, | 5432 {"stringAttr", TestObjectV8Internal::stringAttrAttributeGetterCallback, Test
ObjectV8Internal::stringAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::Ac
cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on
instance */}, |
7673 {"unsignedLongAttribute", TestObjectV8Internal::unsignedLongAttributeAttribu
teGetterCallback, TestObjectV8Internal::unsignedLongAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, | 5433 {"treatNullAsNullStringStringAttr", TestObjectV8Internal::treatNullAsNullStr
ingStringAttrAttributeGetterCallback, TestObjectV8Internal::treatNullAsNullStrin
gStringAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::
DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7674 {"unsignedLongLongAttribute", TestObjectV8Internal::unsignedLongLongAttribut
eAttributeGetterCallback, TestObjectV8Internal::unsignedLongLongAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5434 {"treatNullAsNullStringTreatUndefinedAsNullStringStringAttr", TestObjectV8In
ternal::treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGetter
Callback, TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringS
tringAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DE
FAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7675 {"unsignedShortAttribute", TestObjectV8Internal::unsignedShortAttributeAttri
buteGetterCallback, TestObjectV8Internal::unsignedShortAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, | 5435 {"eventHandlerAttr", TestObjectV8Internal::eventHandlerAttrAttributeGetterCa
llback, TestObjectV8Internal::eventHandlerAttrAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, |
7676 {"testInterfaceEmptyAttribute", TestObjectV8Internal::testInterfaceEmptyAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5436 {"testObjAttr", TestObjectV8Internal::testObjAttrAttributeGetterCallback, Te
stObjectV8Internal::testObjAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8:
:AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /*
on instance */}, |
7677 {"testObjectAttribute", TestObjectV8Internal::testObjectAttributeAttributeGe
tterCallback, TestObjectV8Internal::testObjectAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, | 5437 {"TestSubObjMeasured", TestObjectV8Internal::TestSubObjMeasuredConstructorGe
tterCallback, TestObjectV8Internal::TestObjectReplaceableAttributeSetterCallback
, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo), static_cas
t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEn
um), 0 /* on instance */}, |
7678 {"voidCallbackFunctionAttribute", TestObjectV8Internal::voidCallbackFunction
AttributeAttributeGetterCallback, TestObjectV8Internal::voidCallbackFunctionAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5438 {"XMLObjAttr", TestObjectV8Internal::XMLObjAttrAttributeGetterCallback, Test
ObjectV8Internal::XMLObjAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::Ac
cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on
instance */}, |
7679 {"anyCallbackFunctionOptionalAnyArgAttribute", TestObjectV8Internal::anyCall
backFunctionOptionalAnyArgAttributeAttributeGetterCallback, TestObjectV8Internal
::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, | 5439 {"reflectedStringAttr", TestObjectV8Internal::reflectedStringAttrAttributeGe
tterCallback, TestObjectV8Internal::reflectedStringAttrAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, |
7680 {"cssAttribute", TestObjectV8Internal::cssAttributeAttributeGetterCallback,
TestObjectV8Internal::cssAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0
/* on instance */}, | 5440 {"reflectedTreatNullAsNullStringStringAttr", TestObjectV8Internal::reflected
TreatNullAsNullStringStringAttrAttributeGetterCallback, TestObjectV8Internal::re
flectedTreatNullAsNullStringStringAttrAttributeSetterCallback, 0, 0, 0, static_c
ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None
), 0 /* on instance */}, |
7681 {"imeAttribute", TestObjectV8Internal::imeAttributeAttributeGetterCallback,
TestObjectV8Internal::imeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0
/* on instance */}, | 5441 {"reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttr", TestO
bjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeGetterCallback, TestObjectV8Internal::reflectedTreatNullAsNullString
TreatUndefinedAsNullStringStringAttrAttributeSetterCallback, 0, 0, 0, static_cas
t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None),
0 /* on instance */}, |
7682 {"svgAttribute", TestObjectV8Internal::svgAttributeAttributeGetterCallback,
TestObjectV8Internal::svgAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0
/* on instance */}, | 5442 {"reflectedIntegralAttr", TestObjectV8Internal::reflectedIntegralAttrAttribu
teGetterCallback, TestObjectV8Internal::reflectedIntegralAttrAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, |
7683 {"xmlAttribute", TestObjectV8Internal::xmlAttributeAttributeGetterCallback,
TestObjectV8Internal::xmlAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0
/* on instance */}, | 5443 {"reflectedUnsignedIntegralAttr", TestObjectV8Internal::reflectedUnsignedInt
egralAttrAttributeGetterCallback, TestObjectV8Internal::reflectedUnsignedIntegra
lAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7684 {"nodeFilterAttribute", TestObjectV8Internal::nodeFilterAttributeAttributeGe
tterCallback, TestObjectV8Internal::nodeFilterAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, | 5444 {"reflectedBooleanAttr", TestObjectV8Internal::reflectedBooleanAttrAttribute
GetterCallback, TestObjectV8Internal::reflectedBooleanAttrAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), 0 /* on instance */}, |
7685 {"serializedScriptValueAttribute", TestObjectV8Internal::serializedScriptVal
ueAttributeAttributeGetterCallback, TestObjectV8Internal::serializedScriptValueA
ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5445 {"reflectedURLAttr", TestObjectV8Internal::reflectedURLAttrAttributeGetterCa
llback, TestObjectV8Internal::reflectedURLAttrAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, |
7686 {"anyAttribute", TestObjectV8Internal::anyAttributeAttributeGetterCallback,
TestObjectV8Internal::anyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0
/* on instance */}, | 5446 {"reflectedTreatNullAsNullStringURLAttr", TestObjectV8Internal::reflectedTre
atNullAsNullStringURLAttrAttributeGetterCallback, TestObjectV8Internal::reflecte
dTreatNullAsNullStringURLAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::A
ccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* o
n instance */}, |
7687 {"promiseAttribute", TestObjectV8Internal::promiseAttributeAttributeGetterCa
llback, TestObjectV8Internal::promiseAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, | 5447 {"reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttr", TestObje
ctV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAtt
ributeGetterCallback, TestObjectV8Internal::reflectedTreatNullAsNullStringTreatU
ndefinedAsNullStringURLAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acc
essControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on
instance */}, |
7688 {"windowAttribute", TestObjectV8Internal::windowAttributeAttributeGetterCall
back, TestObjectV8Internal::windowAttributeAttributeSetterCallback, 0, 0, 0, sta
tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8:
:None), 0 /* on instance */}, | 5448 {"reflectedCustomStringAttr", TestObjectV8Internal::reflectedCustomStringAtt
rAttributeGetterCallback, TestObjectV8Internal::reflectedCustomStringAttrAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7689 {"documentAttribute", TestObjectV8Internal::documentAttributeAttributeGetter
Callback, TestObjectV8Internal::documentAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut
e>(v8::None), 0 /* on instance */}, | 5449 {"reflectedTreatNullAsNullStringCustomStringAttr", TestObjectV8Internal::ref
lectedTreatNullAsNullStringCustomStringAttrAttributeGetterCallback, TestObjectV8
Internal::reflectedTreatNullAsNullStringCustomStringAttrAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), 0 /* on instance */}, |
7690 {"documentFragmentAttribute", TestObjectV8Internal::documentFragmentAttribut
eAttributeGetterCallback, TestObjectV8Internal::documentFragmentAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5450 {"reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomStringAttr",
TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStringC
ustomStringAttrAttributeGetterCallback, TestObjectV8Internal::reflectedTreatNull
AsNullStringTreatUndefinedAsNullStringCustomStringAttrAttributeSetterCallback, 0
, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAtt
ribute>(v8::None), 0 /* on instance */}, |
7691 {"documentTypeAttribute", TestObjectV8Internal::documentTypeAttributeAttribu
teGetterCallback, TestObjectV8Internal::documentTypeAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, | 5451 {"reflectedCustomIntegralAttr", TestObjectV8Internal::reflectedCustomIntegra
lAttrAttributeGetterCallback, TestObjectV8Internal::reflectedCustomIntegralAttrA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7692 {"elementAttribute", TestObjectV8Internal::elementAttributeAttributeGetterCa
llback, TestObjectV8Internal::elementAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, | 5452 {"reflectedCustomBooleanAttr", TestObjectV8Internal::reflectedCustomBooleanA
ttrAttributeGetterCallback, TestObjectV8Internal::reflectedCustomBooleanAttrAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7693 {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback
, TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, 0 /* on instance */}, | 5453 {"reflectedCustomURLAttr", TestObjectV8Internal::reflectedCustomURLAttrAttri
buteGetterCallback, TestObjectV8Internal::reflectedCustomURLAttrAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, |
7694 {"shadowRootAttribute", TestObjectV8Internal::shadowRootAttributeAttributeGe
tterCallback, TestObjectV8Internal::shadowRootAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, | 5454 {"reflectedTreatNullAsNullStringCustomURLAttr", TestObjectV8Internal::reflec
tedTreatNullAsNullStringCustomURLAttrAttributeGetterCallback, TestObjectV8Intern
al::reflectedTreatNullAsNullStringCustomURLAttrAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>
(v8::None), 0 /* on instance */}, |
7695 {"arrayBufferAttribute", TestObjectV8Internal::arrayBufferAttributeAttribute
GetterCallback, TestObjectV8Internal::arrayBufferAttributeAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), 0 /* on instance */}, | 5455 {"reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAttr", Te
stObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCust
omURLAttrAttributeGetterCallback, TestObjectV8Internal::reflectedTreatNullAsNull
StringTreatUndefinedAsNullStringCustomURLAttrAttributeSetterCallback, 0, 0, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), 0 /* on instance */}, |
7696 {"float32ArrayAttribute", TestObjectV8Internal::float32ArrayAttributeAttribu
teGetterCallback, TestObjectV8Internal::float32ArrayAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, | |
7697 {"uint8ArrayAttribute", TestObjectV8Internal::uint8ArrayAttributeAttributeGe
tterCallback, TestObjectV8Internal::uint8ArrayAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, | |
7698 {"self", TestObjectV8Internal::selfAttributeGetterCallback, 0, 0, 0, 0, stat
ic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::
None), 0 /* on instance */}, | |
7699 {"readonlyEventTargetAttribute", TestObjectV8Internal::readonlyEventTargetAt
tributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::D
EFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7700 {"readonlyEventTargetOrNullAttribute", TestObjectV8Internal::readonlyEventTa
rgetOrNullAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta
nce */}, | |
7701 {"readonlyWindowAttribute", TestObjectV8Internal::readonlyWindowAttributeAtt
ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7702 {"htmlCollectionAttribute", TestObjectV8Internal::htmlCollectionAttributeAtt
ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7703 {"htmlElementAttribute", TestObjectV8Internal::htmlElementAttributeAttribute
GetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7704 {"stringArrayAttribute", TestObjectV8Internal::stringArrayAttributeAttribute
GetterCallback, TestObjectV8Internal::stringArrayAttributeAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), 0 /* on instance */}, | |
7705 {"testInterfaceEmptyArrayAttribute", TestObjectV8Internal::testInterfaceEmpt
yArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmpty
ArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v
8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7706 {"floatArrayAttribute", TestObjectV8Internal::floatArrayAttributeAttributeGe
tterCallback, TestObjectV8Internal::floatArrayAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, | |
7707 {"stringOrNullAttribute", TestObjectV8Internal::stringOrNullAttributeAttribu
teGetterCallback, TestObjectV8Internal::stringOrNullAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, | |
7708 {"longOrNullAttribute", TestObjectV8Internal::longOrNullAttributeAttributeGe
tterCallback, TestObjectV8Internal::longOrNullAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, | |
7709 {"testInterfaceOrNullAttribute", TestObjectV8Internal::testInterfaceOrNullAt
tributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceOrNullAttribu
teAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7710 {"testEnumAttribute", TestObjectV8Internal::testEnumAttributeAttributeGetter
Callback, TestObjectV8Internal::testEnumAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut
e>(v8::None), 0 /* on instance */}, | |
7711 {"eventHandlerAttribute", TestObjectV8Internal::eventHandlerAttributeAttribu
teGetterCallback, TestObjectV8Internal::eventHandlerAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, | |
7712 {"activityLoggingAccessForAllWorldsLongAttribute", TestObjectV8Internal::act
ivityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8
Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), 0 /* on instance */}, | |
7713 {"activityLoggingGetterForAllWorldsLongAttribute", TestObjectV8Internal::act
ivityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8
Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), 0 /* on instance */}, | |
7714 {"activityLoggingSetterForAllWorldsLongAttribute", TestObjectV8Internal::act
ivityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8
Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), 0 /* on instance */}, | |
7715 {"cachedAttributeAnyAttribute", TestObjectV8Internal::cachedAttributeAnyAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::cachedAttributeAnyAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7716 {"callWithExecutionContextAnyAttribute", TestObjectV8Internal::callWithExecu
tionContextAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithEx
ecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}, | |
7717 {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectV8Internal::chec
kSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, | |
7718 #if ENABLE(CONDITION) | |
7719 {"conditionalLongAttribute", TestObjectV8Internal::conditionalLongAttributeA
ttributeGetterCallback, TestObjectV8Internal::conditionalLongAttributeAttributeS
etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast
<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7720 #endif // ENABLE(CONDITION) | |
7721 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
7722 {"conditionalAndLongAttribute", TestObjectV8Internal::conditionalAndLongAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::conditionalAndLongAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7723 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
7724 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2) | |
7725 {"conditionalOrLongAttribute", TestObjectV8Internal::conditionalOrLongAttrib
uteAttributeGetterCallback, TestObjectV8Internal::conditionalOrLongAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7726 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2) | |
7727 {"testInterfaceEmptyConstructorAttribute", TestObjectV8Internal::TestObjectC
onstructorGetter, TestObjectV8Internal::TestObjectReplaceableAttributeSetterCall
back, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo)
, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute
>(v8::DontEnum), 0 /* on instance */}, | |
7728 {"testInterfaceEmptyConstructorAttribute", TestObjectV8Internal::testInterfa
ceEmptyConstructorAttributeConstructorGetterCallback, TestObjectV8Internal::Test
ObjectReplaceableAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8
TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT
), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */}, | |
7729 {"measureAsFeatureNameTestInterfaceEmptyConstructorAttribute", TestObjectV8I
nternal::measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGe
tterCallback, TestObjectV8Internal::TestObjectReplaceableAttributeSetterCallback
, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::DontEnum), 0 /* on instance */}, | |
7730 {"customObjectAttribute", TestObjectV8Internal::customObjectAttributeAttribu
teGetterCallback, TestObjectV8Internal::customObjectAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, | |
7731 {"customGetterLongAttribute", TestObjectV8Internal::customGetterLongAttribut
eAttributeGetterCallback, TestObjectV8Internal::customGetterLongAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7732 {"customGetterReadonlyObjectAttribute", TestObjectV8Internal::customGetterRe
adonlyObjectAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Access
Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins
tance */}, | |
7733 {"customSetterLongAttribute", TestObjectV8Internal::customSetterLongAttribut
eAttributeGetterCallback, TestObjectV8Internal::customSetterLongAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7734 #if ENABLE(CONDITION) | |
7735 {"customLongAttribute", TestObjectV8Internal::customLongAttributeAttributeGe
tterCallback, TestObjectV8Internal::customLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, | |
7736 #endif // ENABLE(CONDITION) | |
7737 {"customElementsCallbacksReadonlyLongAttribute", TestObjectV8Internal::custo
mElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, stat
ic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::
None), 0 /* on instance */}, | |
7738 {"deprecatedLongAttribute", TestObjectV8Internal::deprecatedLongAttributeAtt
ributeGetterCallback, TestObjectV8Internal::deprecatedLongAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7739 {"enforceRangeLongAttribute", TestObjectV8Internal::enforceRangeLongAttribut
eAttributeGetterCallback, TestObjectV8Internal::enforceRangeLongAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7740 {"implementedAsLongAttribute", TestObjectV8Internal::implementedAsLongAttrib
uteAttributeGetterCallback, TestObjectV8Internal::implementedAsLongAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7741 {"customImplementedAsLongAttribute", TestObjectV8Internal::customImplemented
AsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customImplementedA
sLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v
8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7742 {"customGetterImplementedAsLongAttribute", TestObjectV8Internal::customGette
rImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::custom
GetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, | |
7743 {"customSetterImplementedAsLongAttribute", TestObjectV8Internal::customSette
rImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::custom
SetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, | |
7744 {"measureAsLongAttribute", TestObjectV8Internal::measureAsLongAttributeAttri
buteGetterCallback, TestObjectV8Internal::measureAsLongAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, | |
7745 {"notEnumerableLongAttribute", TestObjectV8Internal::notEnumerableLongAttrib
uteAttributeGetterCallback, TestObjectV8Internal::notEnumerableLongAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */}, | |
7746 {"perWorldBindingsLongAttribute", TestObjectV8Internal::perWorldBindingsLong
AttributeAttributeGetterCallback, TestObjectV8Internal::perWorldBindingsLongAttr
ibuteAttributeSetterCallback, TestObjectV8Internal::perWorldBindingsLongAttribut
eAttributeGetterCallbackForMainWorld, TestObjectV8Internal::perWorldBindingsLong
AttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(
v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}
, | |
7747 {"perWorldBindingsReadonlyLongAttribute", TestObjectV8Internal::perWorldBind
ingsReadonlyLongAttributeAttributeGetterCallback, 0, TestObjectV8Internal::perWo
rldBindingsReadonlyLongAttributeAttributeGetterCallbackForMainWorld, 0, 0, stati
c_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::N
one), 0 /* on instance */}, | |
7748 {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestObjectV8Internal
::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0,
TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttrib
uteGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7749 {"activityLoggingAccessPerWorldBindingsLongAttribute", TestObjectV8Internal:
:activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, Test
ObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSet
terCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttr
ibuteAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingA
ccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}, | |
7750 {"activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", Test
ObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForIsol
atedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Inte
rnal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttribu
teGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessForIsol
atedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), 0 /* on instance */}, | |
7751 {"activityLoggingGetterPerWorldBindingsLongAttribute", TestObjectV8Internal:
:activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback, Test
ObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSet
terCallback, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttr
ibuteAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingG
etterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}, | |
7752 {"activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", Test
ObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterForIsol
atedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Inte
rnal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttribu
teGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingGetterForIsol
atedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), 0 /* on instance */}, | |
7753 {"location", TestObjectV8Internal::locationAttributeGetterCallback, TestObje
ctV8Internal::locationAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta
nce */}, | |
7754 {"locationWithException", TestObjectV8Internal::locationWithExceptionAttribu
teGetterCallback, TestObjectV8Internal::locationWithExceptionAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, | |
7755 {"locationWithCallWith", TestObjectV8Internal::locationWithCallWithAttribute
GetterCallback, TestObjectV8Internal::locationWithCallWithAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), 0 /* on instance */}, | |
7756 {"locationWithPerWorldBindings", TestObjectV8Internal::locationWithPerWorldB
indingsAttributeGetterCallback, TestObjectV8Internal::locationWithPerWorldBindin
gsAttributeSetterCallback, TestObjectV8Internal::locationWithPerWorldBindingsAtt
ributeGetterCallbackForMainWorld, TestObjectV8Internal::locationWithPerWorldBind
ingsAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::D
EFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7757 {"locationWillBeGarbageCollected", TestObjectV8Internal::locationWillBeGarba
geCollectedAttributeGetterCallback, TestObjectV8Internal::locationWillBeGarbageC
ollectedAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7758 {"raisesExceptionLongAttribute", TestObjectV8Internal::raisesExceptionLongAt
tributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionLongAttribu
teAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7759 {"raisesExceptionGetterLongAttribute", TestObjectV8Internal::raisesException
GetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptio
nGetterLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}, | |
7760 {"setterRaisesExceptionLongAttribute", TestObjectV8Internal::setterRaisesExc
eptionLongAttributeAttributeGetterCallback, TestObjectV8Internal::setterRaisesEx
ceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}, | |
7761 {"raisesExceptionTestInterfaceEmptyAttribute", TestObjectV8Internal::raisesE
xceptionTestInterfaceEmptyAttributeAttributeGetterCallback, TestObjectV8Internal
::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, | |
7762 {"cachedAttributeRaisesExceptionGetterAnyAttribute", TestObjectV8Internal::c
achedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, TestObje
ctV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCal
lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro
pertyAttribute>(v8::None), 0 /* on instance */}, | |
7763 {"reflectTestInterfaceAttribute", TestObjectV8Internal::reflectTestInterface
AttributeAttributeGetterCallback, TestObjectV8Internal::reflectTestInterfaceAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7764 {"reflectReflectedNameAttributeTestAttribute", TestObjectV8Internal::reflect
ReflectedNameAttributeTestAttributeAttributeGetterCallback, TestObjectV8Internal
::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, | |
7765 {"reflectBooleanAttribute", TestObjectV8Internal::reflectBooleanAttributeAtt
ributeGetterCallback, TestObjectV8Internal::reflectBooleanAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7766 {"reflectLongAttribute", TestObjectV8Internal::reflectLongAttributeAttribute
GetterCallback, TestObjectV8Internal::reflectLongAttributeAttributeSetterCallbac
k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::None), 0 /* on instance */}, | |
7767 {"reflectUnsignedShortAttribute", TestObjectV8Internal::reflectUnsignedShort
AttributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedShortAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7768 {"reflectUnsignedLongAttribute", TestObjectV8Internal::reflectUnsignedLongAt
tributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedLongAttribu
teAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7769 {"id", TestObjectV8Internal::idAttributeGetterCallback, TestObjectV8Internal
::idAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT
), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7770 {"name", TestObjectV8Internal::nameAttributeGetterCallback, TestObjectV8Inte
rnal::nameAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::D
EFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7771 {"class", TestObjectV8Internal::classAttributeGetterCallback, TestObjectV8In
ternal::classAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8
::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | |
7772 {"reflectedId", TestObjectV8Internal::reflectedIdAttributeGetterCallback, Te
stObjectV8Internal::reflectedIdAttributeSetterCallback, 0, 0, 0, static_cast<v8:
:AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /*
on instance */}, | |
7773 {"reflectedName", TestObjectV8Internal::reflectedNameAttributeGetterCallback
, TestObjectV8Internal::reflectedNameAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, 0 /* on instance */}, | |
7774 {"reflectedClass", TestObjectV8Internal::reflectedClassAttributeGetterCallba
ck, TestObjectV8Internal::reflectedClassAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}, | |
7775 {"limitedToOnlyOneAttribute", TestObjectV8Internal::limitedToOnlyOneAttribut
eAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOneAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5456 {"limitedToOnlyOneAttribute", TestObjectV8Internal::limitedToOnlyOneAttribut
eAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOneAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7776 {"limitedToOnlyAttribute", TestObjectV8Internal::limitedToOnlyAttributeAttri
buteGetterCallback, TestObjectV8Internal::limitedToOnlyAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, | 5457 {"limitedToOnlyAttribute", TestObjectV8Internal::limitedToOnlyAttributeAttri
buteGetterCallback, TestObjectV8Internal::limitedToOnlyAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, |
7777 {"limitedToOnlyOtherAttribute", TestObjectV8Internal::limitedToOnlyOtherAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOtherAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5458 {"limitedToOnlyOtherAttribute", TestObjectV8Internal::limitedToOnlyOtherAttr
ibuteAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOtherAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7778 {"limitedWithMissingDefaultAttribute", TestObjectV8Internal::limitedWithMiss
ingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithMis
singDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}, | 5459 {"limitedWithMissingDefaultAttribute", TestObjectV8Internal::limitedWithMiss
ingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithMis
singDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}, |
7779 {"limitedWithInvalidMissingDefaultAttribute", TestObjectV8Internal::limitedW
ithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::
limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, stati
c_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::N
one), 0 /* on instance */}, | 5460 {"limitedWithInvalidMissingDefaultAttribute", TestObjectV8Internal::limitedW
ithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::
limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, stati
c_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::N
one), 0 /* on instance */}, |
| 5461 {"limitedWithInvalidAndMissingDefaultAttribute", TestObjectV8Internal::limit
edWithInvalidAndMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::limitedWithInvalidAndMissingDefaultAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, |
7780 {"corsSettingAttribute", TestObjectV8Internal::corsSettingAttributeAttribute
GetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5462 {"corsSettingAttribute", TestObjectV8Internal::corsSettingAttributeAttribute
GetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7781 {"limitedWithEmptyMissingInvalidAttribute", TestObjectV8Internal::limitedWit
hEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, | 5463 {"limitedWithEmptyMissingInvalidAttribute", TestObjectV8Internal::limitedWit
hEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, |
7782 {"replaceableReadonlyLongAttribute", TestObjectV8Internal::replaceableReadon
lyLongAttributeAttributeGetterCallback, TestObjectV8Internal::TestObjectReplacea
bleAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5464 {"typedArrayAttr", TestObjectV8Internal::typedArrayAttrAttributeGetterCallba
ck, TestObjectV8Internal::typedArrayAttrAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}, |
7783 {"locationReplaceable", TestObjectV8Internal::locationReplaceableAttributeGe
tterCallback, TestObjectV8Internal::locationReplaceableAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, | 5465 {"attrWithGetterException", TestObjectV8Internal::attrWithGetterExceptionAtt
ributeGetterCallback, TestObjectV8Internal::attrWithGetterExceptionAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7784 {"setterCallWithActiveWindowAndFirstWindowStringAttribute", TestObjectV8Inte
rnal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCall
back, TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5466 {"attrWithSetterException", TestObjectV8Internal::attrWithSetterExceptionAtt
ributeGetterCallback, TestObjectV8Internal::attrWithSetterExceptionAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7785 {"setterCallWithExecutionContextStringAttribute", TestObjectV8Internal::sett
erCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectV8In
ternal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr
ibute>(v8::None), 0 /* on instance */}, | 5467 {"stringAttrWithGetterException", TestObjectV8Internal::stringAttrWithGetter
ExceptionAttributeGetterCallback, TestObjectV8Internal::stringAttrWithGetterExce
ptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7786 {"strictTypeCheckingFloatAttribute", TestObjectV8Internal::strictTypeCheckin
gFloatAttributeAttributeGetterCallback, TestObjectV8Internal::strictTypeChecking
FloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v
8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5468 {"stringAttrWithSetterException", TestObjectV8Internal::stringAttrWithSetter
ExceptionAttributeGetterCallback, TestObjectV8Internal::stringAttrWithSetterExce
ptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7787 {"strictTypeCheckingTestInterfaceAttribute", TestObjectV8Internal::strictTyp
eCheckingTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::st
rictTypeCheckingTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_c
ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None
), 0 /* on instance */}, | 5469 {"customAttr", TestObjectV8Internal::customAttrAttributeGetterCallback, Test
ObjectV8Internal::customAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::Ac
cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on
instance */}, |
7788 {"treatNullAsNullStringStringAttribute", TestObjectV8Internal::treatNullAsNu
llStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullA
sNullStringStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}, | 5470 {"withExecutionContextAttribute", TestObjectV8Internal::withExecutionContext
AttributeAttributeGetterCallback, TestObjectV8Internal::withExecutionContextAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7789 {"treatReturnedNullStringAsNullStringAttribute", TestObjectV8Internal::treat
ReturnedNullStringAsNullStringAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, | 5471 {"withActiveWindowAndFirstWindowAttribute", TestObjectV8Internal::withActive
WindowAndFirstWindowAttributeAttributeGetterCallback, TestObjectV8Internal::with
ActiveWindowAndFirstWindowAttributeAttributeSetterCallback, 0, 0, 0, static_cast
<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None),
0 /* on instance */}, |
7790 {"treatReturnedNullStringAsUndefinedStringAttribute", TestObjectV8Internal::
treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback, TestOb
jectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter
Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::None), 0 /* on instance */}, | 5472 {"withScriptStateAttributeRaises", TestObjectV8Internal::withScriptStateAttr
ibuteRaisesAttributeGetterCallback, TestObjectV8Internal::withScriptStateAttribu
teRaisesAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7791 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett
erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri
bute>(v8::None), 0 /* on instance */}, | 5473 {"enforcedRangeByteAttr", TestObjectV8Internal::enforcedRangeByteAttrAttribu
teGetterCallback, TestObjectV8Internal::enforcedRangeByteAttrAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, |
7792 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett
erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0,
0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri
bute>(v8::None), 0 /* on instance */}, | 5474 {"enforcedRangeOctetAttr", TestObjectV8Internal::enforcedRangeOctetAttrAttri
buteGetterCallback, TestObjectV8Internal::enforcedRangeOctetAttrAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, |
7793 {"unforgeableLongAttribute", TestObjectV8Internal::unforgeableLongAttributeA
ttributeGetterCallback, TestObjectV8Internal::unforgeableLongAttributeAttributeS
etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING
), static_cast<v8::PropertyAttribute>(v8::DontDelete), 0 /* on instance */}, | 5475 {"enforcedRangeShortAttr", TestObjectV8Internal::enforcedRangeShortAttrAttri
buteGetterCallback, TestObjectV8Internal::enforcedRangeShortAttrAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, |
7794 {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttri
buteGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterC
allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, | 5476 {"enforcedRangeUnsignedShortAttr", TestObjectV8Internal::enforcedRangeUnsign
edShortAttrAttributeGetterCallback, TestObjectV8Internal::enforcedRangeUnsignedS
hortAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7795 {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectV8Internal::testI
nterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Inte
rnal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, | 5477 {"enforcedRangeLongAttr", TestObjectV8Internal::enforcedRangeLongAttrAttribu
teGetterCallback, TestObjectV8Internal::enforcedRangeLongAttrAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, |
7796 {"testInterfaceWillBeGarbageCollectedOrNullAttribute", TestObjectV8Internal:
:testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback, Test
ObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 5478 {"enforcedRangeUnsignedLongAttr", TestObjectV8Internal::enforcedRangeUnsigne
dLongAttrAttributeGetterCallback, TestObjectV8Internal::enforcedRangeUnsignedLon
gAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5479 {"enforcedRangeLongLongAttr", TestObjectV8Internal::enforcedRangeLongLongAtt
rAttributeGetterCallback, TestObjectV8Internal::enforcedRangeLongLongAttrAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5480 {"enforcedRangeUnsignedLongLongAttr", TestObjectV8Internal::enforcedRangeUns
ignedLongLongAttrAttributeGetterCallback, TestObjectV8Internal::enforcedRangeUns
ignedLongLongAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl
>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance *
/}, |
| 5481 #if ENABLE(Condition1) |
| 5482 {"conditionalAttr1", TestObjectV8Internal::conditionalAttr1AttributeGetterCa
llback, TestObjectV8Internal::conditionalAttr1AttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, |
| 5483 #endif // ENABLE(Condition1) |
| 5484 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 5485 {"conditionalAttr2", TestObjectV8Internal::conditionalAttr2AttributeGetterCa
llback, TestObjectV8Internal::conditionalAttr2AttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, |
| 5486 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 5487 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
| 5488 {"conditionalAttr3", TestObjectV8Internal::conditionalAttr3AttributeGetterCa
llback, TestObjectV8Internal::conditionalAttr3AttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, |
| 5489 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
| 5490 #if ENABLE(Condition1) |
| 5491 {"conditionalAttr4", TestObjectV8Internal::TestObjectConstructorGetter, Test
ObjectV8Internal::TestObjectReplaceableAttributeSetterCallback, 0, 0, const_cast
<WrapperTypeInfo*>(&V8TestObjectectA::wrapperTypeInfo), static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on i
nstance */}, |
| 5492 #endif // ENABLE(Condition1) |
| 5493 #if ENABLE(Condition1) && ENABLE(Condition2) |
| 5494 {"conditionalAttr5", TestObjectV8Internal::TestObjectConstructorGetter, Test
ObjectV8Internal::TestObjectReplaceableAttributeSetterCallback, 0, 0, const_cast
<WrapperTypeInfo*>(&V8TestObjectectB::wrapperTypeInfo), static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on i
nstance */}, |
| 5495 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
| 5496 #if ENABLE(Condition1) || ENABLE(Condition2) |
| 5497 {"conditionalAttr6", TestObjectV8Internal::TestObjectConstructorGetter, Test
ObjectV8Internal::TestObjectReplaceableAttributeSetterCallback, 0, 0, const_cast
<WrapperTypeInfo*>(&V8TestObjectectC::wrapperTypeInfo), static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on i
nstance */}, |
| 5498 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| 5499 {"cachedAttribute1", TestObjectV8Internal::cachedAttribute1AttributeGetterCa
llback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:
:PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5500 {"cachedAttribute2", TestObjectV8Internal::cachedAttribute2AttributeGetterCa
llback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:
:PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5501 {"cachedDirtyableAttribute", TestObjectV8Internal::cachedDirtyableAttributeA
ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5502 {"cachedDirtyableAttributeRaises", TestObjectV8Internal::cachedDirtyableAttr
ibuteRaisesAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v
8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5503 {"anyAttribute", TestObjectV8Internal::anyAttributeAttributeGetterCallback,
TestObjectV8Internal::anyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<
v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0
/* on instance */}, |
| 5504 {"callbackFunctionAttribute", TestObjectV8Internal::callbackFunctionAttribut
eAttributeGetterCallback, TestObjectV8Internal::callbackFunctionAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5505 {"floatArray", TestObjectV8Internal::floatArrayAttributeGetterCallback, Test
ObjectV8Internal::floatArrayAttributeSetterCallback, 0, 0, 0, static_cast<v8::Ac
cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on
instance */}, |
| 5506 {"doubleArray", TestObjectV8Internal::doubleArrayAttributeGetterCallback, Te
stObjectV8Internal::doubleArrayAttributeSetterCallback, 0, 0, 0, static_cast<v8:
:AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /*
on instance */}, |
| 5507 {"messagePortArray", TestObjectV8Internal::messagePortArrayAttributeGetterCa
llback, TestObjectV8Internal::messagePortArrayAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, |
| 5508 {"contentDocument", TestObjectV8Internal::contentDocumentAttributeGetterCall
back, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P
ropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5509 {"strawberry", TestObjectV8Internal::strawberryAttributeGetterCallback, Test
ObjectV8Internal::strawberryAttributeSetterCallback, 0, 0, 0, static_cast<v8::Ac
cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on
instance */}, |
| 5510 {"strictFloat", TestObjectV8Internal::strictFloatAttributeGetterCallback, Te
stObjectV8Internal::strictFloatAttributeSetterCallback, 0, 0, 0, static_cast<v8:
:AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /*
on instance */}, |
| 5511 {"replaceableAttribute", TestObjectV8Internal::replaceableAttributeAttribute
GetterCallback, TestObjectV8Internal::TestObjectReplaceableAttributeSetterCallba
ck, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Proper
tyAttribute>(v8::None), 0 /* on instance */}, |
| 5512 {"nullableDoubleAttribute", TestObjectV8Internal::nullableDoubleAttributeAtt
ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5513 {"nullableLongAttribute", TestObjectV8Internal::nullableLongAttributeAttribu
teGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5514 {"nullableBooleanAttribute", TestObjectV8Internal::nullableBooleanAttributeA
ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5515 {"nullableStringAttribute", TestObjectV8Internal::nullableStringAttributeAtt
ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5516 {"nullableLongSettableAttribute", TestObjectV8Internal::nullableLongSettable
AttributeAttributeGetterCallback, TestObjectV8Internal::nullableLongSettableAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5517 {"perWorldReadOnlyAttribute", TestObjectV8Internal::perWorldReadOnlyAttribut
eAttributeGetterCallback, 0, TestObjectV8Internal::perWorldReadOnlyAttributeAttr
ibuteGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5518 {"perWorldAttribute", TestObjectV8Internal::perWorldAttributeAttributeGetter
Callback, TestObjectV8Internal::perWorldAttributeAttributeSetterCallback, TestOb
jectV8Internal::perWorldAttributeAttributeGetterCallbackForMainWorld, TestObject
V8Internal::perWorldAttributeAttributeSetterCallbackForMainWorld, 0, static_cast
<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None),
0 /* on instance */}, |
| 5519 {"activityLoggedAttr1", TestObjectV8Internal::activityLoggedAttr1AttributeGe
tterCallback, TestObjectV8Internal::activityLoggedAttr1AttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt
tribute>(v8::None), 0 /* on instance */}, |
| 5520 {"activityLoggedAttr2", TestObjectV8Internal::activityLoggedAttr2AttributeGe
tterCallback, TestObjectV8Internal::activityLoggedAttr2AttributeSetterCallback,
TestObjectV8Internal::activityLoggedAttr2AttributeGetterCallbackForMainWorld, Te
stObjectV8Internal::activityLoggedAttr2AttributeSetterCallbackForMainWorld, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), 0 /* on instance */}, |
| 5521 {"activityLoggedInIsolatedWorldsAttr", TestObjectV8Internal::activityLoggedI
nIsolatedWorldsAttrAttributeGetterCallback, TestObjectV8Internal::activityLogged
InIsolatedWorldsAttrAttributeSetterCallback, TestObjectV8Internal::activityLogge
dInIsolatedWorldsAttrAttributeGetterCallbackForMainWorld, TestObjectV8Internal::
activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorld, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}, |
| 5522 {"activityLoggedAttrSetter1", TestObjectV8Internal::activityLoggedAttrSetter
1AttributeGetterCallback, TestObjectV8Internal::activityLoggedAttrSetter1Attribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5523 {"activityLoggedAttrSetter2", TestObjectV8Internal::activityLoggedAttrSetter
2AttributeGetterCallback, TestObjectV8Internal::activityLoggedAttrSetter2Attribu
teSetterCallback, TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetter
CallbackForMainWorld, TestObjectV8Internal::activityLoggedAttrSetter2AttributeSe
tterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static
_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5524 {"activityLoggedInIsolatedWorldsAttrSetter", TestObjectV8Internal::activityL
oggedInIsolatedWorldsAttrSetterAttributeGetterCallback, TestObjectV8Internal::ac
tivityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback, TestObjectV8Inter
nal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMainWorld
, TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetterC
allbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast
<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5525 {"activityLoggedAttrGetter1", TestObjectV8Internal::activityLoggedAttrGetter
1AttributeGetterCallback, TestObjectV8Internal::activityLoggedAttrGetter1Attribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5526 {"activityLoggedAttrGetter2", TestObjectV8Internal::activityLoggedAttrGetter
2AttributeGetterCallback, TestObjectV8Internal::activityLoggedAttrGetter2Attribu
teSetterCallback, TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetter
CallbackForMainWorld, TestObjectV8Internal::activityLoggedAttrGetter2AttributeSe
tterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static
_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5527 {"activityLoggedInIsolatedWorldsAttrGetter", TestObjectV8Internal::activityL
oggedInIsolatedWorldsAttrGetterAttributeGetterCallback, TestObjectV8Internal::ac
tivityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback, TestObjectV8Inter
nal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMainWorld
, TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetterC
allbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast
<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5528 {"deprecatedReadonlyAttr", TestObjectV8Internal::deprecatedReadonlyAttrAttri
buteGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), sta
tic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 5529 {"deprecatedAttr", TestObjectV8Internal::deprecatedAttrAttributeGetterCallba
ck, TestObjectV8Internal::deprecatedAttrAttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}, |
| 5530 {"deprecatedConstructor", TestObjectV8Internal::deprecatedConstructorConstru
ctorGetterCallback, TestObjectV8Internal::TestObjectReplaceableAttributeSetterCa
llback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo), stat
ic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::
DontEnum), 0 /* on instance */}, |
| 5531 {"location", TestObjectV8Internal::locationAttributeGetterCallback, TestObje
ctV8Internal::locationAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta
nce */}, |
| 5532 {"locationWithException", TestObjectV8Internal::locationWithExceptionAttribu
teGetterCallback, TestObjectV8Internal::locationWithExceptionAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, |
7797 }; | 5533 }; |
7798 | 5534 |
7799 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] =
{ | 5535 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] =
{ |
7800 {"exposeJSAccessorsLongAttribute", TestObjectV8Internal::exposeJSAccessorsLo
ngAttributeAttributeGetterCallback, TestObjectV8Internal::exposeJSAccessorsLongA
ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None)}, | 5536 {"attrWithJSGetterAndSetter", TestObjectV8Internal::attrWithJSGetterAndSette
rAttributeGetterCallback, TestObjectV8Internal::attrWithJSGetterAndSetterAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None)}, |
7801 }; | 5537 }; |
7802 | 5538 |
7803 static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = { | 5539 static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = { |
7804 {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0}, | 5540 {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0}, |
7805 {"dateMethod", TestObjectV8Internal::dateMethodMethodCallback, 0, 0}, | 5541 {"voidMethodWithArgs", TestObjectV8Internal::voidMethodWithArgsMethodCallbac
k, 0, 3}, |
7806 {"stringMethod", TestObjectV8Internal::stringMethodMethodCallback, 0, 0}, | |
7807 {"readonlyDOMTimeStampMethod", TestObjectV8Internal::readonlyDOMTimeStampMet
hodMethodCallback, 0, 0}, | |
7808 {"booleanMethod", TestObjectV8Internal::booleanMethodMethodCallback, 0, 0}, | |
7809 {"byteMethod", TestObjectV8Internal::byteMethodMethodCallback, 0, 0}, | |
7810 {"doubleMethod", TestObjectV8Internal::doubleMethodMethodCallback, 0, 0}, | |
7811 {"floatMethod", TestObjectV8Internal::floatMethodMethodCallback, 0, 0}, | |
7812 {"longMethod", TestObjectV8Internal::longMethodMethodCallback, 0, 0}, | 5542 {"longMethod", TestObjectV8Internal::longMethodMethodCallback, 0, 0}, |
7813 {"longLongMethod", TestObjectV8Internal::longLongMethodMethodCallback, 0, 0}
, | 5543 {"longMethodWithArgs", TestObjectV8Internal::longMethodWithArgsMethodCallbac
k, 0, 3}, |
7814 {"octetMethod", TestObjectV8Internal::octetMethodMethodCallback, 0, 0}, | 5544 {"objMethod", TestObjectV8Internal::objMethodMethodCallback, 0, 0}, |
7815 {"shortMethod", TestObjectV8Internal::shortMethodMethodCallback, 0, 0}, | 5545 {"objMethodWithArgs", TestObjectV8Internal::objMethodWithArgsMethodCallback,
0, 3}, |
7816 {"unsignedLongMethod", TestObjectV8Internal::unsignedLongMethodMethodCallbac
k, 0, 0}, | 5546 {"methodWithSequenceArg", TestObjectV8Internal::methodWithSequenceArgMethodC
allback, 0, 1}, |
7817 {"unsignedLongLongMethod", TestObjectV8Internal::unsignedLongLongMethodMetho
dCallback, 0, 0}, | 5547 {"methodReturningSequence", TestObjectV8Internal::methodReturningSequenceMet
hodCallback, 0, 1}, |
7818 {"unsignedShortMethod", TestObjectV8Internal::unsignedShortMethodMethodCallb
ack, 0, 0}, | 5548 {"methodWithEnumArg", TestObjectV8Internal::methodWithEnumArgMethodCallback,
0, 1}, |
7819 {"voidMethodDateArg", TestObjectV8Internal::voidMethodDateArgMethodCallback,
0, 1}, | 5549 {"methodThatRequiresAllArgsAndThrows", TestObjectV8Internal::methodThatRequi
resAllArgsAndThrowsMethodCallback, 0, 2}, |
7820 {"voidMethodStringArg", TestObjectV8Internal::voidMethodStringArgMethodCallb
ack, 0, 1}, | 5550 {"methodQueryListListener", TestObjectV8Internal::methodQueryListListenerMet
hodCallback, 0, 1}, |
7821 {"voidMethodDOMTimeStampArg", TestObjectV8Internal::voidMethodDOMTimeStampAr
gMethodCallback, 0, 1}, | 5551 {"serializedValue", TestObjectV8Internal::serializedValueMethodCallback, 0,
1}, |
7822 {"voidMethodBooleanArg", TestObjectV8Internal::voidMethodBooleanArgMethodCal
lback, 0, 1}, | 5552 {"optionsObject", TestObjectV8Internal::optionsObjectMethodCallback, 0, 1}, |
7823 {"voidMethodByteArg", TestObjectV8Internal::voidMethodByteArgMethodCallback,
0, 1}, | 5553 {"optionsObjectList", TestObjectV8Internal::optionsObjectListMethodCallback,
0, 1}, |
7824 {"voidMethodDoubleArg", TestObjectV8Internal::voidMethodDoubleArgMethodCallb
ack, 0, 1}, | 5554 {"methodWithException", TestObjectV8Internal::methodWithExceptionMethodCallb
ack, 0, 0}, |
7825 {"voidMethodFloatArg", TestObjectV8Internal::voidMethodFloatArgMethodCallbac
k, 0, 1}, | 5555 {"customMethod", TestObjectV8Internal::customMethodMethodCallback, 0, 0}, |
7826 {"voidMethodLongArg", TestObjectV8Internal::voidMethodLongArgMethodCallback,
0, 1}, | 5556 {"customMethodWithArgs", TestObjectV8Internal::customMethodWithArgsMethodCal
lback, 0, 3}, |
7827 {"voidMethodLongLongArg", TestObjectV8Internal::voidMethodLongLongArgMethodC
allback, 0, 1}, | 5557 {"withScriptStateVoid", TestObjectV8Internal::withScriptStateVoidMethodCallb
ack, 0, 0}, |
7828 {"voidMethodOctetArg", TestObjectV8Internal::voidMethodOctetArgMethodCallbac
k, 0, 1}, | 5558 {"withScriptStateObj", TestObjectV8Internal::withScriptStateObjMethodCallbac
k, 0, 0}, |
7829 {"voidMethodShortArg", TestObjectV8Internal::voidMethodShortArgMethodCallbac
k, 0, 1}, | 5559 {"withScriptStateVoidException", TestObjectV8Internal::withScriptStateVoidEx
ceptionMethodCallback, 0, 0}, |
7830 {"voidMethodUnsignedLongArg", TestObjectV8Internal::voidMethodUnsignedLongAr
gMethodCallback, 0, 1}, | 5560 {"withScriptStateObjException", TestObjectV8Internal::withScriptStateObjExce
ptionMethodCallback, 0, 0}, |
7831 {"voidMethodUnsignedLongLongArg", TestObjectV8Internal::voidMethodUnsignedLo
ngLongArgMethodCallback, 0, 1}, | 5561 {"withExecutionContext", TestObjectV8Internal::withExecutionContextMethodCal
lback, 0, 0}, |
7832 {"voidMethodUnsignedShortArg", TestObjectV8Internal::voidMethodUnsignedShort
ArgMethodCallback, 0, 1}, | 5562 {"withExecutionContextAndScriptState", TestObjectV8Internal::withExecutionCo
ntextAndScriptStateMethodCallback, 0, 0}, |
7833 {"testInterfaceEmptyMethod", TestObjectV8Internal::testInterfaceEmptyMethodM
ethodCallback, 0, 0}, | 5563 {"withExecutionContextAndScriptStateObjException", TestObjectV8Internal::wit
hExecutionContextAndScriptStateObjExceptionMethodCallback, 0, 0}, |
7834 {"voidMethodTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodTestInte
rfaceEmptyArgMethodCallback, 0, 1}, | 5564 {"withExecutionContextAndScriptStateWithSpaces", TestObjectV8Internal::withE
xecutionContextAndScriptStateWithSpacesMethodCallback, 0, 0}, |
7835 {"voidMethodLongArgTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodL
ongArgTestInterfaceEmptyArgMethodCallback, 0, 2}, | 5565 {"withActiveWindowAndFirstWindow", TestObjectV8Internal::withActiveWindowAnd
FirstWindowMethodCallback, 0, 0}, |
7836 {"voidCallbackFunctionMethod", TestObjectV8Internal::voidCallbackFunctionMet
hodMethodCallback, 0, 0}, | 5566 {"methodWithOptionalArg", TestObjectV8Internal::methodWithOptionalArgMethodC
allback, 0, 0}, |
7837 {"anyCallbackFunctionOptionalAnyArgMethod", TestObjectV8Internal::anyCallbac
kFunctionOptionalAnyArgMethodMethodCallback, 0, 0}, | 5567 {"methodWithNonOptionalArgAndOptionalArg", TestObjectV8Internal::methodWithN
onOptionalArgAndOptionalArgMethodCallback, 0, 1}, |
7838 {"voidMethodVoidCallbackFunctionArg", TestObjectV8Internal::voidMethodVoidCa
llbackFunctionArgMethodCallback, 0, 1}, | 5568 {"methodWithNonOptionalArgAndTwoOptionalArgs", TestObjectV8Internal::methodW
ithNonOptionalArgAndTwoOptionalArgsMethodCallback, 0, 1}, |
7839 {"voidMethodAnyCallbackFunctionOptionalAnyArg", TestObjectV8Internal::voidMe
thodAnyCallbackFunctionOptionalAnyArgMethodCallback, 0, 1}, | 5569 {"methodWithOptionalString", TestObjectV8Internal::methodWithOptionalStringM
ethodCallback, 0, 0}, |
7840 {"compareHowMethod", TestObjectV8Internal::compareHowMethodMethodCallback, 0
, 0}, | 5570 {"methodWithOptionalStringIsUndefined", TestObjectV8Internal::methodWithOpti
onalStringIsUndefinedMethodCallback, 0, 0}, |
7841 {"anyMethod", TestObjectV8Internal::anyMethodMethodCallback, 0, 0}, | 5571 {"methodWithOptionalStringIsNullString", TestObjectV8Internal::methodWithOpt
ionalStringIsNullStringMethodCallback, 0, 0}, |
7842 {"voidMethodCompareHowArg", TestObjectV8Internal::voidMethodCompareHowArgMet
hodCallback, 0, 1}, | 5572 {"methodWithCallbackInterfaceArg", TestObjectV8Internal::methodWithCallbackI
nterfaceArgMethodCallback, 0, 1}, |
7843 {"voidMethodEventTargetArg", TestObjectV8Internal::voidMethodEventTargetArgM
ethodCallback, 0, 1}, | 5573 {"methodWithNonCallbackArgAndCallbackInterfaceArg", TestObjectV8Internal::me
thodWithNonCallbackArgAndCallbackInterfaceArgMethodCallback, 0, 2}, |
7844 {"voidMethodMediaQueryListListenerArg", TestObjectV8Internal::voidMethodMedi
aQueryListListenerArgMethodCallback, 0, 1}, | 5574 {"methodWithCallbackInterfaceAndOptionalArg", TestObjectV8Internal::methodWi
thCallbackInterfaceAndOptionalArgMethodCallback, 0, 0}, |
7845 {"voidMethodAnyArg", TestObjectV8Internal::voidMethodAnyArgMethodCallback, 0
, 1}, | 5575 {"methodWithNullableCallbackInterfaceArg", TestObjectV8Internal::methodWithN
ullableCallbackInterfaceArgMethodCallback, 0, 1}, |
7846 {"voidMethodAttrArg", TestObjectV8Internal::voidMethodAttrArgMethodCallback,
0, 1}, | 5576 {"methodWithEnforceRangeInt8", TestObjectV8Internal::methodWithEnforceRangeI
nt8MethodCallback, 0, 1}, |
7847 {"voidMethodDocumentArg", TestObjectV8Internal::voidMethodDocumentArgMethodC
allback, 0, 1}, | 5577 {"methodWithEnforceRangeUInt8", TestObjectV8Internal::methodWithEnforceRange
UInt8MethodCallback, 0, 1}, |
7848 {"voidMethodDocumentTypeArg", TestObjectV8Internal::voidMethodDocumentTypeAr
gMethodCallback, 0, 1}, | 5578 {"methodWithEnforceRangeInt16", TestObjectV8Internal::methodWithEnforceRange
Int16MethodCallback, 0, 1}, |
7849 {"voidMethodElementArg", TestObjectV8Internal::voidMethodElementArgMethodCal
lback, 0, 1}, | 5579 {"methodWithEnforceRangeUInt16", TestObjectV8Internal::methodWithEnforceRang
eUInt16MethodCallback, 0, 1}, |
7850 {"voidMethodNodeArg", TestObjectV8Internal::voidMethodNodeArgMethodCallback,
0, 1}, | 5580 {"methodWithEnforceRangeInt32", TestObjectV8Internal::methodWithEnforceRange
Int32MethodCallback, 0, 1}, |
7851 {"arrayBufferMethod", TestObjectV8Internal::arrayBufferMethodMethodCallback,
0, 0}, | 5581 {"methodWithEnforceRangeUInt32", TestObjectV8Internal::methodWithEnforceRang
eUInt32MethodCallback, 0, 1}, |
7852 {"arrayBufferViewMethod", TestObjectV8Internal::arrayBufferViewMethodMethodC
allback, 0, 0}, | 5582 {"methodWithEnforceRangeInt64", TestObjectV8Internal::methodWithEnforceRange
Int64MethodCallback, 0, 1}, |
7853 {"float32ArrayMethod", TestObjectV8Internal::float32ArrayMethodMethodCallbac
k, 0, 0}, | 5583 {"methodWithEnforceRangeUInt64", TestObjectV8Internal::methodWithEnforceRang
eUInt64MethodCallback, 0, 1}, |
7854 {"int32ArrayMethod", TestObjectV8Internal::int32ArrayMethodMethodCallback, 0
, 0}, | 5584 #if ENABLE(Condition1) |
7855 {"uint8ArrayMethod", TestObjectV8Internal::uint8ArrayMethodMethodCallback, 0
, 0}, | 5585 {"conditionalMethod1", TestObjectV8Internal::conditionalMethod1MethodCallbac
k, 0, 0}, |
7856 {"voidMethodArrayBufferArg", TestObjectV8Internal::voidMethodArrayBufferArgM
ethodCallback, 0, 1}, | 5586 #endif // ENABLE(Condition1) |
7857 {"voidMethodArrayBufferOrNullArg", TestObjectV8Internal::voidMethodArrayBuff
erOrNullArgMethodCallback, 0, 1}, | 5587 #if ENABLE(Condition1) && ENABLE(Condition2) |
7858 {"voidMethodArrayBufferViewArg", TestObjectV8Internal::voidMethodArrayBuffer
ViewArgMethodCallback, 0, 1}, | 5588 {"conditionalMethod2", TestObjectV8Internal::conditionalMethod2MethodCallbac
k, 0, 0}, |
7859 {"voidMethodFloat32ArrayArg", TestObjectV8Internal::voidMethodFloat32ArrayAr
gMethodCallback, 0, 1}, | 5589 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
7860 {"voidMethodInt32ArrayArg", TestObjectV8Internal::voidMethodInt32ArrayArgMet
hodCallback, 0, 1}, | 5590 #if ENABLE(Condition1) || ENABLE(Condition2) |
7861 {"voidMethodUint8ArrayArg", TestObjectV8Internal::voidMethodUint8ArrayArgMet
hodCallback, 0, 1}, | 5591 {"conditionalMethod3", TestObjectV8Internal::conditionalMethod3MethodCallbac
k, 0, 0}, |
7862 {"longArrayMethod", TestObjectV8Internal::longArrayMethodMethodCallback, 0,
0}, | 5592 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
7863 {"stringArrayMethod", TestObjectV8Internal::stringArrayMethodMethodCallback,
0, 0}, | 5593 {"callbackFunctionReturnValue", TestObjectV8Internal::callbackFunctionReturn
ValueMethodCallback, 0, 0}, |
7864 {"testInterfaceEmptyArrayMethod", TestObjectV8Internal::testInterfaceEmptyAr
rayMethodMethodCallback, 0, 0}, | 5594 {"callbackFunctionArgument", TestObjectV8Internal::callbackFunctionArgumentM
ethodCallback, 0, 1}, |
7865 {"voidMethodArrayLongArg", TestObjectV8Internal::voidMethodArrayLongArgMetho
dCallback, 0, 1}, | 5595 {"overloadedMethod", TestObjectV8Internal::overloadedMethodMethodCallback, 0
, 1}, |
7866 {"voidMethodArrayStringArg", TestObjectV8Internal::voidMethodArrayStringArgM
ethodCallback, 0, 1}, | |
7867 {"voidMethodArrayTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodArr
ayTestInterfaceEmptyArgMethodCallback, 0, 1}, | |
7868 {"longSequenceMethod", TestObjectV8Internal::longSequenceMethodMethodCallbac
k, 0, 0}, | |
7869 {"stringSequenceMethod", TestObjectV8Internal::stringSequenceMethodMethodCal
lback, 0, 0}, | |
7870 {"testInterfaceEmptySequenceMethod", TestObjectV8Internal::testInterfaceEmpt
ySequenceMethodMethodCallback, 0, 0}, | |
7871 {"voidMethodSequenceLongArg", TestObjectV8Internal::voidMethodSequenceLongAr
gMethodCallback, 0, 1}, | |
7872 {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStri
ngArgMethodCallback, 0, 1}, | |
7873 {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
SequenceTestInterfaceEmptyArgMethodCallback, 0, 1}, | |
7874 {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTe
stInterfaceEmptyOrNullArgMethodCallback, 0, 1}, | |
7875 {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestC
allbackInterfaceArgMethodCallback, 0, 1}, | |
7876 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMet
hodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0}, | |
7877 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMetho
dTestCallbackInterfaceOrNullArgMethodCallback, 0, 1}, | |
7878 {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0}
, | |
7879 {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodC
allback, 0, 1}, | |
7880 {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0
, 0}, | |
7881 {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0
, 0}, | |
7882 {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 0}, | |
7883 {"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueM
ethodMethodCallback, 0, 0}, | |
7884 {"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodC
allback, 0, 0}, | |
7885 {"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMet
hodCallback, 0, 1}, | |
7886 {"voidMethodEventListenerArg", TestObjectV8Internal::voidMethodEventListener
ArgMethodCallback, 0, 1}, | |
7887 {"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMet
hodCallback, 0, 1}, | |
7888 {"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCal
lback, 0, 1}, | |
7889 {"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSeria
lizedScriptValueArgMethodCallback, 0, 1}, | |
7890 {"voidMethodXPathNSResolverArg", TestObjectV8Internal::voidMethodXPathNSReso
lverArgMethodCallback, 0, 1}, | |
7891 {"voidMethodDictionarySequenceArg", TestObjectV8Internal::voidMethodDictiona
rySequenceArgMethodCallback, 0, 1}, | |
7892 {"voidMethodStringArgLongArg", TestObjectV8Internal::voidMethodStringArgLong
ArgMethodCallback, 0, 2}, | |
7893 {"voidMethodOptionalStringArg", TestObjectV8Internal::voidMethodOptionalStri
ngArgMethodCallback, 0, 0}, | |
7894 {"voidMethodOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
OptionalTestInterfaceEmptyArgMethodCallback, 0, 0}, | |
7895 {"voidMethodOptionalLongArg", TestObjectV8Internal::voidMethodOptionalLongAr
gMethodCallback, 0, 0}, | |
7896 {"stringMethodOptionalLongArg", TestObjectV8Internal::stringMethodOptionalLo
ngArgMethodCallback, 0, 0}, | |
7897 {"testInterfaceEmptyMethodOptionalLongArg", TestObjectV8Internal::testInterf
aceEmptyMethodOptionalLongArgMethodCallback, 0, 0}, | |
7898 {"longMethodOptionalLongArg", TestObjectV8Internal::longMethodOptionalLongAr
gMethodCallback, 0, 0}, | |
7899 {"voidMethodLongArgOptionalLongArg", TestObjectV8Internal::voidMethodLongArg
OptionalLongArgMethodCallback, 0, 1}, | |
7900 {"voidMethodLongArgOptionalLongArgOptionalLongArg", TestObjectV8Internal::vo
idMethodLongArgOptionalLongArgOptionalLongArgMethodCallback, 0, 1}, | |
7901 {"voidMethodLongArgOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voi
dMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback, 0, 1}, | |
7902 {"voidMethodTestInterfaceEmptyArgOptionalLongArg", TestObjectV8Internal::voi
dMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback, 0, 1}, | |
7903 {"voidMethodOptionalDictionaryArg", TestObjectV8Internal::voidMethodOptional
DictionaryArgMethodCallback, 0, 0}, | |
7904 {"voidMethodVariadicStringArg", TestObjectV8Internal::voidMethodVariadicStri
ngArgMethodCallback, 0, 1}, | |
7905 {"voidMethodStringArgVariadicStringArg", TestObjectV8Internal::voidMethodStr
ingArgVariadicStringArgMethodCallback, 0, 2}, | |
7906 {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
VariadicTestInterfaceEmptyArgMethodCallback, 0, 1}, | |
7907 {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectV
8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCal
lback, 0, 2}, | |
7908 {"voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", TestObjectV8Int
ernal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0
, 1}, | |
7909 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback,
0, 1}, | 5596 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback,
0, 1}, |
7910 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback,
0, 1}, | 5597 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback,
0, 1}, |
7911 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback,
0, 1}, | 5598 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback,
0, 1}, |
7912 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback,
0, 1}, | 5599 {"classMethodWithClamp", TestObjectV8Internal::classMethodWithClampMethodCal
lback, 0, 2}, |
7913 {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback,
0, 1}, | 5600 {"methodWithUnsignedLongSequence", TestObjectV8Internal::methodWithUnsignedL
ongSequenceMethodCallback, 0, 1}, |
7914 {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback,
0, 1}, | 5601 {"stringArrayFunction", TestObjectV8Internal::stringArrayFunctionMethodCallb
ack, 0, 1}, |
7915 {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback,
0, 0}, | 5602 {"domStringListFunction", TestObjectV8Internal::domStringListFunctionMethodC
allback, 0, 1}, |
7916 {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback,
0, 0}, | 5603 {"convert1", TestObjectV8Internal::convert1MethodCallback, 0, 1}, |
7917 {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback,
0, 1}, | 5604 {"convert2", TestObjectV8Internal::convert2MethodCallback, 0, 1}, |
7918 {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorl
dBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsM
ethodMethodCallbackForMainWorld, 0}, | 5605 {"orange", TestObjectV8Internal::orangeMethodCallback, 0, 0}, |
7919 {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUns
ignedShortArgMethodCallback, 0, 1}, | 5606 {"strictFunction", TestObjectV8Internal::strictFunctionMethodCallback, 0, 3}
, |
7920 {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsi
gnedLongArgMethodCallback, 0, 1}, | 5607 {"variadicStringMethod", TestObjectV8Internal::variadicStringMethodMethodCal
lback, 0, 2}, |
7921 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::vo
idMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0}, | 5608 {"variadicDoubleMethod", TestObjectV8Internal::variadicDoubleMethodMethodCal
lback, 0, 2}, |
7922 {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaul
tUndefinedLongArgMethodCallback, 0, 0}, | 5609 {"variadicNodeMethod", TestObjectV8Internal::variadicNodeMethodMethodCallbac
k, 0, 2}, |
7923 {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefa
ultUndefinedStringArgMethodCallback, 0, 0}, | 5610 {"perWorldMethod", TestObjectV8Internal::perWorldMethodMethodCallback, TestO
bjectV8Internal::perWorldMethodMethodCallbackForMainWorld, 0}, |
7924 {"voidMethodDefaultNullStringStringArg", TestObjectV8Internal::voidMethodDef
aultNullStringStringArgMethodCallback, 0, 0}, | 5611 {"overloadedPerWorldMethod", TestObjectV8Internal::overloadedPerWorldMethodM
ethodCallback, TestObjectV8Internal::overloadedPerWorldMethodMethodCallbackForMa
inWorld, 1}, |
7925 {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRan
geLongArgMethodCallback, 0, 1}, | 5612 {"activityLoggedMethod1", TestObjectV8Internal::activityLoggedMethod1MethodC
allback, 0, 1}, |
7926 {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMetho
dTreatNullAsNullStringStringArgMethodCallback, 0, 1}, | 5613 {"activityLoggedMethod2", TestObjectV8Internal::activityLoggedMethod2MethodC
allback, TestObjectV8Internal::activityLoggedMethod2MethodCallbackForMainWorld,
1}, |
7927 {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestO
bjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringString
ArgMethodCallback, 0, 1}, | 5614 {"activityLoggedInIsolatedWorldMethod", TestObjectV8Internal::activityLogged
InIsolatedWorldMethodMethodCallback, TestObjectV8Internal::activityLoggedInIsola
tedWorldMethodMethodCallbackForMainWorld, 1}, |
7928 {"activityLoggingAccessForAllWorldsMethod", TestObjectV8Internal::activityLo
ggingAccessForAllWorldsMethodMethodCallback, 0, 0}, | 5615 {"overloadedActivityLoggedMethod", TestObjectV8Internal::overloadedActivityL
oggedMethodMethodCallback, TestObjectV8Internal::overloadedActivityLoggedMethodM
ethodCallbackForMainWorld, 1}, |
7929 {"callWithScriptStateVoidMethod", TestObjectV8Internal::callWithScriptStateV
oidMethodMethodCallback, 0, 0}, | 5616 {"deprecatedMethod", TestObjectV8Internal::deprecatedMethodMethodCallback, 0
, 0}, |
7930 {"callWithScriptStateLongMethod", TestObjectV8Internal::callWithScriptStateL
ongMethodMethodCallback, 0, 0}, | |
7931 {"callWithExecutionContextVoidMethod", TestObjectV8Internal::callWithExecuti
onContextVoidMethodMethodCallback, 0, 0}, | |
7932 {"callWithScriptStateExecutionContextVoidMethod", TestObjectV8Internal::call
WithScriptStateExecutionContextVoidMethodMethodCallback, 0, 0}, | |
7933 {"callWithScriptStateScriptArgumentsVoidMethod", TestObjectV8Internal::callW
ithScriptStateScriptArgumentsVoidMethodMethodCallback, 0, 0}, | |
7934 {"callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg", TestObjec
tV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMetho
dCallback, 0, 0}, | |
7935 {"callWithActiveWindow", TestObjectV8Internal::callWithActiveWindowMethodCal
lback, 0, 0}, | |
7936 {"callWithActiveWindowScriptWindow", TestObjectV8Internal::callWithActiveWin
dowScriptWindowMethodCallback, 0, 0}, | |
7937 {"checkSecurityForNodeVoidMethod", TestObjectV8Internal::checkSecurityForNod
eVoidMethodMethodCallback, 0, 0}, | |
7938 #if ENABLE(CONDITION) | |
7939 {"conditionalConditionVoidMethod", TestObjectV8Internal::conditionalConditio
nVoidMethodMethodCallback, 0, 0}, | |
7940 #endif // ENABLE(CONDITION) | |
7941 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
7942 {"conditionalCondition1AndCondition2VoidMethod", TestObjectV8Internal::condi
tionalCondition1AndCondition2VoidMethodMethodCallback, 0, 0}, | |
7943 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2) | |
7944 {"customVoidMethod", TestObjectV8Internal::customVoidMethodMethodCallback, 0
, 0}, | |
7945 #if ENABLE(CONDITION) | |
7946 {"conditionalConditionCustomVoidMethod", TestObjectV8Internal::conditionalCo
nditionCustomVoidMethodMethodCallback, 0, 0}, | |
7947 #endif // ENABLE(CONDITION) | |
7948 {"customElementCallbacksVoidMethod", TestObjectV8Internal::customElementCall
backsVoidMethodMethodCallback, 0, 0}, | |
7949 {"deprecatedVoidMethod", TestObjectV8Internal::deprecatedVoidMethodMethodCal
lback, 0, 0}, | |
7950 {"implementedAsVoidMethod", TestObjectV8Internal::implementedAsVoidMethodMet
hodCallback, 0, 0}, | |
7951 {"measureAsVoidMethod", TestObjectV8Internal::measureAsVoidMethodMethodCallb
ack, 0, 0}, | |
7952 {"perWorldBindingsVoidMethod", TestObjectV8Internal::perWorldBindingsVoidMet
hodMethodCallback, TestObjectV8Internal::perWorldBindingsVoidMethodMethodCallbac
kForMainWorld, 0}, | |
7953 {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::pe
rWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectV8Interna
l::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1}
, | |
7954 {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectV8Intern
al::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, TestObj
ectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallba
ckForMainWorld, 0}, | |
7955 {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectV8I
nternal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbac
k, TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMet
hodMethodCallbackForMainWorld, 0}, | |
7956 {"raisesExceptionVoidMethod", TestObjectV8Internal::raisesExceptionVoidMetho
dMethodCallback, 0, 0}, | |
7957 {"raisesExceptionStringMethod", TestObjectV8Internal::raisesExceptionStringM
ethodMethodCallback, 0, 0}, | |
7958 {"raisesExceptionVoidMethodOptionalLongArg", TestObjectV8Internal::raisesExc
eptionVoidMethodOptionalLongArgMethodCallback, 0, 0}, | |
7959 {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectV8Internal::
raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1}, | |
7960 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectV8In
ternal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback,
0, 0}, | |
7961 {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectV8Internal::raises
ExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0}, | |
7962 {"callWithExecutionContextRaisesExceptionVoidMethodLongArg", TestObjectV8Int
ernal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback, 0
, 1}, | |
7963 {"strictTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::
strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1}, | |
7964 {"strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Inte
rnal::strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullArgMethodCallback, 0,
1}, | |
7965 {"treatReturnedNullStringAsNullStringMethod", TestObjectV8Internal::treatRet
urnedNullStringAsNullStringMethodMethodCallback, 0, 0}, | |
7966 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectV8Internal::tre
atReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0}, | |
7967 {"voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", TestObjectV8Int
ernal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback, 0
, 1}, | |
7968 {"voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", TestObjectV8Intern
al::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback, 0, 1}, | |
7969 }; | 5617 }; |
7970 | 5618 |
7971 static void configureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> funct
ionTemplate, v8::Isolate* isolate) | 5619 static void configureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> funct
ionTemplate, v8::Isolate* isolate) |
7972 { | 5620 { |
7973 functionTemplate->ReadOnlyPrototype(); | 5621 functionTemplate->ReadOnlyPrototype(); |
7974 | 5622 |
7975 v8::Local<v8::Signature> defaultSignature; | 5623 v8::Local<v8::Signature> defaultSignature; |
7976 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::internalFiel
dCount, | 5624 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestObject", V8EventTarget::domTemplate(isolate), V8TestObject::internalFi
eldCount, |
7977 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), | 5625 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), |
7978 V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors), | 5626 V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors), |
7979 V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods), | 5627 V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods), |
7980 isolate); | 5628 isolate); |
7981 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); | 5629 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); |
7982 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); | 5630 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); |
7983 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 5631 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
7984 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 5632 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
7985 {"runtimeEnabledLongAttribute", TestObjectV8Internal::runtimeEnabledLong
AttributeAttributeGetterCallback, TestObjectV8Internal::runtimeEnabledLongAttrib
uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; | 5633 {"enabledAtRuntimeAttr", TestObjectV8Internal::enabledAtRuntimeAttrAttri
buteGetterCallback, TestObjectV8Internal::enabledAtRuntimeAttrAttributeSetterCal
lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro
pertyAttribute>(v8::None), 0 /* on instance */}; |
7986 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); | 5634 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); |
7987 } | 5635 } |
7988 #if ENABLE(CONDITION) | |
7989 if (RuntimeEnabledFeatures::featureNameEnabled()) { | |
7990 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | |
7991 {"conditionalRuntimeEnabledLongAttribute", TestObjectV8Internal::conditi
onalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::co
nditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cas
t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None),
0 /* on instance */}; | |
7992 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); | |
7993 } | |
7994 #endif // ENABLE(CONDITION) | |
7995 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants
[] = { | 5636 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants
[] = { |
7996 {"CONST_VALUE_0", 0}, | |
7997 {"CONST_VALUE_1", 1}, | |
7998 {"CONST_VALUE_2", 2}, | |
7999 {"CONST_VALUE_4", 4}, | |
8000 {"CONST_VALUE_8", 8}, | |
8001 {"CONST_VALUE_9", -1}, | |
8002 {"CONST_VALUE_10", "my constant string"}, | |
8003 {"CONST_VALUE_11", 0xffffffff}, | |
8004 {"CONST_VALUE_12", 0x01}, | |
8005 {"CONST_VALUE_13", 0X20}, | |
8006 {"CONST_VALUE_14", 0x1abc}, | |
8007 {"CONST_VALUE_15", 010}, | |
8008 {"CONST_VALUE_16", -010}, | |
8009 {"CONST_VALUE_16", -0x1A}, | |
8010 {"CONST_VALUE_17", -0X1a}, | |
8011 {"DEPRECATED_CONSTANT", 1}, | 5637 {"DEPRECATED_CONSTANT", 1}, |
8012 {"CONST_JAVASCRIPT", 1}, | |
8013 }; | 5638 }; |
8014 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants), isolate); | 5639 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants), isolate); |
8015 if (RuntimeEnabledFeatures::featureNameEnabled()) { | |
8016 static const V8DOMConfiguration::ConstantConfiguration constantConfigura
tion = {"FEATURE_ENABLED_CONST", static_cast<signed int>(1)}; | |
8017 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate
, &constantConfiguration, 1, isolate); | |
8018 } | |
8019 COMPILE_ASSERT(0 == TestObject::CONST_VALUE_0, TheValueOfTestObject_CONST_VA
LUE_0DoesntMatchWithImplementation); | |
8020 COMPILE_ASSERT(1 == TestObject::CONST_VALUE_1, TheValueOfTestObject_CONST_VA
LUE_1DoesntMatchWithImplementation); | |
8021 COMPILE_ASSERT(2 == TestObject::CONST_VALUE_2, TheValueOfTestObject_CONST_VA
LUE_2DoesntMatchWithImplementation); | |
8022 COMPILE_ASSERT(4 == TestObject::CONST_VALUE_4, TheValueOfTestObject_CONST_VA
LUE_4DoesntMatchWithImplementation); | |
8023 COMPILE_ASSERT(8 == TestObject::CONST_VALUE_8, TheValueOfTestObject_CONST_VA
LUE_8DoesntMatchWithImplementation); | |
8024 COMPILE_ASSERT(-1 == TestObject::CONST_VALUE_9, TheValueOfTestObject_CONST_V
ALUE_9DoesntMatchWithImplementation); | |
8025 COMPILE_ASSERT("my constant string" == TestObject::CONST_VALUE_10, TheValueO
fTestObject_CONST_VALUE_10DoesntMatchWithImplementation); | |
8026 COMPILE_ASSERT(0xffffffff == TestObject::CONST_VALUE_11, TheValueOfTestObjec
t_CONST_VALUE_11DoesntMatchWithImplementation); | |
8027 COMPILE_ASSERT(0x01 == TestObject::CONST_VALUE_12, TheValueOfTestObject_CONS
T_VALUE_12DoesntMatchWithImplementation); | |
8028 COMPILE_ASSERT(0X20 == TestObject::CONST_VALUE_13, TheValueOfTestObject_CONS
T_VALUE_13DoesntMatchWithImplementation); | |
8029 COMPILE_ASSERT(0x1abc == TestObject::CONST_VALUE_14, TheValueOfTestObject_CO
NST_VALUE_14DoesntMatchWithImplementation); | |
8030 COMPILE_ASSERT(010 == TestObject::CONST_VALUE_15, TheValueOfTestObject_CONST
_VALUE_15DoesntMatchWithImplementation); | |
8031 COMPILE_ASSERT(-010 == TestObject::CONST_VALUE_16, TheValueOfTestObject_CONS
T_VALUE_16DoesntMatchWithImplementation); | |
8032 COMPILE_ASSERT(-0x1A == TestObject::CONST_VALUE_16, TheValueOfTestObject_CON
ST_VALUE_16DoesntMatchWithImplementation); | |
8033 COMPILE_ASSERT(-0X1a == TestObject::CONST_VALUE_17, TheValueOfTestObject_CON
ST_VALUE_17DoesntMatchWithImplementation); | |
8034 COMPILE_ASSERT(1 == TestObject::DEPRECATED_CONSTANT, TheValueOfTestObject_DE
PRECATED_CONSTANTDoesntMatchWithImplementation); | 5640 COMPILE_ASSERT(1 == TestObject::DEPRECATED_CONSTANT, TheValueOfTestObject_DE
PRECATED_CONSTANTDoesntMatchWithImplementation); |
8035 COMPILE_ASSERT(1 == TestObject::FEATURE_ENABLED_CONST, TheValueOfTestObject_
FEATURE_ENABLED_CONSTDoesntMatchWithImplementation); | 5641 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestObjectV8
Internal::indexedPropertyGetterCallback, 0, 0, 0, indexedPropertyEnumerator<Test
Object>); |
8036 COMPILE_ASSERT(1 == TestObject::CONST_IMPL, TheValueOfTestObject_CONST_IMPLD
oesntMatchWithImplementation); | 5642 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestObjectV8In
ternal::namedPropertyGetterCallback, 0, TestObjectV8Internal::namedPropertyQuery
Callback, 0, TestObjectV8Internal::namedPropertyEnumeratorCallback); |
8037 functionTemplate->Set(v8AtomicString(isolate, "staticVoidMethod"), v8::Funct
ionTemplate::New(isolate, TestObjectV8Internal::staticVoidMethodMethodCallback,
v8Undefined(), v8::Local<v8::Signature>(), 0)); | 5643 functionTemplate->Set(v8AtomicString(isolate, "staticMethodWithCallbackAndOp
tionalArg"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::staticMeth
odWithCallbackAndOptionalArgMethodCallback, v8Undefined(), v8::Local<v8::Signatu
re>(), 0)); |
8038 functionTemplate->Set(v8AtomicString(isolate, "overloadedStaticMethod"), v8:
:FunctionTemplate::New(isolate, TestObjectV8Internal::overloadedStaticMethodMeth
odCallback, v8Undefined(), v8::Local<v8::Signature>(), 1)); | 5644 functionTemplate->Set(v8AtomicString(isolate, "staticMethodWithCallbackArg")
, v8::FunctionTemplate::New(isolate, TestObjectV8Internal::staticMethodWithCallb
ackArgMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 1)); |
8039 #if ENABLE(CONDITION) | 5645 functionTemplate->Set(v8AtomicString(isolate, "classMethod"), v8::FunctionTe
mplate::New(isolate, TestObjectV8Internal::classMethodMethodCallback, v8Undefine
d(), v8::Local<v8::Signature>(), 0)); |
8040 functionTemplate->Set(v8AtomicString(isolate, "conditionalConditionStaticVoi
dMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::conditionalC
onditionStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(
), 0)); | 5646 functionTemplate->Set(v8AtomicString(isolate, "classMethodWithOptional"), v8
::FunctionTemplate::New(isolate, TestObjectV8Internal::classMethodWithOptionalMe
thodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
8041 #endif // ENABLE(CONDITION) | 5647 functionTemplate->Set(v8AtomicString(isolate, "classMethod2"), v8::FunctionT
emplate::New(isolate, TestObjectV8Internal::classMethod2MethodCallback, v8Undefi
ned(), v8::Local<v8::Signature>(), 1)); |
8042 prototypeTemplate->Set(v8AtomicString(isolate, "doNotCheckSignatureVoidMetho
d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::doNotCheckSignatur
eVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); | |
8043 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableVoidMethod"), v
8::FunctionTemplate::New(isolate, TestObjectV8Internal::notEnumerableVoidMethodM
ethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttr
ibute>(v8::DontDelete | v8::DontEnum)); | |
8044 prototypeTemplate->Set(v8AtomicString(isolate, "readOnlyVoidMethod"), v8::Fu
nctionTemplate::New(isolate, TestObjectV8Internal::readOnlyVoidMethodMethodCallb
ack, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8:
:DontDelete | v8::ReadOnly)); | |
8045 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableReadOnlyVoidMet
hod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::notEnumerableRea
dOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<
v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum | v8::ReadOnly)); | |
8046 if (RuntimeEnabledFeatures::featureNameEnabled()) | 5648 if (RuntimeEnabledFeatures::featureNameEnabled()) |
8047 prototypeTemplate->Set(v8AtomicString(isolate, "runtimeEnabledVoidMethod
"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::runtimeEnabledVoidM
ethodMethodCallback, v8Undefined(), defaultSignature, 0)); | 5649 prototypeTemplate->Set(v8AtomicString(isolate, "enabledAtRuntimeMethod")
, v8::FunctionTemplate::New(isolate, TestObjectV8Internal::enabledAtRuntimeMetho
dMethodCallback, v8Undefined(), defaultSignature, 1)); |
8048 if (DOMWrapperWorld::current(isolate).isMainWorld()) { | 5650 functionTemplate->Set(v8AtomicString(isolate, "deprecatedStaticMethod"), v8:
:FunctionTemplate::New(isolate, TestObjectV8Internal::deprecatedStaticMethodMeth
odCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); |
8049 if (RuntimeEnabledFeatures::featureNameEnabled()) | 5651 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticReadO
nlyLongAttr"), TestObjectV8Internal::staticReadOnlyLongAttrAttributeGetterCallba
ck, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::Non
e), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFA
ULT)); |
8050 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt
imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal:
:perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Undefined
(), defaultSignature, 0)); | 5652 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin
gAttr"), TestObjectV8Internal::staticStringAttrAttributeGetterCallback, TestObje
ctV8Internal::staticStringAttrAttributeSetterCallback, v8::External::New(isolate
, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSigna
ture>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
8051 } else { | 5653 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "deprecatedS
taticReadOnlyAttr"), TestObjectV8Internal::deprecatedStaticReadOnlyAttrAttribute
GetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAttrib
ute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessContr
ol>(v8::DEFAULT)); |
8052 if (RuntimeEnabledFeatures::featureNameEnabled()) | 5654 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "deprecatedS
taticAttr"), TestObjectV8Internal::deprecatedStaticAttrAttributeGetterCallback,
TestObjectV8Internal::deprecatedStaticAttrAttributeSetterCallback, v8::External:
:New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::A
ccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
8053 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt
imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal:
:perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultS
ignature, 0)); | |
8054 } | |
8055 instanceTemplate->Set(v8AtomicString(isolate, "unforgeableVoidMethod"), v8::
FunctionTemplate::New(isolate, TestObjectV8Internal::unforgeableVoidMethodMethod
Callback, v8Undefined(), defaultSignature, 0)); | |
8056 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin
gAttribute"), TestObjectV8Internal::staticStringAttributeAttributeGetterCallback
, TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, v8::Extern
al::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8
::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | |
8057 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongA
ttribute"), TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, Te
stObjectV8Internal::staticLongAttributeAttributeSetterCallback, v8::External::Ne
w(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acce
ssorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | |
8058 | 5655 |
8059 // Custom toString template | 5656 // Custom toString template |
8060 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:current()->toStringTemplate()); | 5657 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:current()->toStringTemplate()); |
8061 } | 5658 } |
8062 | 5659 |
8063 v8::Handle<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate) | 5660 v8::Handle<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate) |
8064 { | 5661 { |
8065 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 5662 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
8066 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(const_cas
t<WrapperTypeInfo*>(&wrapperTypeInfo)); | 5663 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(const_cas
t<WrapperTypeInfo*>(&wrapperTypeInfo)); |
8067 if (!result.IsEmpty()) | 5664 if (!result.IsEmpty()) |
(...skipping 19 matching lines...) Expand all Loading... |
8087 TestObject* V8TestObject::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle
<v8::Value> value) | 5684 TestObject* V8TestObject::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle
<v8::Value> value) |
8088 { | 5685 { |
8089 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 5686 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
8090 } | 5687 } |
8091 | 5688 |
8092 void V8TestObject::installPerContextEnabledProperties(v8::Handle<v8::Object> ins
tanceTemplate, TestObject* impl, v8::Isolate* isolate) | 5689 void V8TestObject::installPerContextEnabledProperties(v8::Handle<v8::Object> ins
tanceTemplate, TestObject* impl, v8::Isolate* isolate) |
8093 { | 5690 { |
8094 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan
ceTemplate->GetPrototype()); | 5691 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan
ceTemplate->GetPrototype()); |
8095 if (ContextFeatures::featureNameEnabled(impl->document())) { | 5692 if (ContextFeatures::featureNameEnabled(impl->document())) { |
8096 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 5693 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
8097 {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnabl
edLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabledL
ongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:
:DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; | 5694 {"enabledPerContextAttr", TestObjectV8Internal::enabledPerContextAttrAtt
ributeGetterCallback, TestObjectV8Internal::enabledPerContextAttrAttributeSetter
Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::None), 0 /* on instance */}; |
8098 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); | |
8099 } | |
8100 if (ContextFeatures::featureNameEnabled(impl->document())) { | |
8101 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | |
8102 {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectV8Internal::p
erContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8
Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback, 0
, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAtt
ribute>(v8::None), 0 /* on instance */}; | |
8103 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); | 5695 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); |
8104 } | 5696 } |
8105 } | 5697 } |
8106 | 5698 |
8107 void V8TestObject::installPerContextEnabledMethods(v8::Handle<v8::Object> protot
ypeTemplate, v8::Isolate* isolate) | 5699 void V8TestObject::installPerContextEnabledMethods(v8::Handle<v8::Object> protot
ypeTemplate, v8::Isolate* isolate) |
8108 { | 5700 { |
8109 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); | 5701 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); |
8110 | 5702 |
8111 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo
ntext()); | 5703 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo
ntext()); |
8112 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) | 5704 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) |
8113 prototypeTemplate->Set(v8AtomicString(isolate, "perContextEnabledVoidMet
hod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnable
dVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); | 5705 prototypeTemplate->Set(v8AtomicString(isolate, "enabledPerContextMethod"
), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::enabledPerContextMet
hodMethodCallback, v8Undefined(), defaultSignature, 1)->GetFunction()); |
| 5706 } |
| 5707 |
| 5708 EventTarget* V8TestObject::toEventTarget(v8::Handle<v8::Object> object) |
| 5709 { |
| 5710 return toNative(object); |
8114 } | 5711 } |
8115 | 5712 |
8116 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObject> impl,
v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 5713 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObject> impl,
v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
8117 { | 5714 { |
8118 ASSERT(impl); | 5715 ASSERT(impl); |
8119 ASSERT(!DOMDataStore::containsWrapper<V8TestObject>(impl.get(), isolate)); | 5716 ASSERT(!DOMDataStore::containsWrapper<V8TestObject>(impl.get(), isolate)); |
8120 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 5717 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
8121 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); | 5718 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); |
8122 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 5719 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
8123 // the same object de-ref functions, though, so use that as the basis of
the check. | 5720 // the same object de-ref functions, though, so use that as the basis of
the check. |
(...skipping 14 matching lines...) Expand all Loading... |
8138 fromInternalPointer(object)->deref(); | 5735 fromInternalPointer(object)->deref(); |
8139 } | 5736 } |
8140 | 5737 |
8141 template<> | 5738 template<> |
8142 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 5739 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
8143 { | 5740 { |
8144 return toV8(impl, creationContext, isolate); | 5741 return toV8(impl, creationContext, isolate); |
8145 } | 5742 } |
8146 | 5743 |
8147 } // namespace WebCore | 5744 } // namespace WebCore |
OLD | NEW |