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 double cppValue = toRestrictedDouble(v8Value, exceptionState); |
| 113 if (exceptionState.throwIfNeeded()) |
| 114 return; |
113 impl->setDoubleAttribute(cppValue); | 115 impl->setDoubleAttribute(cppValue); |
114 } | 116 } |
115 | 117 |
116 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 118 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
117 { | 119 { |
118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 120 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
119 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu
e, info); | 121 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu
e, info); |
120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 122 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
121 } | 123 } |
122 | 124 |
123 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 125 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
124 { | 126 { |
125 v8::Local<v8::Object> holder = info.Holder(); | 127 v8::Local<v8::Object> holder = info.Holder(); |
126 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 128 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
127 v8SetReturnValue(info, impl->floatAttribute()); | 129 v8SetReturnValue(info, impl->floatAttribute()); |
128 } | 130 } |
129 | 131 |
130 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 132 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
131 { | 133 { |
132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
133 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); | 135 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); |
134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
135 } | 137 } |
136 | 138 |
137 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 139 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
138 { | 140 { |
139 v8::Local<v8::Object> holder = info.Holder(); | 141 v8::Local<v8::Object> holder = info.Holder(); |
140 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface", holder, info.GetIsolate()); | 142 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface", holder, info.GetIsolate()); |
141 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 143 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
142 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toRestrictedFloat(v8Value, exc
eptionState), exceptionState); | 144 float cppValue = toRestrictedFloat(v8Value, exceptionState); |
| 145 if (exceptionState.throwIfNeeded()) |
| 146 return; |
143 impl->setFloatAttribute(cppValue); | 147 impl->setFloatAttribute(cppValue); |
144 } | 148 } |
145 | 149 |
146 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 150 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
147 { | 151 { |
148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 152 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
149 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value
, info); | 153 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value
, info); |
150 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 154 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
151 } | 155 } |
152 | 156 |
153 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 157 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
154 { | 158 { |
155 v8::Local<v8::Object> holder = info.Holder(); | 159 v8::Local<v8::Object> holder = info.Holder(); |
156 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 160 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
157 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 161 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
158 } | 162 } |
159 | 163 |
160 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 164 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
161 { | 165 { |
162 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 166 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
163 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG
etter(info); | 167 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG
etter(info); |
164 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 168 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
165 } | 169 } |
166 | 170 |
167 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 171 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
168 { | 172 { |
169 v8::Local<v8::Object> holder = info.Holder(); | 173 v8::Local<v8::Object> holder = info.Holder(); |
170 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface", holder, info.GetIsolate()); | 174 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface", holder, info.GetIsolate()); |
171 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 175 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
172 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt
ate), exceptionState); | 176 double cppValue = toDouble(v8Value, exceptionState); |
| 177 if (exceptionState.throwIfNeeded()) |
| 178 return; |
173 impl->setUnrestrictedDoubleAttribute(cppValue); | 179 impl->setUnrestrictedDoubleAttribute(cppValue); |
174 } | 180 } |
175 | 181 |
176 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 182 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
177 { | 183 { |
178 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 184 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
179 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS
etter(v8Value, info); | 185 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS
etter(v8Value, info); |
180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 186 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
181 } | 187 } |
182 | 188 |
183 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 189 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
184 { | 190 { |
185 v8::Local<v8::Object> holder = info.Holder(); | 191 v8::Local<v8::Object> holder = info.Holder(); |
186 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 192 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
187 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 193 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
188 } | 194 } |
189 | 195 |
190 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 196 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
191 { | 197 { |
192 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 198 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
193 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe
tter(info); | 199 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe
tter(info); |
194 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 200 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
195 } | 201 } |
196 | 202 |
197 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 203 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
198 { | 204 { |
199 v8::Local<v8::Object> holder = info.Holder(); | 205 v8::Local<v8::Object> holder = info.Holder(); |
200 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface", holder, info.GetIsolate()); | 206 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface", holder, info.GetIsolate()); |
201 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 207 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
202 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat
e), exceptionState); | 208 float cppValue = toFloat(v8Value, exceptionState); |
| 209 if (exceptionState.throwIfNeeded()) |
| 210 return; |
203 impl->setUnrestrictedFloatAttribute(cppValue); | 211 impl->setUnrestrictedFloatAttribute(cppValue); |
204 } | 212 } |
205 | 213 |
206 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 214 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
207 { | 215 { |
208 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 216 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
209 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe
tter(v8Value, info); | 217 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe
tter(v8Value, info); |
210 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 218 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
211 } | 219 } |
212 | 220 |
213 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 221 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
214 { | 222 { |
215 v8::Local<v8::Object> holder = info.Holder(); | 223 v8::Local<v8::Object> holder = info.Holder(); |
216 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 224 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
217 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); | 225 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); |
218 } | 226 } |
219 | 227 |
220 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 228 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
221 { | 229 { |
222 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 230 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
223 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info
); | 231 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetter(info
); |
224 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 232 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
225 } | 233 } |
226 | 234 |
227 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 235 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
228 { | 236 { |
229 v8::Local<v8::Object> holder = info.Holder(); | 237 v8::Local<v8::Object> holder = info.Holder(); |
230 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 238 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
231 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 239 V8StringResource<> cppValue = v8Value; |
| 240 if (!cppValue.prepare()) |
| 241 return; |
232 String string = cppValue; | 242 String string = cppValue; |
233 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 243 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
234 return; | 244 return; |
235 impl->setTestEnumAttribute(cppValue); | 245 impl->setTestEnumAttribute(cppValue); |
236 } | 246 } |
237 | 247 |
238 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 248 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
239 { | 249 { |
240 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 250 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
241 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va
lue, info); | 251 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va
lue, info); |
(...skipping 13 matching lines...) Expand all Loading... |
255 { | 265 { |
256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 266 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
257 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette
r(info); | 267 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette
r(info); |
258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 268 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
259 } | 269 } |
260 | 270 |
261 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 271 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
262 { | 272 { |
263 v8::Local<v8::Object> holder = info.Holder(); | 273 v8::Local<v8::Object> holder = info.Holder(); |
264 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble
Attribute", "TestInterface", holder, info.GetIsolate()); | 274 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble
Attribute", "TestInterface", holder, info.GetIsolate()); |
| 275 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
265 StringOrDouble cppValue; | 276 StringOrDouble cppValue; |
266 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 277 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, exceptionStat
e); |
267 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8StringOrDouble::toImpl(info.GetIs
olate(), v8Value, cppValue, exceptionState), exceptionState); | 278 if (exceptionState.throwIfNeeded()) |
| 279 return; |
268 impl->setStringOrDoubleAttribute(cppValue); | 280 impl->setStringOrDoubleAttribute(cppValue); |
269 } | 281 } |
270 | 282 |
271 static void stringOrDoubleAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 283 static void stringOrDoubleAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
272 { | 284 { |
273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 285 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
274 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette
r(v8Value, info); | 286 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette
r(v8Value, info); |
275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 287 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
276 } | 288 } |
277 | 289 |
278 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 290 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
279 { | 291 { |
280 v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttrib
ute(), info.GetIsolate()); | 292 v8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttrib
ute(), info.GetIsolate()); |
281 } | 293 } |
282 | 294 |
283 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 295 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
284 { | 296 { |
285 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 297 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
286 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetter(
info); | 298 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetter(
info); |
287 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 299 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
288 } | 300 } |
289 | 301 |
290 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 302 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
291 { | 303 { |
292 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 304 V8StringResource<> cppValue = v8Value; |
| 305 if (!cppValue.prepare()) |
| 306 return; |
293 TestInterfaceImplementation::setStaticStringAttribute(cppValue); | 307 TestInterfaceImplementation::setStaticStringAttribute(cppValue); |
294 } | 308 } |
295 | 309 |
296 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 310 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
297 { | 311 { |
298 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 312 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
299 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(
v8Value, info); | 313 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(
v8Value, info); |
300 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 314 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
301 } | 315 } |
302 | 316 |
303 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 317 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
304 { | 318 { |
305 v8::Local<v8::Object> holder = info.Holder(); | 319 v8::Local<v8::Object> holder = info.Holder(); |
306 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 320 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
307 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); | 321 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
308 } | 322 } |
309 | 323 |
310 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 324 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
311 { | 325 { |
312 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 326 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
313 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter
(info); | 327 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter
(info); |
314 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 328 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
315 } | 329 } |
316 | 330 |
317 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 331 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
318 { | 332 { |
319 v8::Local<v8::Object> holder = info.Holder(); | 333 v8::Local<v8::Object> holder = info.Holder(); |
320 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 334 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
321 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 335 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
322 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 336 int cppValue = toInt32(v8Value, exceptionState); |
| 337 if (exceptionState.throwIfNeeded()) |
| 338 return; |
323 impl->setAlwaysExposedAttribute(cppValue); | 339 impl->setAlwaysExposedAttribute(cppValue); |
324 } | 340 } |
325 | 341 |
326 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 342 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
327 { | 343 { |
328 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 344 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
329 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter
(v8Value, info); | 345 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter
(v8Value, info); |
330 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 346 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
331 } | 347 } |
332 | 348 |
333 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 349 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
334 { | 350 { |
335 v8::Local<v8::Object> holder = info.Holder(); | 351 v8::Local<v8::Object> holder = info.Holder(); |
336 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 352 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
337 v8SetReturnValueInt(info, impl->workerExposedAttribute()); | 353 v8SetReturnValueInt(info, impl->workerExposedAttribute()); |
338 } | 354 } |
339 | 355 |
340 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 356 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
341 { | 357 { |
342 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 358 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
343 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter
(info); | 359 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter
(info); |
344 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 360 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
345 } | 361 } |
346 | 362 |
347 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 363 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
348 { | 364 { |
349 v8::Local<v8::Object> holder = info.Holder(); | 365 v8::Local<v8::Object> holder = info.Holder(); |
350 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 366 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
351 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 367 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
352 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 368 int cppValue = toInt32(v8Value, exceptionState); |
| 369 if (exceptionState.throwIfNeeded()) |
| 370 return; |
353 impl->setWorkerExposedAttribute(cppValue); | 371 impl->setWorkerExposedAttribute(cppValue); |
354 } | 372 } |
355 | 373 |
356 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 374 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
357 { | 375 { |
358 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 376 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
359 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter
(v8Value, info); | 377 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter
(v8Value, info); |
360 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 378 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
361 } | 379 } |
362 | 380 |
363 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 381 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
364 { | 382 { |
365 v8::Local<v8::Object> holder = info.Holder(); | 383 v8::Local<v8::Object> holder = info.Holder(); |
366 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 384 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
367 v8SetReturnValueInt(info, impl->windowExposedAttribute()); | 385 v8SetReturnValueInt(info, impl->windowExposedAttribute()); |
368 } | 386 } |
369 | 387 |
370 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 388 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
371 { | 389 { |
372 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 390 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
373 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter
(info); | 391 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter
(info); |
374 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 392 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
375 } | 393 } |
376 | 394 |
377 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 395 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
378 { | 396 { |
379 v8::Local<v8::Object> holder = info.Holder(); | 397 v8::Local<v8::Object> holder = info.Holder(); |
380 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); | 398 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
381 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 399 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
382 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 400 int cppValue = toInt32(v8Value, exceptionState); |
| 401 if (exceptionState.throwIfNeeded()) |
| 402 return; |
383 impl->setWindowExposedAttribute(cppValue); | 403 impl->setWindowExposedAttribute(cppValue); |
384 } | 404 } |
385 | 405 |
386 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 406 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
387 { | 407 { |
388 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 408 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
389 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter
(v8Value, info); | 409 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter
(v8Value, info); |
390 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 410 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
391 } | 411 } |
392 | 412 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 464 |
445 static void implementsStaticStringAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 465 static void implementsStaticStringAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
446 { | 466 { |
447 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 467 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
448 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteGetter(info); | 468 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteGetter(info); |
449 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 469 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
450 } | 470 } |
451 | 471 |
452 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 472 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
453 { | 473 { |
454 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 474 V8StringResource<> cppValue = v8Value; |
| 475 if (!cppValue.prepare()) |
| 476 return; |
455 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue); | 477 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue); |
456 } | 478 } |
457 | 479 |
458 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 480 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
459 { | 481 { |
460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 482 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
461 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteSetter(v8Value, info); | 483 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib
uteSetter(v8Value, info); |
462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 484 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
463 } | 485 } |
464 | 486 |
(...skipping 22 matching lines...) Expand all Loading... |
487 { | 509 { |
488 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 510 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
489 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet
ter(info); | 511 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet
ter(info); |
490 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 512 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
491 } | 513 } |
492 | 514 |
493 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 515 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
494 { | 516 { |
495 v8::Local<v8::Object> holder = info.Holder(); | 517 v8::Local<v8::Object> holder = info.Holder(); |
496 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 518 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
497 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 519 V8StringResource<> cppValue = v8Value; |
| 520 if (!cppValue.prepare()) |
| 521 return; |
498 impl->setImplementsStringAttribute(cppValue); | 522 impl->setImplementsStringAttribute(cppValue); |
499 } | 523 } |
500 | 524 |
501 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 525 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
502 { | 526 { |
503 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 527 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
504 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet
ter(v8Value, info); | 528 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet
ter(v8Value, info); |
505 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 529 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
506 } | 530 } |
507 | 531 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 | 671 |
648 static void implements2StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 672 static void implements2StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
649 { | 673 { |
650 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 674 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
651 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteGetter(info); | 675 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteGetter(info); |
652 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 676 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
653 } | 677 } |
654 | 678 |
655 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 679 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
656 { | 680 { |
657 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 681 V8StringResource<> cppValue = v8Value; |
| 682 if (!cppValue.prepare()) |
| 683 return; |
658 TestImplements2::setImplements2StaticStringAttribute(cppValue); | 684 TestImplements2::setImplements2StaticStringAttribute(cppValue); |
659 } | 685 } |
660 | 686 |
661 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 687 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
662 { | 688 { |
663 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 689 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
664 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteSetter(v8Value, info); | 690 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri
buteSetter(v8Value, info); |
665 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 691 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
666 } | 692 } |
667 | 693 |
668 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 694 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
669 { | 695 { |
670 v8::Local<v8::Object> holder = info.Holder(); | 696 v8::Local<v8::Object> holder = info.Holder(); |
671 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 697 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
672 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im
pl), info.GetIsolate()); | 698 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im
pl), info.GetIsolate()); |
673 } | 699 } |
674 | 700 |
675 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 701 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
676 { | 702 { |
677 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 703 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
678 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe
tter(info); | 704 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe
tter(info); |
679 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 705 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
680 } | 706 } |
681 | 707 |
682 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 708 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
683 { | 709 { |
684 v8::Local<v8::Object> holder = info.Holder(); | 710 v8::Local<v8::Object> holder = info.Holder(); |
685 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 711 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
686 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 712 V8StringResource<> cppValue = v8Value; |
| 713 if (!cppValue.prepare()) |
| 714 return; |
687 TestImplements2::setImplements2StringAttribute(*impl, cppValue); | 715 TestImplements2::setImplements2StringAttribute(*impl, cppValue); |
688 } | 716 } |
689 | 717 |
690 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 718 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
691 { | 719 { |
692 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 720 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
693 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe
tter(v8Value, info); | 721 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe
tter(v8Value, info); |
694 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 722 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
695 } | 723 } |
696 | 724 |
697 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 725 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
698 { | 726 { |
699 v8::Local<v8::Object> holder = info.Holder(); | 727 v8::Local<v8::Object> holder = info.Holder(); |
700 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 728 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
701 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin
gAttribute(*impl), info.GetIsolate()); | 729 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin
gAttribute(*impl), info.GetIsolate()); |
702 } | 730 } |
703 | 731 |
704 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 732 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
705 { | 733 { |
706 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 734 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
707 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe
tter(info); | 735 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe
tter(info); |
708 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 736 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
709 } | 737 } |
710 | 738 |
711 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 739 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
712 { | 740 { |
713 v8::Local<v8::Object> holder = info.Holder(); | 741 v8::Local<v8::Object> holder = info.Holder(); |
714 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 742 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
715 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 743 V8StringResource<> cppValue = v8Value; |
| 744 if (!cppValue.prepare()) |
| 745 return; |
716 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue
); | 746 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue
); |
717 } | 747 } |
718 | 748 |
719 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 749 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
720 { | 750 { |
721 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 751 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
722 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe
tter(v8Value, info); | 752 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe
tter(v8Value, info); |
723 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 753 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
724 } | 754 } |
725 | 755 |
726 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) | 756 static void implements3StaticStringAttributeAttributeGetter(const v8::PropertyCa
llbackInfo<v8::Value>& info) |
727 { | 757 { |
728 v8SetReturnValueString(info, TestImplements3Implementation::implements3Stati
cStringAttribute(), info.GetIsolate()); | 758 v8SetReturnValueString(info, TestImplements3Implementation::implements3Stati
cStringAttribute(), info.GetIsolate()); |
729 } | 759 } |
730 | 760 |
731 static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 761 static void implements3StaticStringAttributeAttributeGetterCallback(v8::Local<v8
::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
732 { | 762 { |
733 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 763 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
734 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteGetter(info); | 764 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteGetter(info); |
735 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 765 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
736 } | 766 } |
737 | 767 |
738 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 768 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
739 { | 769 { |
740 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 770 V8StringResource<> cppValue = v8Value; |
| 771 if (!cppValue.prepare()) |
| 772 return; |
741 TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue)
; | 773 TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue)
; |
742 } | 774 } |
743 | 775 |
744 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) | 776 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8
::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
745 { | 777 { |
746 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 778 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
747 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteSetter(v8Value, info); | 779 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri
buteSetter(v8Value, info); |
748 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 780 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
749 } | 781 } |
750 | 782 |
(...skipping 14 matching lines...) Expand all Loading... |
765 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 797 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
766 } | 798 } |
767 #endif // ENABLE(PARTIAL_CONDITION) | 799 #endif // ENABLE(PARTIAL_CONDITION) |
768 | 800 |
769 #if ENABLE(PARTIAL_CONDITION) | 801 #if ENABLE(PARTIAL_CONDITION) |
770 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 802 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
771 { | 803 { |
772 v8::Local<v8::Object> holder = info.Holder(); | 804 v8::Local<v8::Object> holder = info.Holder(); |
773 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt
ribute", "TestInterface", holder, info.GetIsolate()); | 805 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt
ribute", "TestInterface", holder, info.GetIsolate()); |
774 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 806 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
775 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 807 int cppValue = toInt32(v8Value, exceptionState); |
| 808 if (exceptionState.throwIfNeeded()) |
| 809 return; |
776 TestPartialInterface::setPartialLongAttribute(*impl, cppValue); | 810 TestPartialInterface::setPartialLongAttribute(*impl, cppValue); |
777 } | 811 } |
778 #endif // ENABLE(PARTIAL_CONDITION) | 812 #endif // ENABLE(PARTIAL_CONDITION) |
779 | 813 |
780 #if ENABLE(PARTIAL_CONDITION) | 814 #if ENABLE(PARTIAL_CONDITION) |
781 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 815 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
782 { | 816 { |
783 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 817 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
784 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v
8Value, info); | 818 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v
8Value, info); |
785 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 819 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 13 matching lines...) Expand all Loading... |
799 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 833 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
800 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGe
tter(info); | 834 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGe
tter(info); |
801 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 835 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
802 } | 836 } |
803 #endif // ENABLE(PARTIAL_CONDITION) | 837 #endif // ENABLE(PARTIAL_CONDITION) |
804 | 838 |
805 #if ENABLE(PARTIAL_CONDITION) | 839 #if ENABLE(PARTIAL_CONDITION) |
806 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 840 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
807 { | 841 { |
808 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL
ongAttribute", "TestInterface", holder, info.GetIsolate()); | 842 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL
ongAttribute", "TestInterface", holder, info.GetIsolate()); |
809 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 843 int cppValue = toInt32(v8Value, exceptionState); |
| 844 if (exceptionState.throwIfNeeded()) |
| 845 return; |
810 TestPartialInterface::setPartialStaticLongAttribute(cppValue); | 846 TestPartialInterface::setPartialStaticLongAttribute(cppValue); |
811 } | 847 } |
812 #endif // ENABLE(PARTIAL_CONDITION) | 848 #endif // ENABLE(PARTIAL_CONDITION) |
813 | 849 |
814 #if ENABLE(PARTIAL_CONDITION) | 850 #if ENABLE(PARTIAL_CONDITION) |
815 static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 851 static void partialStaticLongAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
816 { | 852 { |
817 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 853 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
818 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe
tter(v8Value, info); | 854 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe
tter(v8Value, info); |
819 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 855 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 18 matching lines...) Expand all Loading... |
838 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 874 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
839 } | 875 } |
840 #endif // ENABLE(PARTIAL_CONDITION) | 876 #endif // ENABLE(PARTIAL_CONDITION) |
841 | 877 |
842 #if ENABLE(PARTIAL_CONDITION) | 878 #if ENABLE(PARTIAL_CONDITION) |
843 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 879 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
844 { | 880 { |
845 v8::Local<v8::Object> holder = info.Holder(); | 881 v8::Local<v8::Object> holder = info.Holder(); |
846 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit
hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); | 882 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit
hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); |
847 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 883 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
848 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 884 int cppValue = toInt32(v8Value, exceptionState); |
| 885 if (exceptionState.throwIfNeeded()) |
| 886 return; |
849 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 887 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
850 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut
ionContext, *impl, cppValue); | 888 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut
ionContext, *impl, cppValue); |
851 } | 889 } |
852 #endif // ENABLE(PARTIAL_CONDITION) | 890 #endif // ENABLE(PARTIAL_CONDITION) |
853 | 891 |
854 #if ENABLE(PARTIAL_CONDITION) | 892 #if ENABLE(PARTIAL_CONDITION) |
855 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) | 893 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
856 { | 894 { |
857 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 895 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
858 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeSetter(v8Value, info); | 896 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt
tributeAttributeSetter(v8Value, info); |
(...skipping 17 matching lines...) Expand all Loading... |
876 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteGetter(info); | 914 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib
uteGetter(info); |
877 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 915 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
878 } | 916 } |
879 #endif // ENABLE(PARTIAL_CONDITION) | 917 #endif // ENABLE(PARTIAL_CONDITION) |
880 | 918 |
881 #if ENABLE(PARTIAL_CONDITION) | 919 #if ENABLE(PARTIAL_CONDITION) |
882 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 920 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
883 { | 921 { |
884 v8::Local<v8::Object> holder = info.Holder(); | 922 v8::Local<v8::Object> holder = info.Holder(); |
885 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 923 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
886 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 924 V8StringResource<> cppValue = v8Value; |
| 925 if (!cppValue.prepare()) |
| 926 return; |
887 String string = cppValue; | 927 String string = cppValue; |
888 if (!(string == "foo" || string == "bar")) | 928 if (!(string == "foo" || string == "bar")) |
889 return; | 929 return; |
890 TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue); | 930 TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue); |
891 } | 931 } |
892 #endif // ENABLE(PARTIAL_CONDITION) | 932 #endif // ENABLE(PARTIAL_CONDITION) |
893 | 933 |
894 #if ENABLE(PARTIAL_CONDITION) | 934 #if ENABLE(PARTIAL_CONDITION) |
895 static void partialPartialEnumTypeAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 935 static void partialPartialEnumTypeAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
896 { | 936 { |
(...skipping 22 matching lines...) Expand all Loading... |
919 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); | 959 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); |
920 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 960 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
921 } | 961 } |
922 #endif // ENABLE(PARTIAL_CONDITION) | 962 #endif // ENABLE(PARTIAL_CONDITION) |
923 | 963 |
924 #if ENABLE(PARTIAL_CONDITION) | 964 #if ENABLE(PARTIAL_CONDITION) |
925 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 965 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
926 { | 966 { |
927 v8::Local<v8::Object> holder = info.Holder(); | 967 v8::Local<v8::Object> holder = info.Holder(); |
928 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 968 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
929 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 969 V8StringResource<> cppValue = v8Value; |
| 970 if (!cppValue.prepare()) |
| 971 return; |
930 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); | 972 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(
toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
931 } | 973 } |
932 #endif // ENABLE(PARTIAL_CONDITION) | 974 #endif // ENABLE(PARTIAL_CONDITION) |
933 | 975 |
934 #if ENABLE(PARTIAL_CONDITION) | 976 #if ENABLE(PARTIAL_CONDITION) |
935 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 977 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
936 { | 978 { |
937 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 979 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
938 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu
e, info); | 980 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu
e, info); |
939 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 981 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 12 matching lines...) Expand all Loading... |
952 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 994 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
953 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter(
info); | 995 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter(
info); |
954 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 996 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
955 } | 997 } |
956 | 998 |
957 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 999 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
958 { | 1000 { |
959 v8::Local<v8::Object> holder = info.Holder(); | 1001 v8::Local<v8::Object> holder = info.Holder(); |
960 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt
tribute", "TestInterface", holder, info.GetIsolate()); | 1002 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt
tribute", "TestInterface", holder, info.GetIsolate()); |
961 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 1003 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
962 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 1004 int cppValue = toInt32(v8Value, exceptionState); |
| 1005 if (exceptionState.throwIfNeeded()) |
| 1006 return; |
963 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue
); | 1007 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue
); |
964 } | 1008 } |
965 | 1009 |
966 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1010 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
967 { | 1011 { |
968 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1012 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
969 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter(
v8Value, info); | 1013 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter(
v8Value, info); |
970 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1014 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
971 } | 1015 } |
972 | 1016 |
973 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1017 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
974 { | 1018 { |
975 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2Static
LongAttribute()); | 1019 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2Static
LongAttribute()); |
976 } | 1020 } |
977 | 1021 |
978 static void partial2StaticLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1022 static void partial2StaticLongAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
979 { | 1023 { |
980 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1024 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
981 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeG
etter(info); | 1025 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeG
etter(info); |
982 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1026 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
983 } | 1027 } |
984 | 1028 |
985 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 1029 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
986 { | 1030 { |
987 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static
LongAttribute", "TestInterface", holder, info.GetIsolate()); | 1031 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static
LongAttribute", "TestInterface", holder, info.GetIsolate()); |
988 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 1032 int cppValue = toInt32(v8Value, exceptionState); |
| 1033 if (exceptionState.throwIfNeeded()) |
| 1034 return; |
989 TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue)
; | 1035 TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue)
; |
990 } | 1036 } |
991 | 1037 |
992 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1038 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
993 { | 1039 { |
994 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1040 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
995 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS
etter(v8Value, info); | 1041 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS
etter(v8Value, info); |
996 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1042 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
997 } | 1043 } |
998 | 1044 |
(...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()); | 1093 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterface", info.Holder(), info.GetIsolate()); |
1048 if (UNLIKELY(info.Length() < 2)) { | 1094 if (UNLIKELY(info.Length() < 2)) { |
1049 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 1095 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
1050 exceptionState.throwIfNeeded(); | 1096 exceptionState.throwIfNeeded(); |
1051 return; | 1097 return; |
1052 } | 1098 } |
1053 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1099 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1054 double doubleArg; | 1100 double doubleArg; |
1055 float floatArg; | 1101 float floatArg; |
1056 { | 1102 { |
1057 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(doubleArg, toRestrictedDouble(info
[0], exceptionState), exceptionState); | 1103 doubleArg = toRestrictedDouble(info[0], exceptionState); |
1058 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(floatArg, toRestrictedFloat(info[1
], exceptionState), exceptionState); | 1104 if (exceptionState.throwIfNeeded()) |
| 1105 return; |
| 1106 floatArg = toRestrictedFloat(info[1], exceptionState); |
| 1107 if (exceptionState.throwIfNeeded()) |
| 1108 return; |
1059 } | 1109 } |
1060 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 1110 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
1061 } | 1111 } |
1062 | 1112 |
1063 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 1113 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
1064 { | 1114 { |
1065 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1115 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1066 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf
o); | 1116 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf
o); |
1067 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1117 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1068 } | 1118 } |
1069 | 1119 |
1070 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) | 1120 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) |
1071 { | 1121 { |
1072 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface", info.Holder(), info.
GetIsolate()); | 1122 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface", info.Holder(), info.
GetIsolate()); |
1073 if (UNLIKELY(info.Length() < 2)) { | 1123 if (UNLIKELY(info.Length() < 2)) { |
1074 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 1124 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
1075 exceptionState.throwIfNeeded(); | 1125 exceptionState.throwIfNeeded(); |
1076 return; | 1126 return; |
1077 } | 1127 } |
1078 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1128 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1079 double unrestrictedDoubleArg; | 1129 double unrestrictedDoubleArg; |
1080 float unrestrictedFloatArg; | 1130 float unrestrictedFloatArg; |
1081 { | 1131 { |
1082 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unrestrictedDoubleArg, toDouble(in
fo[0], exceptionState), exceptionState); | 1132 unrestrictedDoubleArg = toDouble(info[0], exceptionState); |
1083 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unrestrictedFloatArg, toFloat(info
[1], exceptionState), exceptionState); | 1133 if (exceptionState.throwIfNeeded()) |
| 1134 return; |
| 1135 unrestrictedFloatArg = toFloat(info[1], exceptionState); |
| 1136 if (exceptionState.throwIfNeeded()) |
| 1137 return; |
1084 } | 1138 } |
1085 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); | 1139 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); |
1086 } | 1140 } |
1087 | 1141 |
1088 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 1142 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
1089 { | 1143 { |
1090 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1144 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1091 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest
rictedFloatArgMethod(info); | 1145 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest
rictedFloatArgMethod(info); |
1092 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1146 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1093 } | 1147 } |
1094 | 1148 |
1095 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 1149 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
1096 { | 1150 { |
1097 if (UNLIKELY(info.Length() < 1)) { | 1151 if (UNLIKELY(info.Length() < 1)) { |
1098 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestEnumArg", "TestInterface", 1, info.Length()), in
fo.GetIsolate()); | 1152 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestEnumArg", "TestInterface", 1, info.Length()), in
fo.GetIsolate()); |
1099 return; | 1153 return; |
1100 } | 1154 } |
1101 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1155 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1102 V8StringResource<> testEnumArg; | 1156 V8StringResource<> testEnumArg; |
1103 { | 1157 { |
1104 TOSTRING_VOID_INTERNAL(testEnumArg, info[0]); | 1158 testEnumArg = info[0]; |
| 1159 if (!testEnumArg.prepare()) |
| 1160 return; |
1105 String string = testEnumArg; | 1161 String string = testEnumArg; |
1106 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" |
| string == "EnumValue3")) { | 1162 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.")); | 1163 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestEnumArg", "TestInterface", "parameter 1 ('" +
string + "') is not a valid enum value.")); |
1108 return; | 1164 return; |
1109 } | 1165 } |
1110 } | 1166 } |
1111 impl->voidMethodTestEnumArg(testEnumArg); | 1167 impl->voidMethodTestEnumArg(testEnumArg); |
1112 } | 1168 } |
1113 | 1169 |
1114 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 1170 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); | 1287 TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFla
gMethod(info); |
1232 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1288 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1233 } | 1289 } |
1234 | 1290 |
1235 static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::Func
tionCallbackInfo<v8::Value>& info) | 1291 static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::Func
tionCallbackInfo<v8::Value>& info) |
1236 { | 1292 { |
1237 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadMet
hodWithExposedAndRuntimeEnabledFlag", "TestInterface", info.Holder(), info.GetIs
olate()); | 1293 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadMet
hodWithExposedAndRuntimeEnabledFlag", "TestInterface", info.Holder(), info.GetIs
olate()); |
1238 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1294 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1239 int longArg; | 1295 int longArg; |
1240 { | 1296 { |
1241 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 1297 longArg = toInt32(info[0], exceptionState); |
| 1298 if (exceptionState.throwIfNeeded()) |
| 1299 return; |
1242 } | 1300 } |
1243 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(longArg); | 1301 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(longArg); |
1244 } | 1302 } |
1245 | 1303 |
1246 static void overloadMethodWithExposedAndRuntimeEnabledFlag2Method(const v8::Func
tionCallbackInfo<v8::Value>& info) | 1304 static void overloadMethodWithExposedAndRuntimeEnabledFlag2Method(const v8::Func
tionCallbackInfo<v8::Value>& info) |
1247 { | 1305 { |
1248 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1306 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1249 V8StringResource<> string; | 1307 V8StringResource<> string; |
1250 { | 1308 { |
1251 TOSTRING_VOID_INTERNAL(string, info[0]); | 1309 string = info[0]; |
| 1310 if (!string.prepare()) |
| 1311 return; |
1252 } | 1312 } |
1253 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(string); | 1313 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(string); |
1254 } | 1314 } |
1255 | 1315 |
1256 static void overloadMethodWithExposedAndRuntimeEnabledFlag3Method(const v8::Func
tionCallbackInfo<v8::Value>& info) | 1316 static void overloadMethodWithExposedAndRuntimeEnabledFlag3Method(const v8::Func
tionCallbackInfo<v8::Value>& info) |
1257 { | 1317 { |
1258 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1318 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1259 DOMWindow* window; | 1319 DOMWindow* window; |
1260 { | 1320 { |
1261 window = toDOMWindow(info.GetIsolate(), info[0]); | 1321 window = toDOMWindow(info.GetIsolate(), info[0]); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 default: | 1356 default: |
1297 break; | 1357 break; |
1298 } | 1358 } |
1299 if (info.Length() < 1) { | 1359 if (info.Length() < 1) { |
1300 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 1360 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
1301 exceptionState.throwIfNeeded(); | 1361 exceptionState.throwIfNeeded(); |
1302 return; | 1362 return; |
1303 } | 1363 } |
1304 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 1364 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
1305 exceptionState.throwIfNeeded(); | 1365 exceptionState.throwIfNeeded(); |
| 1366 return; |
1306 } | 1367 } |
1307 | 1368 |
1308 static void overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 1369 static void overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
1309 { | 1370 { |
1310 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1371 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1311 TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEn
abledFlagMethod(info); | 1372 TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEn
abledFlagMethod(info); |
1312 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1373 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1313 } | 1374 } |
1314 | 1375 |
1315 static void methodWithExposedHavingRuntimeEnabldFlagMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 1376 static void methodWithExposedHavingRuntimeEnabldFlagMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
(...skipping 27 matching lines...) Expand all Loading... |
1343 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1404 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1344 impl->voidMethodPartialOverload(); | 1405 impl->voidMethodPartialOverload(); |
1345 } | 1406 } |
1346 | 1407 |
1347 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 1408 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
1348 { | 1409 { |
1349 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 1410 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
1350 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1411 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1351 double doubleArg; | 1412 double doubleArg; |
1352 { | 1413 { |
1353 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(doubleArg, toRestrictedDouble(info
[0], exceptionState), exceptionState); | 1414 doubleArg = toRestrictedDouble(info[0], exceptionState); |
| 1415 if (exceptionState.throwIfNeeded()) |
| 1416 return; |
1354 } | 1417 } |
1355 impl->voidMethodPartialOverload(doubleArg); | 1418 impl->voidMethodPartialOverload(doubleArg); |
1356 } | 1419 } |
1357 | 1420 |
1358 static void staticVoidMethodPartialOverload1Method(const v8::FunctionCallbackInf
o<v8::Value>& info) | 1421 static void staticVoidMethodPartialOverload1Method(const v8::FunctionCallbackInf
o<v8::Value>& info) |
1359 { | 1422 { |
1360 TestInterfaceImplementation::staticVoidMethodPartialOverload(); | 1423 TestInterfaceImplementation::staticVoidMethodPartialOverload(); |
1361 } | 1424 } |
1362 | 1425 |
1363 static void promiseMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v
8::Value>& info) | 1426 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()); | 1466 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC
omplexMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
1404 if (UNLIKELY(info.Length() < 2)) { | 1467 if (UNLIKELY(info.Length() < 2)) { |
1405 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 1468 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
1406 exceptionState.throwIfNeeded(); | 1469 exceptionState.throwIfNeeded(); |
1407 return; | 1470 return; |
1408 } | 1471 } |
1409 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1472 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1410 V8StringResource<> strArg; | 1473 V8StringResource<> strArg; |
1411 TestInterfaceEmpty* testInterfaceEmptyArg; | 1474 TestInterfaceEmpty* testInterfaceEmptyArg; |
1412 { | 1475 { |
1413 TOSTRING_VOID_INTERNAL(strArg, info[0]); | 1476 strArg = info[0]; |
| 1477 if (!strArg.prepare()) |
| 1478 return; |
1414 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[1]); | 1479 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[1]); |
1415 if (!testInterfaceEmptyArg) { | 1480 if (!testInterfaceEmptyArg) { |
1416 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); | 1481 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); |
1417 exceptionState.throwIfNeeded(); | 1482 exceptionState.throwIfNeeded(); |
1418 return; | 1483 return; |
1419 } | 1484 } |
1420 } | 1485 } |
1421 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 1486 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
1422 RefPtr<TestInterfaceEmpty> result = impl->implementsComplexMethod(executionC
ontext, strArg, testInterfaceEmptyArg, exceptionState); | 1487 RefPtr<TestInterfaceEmpty> result = impl->implementsComplexMethod(executionC
ontext, strArg, testInterfaceEmptyArg, exceptionState); |
1423 if (exceptionState.hadException()) { | 1488 if (exceptionState.hadException()) { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 { | 1594 { |
1530 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate()); | 1595 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate()); |
1531 if (UNLIKELY(info.Length() < 1)) { | 1596 if (UNLIKELY(info.Length() < 1)) { |
1532 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 1597 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
1533 exceptionState.throwIfNeeded(); | 1598 exceptionState.throwIfNeeded(); |
1534 return; | 1599 return; |
1535 } | 1600 } |
1536 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1601 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1537 int longArg; | 1602 int longArg; |
1538 { | 1603 { |
1539 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 1604 longArg = toInt32(info[0], exceptionState); |
| 1605 if (exceptionState.throwIfNeeded()) |
| 1606 return; |
1540 } | 1607 } |
1541 TestPartialInterface::partialVoidMethodLongArg(*impl, longArg); | 1608 TestPartialInterface::partialVoidMethodLongArg(*impl, longArg); |
1542 } | 1609 } |
1543 #endif // ENABLE(PARTIAL_CONDITION) | 1610 #endif // ENABLE(PARTIAL_CONDITION) |
1544 | 1611 |
1545 #if ENABLE(PARTIAL_CONDITION) | 1612 #if ENABLE(PARTIAL_CONDITION) |
1546 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 1613 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
1547 { | 1614 { |
1548 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1615 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1549 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info); | 1616 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 { | 1675 { |
1609 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestInterface", info.Holder(), in
fo.GetIsolate()); | 1676 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestInterface", info.Holder(), in
fo.GetIsolate()); |
1610 if (UNLIKELY(info.Length() < 1)) { | 1677 if (UNLIKELY(info.Length() < 1)) { |
1611 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 1678 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
1612 exceptionState.throwIfNeeded(); | 1679 exceptionState.throwIfNeeded(); |
1613 return; | 1680 return; |
1614 } | 1681 } |
1615 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1682 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1616 int value; | 1683 int value; |
1617 { | 1684 { |
1618 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS
tate), exceptionState); | 1685 value = toInt16(info[0], exceptionState); |
| 1686 if (exceptionState.throwIfNeeded()) |
| 1687 return; |
1619 } | 1688 } |
1620 int result = 0; | 1689 int result = 0; |
1621 if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplemented
InPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCu
rrentContext())), impl, value, &result)) | 1690 if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplemented
InPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCu
rrentContext())), impl, value, &result)) |
1622 return; | 1691 return; |
1623 v8SetReturnValueInt(info, result); | 1692 v8SetReturnValueInt(info, result); |
1624 } | 1693 } |
1625 #endif // ENABLE(PARTIAL_CONDITION) | 1694 #endif // ENABLE(PARTIAL_CONDITION) |
1626 | 1695 |
1627 #if ENABLE(PARTIAL_CONDITION) | 1696 #if ENABLE(PARTIAL_CONDITION) |
1628 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 1697 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) | 1914 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
1846 { | 1915 { |
1847 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); | 1916 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); |
1848 TestInterfaceImplementationV8Internal::indexedPropertyGetter(index, info); | 1917 TestInterfaceImplementationV8Internal::indexedPropertyGetter(index, info); |
1849 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1918 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1850 } | 1919 } |
1851 | 1920 |
1852 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1921 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1853 { | 1922 { |
1854 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1923 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1855 TOSTRING_VOID(V8StringResource<>, propertyValue, v8Value); | 1924 V8StringResource<> propertyValue = v8Value; |
| 1925 if (!propertyValue.prepare()) |
| 1926 return; |
1856 bool result = impl->anonymousIndexedSetter(index, propertyValue); | 1927 bool result = impl->anonymousIndexedSetter(index, propertyValue); |
1857 if (!result) | 1928 if (!result) |
1858 return; | 1929 return; |
1859 v8SetReturnValue(info, v8Value); | 1930 v8SetReturnValue(info, v8Value); |
1860 } | 1931 } |
1861 | 1932 |
1862 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 1933 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
1863 { | 1934 { |
1864 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); | 1935 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); |
1865 TestInterfaceImplementationV8Internal::indexedPropertySetter(index, v8Value,
info); | 1936 TestInterfaceImplementationV8Internal::indexedPropertySetter(index, v8Value,
info); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1910 { | 1981 { |
1911 if (!name->IsString()) | 1982 if (!name->IsString()) |
1912 return; | 1983 return; |
1913 auto nameString = name.As<v8::String>(); | 1984 auto nameString = name.As<v8::String>(); |
1914 if (info.Holder()->HasRealNamedProperty(nameString)) | 1985 if (info.Holder()->HasRealNamedProperty(nameString)) |
1915 return; | 1986 return; |
1916 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(nameString).IsEmpty
()) | 1987 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(nameString).IsEmpty
()) |
1917 return; | 1988 return; |
1918 | 1989 |
1919 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1990 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1920 TOSTRING_VOID(V8StringResource<>, propertyName, nameString); | 1991 V8StringResource<> propertyName(nameString); |
1921 TOSTRING_VOID(V8StringResource<>, propertyValue, v8Value); | 1992 if (!propertyName.prepare()) |
| 1993 return; |
| 1994 V8StringResource<> propertyValue = v8Value; |
| 1995 if (!propertyValue.prepare()) |
| 1996 return; |
1922 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); | 1997 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); |
1923 if (!result) | 1998 if (!result) |
1924 return; | 1999 return; |
1925 v8SetReturnValue(info, v8Value); | 2000 v8SetReturnValue(info, v8Value); |
1926 } | 2001 } |
1927 | 2002 |
1928 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 2003 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
1929 { | 2004 { |
1930 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); | 2005 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); |
1931 TestInterfaceImplementationV8Internal::namedPropertySetter(name, v8Value, in
fo); | 2006 TestInterfaceImplementationV8Internal::namedPropertySetter(name, v8Value, in
fo); |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2348 | 2423 |
2349 ScriptState::Scope scope(scriptState); | 2424 ScriptState::Scope scope(scriptState); |
2350 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 2425 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
2351 | 2426 |
2352 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); | 2427 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(),
value); |
2353 v8::Local<v8::Value> argv[] = { valueHandle }; | 2428 v8::Local<v8::Value> argv[] = { valueHandle }; |
2354 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod
WithShortArgumentImplementedInPrivateScript", "TestInterfaceImplementation", scr
iptState->context()->Global(), scriptState->isolate()); | 2429 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); | 2430 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState
, scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShortA
rgumentImplementedInPrivateScript", holder, 1, argv); |
2356 if (v8Value.IsEmpty()) | 2431 if (v8Value.IsEmpty()) |
2357 return false; | 2432 return false; |
2358 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta
te), exceptionState, false); | 2433 int cppValue = toInt16(v8Value, exceptionState); |
| 2434 if (exceptionState.throwIfNeeded()) |
| 2435 return false; |
2359 *result = cppValue; | 2436 *result = cppValue; |
2360 RELEASE_ASSERT(!exceptionState.hadException()); | 2437 RELEASE_ASSERT(!exceptionState.hadException()); |
2361 return true; | 2438 return true; |
2362 } | 2439 } |
2363 | 2440 |
2364 bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame*
frame, TestInterfaceImplementation* holderImpl, String* result) | 2441 bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame*
frame, TestInterfaceImplementation* holderImpl, String* result) |
2365 { | 2442 { |
2366 if (!frame) | 2443 if (!frame) |
2367 return false; | 2444 return false; |
2368 v8::HandleScope handleScope(toIsolate(frame)); | 2445 v8::HandleScope handleScope(toIsolate(frame)); |
2369 ScriptForbiddenScope::AllowUserAgentScript script; | 2446 ScriptForbiddenScope::AllowUserAgentScript script; |
2370 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe
rWorld::privateScriptIsolatedWorld()); | 2447 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe
rWorld::privateScriptIsolatedWorld()); |
2371 if (contextInPrivateScript.IsEmpty()) | 2448 if (contextInPrivateScript.IsEmpty()) |
2372 return false; | 2449 return false; |
2373 ScriptState* scriptState = ScriptState::from(contextInPrivateScript); | 2450 ScriptState* scriptState = ScriptState::from(contextInPrivateScript); |
2374 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); | 2451 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
2375 if (!scriptState->executionContext()) | 2452 if (!scriptState->executionContext()) |
2376 return false; | 2453 return false; |
2377 | 2454 |
2378 ScriptState::Scope scope(scriptState); | 2455 ScriptState::Scope scope(scriptState); |
2379 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 2456 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
2380 | 2457 |
2381 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut
e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState
->isolate()); | 2458 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); | 2459 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(sc
riptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttrib
ute", holder); |
2383 if (v8Value.IsEmpty()) | 2460 if (v8Value.IsEmpty()) |
2384 return false; | 2461 return false; |
2385 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); | 2462 V8StringResource<> cppValue = v8Value; |
| 2463 if (!cppValue.prepare()) |
| 2464 return false; |
2386 RELEASE_ASSERT(!exceptionState.hadException()); | 2465 RELEASE_ASSERT(!exceptionState.hadException()); |
2387 *result = cppValue; | 2466 *result = cppValue; |
2388 return true; | 2467 return true; |
2389 } | 2468 } |
2390 | 2469 |
2391 bool V8TestInterface::PrivateScript::stringAttributeAttributeSetter(LocalFrame*
frame, TestInterfaceImplementation* holderImpl, String cppValue) | 2470 bool V8TestInterface::PrivateScript::stringAttributeAttributeSetter(LocalFrame*
frame, TestInterfaceImplementation* holderImpl, String cppValue) |
2392 { | 2471 { |
2393 if (!frame) | 2472 if (!frame) |
2394 return false; | 2473 return false; |
2395 v8::HandleScope handleScope(toIsolate(frame)); | 2474 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>&)) | 2516 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
2438 { | 2517 { |
2439 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; | 2518 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; |
2440 } | 2519 } |
2441 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2520 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
2442 { | 2521 { |
2443 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; | 2522 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; |
2444 } | 2523 } |
2445 } // namespace blink | 2524 } // namespace blink |
2446 #endif // ENABLE(CONDITION) | 2525 #endif // ENABLE(CONDITION) |
OLD | NEW |