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 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
9 #include "V8TestInterface.h" | 9 #include "V8TestInterface.h" |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 102 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
103 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info); | 103 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info); |
104 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 104 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
105 } | 105 } |
106 | 106 |
107 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 107 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
108 { | 108 { |
109 v8::Local<v8::Object> holder = info.Holder(); | 109 v8::Local<v8::Object> holder = info.Holder(); |
110 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface", holder, info.GetIsolate()); | 110 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface", holder, info.GetIsolate()); |
111 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 111 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
112 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toRestrictedDouble(v8Value, e
xceptionState), exceptionState); | 112 TONATIVE_DECLARE(double, cppValue, convertAndThrow(cppValue = toRestrictedDo
uble(v8Value, exceptionState), exceptionState), return); |
113 impl->setDoubleAttribute(cppValue); | 113 impl->setDoubleAttribute(cppValue); |
114 } | 114 } |
115 | 115 |
116 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 116 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
117 { | 117 { |
118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
119 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu
e, info); | 119 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu
e, info); |
120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
121 } | 121 } |
122 | 122 |
123 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 123 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
124 { | 124 { |
125 v8::Local<v8::Object> holder = info.Holder(); | 125 v8::Local<v8::Object> holder = info.Holder(); |
126 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 126 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
127 v8SetReturnValue(info, impl->floatAttribute()); | 127 v8SetReturnValue(info, impl->floatAttribute()); |
128 } | 128 } |
129 | 129 |
130 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 130 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
131 { | 131 { |
132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
133 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); | 133 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); |
134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
135 } | 135 } |
136 | 136 |
137 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 137 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
138 { | 138 { |
139 v8::Local<v8::Object> holder = info.Holder(); | 139 v8::Local<v8::Object> holder = info.Holder(); |
140 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface", holder, info.GetIsolate()); | 140 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface", holder, info.GetIsolate()); |
141 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 141 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
142 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toRestrictedFloat(v8Value, exc
eptionState), exceptionState); | 142 TONATIVE_DECLARE(float, cppValue, convertAndThrow(cppValue = toRestrictedFlo
at(v8Value, exceptionState), exceptionState), return); |
143 impl->setFloatAttribute(cppValue); | 143 impl->setFloatAttribute(cppValue); |
144 } | 144 } |
145 | 145 |
146 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 146 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
147 { | 147 { |
148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
149 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value
, info); | 149 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value
, info); |
150 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 150 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
151 } | 151 } |
152 | 152 |
153 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 153 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
154 { | 154 { |
155 v8::Local<v8::Object> holder = info.Holder(); | 155 v8::Local<v8::Object> holder = info.Holder(); |
156 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 156 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
157 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 157 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
158 } | 158 } |
159 | 159 |
160 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 160 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
161 { | 161 { |
162 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 162 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
163 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG
etter(info); | 163 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG
etter(info); |
164 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 164 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
165 } | 165 } |
166 | 166 |
167 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 167 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
168 { | 168 { |
169 v8::Local<v8::Object> holder = info.Holder(); | 169 v8::Local<v8::Object> holder = info.Holder(); |
170 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface", holder, info.GetIsolate()); | 170 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface", holder, info.GetIsolate()); |
171 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 171 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
172 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt
ate), exceptionState); | 172 TONATIVE_DECLARE(double, cppValue, convertAndThrow(cppValue = toDouble(v8Val
ue, exceptionState), exceptionState), return); |
173 impl->setUnrestrictedDoubleAttribute(cppValue); | 173 impl->setUnrestrictedDoubleAttribute(cppValue); |
174 } | 174 } |
175 | 175 |
176 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 176 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
177 { | 177 { |
178 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 178 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
179 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS
etter(v8Value, info); | 179 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS
etter(v8Value, info); |
180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
181 } | 181 } |
182 | 182 |
183 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 183 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
184 { | 184 { |
185 v8::Local<v8::Object> holder = info.Holder(); | 185 v8::Local<v8::Object> holder = info.Holder(); |
186 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 186 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
187 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 187 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
188 } | 188 } |
189 | 189 |
190 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 190 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
191 { | 191 { |
192 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 192 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
193 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe
tter(info); | 193 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe
tter(info); |
194 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 194 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
195 } | 195 } |
196 | 196 |
197 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 197 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
198 { | 198 { |
199 v8::Local<v8::Object> holder = info.Holder(); | 199 v8::Local<v8::Object> holder = info.Holder(); |
200 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface", holder, info.GetIsolate()); | 200 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface", holder, info.GetIsolate()); |
201 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 201 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
202 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat
e), exceptionState); | 202 TONATIVE_DECLARE(float, cppValue, convertAndThrow(cppValue = toFloat(v8Value
, exceptionState), exceptionState), return); |
203 impl->setUnrestrictedFloatAttribute(cppValue); | 203 impl->setUnrestrictedFloatAttribute(cppValue); |
204 } | 204 } |
205 | 205 |
206 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 206 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
207 { | 207 { |
208 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 208 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
209 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe
tter(v8Value, info); | 209 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe
tter(v8Value, info); |
210 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 210 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
211 } | 211 } |
212 | 212 |
213 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 213 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
214 { | 214 { |
215 v8::Local<v8::Object> holder = info.Holder(); | 215 v8::Local<v8::Object> holder = info.Holder(); |
216 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 216 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
217 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); | 217 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); |
218 } | 218 } |
219 | 219 |
220 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 220 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
221 { | 221 { |
222 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 222 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
223 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info
); | 223 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info
); |
224 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 224 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
225 } | 225 } |
226 | 226 |
227 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 227 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
228 { | 228 { |
229 v8::Local<v8::Object> holder = info.Holder(); | 229 v8::Local<v8::Object> holder = info.Holder(); |
230 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 230 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
231 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 231 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return); |
232 String string = cppValue; | 232 String string = cppValue; |
233 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 233 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
234 return; | 234 return; |
235 impl->setTestEnumAttribute(cppValue); | 235 impl->setTestEnumAttribute(cppValue); |
236 } | 236 } |
237 | 237 |
238 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 238 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
239 { | 239 { |
240 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 240 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
241 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va
lue, info); | 241 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va
lue, info); |
(...skipping 13 matching lines...) Expand all Loading... |
255 { | 255 { |
256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
257 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette
r(info); | 257 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette
r(info); |
258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
259 } | 259 } |
260 | 260 |
261 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 261 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
262 { | 262 { |
263 v8::Local<v8::Object> holder = info.Holder(); | 263 v8::Local<v8::Object> holder = info.Holder(); |
264 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble
Attribute", "TestInterface", holder, info.GetIsolate()); | 264 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble
Attribute", "TestInterface", holder, info.GetIsolate()); |
265 StringOrDouble cppValue; | |
266 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 265 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
267 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8StringOrDouble::toImpl(info.GetIs
olate(), v8Value, cppValue, exceptionState), exceptionState); | 266 TONATIVE_DECLARE(StringOrDouble, cppValue, V8StringOrDouble::toImpl(info.Get
Isolate(), v8Value, cppValue, exceptionState), return exceptionState.throwExcept
ion()); |
268 impl->setStringOrDoubleAttribute(cppValue); | 267 impl->setStringOrDoubleAttribute(cppValue); |
269 } | 268 } |
270 | 269 |
271 static void stringOrDoubleAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 270 static void stringOrDoubleAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
272 { | 271 { |
273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
274 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette
r(v8Value, info); | 273 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette
r(v8Value, info); |
275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
276 } | 275 } |
277 | 276 |
278 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 277 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
279 { | 278 { |
280 v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttrib
ute(), info.GetIsolate()); | 279 v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttrib
ute(), info.GetIsolate()); |
281 } | 280 } |
282 | 281 |
283 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 282 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
284 { | 283 { |
285 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 284 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
286 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetter(
info); | 285 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetter(
info); |
287 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 286 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
288 } | 287 } |
289 | 288 |
290 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 289 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
291 { | 290 { |
292 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 291 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return); |
293 TestInterfaceImplementation::setStaticStringAttribute(cppValue); | 292 TestInterfaceImplementation::setStaticStringAttribute(cppValue); |
294 } | 293 } |
295 | 294 |
296 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 295 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
297 { | 296 { |
298 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 297 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
299 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(
v8Value, info); | 298 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(
v8Value, info); |
300 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 299 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
301 } | 300 } |
302 | 301 |
303 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 302 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
304 { | 303 { |
305 v8::Local<v8::Object> holder = info.Holder(); | 304 v8::Local<v8::Object> holder = info.Holder(); |
306 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 305 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
307 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); | 306 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
308 } | 307 } |
309 | 308 |
310 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 309 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
311 { | 310 { |
312 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 311 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
313 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter
(info); | 312 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter
(info); |
314 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 313 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
315 } | 314 } |
316 | 315 |
317 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 316 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
318 { | 317 { |
319 v8::Local<v8::Object> holder = info.Holder(); | 318 v8::Local<v8::Object> holder = info.Holder(); |
320 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 319 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
321 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 320 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
322 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 321 TONATIVE_DECLARE(int, cppValue, convertAndThrow(cppValue = toInt32(v8Value,
exceptionState), exceptionState), return); |
323 impl->setAlwaysExposedAttribute(cppValue); | 322 impl->setAlwaysExposedAttribute(cppValue); |
324 } | 323 } |
325 | 324 |
326 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 325 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
327 { | 326 { |
328 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 327 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
329 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter
(v8Value, info); | 328 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter
(v8Value, info); |
330 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 329 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
331 } | 330 } |
332 | 331 |
333 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 332 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
334 { | 333 { |
335 v8::Local<v8::Object> holder = info.Holder(); | 334 v8::Local<v8::Object> holder = info.Holder(); |
336 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 335 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
337 v8SetReturnValueInt(info, impl->workerExposedAttribute()); | 336 v8SetReturnValueInt(info, impl->workerExposedAttribute()); |
338 } | 337 } |
339 | 338 |
340 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 339 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
341 { | 340 { |
342 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 341 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
343 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter
(info); | 342 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter
(info); |
344 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
345 } | 344 } |
346 | 345 |
347 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 346 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
348 { | 347 { |
349 v8::Local<v8::Object> holder = info.Holder(); | 348 v8::Local<v8::Object> holder = info.Holder(); |
350 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 349 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
351 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 350 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
352 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 351 TONATIVE_DECLARE(int, cppValue, convertAndThrow(cppValue = toInt32(v8Value,
exceptionState), exceptionState), return); |
353 impl->setWorkerExposedAttribute(cppValue); | 352 impl->setWorkerExposedAttribute(cppValue); |
354 } | 353 } |
355 | 354 |
356 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 355 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
357 { | 356 { |
358 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 357 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
359 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter
(v8Value, info); | 358 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter
(v8Value, info); |
360 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 359 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
361 } | 360 } |
362 | 361 |
363 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 362 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
364 { | 363 { |
365 v8::Local<v8::Object> holder = info.Holder(); | 364 v8::Local<v8::Object> holder = info.Holder(); |
366 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 365 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
367 v8SetReturnValueInt(info, impl->windowExposedAttribute()); | 366 v8SetReturnValueInt(info, impl->windowExposedAttribute()); |
368 } | 367 } |
369 | 368 |
370 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 369 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
371 { | 370 { |
372 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 371 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
373 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter
(info); | 372 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter
(info); |
374 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 373 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
375 } | 374 } |
376 | 375 |
377 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 376 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
378 { | 377 { |
379 v8::Local<v8::Object> holder = info.Holder(); | 378 v8::Local<v8::Object> holder = info.Holder(); |
380 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 379 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
381 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 380 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
382 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 381 TONATIVE_DECLARE(int, cppValue, convertAndThrow(cppValue = toInt32(v8Value,
exceptionState), exceptionState), return); |
383 impl->setWindowExposedAttribute(cppValue); | 382 impl->setWindowExposedAttribute(cppValue); |
384 } | 383 } |
385 | 384 |
386 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 385 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
387 { | 386 { |
388 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 387 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
389 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter
(v8Value, info); | 388 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter
(v8Value, info); |
390 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 389 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
391 } | 390 } |
392 | 391 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 443 |
445 static void implementsStaticStringAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 444 static void implementsStaticStringAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
446 { | 445 { |
447 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 446 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
448 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteGetter(info); | 447 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteGetter(info); |
449 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 448 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
450 } | 449 } |
451 | 450 |
452 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 451 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
453 { | 452 { |
454 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 453 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return); |
455 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue); | 454 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue); |
456 } | 455 } |
457 | 456 |
458 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 457 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
459 { | 458 { |
460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 459 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
461 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteSetter(v8Value, info); | 460 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteSetter(v8Value, info); |
462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 461 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
463 } | 462 } |
464 | 463 |
(...skipping 22 matching lines...) Expand all Loading... |
487 { | 486 { |
488 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 487 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
489 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet
ter(info); | 488 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet
ter(info); |
490 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 489 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
491 } | 490 } |
492 | 491 |
493 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 492 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
494 { | 493 { |
495 v8::Local<v8::Object> holder = info.Holder(); | 494 v8::Local<v8::Object> holder = info.Holder(); |
496 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 495 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
497 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 496 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return); |
498 impl->setImplementsStringAttribute(cppValue); | 497 impl->setImplementsStringAttribute(cppValue); |
499 } | 498 } |
500 | 499 |
501 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 500 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
502 { | 501 { |
503 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 502 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
504 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet
ter(v8Value, info); | 503 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet
ter(v8Value, info); |
505 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 504 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
506 } | 505 } |
507 | 506 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 | 646 |
648 static void implements2StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 647 static void implements2StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
649 { | 648 { |
650 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 649 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
651 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteGetter(info); | 650 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteGetter(info); |
652 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 651 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
653 } | 652 } |
654 | 653 |
655 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 654 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
656 { | 655 { |
657 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 656 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return); |
658 TestImplements2::setImplements2StaticStringAttribute(cppValue); | 657 TestImplements2::setImplements2StaticStringAttribute(cppValue); |
659 } | 658 } |
660 | 659 |
661 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 660 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
662 { | 661 { |
663 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 662 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
664 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteSetter(v8Value, info); | 663 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteSetter(v8Value, info); |
665 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 664 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
666 } | 665 } |
667 | 666 |
668 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 667 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
669 { | 668 { |
670 v8::Local<v8::Object> holder = info.Holder(); | 669 v8::Local<v8::Object> holder = info.Holder(); |
671 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 670 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
672 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im
pl), info.GetIsolate()); | 671 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im
pl), info.GetIsolate()); |
673 } | 672 } |
674 | 673 |
675 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 674 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
676 { | 675 { |
677 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 676 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
678 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe
tter(info); | 677 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe
tter(info); |
679 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 678 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
680 } | 679 } |
681 | 680 |
682 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 681 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
683 { | 682 { |
684 v8::Local<v8::Object> holder = info.Holder(); | 683 v8::Local<v8::Object> holder = info.Holder(); |
685 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 684 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
686 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 685 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return); |
687 TestImplements2::setImplements2StringAttribute(*impl, cppValue); | 686 TestImplements2::setImplements2StringAttribute(*impl, cppValue); |
688 } | 687 } |
689 | 688 |
690 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 689 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
691 { | 690 { |
692 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 691 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
693 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe
tter(v8Value, info); | 692 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe
tter(v8Value, info); |
694 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 693 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
695 } | 694 } |
696 | 695 |
697 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 696 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
698 { | 697 { |
699 v8::Local<v8::Object> holder = info.Holder(); | 698 v8::Local<v8::Object> holder = info.Holder(); |
700 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 699 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
701 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin
gAttribute(*impl), info.GetIsolate()); | 700 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin
gAttribute(*impl), info.GetIsolate()); |
702 } | 701 } |
703 | 702 |
704 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 703 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
705 { | 704 { |
706 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 705 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
707 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe
tter(info); | 706 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe
tter(info); |
708 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 707 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
709 } | 708 } |
710 | 709 |
711 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 710 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
712 { | 711 { |
713 v8::Local<v8::Object> holder = info.Holder(); | 712 v8::Local<v8::Object> holder = info.Holder(); |
714 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 713 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
715 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 714 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return); |
716 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue
); | 715 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue
); |
717 } | 716 } |
718 | 717 |
719 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 718 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
720 { | 719 { |
721 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 720 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
722 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe
tter(v8Value, info); | 721 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe
tter(v8Value, info); |
723 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 722 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
724 } | 723 } |
725 | 724 |
726 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 725 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
727 { | 726 { |
728 v8SetReturnValueString(info, TestImplements3Implementation::implements3Stati
cStringAttribute(), info.GetIsolate()); | 727 v8SetReturnValueString(info, TestImplements3Implementation::implements3Stati
cStringAttribute(), info.GetIsolate()); |
729 } | 728 } |
730 | 729 |
731 static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 730 static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
732 { | 731 { |
733 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 732 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
734 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteGetter(info); | 733 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteGetter(info); |
735 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 734 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
736 } | 735 } |
737 | 736 |
738 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 737 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
739 { | 738 { |
740 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 739 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return); |
741 TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue)
; | 740 TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue)
; |
742 } | 741 } |
743 | 742 |
744 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 743 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
745 { | 744 { |
746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 745 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
747 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteSetter(v8Value, info); | 746 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteSetter(v8Value, info); |
748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 747 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
749 } | 748 } |
750 | 749 |
(...skipping 14 matching lines...) Expand all Loading... |
765 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 764 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
766 } | 765 } |
767 #endif // ENABLE(PARTIAL_CONDITION) | 766 #endif // ENABLE(PARTIAL_CONDITION) |
768 | 767 |
769 #if ENABLE(PARTIAL_CONDITION) | 768 #if ENABLE(PARTIAL_CONDITION) |
770 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 769 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
771 { | 770 { |
772 v8::Local<v8::Object> holder = info.Holder(); | 771 v8::Local<v8::Object> holder = info.Holder(); |
773 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt
ribute", "TestInterface", holder, info.GetIsolate()); | 772 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt
ribute", "TestInterface", holder, info.GetIsolate()); |
774 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 773 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
775 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 774 TONATIVE_DECLARE(int, cppValue, convertAndThrow(cppValue = toInt32(v8Value,
exceptionState), exceptionState), return); |
776 TestPartialInterface::setPartialLongAttribute(*impl, cppValue); | 775 TestPartialInterface::setPartialLongAttribute(*impl, cppValue); |
777 } | 776 } |
778 #endif // ENABLE(PARTIAL_CONDITION) | 777 #endif // ENABLE(PARTIAL_CONDITION) |
779 | 778 |
780 #if ENABLE(PARTIAL_CONDITION) | 779 #if ENABLE(PARTIAL_CONDITION) |
781 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 780 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
782 { | 781 { |
783 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 782 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
784 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v
8Value, info); | 783 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v
8Value, info); |
785 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 784 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 13 matching lines...) Expand all Loading... |
799 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 798 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
800 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGe
tter(info); | 799 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGe
tter(info); |
801 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 800 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
802 } | 801 } |
803 #endif // ENABLE(PARTIAL_CONDITION) | 802 #endif // ENABLE(PARTIAL_CONDITION) |
804 | 803 |
805 #if ENABLE(PARTIAL_CONDITION) | 804 #if ENABLE(PARTIAL_CONDITION) |
806 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 805 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
807 { | 806 { |
808 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL
ongAttribute", "TestInterface", holder, info.GetIsolate()); | 807 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL
ongAttribute", "TestInterface", holder, info.GetIsolate()); |
809 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 808 TONATIVE_DECLARE(int, cppValue, convertAndThrow(cppValue = toInt32(v8Value,
exceptionState), exceptionState), return); |
810 TestPartialInterface::setPartialStaticLongAttribute(cppValue); | 809 TestPartialInterface::setPartialStaticLongAttribute(cppValue); |
811 } | 810 } |
812 #endif // ENABLE(PARTIAL_CONDITION) | 811 #endif // ENABLE(PARTIAL_CONDITION) |
813 | 812 |
814 #if ENABLE(PARTIAL_CONDITION) | 813 #if ENABLE(PARTIAL_CONDITION) |
815 static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 814 static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
816 { | 815 { |
817 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 816 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
818 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe
tter(v8Value, info); | 817 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe
tter(v8Value, info); |
819 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 818 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 18 matching lines...) Expand all Loading... |
838 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 837 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
839 } | 838 } |
840 #endif // ENABLE(PARTIAL_CONDITION) | 839 #endif // ENABLE(PARTIAL_CONDITION) |
841 | 840 |
842 #if ENABLE(PARTIAL_CONDITION) | 841 #if ENABLE(PARTIAL_CONDITION) |
843 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 842 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
844 { | 843 { |
845 v8::Local<v8::Object> holder = info.Holder(); | 844 v8::Local<v8::Object> holder = info.Holder(); |
846 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit
hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); | 845 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit
hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); |
847 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 846 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
848 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 847 TONATIVE_DECLARE(int, cppValue, convertAndThrow(cppValue = toInt32(v8Value,
exceptionState), exceptionState), return); |
849 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 848 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
850 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut
ionContext, *impl, cppValue); | 849 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut
ionContext, *impl, cppValue); |
851 } | 850 } |
852 #endif // ENABLE(PARTIAL_CONDITION) | 851 #endif // ENABLE(PARTIAL_CONDITION) |
853 | 852 |
854 #if ENABLE(PARTIAL_CONDITION) | 853 #if ENABLE(PARTIAL_CONDITION) |
855 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 854 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
856 { | 855 { |
857 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 856 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
858 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeSetter(v8Value, info); | 857 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeSetter(v8Value, info); |
(...skipping 17 matching lines...) Expand all Loading... |
876 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteGetter(info); | 875 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteGetter(info); |
877 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 876 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
878 } | 877 } |
879 #endif // ENABLE(PARTIAL_CONDITION) | 878 #endif // ENABLE(PARTIAL_CONDITION) |
880 | 879 |
881 #if ENABLE(PARTIAL_CONDITION) | 880 #if ENABLE(PARTIAL_CONDITION) |
882 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 881 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
883 { | 882 { |
884 v8::Local<v8::Object> holder = info.Holder(); | 883 v8::Local<v8::Object> holder = info.Holder(); |
885 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 884 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
886 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 885 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return); |
887 String string = cppValue; | 886 String string = cppValue; |
888 if (!(string == "foo" || string == "bar")) | 887 if (!(string == "foo" || string == "bar")) |
889 return; | 888 return; |
890 TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue); | 889 TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue); |
891 } | 890 } |
892 #endif // ENABLE(PARTIAL_CONDITION) | 891 #endif // ENABLE(PARTIAL_CONDITION) |
893 | 892 |
894 #if ENABLE(PARTIAL_CONDITION) | 893 #if ENABLE(PARTIAL_CONDITION) |
895 static void partialPartialEnumTypeAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 894 static void partialPartialEnumTypeAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
896 { | 895 { |
(...skipping 22 matching lines...) Expand all Loading... |
919 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); | 918 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); |
920 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 919 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
921 } | 920 } |
922 #endif // ENABLE(PARTIAL_CONDITION) | 921 #endif // ENABLE(PARTIAL_CONDITION) |
923 | 922 |
924 #if ENABLE(PARTIAL_CONDITION) | 923 #if ENABLE(PARTIAL_CONDITION) |
925 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 924 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
926 { | 925 { |
927 v8::Local<v8::Object> holder = info.Holder(); | 926 v8::Local<v8::Object> holder = info.Holder(); |
928 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 927 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
929 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 928 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return); |
930 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); | 929 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
931 } | 930 } |
932 #endif // ENABLE(PARTIAL_CONDITION) | 931 #endif // ENABLE(PARTIAL_CONDITION) |
933 | 932 |
934 #if ENABLE(PARTIAL_CONDITION) | 933 #if ENABLE(PARTIAL_CONDITION) |
935 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 934 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
936 { | 935 { |
937 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 936 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
938 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu
e, info); | 937 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu
e, info); |
939 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 938 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 12 matching lines...) Expand all Loading... |
952 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 951 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
953 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter(
info); | 952 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter(
info); |
954 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 953 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
955 } | 954 } |
956 | 955 |
957 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 956 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
958 { | 957 { |
959 v8::Local<v8::Object> holder = info.Holder(); | 958 v8::Local<v8::Object> holder = info.Holder(); |
960 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt
tribute", "TestInterface", holder, info.GetIsolate()); | 959 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt
tribute", "TestInterface", holder, info.GetIsolate()); |
961 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 960 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
962 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 961 TONATIVE_DECLARE(int, cppValue, convertAndThrow(cppValue = toInt32(v8Value,
exceptionState), exceptionState), return); |
963 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue
); | 962 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue
); |
964 } | 963 } |
965 | 964 |
966 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 965 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
967 { | 966 { |
968 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 967 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
969 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter(
v8Value, info); | 968 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter(
v8Value, info); |
970 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 969 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
971 } | 970 } |
972 | 971 |
973 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 972 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
974 { | 973 { |
975 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2Static
LongAttribute()); | 974 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2Static
LongAttribute()); |
976 } | 975 } |
977 | 976 |
978 static void partial2StaticLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 977 static void partial2StaticLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
979 { | 978 { |
980 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 979 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
981 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeG
etter(info); | 980 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeG
etter(info); |
982 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 981 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
983 } | 982 } |
984 | 983 |
985 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 984 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
986 { | 985 { |
987 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static
LongAttribute", "TestInterface", holder, info.GetIsolate()); | 986 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static
LongAttribute", "TestInterface", holder, info.GetIsolate()); |
988 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 987 TONATIVE_DECLARE(int, cppValue, convertAndThrow(cppValue = toInt32(v8Value,
exceptionState), exceptionState), return); |
989 TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue)
; | 988 TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue)
; |
990 } | 989 } |
991 | 990 |
992 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 991 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
993 { | 992 { |
994 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 993 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
995 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS
etter(v8Value, info); | 994 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS
etter(v8Value, info); |
996 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 995 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
997 } | 996 } |
998 | 997 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterface", info.Holder(), info.GetIsolate()); | 1046 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterface", info.Holder(), info.GetIsolate()); |
1048 if (UNLIKELY(info.Length() < 2)) { | 1047 if (UNLIKELY(info.Length() < 2)) { |
1049 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 1048 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
1050 exceptionState.throwIfNeeded(); | 1049 exceptionState.throwIfNeeded(); |
1051 return; | 1050 return; |
1052 } | 1051 } |
1053 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1052 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1054 double doubleArg; | 1053 double doubleArg; |
1055 float floatArg; | 1054 float floatArg; |
1056 { | 1055 { |
1057 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(doubleArg, toRestrictedDouble(info
[0], exceptionState), exceptionState); | 1056 TONATIVE_CONVERT(convertAndThrow(doubleArg = toRestrictedDouble(info[0],
exceptionState), exceptionState), return); |
1058 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(floatArg, toRestrictedFloat(info[1
], exceptionState), exceptionState); | 1057 TONATIVE_CONVERT(convertAndThrow(floatArg = toRestrictedFloat(info[1], e
xceptionState), exceptionState), return); |
1059 } | 1058 } |
1060 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 1059 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
1061 } | 1060 } |
1062 | 1061 |
1063 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 1062 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
1064 { | 1063 { |
1065 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1064 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1066 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf
o); | 1065 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf
o); |
1067 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1066 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1068 } | 1067 } |
1069 | 1068 |
1070 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) | 1069 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) |
1071 { | 1070 { |
1072 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface", info.Holder(), info.
GetIsolate()); | 1071 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface", info.Holder(), info.
GetIsolate()); |
1073 if (UNLIKELY(info.Length() < 2)) { | 1072 if (UNLIKELY(info.Length() < 2)) { |
1074 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 1073 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
1075 exceptionState.throwIfNeeded(); | 1074 exceptionState.throwIfNeeded(); |
1076 return; | 1075 return; |
1077 } | 1076 } |
1078 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1077 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1079 double unrestrictedDoubleArg; | 1078 double unrestrictedDoubleArg; |
1080 float unrestrictedFloatArg; | 1079 float unrestrictedFloatArg; |
1081 { | 1080 { |
1082 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unrestrictedDoubleArg, toDouble(in
fo[0], exceptionState), exceptionState); | 1081 TONATIVE_CONVERT(convertAndThrow(unrestrictedDoubleArg = toDouble(info[0
], exceptionState), exceptionState), return); |
1083 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unrestrictedFloatArg, toFloat(info
[1], exceptionState), exceptionState); | 1082 TONATIVE_CONVERT(convertAndThrow(unrestrictedFloatArg = toFloat(info[1],
exceptionState), exceptionState), return); |
1084 } | 1083 } |
1085 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); | 1084 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); |
1086 } | 1085 } |
1087 | 1086 |
1088 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 1087 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
1089 { | 1088 { |
1090 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1089 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1091 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest
rictedFloatArgMethod(info); | 1090 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest
rictedFloatArgMethod(info); |
1092 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1091 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1093 } | 1092 } |
1094 | 1093 |
1095 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 1094 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
1096 { | 1095 { |
1097 if (UNLIKELY(info.Length() < 1)) { | 1096 if (UNLIKELY(info.Length() < 1)) { |
1098 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestEnumArg", "TestInterface", 1, info.Length()), in
fo.GetIsolate()); | 1097 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestEnumArg", "TestInterface", 1, info.Length()), in
fo.GetIsolate()); |
1099 return; | 1098 return; |
1100 } | 1099 } |
1101 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1100 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1102 V8StringResource<> testEnumArg; | 1101 V8StringResource<> testEnumArg; |
1103 { | 1102 { |
1104 TOSTRING_VOID_INTERNAL(testEnumArg, info[0]); | 1103 TONATIVE_CONVERT((testEnumArg = info[0]).prepare(), return); |
1105 String string = testEnumArg; | 1104 String string = testEnumArg; |
1106 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" |
| string == "EnumValue3")) { | 1105 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" |
| string == "EnumValue3")) { |
1107 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestEnumArg", "TestInterface", "parameter 1 ('" +
string + "') is not a valid enum value.")); | 1106 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestEnumArg", "TestInterface", "parameter 1 ('" +
string + "') is not a valid enum value.")); |
1108 return; | 1107 return; |
1109 } | 1108 } |
1110 } | 1109 } |
1111 impl->voidMethodTestEnumArg(testEnumArg); | 1110 impl->voidMethodTestEnumArg(testEnumArg); |
1112 } | 1111 } |
1113 | 1112 |
1114 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 1113 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFla
gMethod(info); | 1230 TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFla
gMethod(info); |
1232 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1233 } | 1232 } |
1234 | 1233 |
1235 static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::Func
tionCallbackInfo<v8::Value>& info) | 1234 static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::Func
tionCallbackInfo<v8::Value>& info) |
1236 { | 1235 { |
1237 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadMet
hodWithExposedAndRuntimeEnabledFlag", "TestInterface", info.Holder(), info.GetIs
olate()); | 1236 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadMet
hodWithExposedAndRuntimeEnabledFlag", "TestInterface", info.Holder(), info.GetIs
olate()); |
1238 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1237 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1239 int longArg; | 1238 int longArg; |
1240 { | 1239 { |
1241 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 1240 TONATIVE_CONVERT(convertAndThrow(longArg = toInt32(info[0], exceptionSta
te), exceptionState), return); |
1242 } | 1241 } |
1243 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(longArg); | 1242 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(longArg); |
1244 } | 1243 } |
1245 | 1244 |
1246 static void overloadMethodWithExposedAndRuntimeEnabledFlag2Method(const v8::Func
tionCallbackInfo<v8::Value>& info) | 1245 static void overloadMethodWithExposedAndRuntimeEnabledFlag2Method(const v8::Func
tionCallbackInfo<v8::Value>& info) |
1247 { | 1246 { |
1248 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1247 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1249 V8StringResource<> string; | 1248 V8StringResource<> string; |
1250 { | 1249 { |
1251 TOSTRING_VOID_INTERNAL(string, info[0]); | 1250 TONATIVE_CONVERT((string = info[0]).prepare(), return); |
1252 } | 1251 } |
1253 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(string); | 1252 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(string); |
1254 } | 1253 } |
1255 | 1254 |
1256 static void overloadMethodWithExposedAndRuntimeEnabledFlag3Method(const v8::Func
tionCallbackInfo<v8::Value>& info) | 1255 static void overloadMethodWithExposedAndRuntimeEnabledFlag3Method(const v8::Func
tionCallbackInfo<v8::Value>& info) |
1257 { | 1256 { |
1258 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1257 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1259 DOMWindow* window; | 1258 DOMWindow* window; |
1260 { | 1259 { |
1261 window = toDOMWindow(info.GetIsolate(), info[0]); | 1260 window = toDOMWindow(info.GetIsolate(), info[0]); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 default: | 1295 default: |
1297 break; | 1296 break; |
1298 } | 1297 } |
1299 if (info.Length() < 1) { | 1298 if (info.Length() < 1) { |
1300 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 1299 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
1301 exceptionState.throwIfNeeded(); | 1300 exceptionState.throwIfNeeded(); |
1302 return; | 1301 return; |
1303 } | 1302 } |
1304 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 1303 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
1305 exceptionState.throwIfNeeded(); | 1304 exceptionState.throwIfNeeded(); |
| 1305 return; |
1306 } | 1306 } |
1307 | 1307 |
1308 static void overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 1308 static void overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
1309 { | 1309 { |
1310 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1310 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1311 TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEn
abledFlagMethod(info); | 1311 TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEn
abledFlagMethod(info); |
1312 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1312 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1313 } | 1313 } |
1314 | 1314 |
1315 static void methodWithExposedHavingRuntimeEnabldFlagMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 1315 static void methodWithExposedHavingRuntimeEnabldFlagMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
(...skipping 27 matching lines...) Expand all Loading... |
1343 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1343 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1344 impl->voidMethodPartialOverload(); | 1344 impl->voidMethodPartialOverload(); |
1345 } | 1345 } |
1346 | 1346 |
1347 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 1347 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
1348 { | 1348 { |
1349 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 1349 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
1350 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1350 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1351 double doubleArg; | 1351 double doubleArg; |
1352 { | 1352 { |
1353 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(doubleArg, toRestrictedDouble(info
[0], exceptionState), exceptionState); | 1353 TONATIVE_CONVERT(convertAndThrow(doubleArg = toRestrictedDouble(info[0],
exceptionState), exceptionState), return); |
1354 } | 1354 } |
1355 impl->voidMethodPartialOverload(doubleArg); | 1355 impl->voidMethodPartialOverload(doubleArg); |
1356 } | 1356 } |
1357 | 1357 |
1358 static void staticVoidMethodPartialOverload1Method(const v8::FunctionCallbackInf
o<v8::Value>& info) | 1358 static void staticVoidMethodPartialOverload1Method(const v8::FunctionCallbackInf
o<v8::Value>& info) |
1359 { | 1359 { |
1360 TestInterfaceImplementation::staticVoidMethodPartialOverload(); | 1360 TestInterfaceImplementation::staticVoidMethodPartialOverload(); |
1361 } | 1361 } |
1362 | 1362 |
1363 static void promiseMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v
8::Value>& info) | 1363 static void promiseMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v
8::Value>& info) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1403 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC
omplexMethod", "TestInterface", info.Holder(), info.GetIsolate()); | 1403 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC
omplexMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
1404 if (UNLIKELY(info.Length() < 2)) { | 1404 if (UNLIKELY(info.Length() < 2)) { |
1405 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 1405 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
1406 exceptionState.throwIfNeeded(); | 1406 exceptionState.throwIfNeeded(); |
1407 return; | 1407 return; |
1408 } | 1408 } |
1409 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1409 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1410 V8StringResource<> strArg; | 1410 V8StringResource<> strArg; |
1411 TestInterfaceEmpty* testInterfaceEmptyArg; | 1411 TestInterfaceEmpty* testInterfaceEmptyArg; |
1412 { | 1412 { |
1413 TOSTRING_VOID_INTERNAL(strArg, info[0]); | 1413 TONATIVE_CONVERT((strArg = info[0]).prepare(), return); |
1414 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[1]); | 1414 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[1]); |
1415 if (!testInterfaceEmptyArg) { | 1415 if (!testInterfaceEmptyArg) { |
1416 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); | 1416 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); |
1417 exceptionState.throwIfNeeded(); | 1417 exceptionState.throwIfNeeded(); |
1418 return; | 1418 return; |
1419 } | 1419 } |
1420 } | 1420 } |
1421 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 1421 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
1422 RefPtr<TestInterfaceEmpty> result = impl->implementsComplexMethod(executionC
ontext, strArg, testInterfaceEmptyArg, exceptionState); | 1422 RefPtr<TestInterfaceEmpty> result = impl->implementsComplexMethod(executionC
ontext, strArg, testInterfaceEmptyArg, exceptionState); |
1423 if (exceptionState.hadException()) { | 1423 if (exceptionState.hadException()) { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 { | 1529 { |
1530 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate()); | 1530 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate()); |
1531 if (UNLIKELY(info.Length() < 1)) { | 1531 if (UNLIKELY(info.Length() < 1)) { |
1532 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 1532 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
1533 exceptionState.throwIfNeeded(); | 1533 exceptionState.throwIfNeeded(); |
1534 return; | 1534 return; |
1535 } | 1535 } |
1536 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1536 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1537 int longArg; | 1537 int longArg; |
1538 { | 1538 { |
1539 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 1539 TONATIVE_CONVERT(convertAndThrow(longArg = toInt32(info[0], exceptionSta
te), exceptionState), return); |
1540 } | 1540 } |
1541 TestPartialInterface::partialVoidMethodLongArg(*impl, longArg); | 1541 TestPartialInterface::partialVoidMethodLongArg(*impl, longArg); |
1542 } | 1542 } |
1543 #endif // ENABLE(PARTIAL_CONDITION) | 1543 #endif // ENABLE(PARTIAL_CONDITION) |
1544 | 1544 |
1545 #if ENABLE(PARTIAL_CONDITION) | 1545 #if ENABLE(PARTIAL_CONDITION) |
1546 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 1546 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
1547 { | 1547 { |
1548 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1548 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1549 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info); | 1549 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 { | 1608 { |
1609 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestInterface", info.Holder(), in
fo.GetIsolate()); | 1609 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestInterface", info.Holder(), in
fo.GetIsolate()); |
1610 if (UNLIKELY(info.Length() < 1)) { | 1610 if (UNLIKELY(info.Length() < 1)) { |
1611 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 1611 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
1612 exceptionState.throwIfNeeded(); | 1612 exceptionState.throwIfNeeded(); |
1613 return; | 1613 return; |
1614 } | 1614 } |
1615 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1615 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1616 int value; | 1616 int value; |
1617 { | 1617 { |
1618 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS
tate), exceptionState); | 1618 TONATIVE_CONVERT(convertAndThrow(value = toInt16(info[0], exceptionState
), exceptionState), return); |
1619 } | 1619 } |
1620 int result = 0; | 1620 int result = 0; |
1621 if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplemented
InPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCu
rrentContext())), impl, value, &result)) | 1621 if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplemented
InPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCu
rrentContext())), impl, value, &result)) |
1622 return; | 1622 return; |
1623 v8SetReturnValueInt(info, result); | 1623 v8SetReturnValueInt(info, result); |
1624 } | 1624 } |
1625 #endif // ENABLE(PARTIAL_CONDITION) | 1625 #endif // ENABLE(PARTIAL_CONDITION) |
1626 | 1626 |
1627 #if ENABLE(PARTIAL_CONDITION) | 1627 #if ENABLE(PARTIAL_CONDITION) |
1628 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 1628 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 1845 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
1846 { | 1846 { |
1847 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); | 1847 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); |
1848 TestInterfaceImplementationV8Internal::indexedPropertyGetter(index, info); | 1848 TestInterfaceImplementationV8Internal::indexedPropertyGetter(index, info); |
1849 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1849 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1850 } | 1850 } |
1851 | 1851 |
1852 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1852 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1853 { | 1853 { |
1854 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1854 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1855 TOSTRING_VOID(V8StringResource<>, propertyValue, v8Value); | 1855 TONATIVE_DECLARE(V8StringResource<>, propertyValue, (propertyValue = v8Value
).prepare(), return); |
1856 bool result = impl->anonymousIndexedSetter(index, propertyValue); | 1856 bool result = impl->anonymousIndexedSetter(index, propertyValue); |
1857 if (!result) | 1857 if (!result) |
1858 return; | 1858 return; |
1859 v8SetReturnValue(info, v8Value); | 1859 v8SetReturnValue(info, v8Value); |
1860 } | 1860 } |
1861 | 1861 |
1862 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 1862 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
1863 { | 1863 { |
1864 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); | 1864 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); |
1865 TestInterfaceImplementationV8Internal::indexedPropertySetter(index, v8Value,
info); | 1865 TestInterfaceImplementationV8Internal::indexedPropertySetter(index, v8Value,
info); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 if (!name->IsString()) | 1911 if (!name->IsString()) |
1912 return; | 1912 return; |
1913 auto nameString = name.As<v8::String>(); | 1913 auto nameString = name.As<v8::String>(); |
1914 if (info.Holder()->HasRealNamedProperty(nameString)) | 1914 if (info.Holder()->HasRealNamedProperty(nameString)) |
1915 return; | 1915 return; |
1916 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(nameString).IsEmpty
()) | 1916 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(nameString).IsEmpty
()) |
1917 return; | 1917 return; |
1918 | 1918 |
1919 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1919 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1920 TOSTRING_VOID(V8StringResource<>, propertyName, nameString); | 1920 TOSTRING_VOID(V8StringResource<>, propertyName, nameString); |
1921 TOSTRING_VOID(V8StringResource<>, propertyValue, v8Value); | 1921 TONATIVE_DECLARE(V8StringResource<>, propertyValue, (propertyValue = v8Value
).prepare(), return); |
1922 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); | 1922 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); |
1923 if (!result) | 1923 if (!result) |
1924 return; | 1924 return; |
1925 v8SetReturnValue(info, v8Value); | 1925 v8SetReturnValue(info, v8Value); |
1926 } | 1926 } |
1927 | 1927 |
1928 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 1928 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
1929 { | 1929 { |
1930 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); | 1930 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); |
1931 TestInterfaceImplementationV8Internal::namedPropertySetter(name, v8Value, in
fo); | 1931 TestInterfaceImplementationV8Internal::namedPropertySetter(name, v8Value, in
fo); |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2348 | 2348 |
2349 ScriptState::Scope scope(scriptState); | 2349 ScriptState::Scope scope(scriptState); |
2350 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 2350 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
2351 | 2351 |
2352 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); | 2352 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); |
2353 v8::Local<v8::Value> argv[] = { valueHandle }; | 2353 v8::Local<v8::Value> argv[] = { valueHandle }; |
2354 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestInterfaceImplementation", scr
iptState->context()->Global(), scriptState->isolate()); | 2354 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestInterfaceImplementation", scr
iptState->context()->Global(), scriptState->isolate()); |
2355 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShortA
rgumentImplementedInPrivateScript", holder, 1, argv); | 2355 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShortA
rgumentImplementedInPrivateScript", holder, 1, argv); |
2356 if (v8Value.IsEmpty()) | 2356 if (v8Value.IsEmpty()) |
2357 return false; | 2357 return false; |
2358 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 2358 TONATIVE_DECLARE(int, cppValue, convertAndThrow(cppValue = toInt16(v8Value,
exceptionState), exceptionState), return false); |
2359 *result = cppValue; | 2359 *result = cppValue; |
2360 RELEASE_ASSERT(!exceptionState.hadException()); | 2360 RELEASE_ASSERT(!exceptionState.hadException()); |
2361 return true; | 2361 return true; |
2362 } | 2362 } |
2363 | 2363 |
2364 bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame*
frame, TestInterfaceImplementation* holderImpl, String* result) | 2364 bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame*
frame, TestInterfaceImplementation* holderImpl, String* result) |
2365 { | 2365 { |
2366 if (!frame) | 2366 if (!frame) |
2367 return false; | 2367 return false; |
2368 v8::HandleScope handleScope(toIsolate(frame)); | 2368 v8::HandleScope handleScope(toIsolate(frame)); |
2369 ScriptForbiddenScope::AllowUserAgentScript script; | 2369 ScriptForbiddenScope::AllowUserAgentScript script; |
2370 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe
rWorld::privateScriptIsolatedWorld()); | 2370 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe
rWorld::privateScriptIsolatedWorld()); |
2371 if (contextInPrivateScript.IsEmpty()) | 2371 if (contextInPrivateScript.IsEmpty()) |
2372 return false; | 2372 return false; |
2373 ScriptState* scriptState = ScriptState::from(contextInPrivateScript); | 2373 ScriptState* scriptState = ScriptState::from(contextInPrivateScript); |
2374 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); | 2374 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
2375 if (!scriptState->executionContext()) | 2375 if (!scriptState->executionContext()) |
2376 return false; | 2376 return false; |
2377 | 2377 |
2378 ScriptState::Scope scope(scriptState); | 2378 ScriptState::Scope scope(scriptState); |
2379 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 2379 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
2380 | 2380 |
2381 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut
e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState
->isolate()); | 2381 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut
e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState
->isolate()); |
2382 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(sc
riptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttrib
ute", holder); | 2382 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(sc
riptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttrib
ute", holder); |
2383 if (v8Value.IsEmpty()) | 2383 if (v8Value.IsEmpty()) |
2384 return false; | 2384 return false; |
2385 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 2385 TONATIVE_DECLARE(V8StringResource<>, cppValue, (cppValue = v8Value).prepare(
), return false); |
2386 RELEASE_ASSERT(!exceptionState.hadException()); | 2386 RELEASE_ASSERT(!exceptionState.hadException()); |
2387 *result = cppValue; | 2387 *result = cppValue; |
2388 return true; | 2388 return true; |
2389 } | 2389 } |
2390 | 2390 |
2391 bool V8TestInterface::PrivateScript::stringAttributeAttributeSetter(LocalFrame*
frame, TestInterfaceImplementation* holderImpl, String cppValue) | 2391 bool V8TestInterface::PrivateScript::stringAttributeAttributeSetter(LocalFrame*
frame, TestInterfaceImplementation* holderImpl, String cppValue) |
2392 { | 2392 { |
2393 if (!frame) | 2393 if (!frame) |
2394 return false; | 2394 return false; |
2395 v8::HandleScope handleScope(toIsolate(frame)); | 2395 v8::HandleScope handleScope(toIsolate(frame)); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2437 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2437 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
2438 { | 2438 { |
2439 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; | 2439 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; |
2440 } | 2440 } |
2441 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2441 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
2442 { | 2442 { |
2443 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; | 2443 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; |
2444 } | 2444 } |
2445 } // namespace blink | 2445 } // namespace blink |
2446 #endif // ENABLE(CONDITION) | 2446 #endif // ENABLE(CONDITION) |
OLD | NEW |