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

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

Issue 2272613003: binding: Retires ExceptionState::throwIfNeeded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 4 years, 3 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 "V8TestInterface.h" 7 #include "V8TestInterface.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/PrivateScriptRunner.h" 10 #include "bindings/core/v8/PrivateScriptRunner.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 91 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
92 { 92 {
93 v8::Local<v8::Object> holder = info.Holder(); 93 v8::Local<v8::Object> holder = info.Holder();
94 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface", holder, info.GetIsolate()); 94 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface", holder, info.GetIsolate());
95 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 95 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
96 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value); 96 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value);
97 if (!cppValue) { 97 if (!cppValue) {
98 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'."); 98 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'.");
99 exceptionState.throwIfNeeded();
100 return; 99 return;
101 } 100 }
102 impl->setTestInterfaceAttribute(cppValue); 101 impl->setTestInterfaceAttribute(cppValue);
103 } 102 }
104 103
105 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 104 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
106 { 105 {
107 v8::Local<v8::Value> v8Value = info[0]; 106 v8::Local<v8::Value> v8Value = info[0];
108 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib uteSetter); 107 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib uteSetter);
109 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter (v8Value, info); 108 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter (v8Value, info);
(...skipping 10 matching lines...) Expand all
120 { 119 {
121 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info); 120 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info);
122 } 121 }
123 122
124 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info) 123 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info)
125 { 124 {
126 v8::Local<v8::Object> holder = info.Holder(); 125 v8::Local<v8::Object> holder = info.Holder();
127 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface", holder, info.GetIsolate()); 126 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface", holder, info.GetIsolate());
128 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 127 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
129 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate); 128 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate);
130 if (exceptionState.throwIfNeeded()) 129 if (exceptionState.hadException())
131 return; 130 return;
132 impl->setDoubleAttribute(cppValue); 131 impl->setDoubleAttribute(cppValue);
133 } 132 }
134 133
135 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 134 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
136 { 135 {
137 v8::Local<v8::Value> v8Value = info[0]; 136 v8::Local<v8::Value> v8Value = info[0];
138 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu e, info); 137 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu e, info);
139 } 138 }
140 139
141 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info) 140 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info)
142 { 141 {
143 v8::Local<v8::Object> holder = info.Holder(); 142 v8::Local<v8::Object> holder = info.Holder();
144 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 143 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
145 v8SetReturnValue(info, impl->floatAttribute()); 144 v8SetReturnValue(info, impl->floatAttribute());
146 } 145 }
147 146
148 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 147 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
149 { 148 {
150 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); 149 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info);
151 } 150 }
152 151
153 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info) 152 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info)
154 { 153 {
155 v8::Local<v8::Object> holder = info.Holder(); 154 v8::Local<v8::Object> holder = info.Holder();
156 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface", holder, info.GetIsolate()); 155 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface", holder, info.GetIsolate());
157 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 156 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
158 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e); 157 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e);
159 if (exceptionState.throwIfNeeded()) 158 if (exceptionState.hadException())
160 return; 159 return;
161 impl->setFloatAttribute(cppValue); 160 impl->setFloatAttribute(cppValue);
162 } 161 }
163 162
164 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 163 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
165 { 164 {
166 v8::Local<v8::Value> v8Value = info[0]; 165 v8::Local<v8::Value> v8Value = info[0];
167 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value , info); 166 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value , info);
168 } 167 }
169 168
170 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) 169 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info)
171 { 170 {
172 v8::Local<v8::Object> holder = info.Holder(); 171 v8::Local<v8::Object> holder = info.Holder();
173 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 172 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
174 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); 173 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
175 } 174 }
176 175
177 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 176 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
178 { 177 {
179 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG etter(info); 178 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG etter(info);
180 } 179 }
181 180
182 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) 181 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info)
183 { 182 {
184 v8::Local<v8::Object> holder = info.Holder(); 183 v8::Local<v8::Object> holder = info.Holder();
185 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface", holder, info.GetIsolate()); 184 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface", holder, info.GetIsolate());
186 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 185 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
187 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); 186 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState);
188 if (exceptionState.throwIfNeeded()) 187 if (exceptionState.hadException())
189 return; 188 return;
190 impl->setUnrestrictedDoubleAttribute(cppValue); 189 impl->setUnrestrictedDoubleAttribute(cppValue);
191 } 190 }
192 191
193 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 192 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
194 { 193 {
195 v8::Local<v8::Value> v8Value = info[0]; 194 v8::Local<v8::Value> v8Value = info[0];
196 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS etter(v8Value, info); 195 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS etter(v8Value, info);
197 } 196 }
198 197
199 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) 198 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info)
200 { 199 {
201 v8::Local<v8::Object> holder = info.Holder(); 200 v8::Local<v8::Object> holder = info.Holder();
202 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 201 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
203 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); 202 v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
204 } 203 }
205 204
206 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 205 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
207 { 206 {
208 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe tter(info); 207 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe tter(info);
209 } 208 }
210 209
211 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) 210 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info)
212 { 211 {
213 v8::Local<v8::Object> holder = info.Holder(); 212 v8::Local<v8::Object> holder = info.Holder();
214 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface", holder, info.GetIsolate()); 213 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface", holder, info.GetIsolate());
215 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 214 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
216 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); 215 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState);
217 if (exceptionState.throwIfNeeded()) 216 if (exceptionState.hadException())
218 return; 217 return;
219 impl->setUnrestrictedFloatAttribute(cppValue); 218 impl->setUnrestrictedFloatAttribute(cppValue);
220 } 219 }
221 220
222 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 221 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
223 { 222 {
224 v8::Local<v8::Value> v8Value = info[0]; 223 v8::Local<v8::Value> v8Value = info[0];
225 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe tter(v8Value, info); 224 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe tter(v8Value, info);
226 } 225 }
227 226
(...skipping 18 matching lines...) Expand all
246 if (!cppValue.prepare()) 245 if (!cppValue.prepare())
247 return; 246 return;
248 const char* validValues[] = { 247 const char* validValues[] = {
249 "", 248 "",
250 "EnumValue1", 249 "EnumValue1",
251 "EnumValue2", 250 "EnumValue2",
252 "EnumValue3", 251 "EnumValue3",
253 }; 252 };
254 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test Enum", exceptionState)) { 253 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test Enum", exceptionState)) {
255 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); 254 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message()));
255 // http://heycam.github.io/webidl/#idl-enums
256 // Assignment of an invalid string value to an attribute is ignored,
257 // while passing such a value as an operation argument results in
258 // an exception being thrown.
259 exceptionState.clearException();
256 return; 260 return;
257 } 261 }
258 impl->setTestEnumAttribute(cppValue); 262 impl->setTestEnumAttribute(cppValue);
259 } 263 }
260 264
261 static void testEnumAttributeAttributeSetterCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 265 static void testEnumAttributeAttributeSetterCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
262 { 266 {
263 v8::Local<v8::Value> v8Value = info[0]; 267 v8::Local<v8::Value> v8Value = info[0];
264 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va lue, info); 268 TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetter(v8Va lue, info);
265 } 269 }
(...skipping 12 matching lines...) Expand all
278 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette r(info); 282 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGette r(info);
279 } 283 }
280 284
281 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 285 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
282 { 286 {
283 v8::Local<v8::Object> holder = info.Holder(); 287 v8::Local<v8::Object> holder = info.Holder();
284 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble Attribute", "TestInterface", holder, info.GetIsolate()); 288 ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrDouble Attribute", "TestInterface", holder, info.GetIsolate());
285 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 289 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
286 StringOrDouble cppValue; 290 StringOrDouble cppValue;
287 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConv ersionMode::NotNullable, exceptionState); 291 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConv ersionMode::NotNullable, exceptionState);
288 if (exceptionState.throwIfNeeded()) 292 if (exceptionState.hadException())
289 return; 293 return;
290 impl->setStringOrDoubleAttribute(cppValue); 294 impl->setStringOrDoubleAttribute(cppValue);
291 } 295 }
292 296
293 static void stringOrDoubleAttributeAttributeSetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 297 static void stringOrDoubleAttributeAttributeSetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
294 { 298 {
295 v8::Local<v8::Value> v8Value = info[0]; 299 v8::Local<v8::Value> v8Value = info[0];
296 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette r(v8Value, info); 300 TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSette r(v8Value, info);
297 } 301 }
298 302
299 static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackIn fo<v8::Value>& info) 303 static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackIn fo<v8::Value>& info)
300 { 304 {
301 v8::Local<v8::Object> holder = info.Holder(); 305 v8::Local<v8::Object> holder = info.Holder();
302 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 306 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
303 v8SetReturnValueInt(info, impl->conditionalLongAttribute()); 307 v8SetReturnValueInt(info, impl->conditionalLongAttribute());
304 } 308 }
305 309
306 static void conditionalLongAttributeAttributeGetterCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 310 static void conditionalLongAttributeAttributeGetterCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
307 { 311 {
308 TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeGett er(info); 312 TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeGett er(info);
309 } 313 }
310 314
311 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value , const v8::FunctionCallbackInfo<v8::Value>& info) 315 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value , const v8::FunctionCallbackInfo<v8::Value>& info)
312 { 316 {
313 v8::Local<v8::Object> holder = info.Holder(); 317 v8::Local<v8::Object> holder = info.Holder();
314 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon gAttribute", "TestInterface", holder, info.GetIsolate()); 318 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon gAttribute", "TestInterface", holder, info.GetIsolate());
315 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 319 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
316 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 320 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
317 if (exceptionState.throwIfNeeded()) 321 if (exceptionState.hadException())
318 return; 322 return;
319 impl->setConditionalLongAttribute(cppValue); 323 impl->setConditionalLongAttribute(cppValue);
320 } 324 }
321 325
322 static void conditionalLongAttributeAttributeSetterCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 326 static void conditionalLongAttributeAttributeSetterCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
323 { 327 {
324 v8::Local<v8::Value> v8Value = info[0]; 328 v8::Local<v8::Value> v8Value = info[0];
325 TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeSett er(v8Value, info); 329 TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeSett er(v8Value, info);
326 } 330 }
327 331
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttrib uteGetter(info); 375 TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttrib uteGetter(info);
372 } 376 }
373 377
374 static void staticReturnDOMWrapperAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 378 static void staticReturnDOMWrapperAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
375 { 379 {
376 v8::Local<v8::Object> holder = info.Holder(); 380 v8::Local<v8::Object> holder = info.Holder();
377 ExceptionState exceptionState(ExceptionState::SetterContext, "staticReturnDO MWrapperAttribute", "TestInterface", holder, info.GetIsolate()); 381 ExceptionState exceptionState(ExceptionState::SetterContext, "staticReturnDO MWrapperAttribute", "TestInterface", holder, info.GetIsolate());
378 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value); 382 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value);
379 if (!cppValue) { 383 if (!cppValue) {
380 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'."); 384 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'.");
381 exceptionState.throwIfNeeded();
382 return; 385 return;
383 } 386 }
384 TestInterfaceImplementation::setStaticReturnDOMWrapperAttribute(cppValue); 387 TestInterfaceImplementation::setStaticReturnDOMWrapperAttribute(cppValue);
385 } 388 }
386 389
387 static void staticReturnDOMWrapperAttributeAttributeSetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 390 static void staticReturnDOMWrapperAttributeAttributeSetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
388 { 391 {
389 v8::Local<v8::Value> v8Value = info[0]; 392 v8::Local<v8::Value> v8Value = info[0];
390 TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttrib uteSetter(v8Value, info); 393 TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttrib uteSetter(v8Value, info);
391 } 394 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 { 465 {
463 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter (info); 466 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter (info);
464 } 467 }
465 468
466 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 469 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
467 { 470 {
468 v8::Local<v8::Object> holder = info.Holder(); 471 v8::Local<v8::Object> holder = info.Holder();
469 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface", holder, info.GetIsolate()); 472 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface", holder, info.GetIsolate());
470 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 473 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
471 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 474 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
472 if (exceptionState.throwIfNeeded()) 475 if (exceptionState.hadException())
473 return; 476 return;
474 impl->setAlwaysExposedAttribute(cppValue); 477 impl->setAlwaysExposedAttribute(cppValue);
475 } 478 }
476 479
477 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 480 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
478 { 481 {
479 v8::Local<v8::Value> v8Value = info[0]; 482 v8::Local<v8::Value> v8Value = info[0];
480 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter (v8Value, info); 483 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter (v8Value, info);
481 } 484 }
482 485
483 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 486 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
484 { 487 {
485 v8::Local<v8::Object> holder = info.Holder(); 488 v8::Local<v8::Object> holder = info.Holder();
486 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 489 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
487 v8SetReturnValueInt(info, impl->workerExposedAttribute()); 490 v8SetReturnValueInt(info, impl->workerExposedAttribute());
488 } 491 }
489 492
490 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 493 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
491 { 494 {
492 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter (info); 495 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter (info);
493 } 496 }
494 497
495 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 498 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
496 { 499 {
497 v8::Local<v8::Object> holder = info.Holder(); 500 v8::Local<v8::Object> holder = info.Holder();
498 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface", holder, info.GetIsolate()); 501 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface", holder, info.GetIsolate());
499 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 502 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
500 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 503 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
501 if (exceptionState.throwIfNeeded()) 504 if (exceptionState.hadException())
502 return; 505 return;
503 impl->setWorkerExposedAttribute(cppValue); 506 impl->setWorkerExposedAttribute(cppValue);
504 } 507 }
505 508
506 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 509 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
507 { 510 {
508 v8::Local<v8::Value> v8Value = info[0]; 511 v8::Local<v8::Value> v8Value = info[0];
509 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter (v8Value, info); 512 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter (v8Value, info);
510 } 513 }
511 514
512 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 515 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
513 { 516 {
514 v8::Local<v8::Object> holder = info.Holder(); 517 v8::Local<v8::Object> holder = info.Holder();
515 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 518 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
516 v8SetReturnValueInt(info, impl->windowExposedAttribute()); 519 v8SetReturnValueInt(info, impl->windowExposedAttribute());
517 } 520 }
518 521
519 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 522 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
520 { 523 {
521 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter (info); 524 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter (info);
522 } 525 }
523 526
524 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 527 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
525 { 528 {
526 v8::Local<v8::Object> holder = info.Holder(); 529 v8::Local<v8::Object> holder = info.Holder();
527 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface", holder, info.GetIsolate()); 530 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface", holder, info.GetIsolate());
528 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 531 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
529 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 532 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
530 if (exceptionState.throwIfNeeded()) 533 if (exceptionState.hadException())
531 return; 534 return;
532 impl->setWindowExposedAttribute(cppValue); 535 impl->setWindowExposedAttribute(cppValue);
533 } 536 }
534 537
535 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 538 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
536 { 539 {
537 v8::Local<v8::Value> v8Value = info[0]; 540 v8::Local<v8::Value> v8Value = info[0];
538 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter (v8Value, info); 541 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter (v8Value, info);
539 } 542 }
540 543
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 } 584 }
582 585
583 static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 586 static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
584 { 587 {
585 v8::Local<v8::Object> holder = info.Holder(); 588 v8::Local<v8::Object> holder = info.Holder();
586 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextA ttribute", "TestInterface", holder, info.GetIsolate()); 589 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextA ttribute", "TestInterface", holder, info.GetIsolate());
587 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 590 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
588 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 591 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
589 if (!cppValue) { 592 if (!cppValue) {
590 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 593 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
591 exceptionState.throwIfNeeded();
592 return; 594 return;
593 } 595 }
594 impl->setSecureContextAttribute(cppValue); 596 impl->setSecureContextAttribute(cppValue);
595 } 597 }
596 598
597 static void secureContextAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 599 static void secureContextAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
598 { 600 {
599 v8::Local<v8::Value> v8Value = info[0]; 601 v8::Local<v8::Value> v8Value = info[0];
600 TestInterfaceImplementationV8Internal::secureContextAttributeAttributeSetter (v8Value, info); 602 TestInterfaceImplementationV8Internal::secureContextAttributeAttributeSetter (v8Value, info);
601 } 603 }
(...skipping 11 matching lines...) Expand all
613 } 615 }
614 616
615 static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 617 static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
616 { 618 {
617 v8::Local<v8::Object> holder = info.Holder(); 619 v8::Local<v8::Object> holder = info.Holder();
618 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextR untimeEnabledAttribute", "TestInterface", holder, info.GetIsolate()); 620 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextR untimeEnabledAttribute", "TestInterface", holder, info.GetIsolate());
619 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 621 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
620 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 622 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
621 if (!cppValue) { 623 if (!cppValue) {
622 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 624 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
623 exceptionState.throwIfNeeded();
624 return; 625 return;
625 } 626 }
626 impl->setSecureContextRuntimeEnabledAttribute(cppValue); 627 impl->setSecureContextRuntimeEnabledAttribute(cppValue);
627 } 628 }
628 629
629 static void secureContextRuntimeEnabledAttributeAttributeSetterCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info) 630 static void secureContextRuntimeEnabledAttributeAttributeSetterCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info)
630 { 631 {
631 v8::Local<v8::Value> v8Value = info[0]; 632 v8::Local<v8::Value> v8Value = info[0];
632 TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeA ttributeSetter(v8Value, info); 633 TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeA ttributeSetter(v8Value, info);
633 } 634 }
(...skipping 11 matching lines...) Expand all
645 } 646 }
646 647
647 static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 648 static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
648 { 649 {
649 v8::Local<v8::Object> holder = info.Holder(); 650 v8::Local<v8::Object> holder = info.Holder();
650 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW indowExposedAttribute", "TestInterface", holder, info.GetIsolate()); 651 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW indowExposedAttribute", "TestInterface", holder, info.GetIsolate());
651 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 652 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
652 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 653 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
653 if (!cppValue) { 654 if (!cppValue) {
654 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 655 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
655 exceptionState.throwIfNeeded();
656 return; 656 return;
657 } 657 }
658 impl->setSecureContextWindowExposedAttribute(cppValue); 658 impl->setSecureContextWindowExposedAttribute(cppValue);
659 } 659 }
660 660
661 static void secureContextWindowExposedAttributeAttributeSetterCallback(const v8: :FunctionCallbackInfo<v8::Value>& info) 661 static void secureContextWindowExposedAttributeAttributeSetterCallback(const v8: :FunctionCallbackInfo<v8::Value>& info)
662 { 662 {
663 v8::Local<v8::Value> v8Value = info[0]; 663 v8::Local<v8::Value> v8Value = info[0];
664 TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAt tributeSetter(v8Value, info); 664 TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAt tributeSetter(v8Value, info);
665 } 665 }
(...skipping 11 matching lines...) Expand all
677 } 677 }
678 678
679 static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 679 static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
680 { 680 {
681 v8::Local<v8::Object> holder = info.Holder(); 681 v8::Local<v8::Object> holder = info.Holder();
682 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW orkerExposedAttribute", "TestInterface", holder, info.GetIsolate()); 682 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW orkerExposedAttribute", "TestInterface", holder, info.GetIsolate());
683 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 683 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
684 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 684 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
685 if (!cppValue) { 685 if (!cppValue) {
686 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 686 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
687 exceptionState.throwIfNeeded();
688 return; 687 return;
689 } 688 }
690 impl->setSecureContextWorkerExposedAttribute(cppValue); 689 impl->setSecureContextWorkerExposedAttribute(cppValue);
691 } 690 }
692 691
693 static void secureContextWorkerExposedAttributeAttributeSetterCallback(const v8: :FunctionCallbackInfo<v8::Value>& info) 692 static void secureContextWorkerExposedAttributeAttributeSetterCallback(const v8: :FunctionCallbackInfo<v8::Value>& info)
694 { 693 {
695 v8::Local<v8::Value> v8Value = info[0]; 694 v8::Local<v8::Value> v8Value = info[0];
696 TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAt tributeSetter(v8Value, info); 695 TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAt tributeSetter(v8Value, info);
697 } 696 }
(...skipping 11 matching lines...) Expand all
709 } 708 }
710 709
711 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 710 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
712 { 711 {
713 v8::Local<v8::Object> holder = info.Holder(); 712 v8::Local<v8::Object> holder = info.Holder();
714 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW indowExposedRuntimeEnabledAttribute", "TestInterface", holder, info.GetIsolate() ); 713 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW indowExposedRuntimeEnabledAttribute", "TestInterface", holder, info.GetIsolate() );
715 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 714 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
716 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 715 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
717 if (!cppValue) { 716 if (!cppValue) {
718 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 717 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
719 exceptionState.throwIfNeeded();
720 return; 718 return;
721 } 719 }
722 impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue); 720 impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue);
723 } 721 }
724 722
725 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCall back(const v8::FunctionCallbackInfo<v8::Value>& info) 723 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCall back(const v8::FunctionCallbackInfo<v8::Value>& info)
726 { 724 {
727 v8::Local<v8::Value> v8Value = info[0]; 725 v8::Local<v8::Value> v8Value = info[0];
728 TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnab ledAttributeAttributeSetter(v8Value, info); 726 TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnab ledAttributeAttributeSetter(v8Value, info);
729 } 727 }
(...skipping 11 matching lines...) Expand all
741 } 739 }
742 740
743 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 741 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
744 { 742 {
745 v8::Local<v8::Object> holder = info.Holder(); 743 v8::Local<v8::Object> holder = info.Holder();
746 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW orkerExposedRuntimeEnabledAttribute", "TestInterface", holder, info.GetIsolate() ); 744 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW orkerExposedRuntimeEnabledAttribute", "TestInterface", holder, info.GetIsolate() );
747 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 745 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
748 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 746 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
749 if (!cppValue) { 747 if (!cppValue) {
750 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 748 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
751 exceptionState.throwIfNeeded();
752 return; 749 return;
753 } 750 }
754 impl->setSecureContextWorkerExposedRuntimeEnabledAttribute(cppValue); 751 impl->setSecureContextWorkerExposedRuntimeEnabledAttribute(cppValue);
755 } 752 }
756 753
757 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCall back(const v8::FunctionCallbackInfo<v8::Value>& info) 754 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCall back(const v8::FunctionCallbackInfo<v8::Value>& info)
758 { 755 {
759 v8::Local<v8::Value> v8Value = info[0]; 756 v8::Local<v8::Value> v8Value = info[0];
760 TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnab ledAttributeAttributeSetter(v8Value, info); 757 TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnab ledAttributeAttributeSetter(v8Value, info);
761 } 758 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 } 844 }
848 845
849 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 846 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
850 { 847 {
851 v8::Local<v8::Object> holder = info.Holder(); 848 v8::Local<v8::Object> holder = info.Holder();
852 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterface", holder, info.GetIsolate()); 849 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterface", holder, info.GetIsolate());
853 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 850 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
854 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 851 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
855 if (!cppValue) { 852 if (!cppValue) {
856 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 853 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
857 exceptionState.throwIfNeeded();
858 return; 854 return;
859 } 855 }
860 impl->setImplementsNodeAttribute(cppValue); 856 impl->setImplementsNodeAttribute(cppValue);
861 } 857 }
862 858
863 static void implementsNodeAttributeAttributeSetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 859 static void implementsNodeAttributeAttributeSetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
864 { 860 {
865 v8::Local<v8::Value> v8Value = info[0]; 861 v8::Local<v8::Value> v8Value = info[0];
866 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette r(v8Value, info); 862 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette r(v8Value, info);
867 } 863 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 } 902 }
907 903
908 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 904 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
909 { 905 {
910 v8::Local<v8::Object> holder = info.Holder(); 906 v8::Local<v8::Object> holder = info.Holder();
911 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); 907 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate());
912 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 908 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
913 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 909 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
914 if (!cppValue) { 910 if (!cppValue) {
915 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 911 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
916 exceptionState.throwIfNeeded();
917 return; 912 return;
918 } 913 }
919 impl->setImplementsRuntimeEnabledNodeAttribute(cppValue); 914 impl->setImplementsRuntimeEnabledNodeAttribute(cppValue);
920 } 915 }
921 916
922 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 917 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
923 { 918 {
924 v8::Local<v8::Value> v8Value = info[0]; 919 v8::Local<v8::Value> v8Value = info[0];
925 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeSetter(v8Value, info); 920 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeSetter(v8Value, info);
926 } 921 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 { 1035 {
1041 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(i nfo); 1036 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(i nfo);
1042 } 1037 }
1043 1038
1044 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info) 1039 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info)
1045 { 1040 {
1046 v8::Local<v8::Object> holder = info.Holder(); 1041 v8::Local<v8::Object> holder = info.Holder();
1047 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt ribute", "TestInterface", holder, info.GetIsolate()); 1042 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt ribute", "TestInterface", holder, info.GetIsolate());
1048 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1043 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1049 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 1044 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
1050 if (exceptionState.throwIfNeeded()) 1045 if (exceptionState.hadException())
1051 return; 1046 return;
1052 TestInterfacePartial::setPartialLongAttribute(*impl, cppValue); 1047 TestInterfacePartial::setPartialLongAttribute(*impl, cppValue);
1053 } 1048 }
1054 1049
1055 static void partialLongAttributeAttributeSetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 1050 static void partialLongAttributeAttributeSetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
1056 { 1051 {
1057 v8::Local<v8::Value> v8Value = info[0]; 1052 v8::Local<v8::Value> v8Value = info[0];
1058 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v 8Value, info); 1053 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetter(v 8Value, info);
1059 } 1054 }
1060 1055
1061 static void partialStaticLongAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) 1056 static void partialStaticLongAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info)
1062 { 1057 {
1063 v8SetReturnValueInt(info, TestInterfacePartial::partialStaticLongAttribute() ); 1058 v8SetReturnValueInt(info, TestInterfacePartial::partialStaticLongAttribute() );
1064 } 1059 }
1065 1060
1066 static void partialStaticLongAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 1061 static void partialStaticLongAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
1067 { 1062 {
1068 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGe tter(info); 1063 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGe tter(info);
1069 } 1064 }
1070 1065
1071 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) 1066 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info)
1072 { 1067 {
1073 v8::Local<v8::Object> holder = info.Holder(); 1068 v8::Local<v8::Object> holder = info.Holder();
1074 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL ongAttribute", "TestInterface", holder, info.GetIsolate()); 1069 ExceptionState exceptionState(ExceptionState::SetterContext, "partialStaticL ongAttribute", "TestInterface", holder, info.GetIsolate());
1075 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 1070 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
1076 if (exceptionState.throwIfNeeded()) 1071 if (exceptionState.hadException())
1077 return; 1072 return;
1078 TestInterfacePartial::setPartialStaticLongAttribute(cppValue); 1073 TestInterfacePartial::setPartialStaticLongAttribute(cppValue);
1079 } 1074 }
1080 1075
1081 static void partialStaticLongAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 1076 static void partialStaticLongAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
1082 { 1077 {
1083 v8::Local<v8::Value> v8Value = info[0]; 1078 v8::Local<v8::Value> v8Value = info[0];
1084 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe tter(v8Value, info); 1079 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe tter(v8Value, info);
1085 } 1080 }
1086 1081
1087 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::FunctionCallbackInfo<v8::Value>& info) 1082 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::FunctionCallbackInfo<v8::Value>& info)
1088 { 1083 {
1089 v8::Local<v8::Object> holder = info.Holder(); 1084 v8::Local<v8::Object> holder = info.Holder();
1090 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1085 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1091 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 1086 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1092 v8SetReturnValueInt(info, TestInterfacePartial::partialCallWithExecutionCont extLongAttribute(executionContext, *impl)); 1087 v8SetReturnValueInt(info, TestInterfacePartial::partialCallWithExecutionCont extLongAttribute(executionContext, *impl));
1093 } 1088 }
1094 1089
1095 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( const v8::FunctionCallbackInfo<v8::Value>& info) 1090 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
1096 { 1091 {
1097 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeGetter(info); 1092 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeGetter(info);
1098 } 1093 }
1099 1094
1100 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1095 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
1101 { 1096 {
1102 v8::Local<v8::Object> holder = info.Holder(); 1097 v8::Local<v8::Object> holder = info.Holder();
1103 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); 1098 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate());
1104 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1099 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1105 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 1100 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
1106 if (exceptionState.throwIfNeeded()) 1101 if (exceptionState.hadException())
1107 return; 1102 return;
1108 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 1103 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1109 TestInterfacePartial::setPartialCallWithExecutionContextLongAttribute(execut ionContext, *impl, cppValue); 1104 TestInterfacePartial::setPartialCallWithExecutionContextLongAttribute(execut ionContext, *impl, cppValue);
1110 } 1105 }
1111 1106
1112 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback( const v8::FunctionCallbackInfo<v8::Value>& info) 1107 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
1113 { 1108 {
1114 v8::Local<v8::Value> v8Value = info[0]; 1109 v8::Local<v8::Value> v8Value = info[0];
1115 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeSetter(v8Value, info); 1110 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeSetter(v8Value, info);
1116 } 1111 }
(...skipping 17 matching lines...) Expand all
1134 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1129 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1135 V8StringResource<> cppValue = v8Value; 1130 V8StringResource<> cppValue = v8Value;
1136 if (!cppValue.prepare()) 1131 if (!cppValue.prepare())
1137 return; 1132 return;
1138 const char* validValues[] = { 1133 const char* validValues[] = {
1139 "foo", 1134 "foo",
1140 "bar", 1135 "bar",
1141 }; 1136 };
1142 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Part ialEnumType", exceptionState)) { 1137 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Part ialEnumType", exceptionState)) {
1143 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); 1138 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message()));
1139 // http://heycam.github.io/webidl/#idl-enums
1140 // Assignment of an invalid string value to an attribute is ignored,
1141 // while passing such a value as an operation argument results in
1142 // an exception being thrown.
1143 exceptionState.clearException();
1144 return; 1144 return;
1145 } 1145 }
1146 TestInterfacePartial::setPartialPartialEnumTypeAttribute(*impl, cppValue); 1146 TestInterfacePartial::setPartialPartialEnumTypeAttribute(*impl, cppValue);
1147 } 1147 }
1148 1148
1149 static void partialPartialEnumTypeAttributeAttributeSetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 1149 static void partialPartialEnumTypeAttributeAttributeSetterCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
1150 { 1150 {
1151 v8::Local<v8::Value> v8Value = info[0]; 1151 v8::Local<v8::Value> v8Value = info[0];
1152 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib uteSetter(v8Value, info); 1152 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib uteSetter(v8Value, info);
1153 } 1153 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 { 1194 {
1195 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter( info); 1195 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter( info);
1196 } 1196 }
1197 1197
1198 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) 1198 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info)
1199 { 1199 {
1200 v8::Local<v8::Object> holder = info.Holder(); 1200 v8::Local<v8::Object> holder = info.Holder();
1201 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt tribute", "TestInterface", holder, info.GetIsolate()); 1201 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt tribute", "TestInterface", holder, info.GetIsolate());
1202 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1202 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1203 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 1203 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
1204 if (exceptionState.throwIfNeeded()) 1204 if (exceptionState.hadException())
1205 return; 1205 return;
1206 TestInterfacePartial2Implementation::setPartial2LongAttribute(*impl, cppValu e); 1206 TestInterfacePartial2Implementation::setPartial2LongAttribute(*impl, cppValu e);
1207 } 1207 }
1208 1208
1209 static void partial2LongAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 1209 static void partial2LongAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
1210 { 1210 {
1211 v8::Local<v8::Value> v8Value = info[0]; 1211 v8::Local<v8::Value> v8Value = info[0];
1212 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter( v8Value, info); 1212 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter( v8Value, info);
1213 } 1213 }
1214 1214
1215 static void partial2StaticLongAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) 1215 static void partial2StaticLongAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info)
1216 { 1216 {
1217 v8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2Stati cLongAttribute()); 1217 v8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2Stati cLongAttribute());
1218 } 1218 }
1219 1219
1220 static void partial2StaticLongAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 1220 static void partial2StaticLongAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
1221 { 1221 {
1222 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeG etter(info); 1222 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeG etter(info);
1223 } 1223 }
1224 1224
1225 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) 1225 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info)
1226 { 1226 {
1227 v8::Local<v8::Object> holder = info.Holder(); 1227 v8::Local<v8::Object> holder = info.Holder();
1228 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static LongAttribute", "TestInterface", holder, info.GetIsolate()); 1228 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Static LongAttribute", "TestInterface", holder, info.GetIsolate());
1229 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 1229 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
1230 if (exceptionState.throwIfNeeded()) 1230 if (exceptionState.hadException())
1231 return; 1231 return;
1232 TestInterfacePartial2Implementation::setPartial2StaticLongAttribute(cppValue ); 1232 TestInterfacePartial2Implementation::setPartial2StaticLongAttribute(cppValue );
1233 } 1233 }
1234 1234
1235 static void partial2StaticLongAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 1235 static void partial2StaticLongAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
1236 { 1236 {
1237 v8::Local<v8::Value> v8Value = info[0]; 1237 v8::Local<v8::Value> v8Value = info[0];
1238 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS etter(v8Value, info); 1238 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS etter(v8Value, info);
1239 } 1239 }
1240 1240
(...skipping 10 matching lines...) Expand all
1251 } 1251 }
1252 1252
1253 static void partial2SecureContextAttributeAttributeSetter(v8::Local<v8::Value> v 8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1253 static void partial2SecureContextAttributeAttributeSetter(v8::Local<v8::Value> v 8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
1254 { 1254 {
1255 v8::Local<v8::Object> holder = info.Holder(); 1255 v8::Local<v8::Object> holder = info.Holder();
1256 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Secure ContextAttribute", "TestInterface", holder, info.GetIsolate()); 1256 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2Secure ContextAttribute", "TestInterface", holder, info.GetIsolate());
1257 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1257 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1258 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1258 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1259 if (!cppValue) { 1259 if (!cppValue) {
1260 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 1260 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
1261 exceptionState.throwIfNeeded();
1262 return; 1261 return;
1263 } 1262 }
1264 TestInterfacePartial2Implementation::setPartial2SecureContextAttribute(*impl , cppValue); 1263 TestInterfacePartial2Implementation::setPartial2SecureContextAttribute(*impl , cppValue);
1265 } 1264 }
1266 1265
1267 static void partial2SecureContextAttributeAttributeSetterCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 1266 static void partial2SecureContextAttributeAttributeSetterCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
1268 { 1267 {
1269 v8::Local<v8::Value> v8Value = info[0]; 1268 v8::Local<v8::Value> v8Value = info[0];
1270 TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttribu teSetter(v8Value, info); 1269 TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttribu teSetter(v8Value, info);
1271 } 1270 }
(...skipping 11 matching lines...) Expand all
1283 } 1282 }
1284 1283
1285 static void partialSecureContextAttributeAttributeSetter(v8::Local<v8::Value> v8 Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1284 static void partialSecureContextAttributeAttributeSetter(v8::Local<v8::Value> v8 Value, const v8::FunctionCallbackInfo<v8::Value>& info)
1286 { 1285 {
1287 v8::Local<v8::Object> holder = info.Holder(); 1286 v8::Local<v8::Object> holder = info.Holder();
1288 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextAttribute", "TestInterface", holder, info.GetIsolate()); 1287 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextAttribute", "TestInterface", holder, info.GetIsolate());
1289 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1288 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1290 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1289 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1291 if (!cppValue) { 1290 if (!cppValue) {
1292 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 1291 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
1293 exceptionState.throwIfNeeded();
1294 return; 1292 return;
1295 } 1293 }
1296 TestInterfacePartialSecureContext::setPartialSecureContextAttribute(*impl, c ppValue); 1294 TestInterfacePartialSecureContext::setPartialSecureContextAttribute(*impl, c ppValue);
1297 } 1295 }
1298 1296
1299 static void partialSecureContextAttributeAttributeSetterCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 1297 static void partialSecureContextAttributeAttributeSetterCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
1300 { 1298 {
1301 v8::Local<v8::Value> v8Value = info[0]; 1299 v8::Local<v8::Value> v8Value = info[0];
1302 TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttribut eSetter(v8Value, info); 1300 TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttribut eSetter(v8Value, info);
1303 } 1301 }
(...skipping 11 matching lines...) Expand all
1315 } 1313 }
1316 1314
1317 static void partialSecureContextRuntimeEnabledAttributeAttributeSetter(v8::Local <v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1315 static void partialSecureContextRuntimeEnabledAttributeAttributeSetter(v8::Local <v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
1318 { 1316 {
1319 v8::Local<v8::Object> holder = info.Holder(); 1317 v8::Local<v8::Object> holder = info.Holder();
1320 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextRuntimeEnabledAttribute", "TestInterface", holder, info.GetIsolate()); 1318 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextRuntimeEnabledAttribute", "TestInterface", holder, info.GetIsolate());
1321 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1319 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1322 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1320 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1323 if (!cppValue) { 1321 if (!cppValue) {
1324 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 1322 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
1325 exceptionState.throwIfNeeded();
1326 return; 1323 return;
1327 } 1324 }
1328 TestInterfacePartialSecureContext::setPartialSecureContextRuntimeEnabledAttr ibute(*impl, cppValue); 1325 TestInterfacePartialSecureContext::setPartialSecureContextRuntimeEnabledAttr ibute(*impl, cppValue);
1329 } 1326 }
1330 1327
1331 static void partialSecureContextRuntimeEnabledAttributeAttributeSetterCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) 1328 static void partialSecureContextRuntimeEnabledAttributeAttributeSetterCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info)
1332 { 1329 {
1333 v8::Local<v8::Value> v8Value = info[0]; 1330 v8::Local<v8::Value> v8Value = info[0];
1334 TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAtt ributeAttributeSetter(v8Value, info); 1331 TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAtt ributeAttributeSetter(v8Value, info);
1335 } 1332 }
(...skipping 11 matching lines...) Expand all
1347 } 1344 }
1348 1345
1349 static void partialSecureContextWindowExposedAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1346 static void partialSecureContextWindowExposedAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
1350 { 1347 {
1351 v8::Local<v8::Object> holder = info.Holder(); 1348 v8::Local<v8::Object> holder = info.Holder();
1352 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextWindowExposedAttribute", "TestInterface", holder, info.GetIsolate()); 1349 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextWindowExposedAttribute", "TestInterface", holder, info.GetIsolate());
1353 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1350 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1354 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1351 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1355 if (!cppValue) { 1352 if (!cppValue) {
1356 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 1353 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
1357 exceptionState.throwIfNeeded();
1358 return; 1354 return;
1359 } 1355 }
1360 TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedAttri bute(*impl, cppValue); 1356 TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedAttri bute(*impl, cppValue);
1361 } 1357 }
1362 1358
1363 static void partialSecureContextWindowExposedAttributeAttributeSetterCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info) 1359 static void partialSecureContextWindowExposedAttributeAttributeSetterCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info)
1364 { 1360 {
1365 v8::Local<v8::Value> v8Value = info[0]; 1361 v8::Local<v8::Value> v8Value = info[0];
1366 TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttr ibuteAttributeSetter(v8Value, info); 1362 TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttr ibuteAttributeSetter(v8Value, info);
1367 } 1363 }
(...skipping 11 matching lines...) Expand all
1379 } 1375 }
1380 1376
1381 static void partialSecureContextWorkerExposedAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1377 static void partialSecureContextWorkerExposedAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
1382 { 1378 {
1383 v8::Local<v8::Object> holder = info.Holder(); 1379 v8::Local<v8::Object> holder = info.Holder();
1384 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextWorkerExposedAttribute", "TestInterface", holder, info.GetIsolate()); 1380 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextWorkerExposedAttribute", "TestInterface", holder, info.GetIsolate());
1385 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1381 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1386 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1382 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1387 if (!cppValue) { 1383 if (!cppValue) {
1388 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 1384 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
1389 exceptionState.throwIfNeeded();
1390 return; 1385 return;
1391 } 1386 }
1392 TestInterfacePartialSecureContext::setPartialSecureContextWorkerExposedAttri bute(*impl, cppValue); 1387 TestInterfacePartialSecureContext::setPartialSecureContextWorkerExposedAttri bute(*impl, cppValue);
1393 } 1388 }
1394 1389
1395 static void partialSecureContextWorkerExposedAttributeAttributeSetterCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info) 1390 static void partialSecureContextWorkerExposedAttributeAttributeSetterCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info)
1396 { 1391 {
1397 v8::Local<v8::Value> v8Value = info[0]; 1392 v8::Local<v8::Value> v8Value = info[0];
1398 TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttr ibuteAttributeSetter(v8Value, info); 1393 TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttr ibuteAttributeSetter(v8Value, info);
1399 } 1394 }
(...skipping 11 matching lines...) Expand all
1411 } 1406 }
1412 1407
1413 static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSet ter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& inf o) 1408 static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSet ter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& inf o)
1414 { 1409 {
1415 v8::Local<v8::Object> holder = info.Holder(); 1410 v8::Local<v8::Object> holder = info.Holder();
1416 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextWindowExposedRuntimeEnabledAttribute", "TestInterface", holder, info.GetIs olate()); 1411 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextWindowExposedRuntimeEnabledAttribute", "TestInterface", holder, info.GetIs olate());
1417 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1412 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1418 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1413 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1419 if (!cppValue) { 1414 if (!cppValue) {
1420 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 1415 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
1421 exceptionState.throwIfNeeded();
1422 return; 1416 return;
1423 } 1417 }
1424 TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedRunti meEnabledAttribute(*impl, cppValue); 1418 TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedRunti meEnabledAttribute(*impl, cppValue);
1425 } 1419 }
1426 1420
1427 static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSet terCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 1421 static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSet terCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
1428 { 1422 {
1429 v8::Local<v8::Value> v8Value = info[0]; 1423 v8::Local<v8::Value> v8Value = info[0];
1430 TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRunt imeEnabledAttributeAttributeSetter(v8Value, info); 1424 TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRunt imeEnabledAttributeAttributeSetter(v8Value, info);
1431 } 1425 }
(...skipping 11 matching lines...) Expand all
1443 } 1437 }
1444 1438
1445 static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSet ter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& inf o) 1439 static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSet ter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& inf o)
1446 { 1440 {
1447 v8::Local<v8::Object> holder = info.Holder(); 1441 v8::Local<v8::Object> holder = info.Holder();
1448 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextWorkerExposedRuntimeEnabledAttribute", "TestInterface", holder, info.GetIs olate()); 1442 ExceptionState exceptionState(ExceptionState::SetterContext, "partialSecureC ontextWorkerExposedRuntimeEnabledAttribute", "TestInterface", holder, info.GetIs olate());
1449 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1443 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1450 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1444 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1451 if (!cppValue) { 1445 if (!cppValue) {
1452 exceptionState.throwTypeError("The provided value is not of type 'bool'. "); 1446 exceptionState.throwTypeError("The provided value is not of type 'bool'. ");
1453 exceptionState.throwIfNeeded();
1454 return; 1447 return;
1455 } 1448 }
1456 TestInterfacePartialSecureContext::setPartialSecureContextWorkerExposedRunti meEnabledAttribute(*impl, cppValue); 1449 TestInterfacePartialSecureContext::setPartialSecureContextWorkerExposedRunti meEnabledAttribute(*impl, cppValue);
1457 } 1450 }
1458 1451
1459 static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSet terCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 1452 static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSet terCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
1460 { 1453 {
1461 v8::Local<v8::Value> v8Value = info[0]; 1454 v8::Local<v8::Value> v8Value = info[0];
1462 TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRunt imeEnabledAttributeAttributeSetter(v8Value, info); 1455 TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRunt imeEnabledAttributeAttributeSetter(v8Value, info);
1463 } 1456 }
(...skipping 19 matching lines...) Expand all
1483 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 1476 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
1484 { 1477 {
1485 TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod (info); 1478 TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod (info);
1486 } 1479 }
1487 1480
1488 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 1481 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
1489 { 1482 {
1490 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleArgFloatArg", "TestInterface", info.Holder(), info.GetIsolate()); 1483 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleArgFloatArg", "TestInterface", info.Holder(), info.GetIsolate());
1491 if (UNLIKELY(info.Length() < 2)) { 1484 if (UNLIKELY(info.Length() < 2)) {
1492 setMinimumArityTypeError(exceptionState, 2, info.Length()); 1485 setMinimumArityTypeError(exceptionState, 2, info.Length());
1493 exceptionState.throwIfNeeded();
1494 return; 1486 return;
1495 } 1487 }
1496 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1488 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1497 double doubleArg; 1489 double doubleArg;
1498 float floatArg; 1490 float floatArg;
1499 { 1491 {
1500 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e); 1492 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e);
1501 if (exceptionState.throwIfNeeded()) 1493 if (exceptionState.hadException())
1502 return; 1494 return;
1503 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState) ; 1495 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState) ;
1504 if (exceptionState.throwIfNeeded()) 1496 if (exceptionState.hadException())
1505 return; 1497 return;
1506 } 1498 }
1507 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); 1499 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg);
1508 } 1500 }
1509 1501
1510 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 1502 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
1511 { 1503 {
1512 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf o); 1504 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf o);
1513 } 1505 }
1514 1506
1515 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info) 1507 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info)
1516 { 1508 {
1517 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface", info.Holder(), info. GetIsolate()); 1509 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface", info.Holder(), info. GetIsolate());
1518 if (UNLIKELY(info.Length() < 2)) { 1510 if (UNLIKELY(info.Length() < 2)) {
1519 setMinimumArityTypeError(exceptionState, 2, info.Length()); 1511 setMinimumArityTypeError(exceptionState, 2, info.Length());
1520 exceptionState.throwIfNeeded();
1521 return; 1512 return;
1522 } 1513 }
1523 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1514 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1524 double unrestrictedDoubleArg; 1515 double unrestrictedDoubleArg;
1525 float unrestrictedFloatArg; 1516 float unrestrictedFloatArg;
1526 { 1517 {
1527 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt ate); 1518 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt ate);
1528 if (exceptionState.throwIfNeeded()) 1519 if (exceptionState.hadException())
1529 return; 1520 return;
1530 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat e); 1521 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat e);
1531 if (exceptionState.throwIfNeeded()) 1522 if (exceptionState.hadException())
1532 return; 1523 return;
1533 } 1524 }
1534 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble Arg, unrestrictedFloatArg); 1525 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble Arg, unrestrictedFloatArg);
1535 } 1526 }
1536 1527
1537 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info) 1528 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info)
1538 { 1529 {
1539 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest rictedFloatArgMethod(info); 1530 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest rictedFloatArgMethod(info);
1540 } 1531 }
1541 1532
1542 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 1533 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
1543 { 1534 {
1544 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estEnumArg", "TestInterface", info.Holder(), info.GetIsolate()); 1535 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estEnumArg", "TestInterface", info.Holder(), info.GetIsolate());
1545 if (UNLIKELY(info.Length() < 1)) { 1536 if (UNLIKELY(info.Length() < 1)) {
1546 setMinimumArityTypeError(exceptionState, 1, info.Length()); 1537 setMinimumArityTypeError(exceptionState, 1, info.Length());
1547 exceptionState.throwIfNeeded();
1548 return; 1538 return;
1549 } 1539 }
1550 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1540 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1551 V8StringResource<> testEnumArg; 1541 V8StringResource<> testEnumArg;
1552 { 1542 {
1553 testEnumArg = info[0]; 1543 testEnumArg = info[0];
1554 if (!testEnumArg.prepare()) 1544 if (!testEnumArg.prepare())
1555 return; 1545 return;
1556 const char* validValues[] = { 1546 const char* validValues[] = {
1557 "", 1547 "",
1558 "EnumValue1", 1548 "EnumValue1",
1559 "EnumValue2", 1549 "EnumValue2",
1560 "EnumValue3", 1550 "EnumValue3",
1561 }; 1551 };
1562 if (!isValidEnum(testEnumArg, validValues, WTF_ARRAY_LENGTH(validValues) , "TestEnum", exceptionState)) { 1552 if (!isValidEnum(testEnumArg, validValues, WTF_ARRAY_LENGTH(validValues) , "TestEnum", exceptionState)) {
1563 exceptionState.throwIfNeeded();
1564 return; 1553 return;
1565 } 1554 }
1566 } 1555 }
1567 impl->voidMethodTestEnumArg(testEnumArg); 1556 impl->voidMethodTestEnumArg(testEnumArg);
1568 } 1557 }
1569 1558
1570 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 1559 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
1571 { 1560 {
1572 TestInterfaceImplementationV8Internal::voidMethodTestEnumArgMethod(info); 1561 TestInterfaceImplementationV8Internal::voidMethodTestEnumArgMethod(info);
1573 } 1562 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFla gMethod(info); 1667 TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFla gMethod(info);
1679 } 1668 }
1680 1669
1681 static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::Func tionCallbackInfo<v8::Value>& info) 1670 static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::Func tionCallbackInfo<v8::Value>& info)
1682 { 1671 {
1683 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadMet hodWithExposedAndRuntimeEnabledFlag", "TestInterface", info.Holder(), info.GetIs olate()); 1672 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadMet hodWithExposedAndRuntimeEnabledFlag", "TestInterface", info.Holder(), info.GetIs olate());
1684 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1673 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1685 int longArg; 1674 int longArg;
1686 { 1675 {
1687 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 1676 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState);
1688 if (exceptionState.throwIfNeeded()) 1677 if (exceptionState.hadException())
1689 return; 1678 return;
1690 } 1679 }
1691 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(longArg); 1680 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(longArg);
1692 } 1681 }
1693 1682
1694 static void overloadMethodWithExposedAndRuntimeEnabledFlag2Method(const v8::Func tionCallbackInfo<v8::Value>& info) 1683 static void overloadMethodWithExposedAndRuntimeEnabledFlag2Method(const v8::Func tionCallbackInfo<v8::Value>& info)
1695 { 1684 {
1696 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1685 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1697 V8StringResource<> string; 1686 V8StringResource<> string;
1698 { 1687 {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 if (true) { 1730 if (true) {
1742 overloadMethodWithExposedAndRuntimeEnabledFlag1Method(info); 1731 overloadMethodWithExposedAndRuntimeEnabledFlag1Method(info);
1743 return; 1732 return;
1744 } 1733 }
1745 break; 1734 break;
1746 default: 1735 default:
1747 break; 1736 break;
1748 } 1737 }
1749 if (info.Length() < 1) { 1738 if (info.Length() < 1) {
1750 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 1739 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
1751 exceptionState.throwIfNeeded();
1752 return; 1740 return;
1753 } 1741 }
1754 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 1742 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
1755 exceptionState.throwIfNeeded();
1756 return; 1743 return;
1757 } 1744 }
1758 1745
1759 static void overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 1746 static void overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
1760 { 1747 {
1761 TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEn abledFlagMethod(info); 1748 TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEn abledFlagMethod(info);
1762 } 1749 }
1763 1750
1764 static void methodWithExposedHavingRuntimeEnabldFlagMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 1751 static void methodWithExposedHavingRuntimeEnabldFlagMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
1765 { 1752 {
(...skipping 23 matching lines...) Expand all
1789 impl->voidMethodPartialOverload(); 1776 impl->voidMethodPartialOverload();
1790 } 1777 }
1791 1778
1792 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8:: Value>& info) 1779 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8:: Value>& info)
1793 { 1780 {
1794 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); 1781 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP artialOverload", "TestInterface", info.Holder(), info.GetIsolate());
1795 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1782 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1796 double doubleArg; 1783 double doubleArg;
1797 { 1784 {
1798 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e); 1785 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e);
1799 if (exceptionState.throwIfNeeded()) 1786 if (exceptionState.hadException())
1800 return; 1787 return;
1801 } 1788 }
1802 impl->voidMethodPartialOverload(doubleArg); 1789 impl->voidMethodPartialOverload(doubleArg);
1803 } 1790 }
1804 1791
1805 static void staticVoidMethodPartialOverload1Method(const v8::FunctionCallbackInf o<v8::Value>& info) 1792 static void staticVoidMethodPartialOverload1Method(const v8::FunctionCallbackInf o<v8::Value>& info)
1806 { 1793 {
1807 TestInterfaceImplementation::staticVoidMethodPartialOverload(); 1794 TestInterfaceImplementation::staticVoidMethodPartialOverload();
1808 } 1795 }
1809 1796
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1926 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 1913 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
1927 { 1914 {
1928 TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info); 1915 TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info);
1929 } 1916 }
1930 1917
1931 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 1918 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
1932 { 1919 {
1933 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterface", info.Holder(), info.GetIsolate()); 1920 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterface", info.Holder(), info.GetIsolate());
1934 if (UNLIKELY(info.Length() < 2)) { 1921 if (UNLIKELY(info.Length() < 2)) {
1935 setMinimumArityTypeError(exceptionState, 2, info.Length()); 1922 setMinimumArityTypeError(exceptionState, 2, info.Length());
1936 exceptionState.throwIfNeeded();
1937 return; 1923 return;
1938 } 1924 }
1939 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1925 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1940 V8StringResource<> strArg; 1926 V8StringResource<> strArg;
1941 TestInterfaceEmpty* testInterfaceEmptyArg; 1927 TestInterfaceEmpty* testInterfaceEmptyArg;
1942 { 1928 {
1943 strArg = info[0]; 1929 strArg = info[0];
1944 if (!strArg.prepare()) 1930 if (!strArg.prepare())
1945 return; 1931 return;
1946 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[1]); 1932 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[1]);
1947 if (!testInterfaceEmptyArg) { 1933 if (!testInterfaceEmptyArg) {
1948 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter faceEmpty'."); 1934 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter faceEmpty'.");
1949 exceptionState.throwIfNeeded();
1950 return; 1935 return;
1951 } 1936 }
1952 } 1937 }
1953 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 1938 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1954 TestInterfaceEmpty* result = impl->implementsComplexMethod(executionContext, strArg, testInterfaceEmptyArg, exceptionState); 1939 TestInterfaceEmpty* result = impl->implementsComplexMethod(executionContext, strArg, testInterfaceEmptyArg, exceptionState);
1955 if (exceptionState.hadException()) { 1940 if (exceptionState.hadException()) {
1956 exceptionState.throwIfNeeded();
1957 return; 1941 return;
1958 } 1942 }
1959 v8SetReturnValue(info, result); 1943 v8SetReturnValue(info, result);
1960 } 1944 }
1961 1945
1962 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 1946 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
1963 { 1947 {
1964 TestInterfaceImplementationV8Internal::implementsComplexMethodMethod(info); 1948 TestInterfaceImplementationV8Internal::implementsComplexMethodMethod(info);
1965 } 1949 }
1966 1950
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
2030 static void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 2014 static void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
2031 { 2015 {
2032 TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethod(info); 2016 TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethod(info);
2033 } 2017 }
2034 2018
2035 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 2019 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
2036 { 2020 {
2037 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate()); 2021 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate());
2038 if (UNLIKELY(info.Length() < 1)) { 2022 if (UNLIKELY(info.Length() < 1)) {
2039 setMinimumArityTypeError(exceptionState, 1, info.Length()); 2023 setMinimumArityTypeError(exceptionState, 1, info.Length());
2040 exceptionState.throwIfNeeded();
2041 return; 2024 return;
2042 } 2025 }
2043 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2026 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2044 int longArg; 2027 int longArg;
2045 { 2028 {
2046 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 2029 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState);
2047 if (exceptionState.throwIfNeeded()) 2030 if (exceptionState.hadException())
2048 return; 2031 return;
2049 } 2032 }
2050 TestInterfacePartial::partialVoidMethodLongArg(*impl, longArg); 2033 TestInterfacePartial::partialVoidMethodLongArg(*impl, longArg);
2051 } 2034 }
2052 2035
2053 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 2036 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
2054 { 2037 {
2055 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info); 2038 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info);
2056 } 2039 }
2057 2040
2058 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 2041 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2059 { 2042 {
2060 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); 2043 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
2061 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2044 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2062 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 2045 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
2063 TestInterfacePartial::partialCallWithExecutionContextRaisesExceptionVoidMeth od(executionContext, *impl, exceptionState); 2046 TestInterfacePartial::partialCallWithExecutionContextRaisesExceptionVoidMeth od(executionContext, *impl, exceptionState);
2064 if (exceptionState.hadException()) { 2047 if (exceptionState.hadException()) {
2065 exceptionState.throwIfNeeded();
2066 return; 2048 return;
2067 } 2049 }
2068 } 2050 }
2069 2051
2070 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 2052 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
2071 { 2053 {
2072 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaises ExceptionVoidMethodMethod(info); 2054 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaises ExceptionVoidMethodMethod(info);
2073 } 2055 }
2074 2056
2075 static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall backInfo<v8::Value>& info) 2057 static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
(...skipping 17 matching lines...) Expand all
2093 static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 2075 static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
2094 { 2076 {
2095 TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeA rgMethod(info); 2077 TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeA rgMethod(info);
2096 } 2078 }
2097 2079
2098 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v 8::FunctionCallbackInfo<v8::Value>& info) 2080 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v 8::FunctionCallbackInfo<v8::Value>& info)
2099 { 2081 {
2100 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestInterface", info.Holder(), in fo.GetIsolate()); 2082 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestInterface", info.Holder(), in fo.GetIsolate());
2101 if (UNLIKELY(info.Length() < 1)) { 2083 if (UNLIKELY(info.Length() < 1)) {
2102 setMinimumArityTypeError(exceptionState, 1, info.Length()); 2084 setMinimumArityTypeError(exceptionState, 1, info.Length());
2103 exceptionState.throwIfNeeded();
2104 return; 2085 return;
2105 } 2086 }
2106 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2087 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2107 int value; 2088 int value;
2108 { 2089 {
2109 value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionS tate); 2090 value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionS tate);
2110 if (exceptionState.throwIfNeeded()) 2091 if (exceptionState.hadException())
2111 return; 2092 return;
2112 } 2093 }
2113 int result = 0; 2094 int result = 0;
2114 if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplemented InPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCu rrentContext())), impl, value, &result)) 2095 if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplemented InPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCu rrentContext())), impl, value, &result))
2115 return; 2096 return;
2116 v8SetReturnValueInt(info, result); 2097 v8SetReturnValueInt(info, result);
2117 } 2098 }
2118 2099
2119 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info) 2100 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info)
2120 { 2101 {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info); 2334 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info);
2354 } 2335 }
2355 2336
2356 static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 2337 static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2357 { 2338 {
2358 ExceptionState exceptionState(ExceptionState::ExecutionContext, "toJSON", "T estInterface", info.Holder(), info.GetIsolate()); 2339 ExceptionState exceptionState(ExceptionState::ExecutionContext, "toJSON", "T estInterface", info.Holder(), info.GetIsolate());
2359 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2340 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2360 ScriptState* scriptState = ScriptState::forReceiverObject(info); 2341 ScriptState* scriptState = ScriptState::forReceiverObject(info);
2361 ScriptValue result = impl->toJSONForBinding(scriptState, exceptionState); 2342 ScriptValue result = impl->toJSONForBinding(scriptState, exceptionState);
2362 if (exceptionState.hadException()) { 2343 if (exceptionState.hadException()) {
2363 exceptionState.throwIfNeeded();
2364 return; 2344 return;
2365 } 2345 }
2366 v8SetReturnValue(info, result.v8Value()); 2346 v8SetReturnValue(info, result.v8Value());
2367 } 2347 }
2368 2348
2369 static void toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 2349 static void toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
2370 { 2350 {
2371 TestInterfaceImplementationV8Internal::toJSONMethod(info); 2351 TestInterfaceImplementationV8Internal::toJSONMethod(info);
2372 } 2352 }
2373 2353
2374 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 2354 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2375 { 2355 {
2376 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2356 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2377 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); 2357 v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
2378 } 2358 }
2379 2359
2380 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 2360 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
2381 { 2361 {
2382 TestInterfaceImplementationV8Internal::toStringMethod(info); 2362 TestInterfaceImplementationV8Internal::toStringMethod(info);
2383 } 2363 }
2384 2364
2385 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 2365 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2386 { 2366 {
2387 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface", info.Holder(), info.GetIsolate()); 2367 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface", info.Holder(), info.GetIsolate());
2388 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2368 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2389 ScriptState* scriptState = ScriptState::forReceiverObject(info); 2369 ScriptState* scriptState = ScriptState::forReceiverObject(info);
2390 Iterator* result = impl->iterator(scriptState, exceptionState); 2370 Iterator* result = impl->iterator(scriptState, exceptionState);
2391 if (exceptionState.hadException()) { 2371 if (exceptionState.hadException()) {
2392 exceptionState.throwIfNeeded();
2393 return; 2372 return;
2394 } 2373 }
2395 v8SetReturnValue(info, result); 2374 v8SetReturnValue(info, result);
2396 } 2375 }
2397 2376
2398 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 2377 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
2399 { 2378 {
2400 TestInterfaceImplementationV8Internal::iteratorMethod(info); 2379 TestInterfaceImplementationV8Internal::iteratorMethod(info);
2401 } 2380 }
2402 2381
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2485 TestInterfaceImplementationV8Internal::namedPropertySetter(name, v8Value, in fo); 2464 TestInterfaceImplementationV8Internal::namedPropertySetter(name, v8Value, in fo);
2486 } 2465 }
2487 2466
2488 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb ackInfo<v8::Integer>& info) 2467 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb ackInfo<v8::Integer>& info)
2489 { 2468 {
2490 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2469 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2491 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); 2470 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>());
2492 v8::String::Utf8Value namedProperty(name); 2471 v8::String::Utf8Value namedProperty(name);
2493 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestInterface", info.Holder(), info.GetIsolate()); 2472 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestInterface", info.Holder(), info.GetIsolate());
2494 bool result = impl->namedPropertyQuery(propertyName, exceptionState); 2473 bool result = impl->namedPropertyQuery(propertyName, exceptionState);
2495 if (exceptionState.throwIfNeeded()) 2474 if (exceptionState.hadException())
2496 return; 2475 return;
2497 if (!result) 2476 if (!result)
2498 return; 2477 return;
2499 v8SetReturnValueInt(info, v8::None); 2478 v8SetReturnValueInt(info, v8::None);
2500 } 2479 }
2501 2480
2502 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope rtyCallbackInfo<v8::Integer>& info) 2481 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope rtyCallbackInfo<v8::Integer>& info)
2503 { 2482 {
2504 if (!name->IsString()) 2483 if (!name->IsString())
2505 return; 2484 return;
(...skipping 15 matching lines...) Expand all
2521 return; 2500 return;
2522 TestInterfaceImplementationV8Internal::namedPropertyDeleter(name, info); 2501 TestInterfaceImplementationV8Internal::namedPropertyDeleter(name, info);
2523 } 2502 }
2524 2503
2525 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo) 2504 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo)
2526 { 2505 {
2527 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 2506 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
2528 Vector<String> names; 2507 Vector<String> names;
2529 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter face", info.Holder(), info.GetIsolate()); 2508 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter face", info.Holder(), info.GetIsolate());
2530 impl->namedPropertyEnumerator(names, exceptionState); 2509 impl->namedPropertyEnumerator(names, exceptionState);
2531 if (exceptionState.throwIfNeeded()) 2510 if (exceptionState.hadException())
2532 return; 2511 return;
2533 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size( )); 2512 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size( ));
2534 for (size_t i = 0; i < names.size(); ++i) { 2513 for (size_t i = 0; i < names.size(); ++i) {
2535 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur rentContext(), i, v8String(info.GetIsolate(), names[i])))) 2514 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur rentContext(), i, v8String(info.GetIsolate(), names[i]))))
2536 return; 2515 return;
2537 } 2516 }
2538 v8SetReturnValue(info, v8names); 2517 v8SetReturnValue(info, v8names);
2539 } 2518 }
2540 2519
2541 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info) 2520 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info)
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
2988 2967
2989 ScriptState::Scope scope(scriptState); 2968 ScriptState::Scope scope(scriptState);
2990 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 2969 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
2991 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value); 2970 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value);
2992 v8::Local<v8::Value> argv[] = { valueHandle }; 2971 v8::Local<v8::Value> argv[] = { valueHandle };
2993 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestInterfaceImplementation", scr iptState->context()->Global(), scriptState->isolate()); 2972 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestInterfaceImplementation", scr iptState->context()->Global(), scriptState->isolate());
2994 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShortA rgumentImplementedInPrivateScript", holder, 1, argv); 2973 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShortA rgumentImplementedInPrivateScript", holder, 1, argv);
2995 if (v8Value.IsEmpty()) 2974 if (v8Value.IsEmpty())
2996 return false; 2975 return false;
2997 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex ceptionState); 2976 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex ceptionState);
2998 if (exceptionState.throwIfNeeded()) 2977 if (exceptionState.hadException())
2999 return false; 2978 return false;
3000 *result = cppValue; 2979 *result = cppValue;
3001 RELEASE_ASSERT(!exceptionState.hadException()); 2980 RELEASE_ASSERT(!exceptionState.hadException());
3002 return true; 2981 return true;
3003 } 2982 }
3004 2983
3005 bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String* result) 2984 bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String* result)
3006 { 2985 {
3007 if (!frame) 2986 if (!frame)
3008 return false; 2987 return false;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
3081 { 3060 {
3082 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method; 3061 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method;
3083 } 3062 }
3084 3063
3085 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 3064 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
3086 { 3065 {
3087 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method; 3066 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method;
3088 } 3067 }
3089 3068
3090 } // namespace blink 3069 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698