Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterface.cpp

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

Powered by Google App Engine
This is Rietveld 408576698