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

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

Issue 2733763003: Reimplement [PutForwards] per spec (Closed)
Patch Set: avoid using v8::Maybe Created 3 years, 7 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. 5 // This file has been auto-generated by code_generator_v8.py.
6 // DO NOT MODIFY! 6 // DO NOT MODIFY!
7 7
8 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 85 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
86 86
87 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceAttribute()), impl); 87 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceAttribute()), impl);
88 } 88 }
89 89
90 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 90 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
91 v8::Isolate* isolate = info.GetIsolate(); 91 v8::Isolate* isolate = info.GetIsolate();
92 ALLOW_UNUSED_LOCAL(isolate); 92 ALLOW_UNUSED_LOCAL(isolate);
93 93
94 v8::Local<v8::Object> holder = info.Holder(); 94 v8::Local<v8::Object> holder = info.Holder();
95 ALLOW_UNUSED_LOCAL(holder);
96
95 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 97 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
96 98
97 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "testInterfaceAttribute"); 99 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "testInterfaceAttribute");
98 100
99 // Prepare the value to be set. 101 // Prepare the value to be set.
100 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i nfo.GetIsolate(), v8Value); 102 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i nfo.GetIsolate(), v8Value);
101 103
102 // Type check per: http://heycam.github.io/webidl/#es-interface 104 // Type check per: http://heycam.github.io/webidl/#es-interface
103 if (!cppValue) { 105 if (!cppValue) {
104 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf ace'."); 106 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf ace'.");
105 return; 107 return;
106 } 108 }
107 109
108 impl->setTestInterfaceAttribute(cppValue); 110 impl->setTestInterfaceAttribute(cppValue);
109 } 111 }
110 112
111 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info) { 113 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info) {
112 v8::Local<v8::Object> holder = info.Holder(); 114 v8::Local<v8::Object> holder = info.Holder();
113 115
114 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 116 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
115 117
116 V8SetReturnValue(info, impl->doubleAttribute()); 118 V8SetReturnValue(info, impl->doubleAttribute());
117 } 119 }
118 120
119 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info) { 121 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info) {
120 v8::Isolate* isolate = info.GetIsolate(); 122 v8::Isolate* isolate = info.GetIsolate();
121 ALLOW_UNUSED_LOCAL(isolate); 123 ALLOW_UNUSED_LOCAL(isolate);
122 124
123 v8::Local<v8::Object> holder = info.Holder(); 125 v8::Local<v8::Object> holder = info.Holder();
126 ALLOW_UNUSED_LOCAL(holder);
127
124 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 128 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
125 129
126 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "doubleAttribute"); 130 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "doubleAttribute");
127 131
128 // Prepare the value to be set. 132 // Prepare the value to be set.
129 double cppValue = NativeValueTraits<IDLDouble>::NativeValue(info.GetIsolate(), v8Value, exceptionState); 133 double cppValue = NativeValueTraits<IDLDouble>::NativeValue(info.GetIsolate(), v8Value, exceptionState);
130 if (exceptionState.HadException()) 134 if (exceptionState.HadException())
131 return; 135 return;
132 136
133 impl->setDoubleAttribute(cppValue); 137 impl->setDoubleAttribute(cppValue);
134 } 138 }
135 139
136 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info) { 140 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info) {
137 v8::Local<v8::Object> holder = info.Holder(); 141 v8::Local<v8::Object> holder = info.Holder();
138 142
139 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 143 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
140 144
141 V8SetReturnValue(info, impl->floatAttribute()); 145 V8SetReturnValue(info, impl->floatAttribute());
142 } 146 }
143 147
144 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info) { 148 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info) {
145 v8::Isolate* isolate = info.GetIsolate(); 149 v8::Isolate* isolate = info.GetIsolate();
146 ALLOW_UNUSED_LOCAL(isolate); 150 ALLOW_UNUSED_LOCAL(isolate);
147 151
148 v8::Local<v8::Object> holder = info.Holder(); 152 v8::Local<v8::Object> holder = info.Holder();
153 ALLOW_UNUSED_LOCAL(holder);
154
149 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 155 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
150 156
151 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "floatAttribute"); 157 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "floatAttribute");
152 158
153 // Prepare the value to be set. 159 // Prepare the value to be set.
154 float cppValue = NativeValueTraits<IDLFloat>::NativeValue(info.GetIsolate(), v 8Value, exceptionState); 160 float cppValue = NativeValueTraits<IDLFloat>::NativeValue(info.GetIsolate(), v 8Value, exceptionState);
155 if (exceptionState.HadException()) 161 if (exceptionState.HadException())
156 return; 162 return;
157 163
158 impl->setFloatAttribute(cppValue); 164 impl->setFloatAttribute(cppValue);
159 } 165 }
160 166
161 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) { 167 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) {
162 v8::Local<v8::Object> holder = info.Holder(); 168 v8::Local<v8::Object> holder = info.Holder();
163 169
164 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 170 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
165 171
166 V8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); 172 V8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
167 } 173 }
168 174
169 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) { 175 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) {
170 v8::Isolate* isolate = info.GetIsolate(); 176 v8::Isolate* isolate = info.GetIsolate();
171 ALLOW_UNUSED_LOCAL(isolate); 177 ALLOW_UNUSED_LOCAL(isolate);
172 178
173 v8::Local<v8::Object> holder = info.Holder(); 179 v8::Local<v8::Object> holder = info.Holder();
180 ALLOW_UNUSED_LOCAL(holder);
181
174 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 182 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
175 183
176 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "unrestrictedDoubleAttribute"); 184 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "unrestrictedDoubleAttribute");
177 185
178 // Prepare the value to be set. 186 // Prepare the value to be set.
179 double cppValue = NativeValueTraits<IDLUnrestrictedDouble>::NativeValue(info.G etIsolate(), v8Value, exceptionState); 187 double cppValue = NativeValueTraits<IDLUnrestrictedDouble>::NativeValue(info.G etIsolate(), v8Value, exceptionState);
180 if (exceptionState.HadException()) 188 if (exceptionState.HadException())
181 return; 189 return;
182 190
183 impl->setUnrestrictedDoubleAttribute(cppValue); 191 impl->setUnrestrictedDoubleAttribute(cppValue);
184 } 192 }
185 193
186 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) { 194 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) {
187 v8::Local<v8::Object> holder = info.Holder(); 195 v8::Local<v8::Object> holder = info.Holder();
188 196
189 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 197 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
190 198
191 V8SetReturnValue(info, impl->unrestrictedFloatAttribute()); 199 V8SetReturnValue(info, impl->unrestrictedFloatAttribute());
192 } 200 }
193 201
194 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) { 202 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) {
195 v8::Isolate* isolate = info.GetIsolate(); 203 v8::Isolate* isolate = info.GetIsolate();
196 ALLOW_UNUSED_LOCAL(isolate); 204 ALLOW_UNUSED_LOCAL(isolate);
197 205
198 v8::Local<v8::Object> holder = info.Holder(); 206 v8::Local<v8::Object> holder = info.Holder();
207 ALLOW_UNUSED_LOCAL(holder);
208
199 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 209 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
200 210
201 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "unrestrictedFloatAttribute"); 211 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "unrestrictedFloatAttribute");
202 212
203 // Prepare the value to be set. 213 // Prepare the value to be set.
204 float cppValue = NativeValueTraits<IDLUnrestrictedFloat>::NativeValue(info.Get Isolate(), v8Value, exceptionState); 214 float cppValue = NativeValueTraits<IDLUnrestrictedFloat>::NativeValue(info.Get Isolate(), v8Value, exceptionState);
205 if (exceptionState.HadException()) 215 if (exceptionState.HadException())
206 return; 216 return;
207 217
208 impl->setUnrestrictedFloatAttribute(cppValue); 218 impl->setUnrestrictedFloatAttribute(cppValue);
209 } 219 }
210 220
211 static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:: Value>& info) { 221 static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:: Value>& info) {
212 v8::Local<v8::Object> holder = info.Holder(); 222 v8::Local<v8::Object> holder = info.Holder();
213 223
214 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 224 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
215 225
216 V8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate()); 226 V8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate());
217 } 227 }
218 228
219 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 229 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
220 v8::Isolate* isolate = info.GetIsolate(); 230 v8::Isolate* isolate = info.GetIsolate();
221 ALLOW_UNUSED_LOCAL(isolate); 231 ALLOW_UNUSED_LOCAL(isolate);
222 232
223 v8::Local<v8::Object> holder = info.Holder(); 233 v8::Local<v8::Object> holder = info.Holder();
234 ALLOW_UNUSED_LOCAL(holder);
235
224 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 236 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
225 237
226 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "testEnumAttribute"); 238 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "testEnumAttribute");
227 239
228 // Prepare the value to be set. 240 // Prepare the value to be set.
229 V8StringResource<> cppValue = v8Value; 241 V8StringResource<> cppValue = v8Value;
230 if (!cppValue.Prepare()) 242 if (!cppValue.Prepare())
231 return; 243 return;
232 244
233 // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter 245 // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter
(...skipping 22 matching lines...) Expand all
256 impl->stringOrDoubleAttribute(result); 268 impl->stringOrDoubleAttribute(result);
257 269
258 V8SetReturnValue(info, result); 270 V8SetReturnValue(info, result);
259 } 271 }
260 272
261 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 273 static void stringOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
262 v8::Isolate* isolate = info.GetIsolate(); 274 v8::Isolate* isolate = info.GetIsolate();
263 ALLOW_UNUSED_LOCAL(isolate); 275 ALLOW_UNUSED_LOCAL(isolate);
264 276
265 v8::Local<v8::Object> holder = info.Holder(); 277 v8::Local<v8::Object> holder = info.Holder();
278 ALLOW_UNUSED_LOCAL(holder);
279
266 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 280 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
267 281
268 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "stringOrDoubleAttribute"); 282 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "stringOrDoubleAttribute");
269 283
270 // Prepare the value to be set. 284 // Prepare the value to be set.
271 StringOrDouble cppValue; 285 StringOrDouble cppValue;
272 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConver sionMode::kNotNullable, exceptionState); 286 V8StringOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConver sionMode::kNotNullable, exceptionState);
273 if (exceptionState.HadException()) 287 if (exceptionState.HadException())
274 return; 288 return;
275 289
276 impl->setStringOrDoubleAttribute(cppValue); 290 impl->setStringOrDoubleAttribute(cppValue);
277 } 291 }
278 292
279 static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackIn fo<v8::Value>& info) { 293 static void conditionalLongAttributeAttributeGetter(const v8::FunctionCallbackIn fo<v8::Value>& info) {
280 v8::Local<v8::Object> holder = info.Holder(); 294 v8::Local<v8::Object> holder = info.Holder();
281 295
282 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 296 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
283 297
284 V8SetReturnValueInt(info, impl->conditionalLongAttribute()); 298 V8SetReturnValueInt(info, impl->conditionalLongAttribute());
285 } 299 }
286 300
287 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value , const v8::FunctionCallbackInfo<v8::Value>& info) { 301 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value , const v8::FunctionCallbackInfo<v8::Value>& info) {
288 v8::Isolate* isolate = info.GetIsolate(); 302 v8::Isolate* isolate = info.GetIsolate();
289 ALLOW_UNUSED_LOCAL(isolate); 303 ALLOW_UNUSED_LOCAL(isolate);
290 304
291 v8::Local<v8::Object> holder = info.Holder(); 305 v8::Local<v8::Object> holder = info.Holder();
306 ALLOW_UNUSED_LOCAL(holder);
307
292 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 308 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
293 309
294 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "conditionalLongAttribute"); 310 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "conditionalLongAttribute");
295 311
296 // Prepare the value to be set. 312 // Prepare the value to be set.
297 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion); 313 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion);
298 if (exceptionState.HadException()) 314 if (exceptionState.HadException())
299 return; 315 return;
300 316
301 impl->setConditionalLongAttribute(cppValue); 317 impl->setConditionalLongAttribute(cppValue);
302 } 318 }
303 319
304 static void conditionalReadOnlyLongAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info) { 320 static void conditionalReadOnlyLongAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info) {
305 v8::Local<v8::Object> holder = info.Holder(); 321 v8::Local<v8::Object> holder = info.Holder();
306 322
307 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 323 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
308 324
309 V8SetReturnValueInt(info, impl->conditionalReadOnlyLongAttribute()); 325 V8SetReturnValueInt(info, impl->conditionalReadOnlyLongAttribute());
310 } 326 }
311 327
312 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info) { 328 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info) {
313 V8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttribut e(), info.GetIsolate()); 329 V8SetReturnValueString(info, TestInterfaceImplementation::staticStringAttribut e(), info.GetIsolate());
314 } 330 }
315 331
316 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) { 332 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) {
317 v8::Isolate* isolate = info.GetIsolate(); 333 v8::Isolate* isolate = info.GetIsolate();
318 ALLOW_UNUSED_LOCAL(isolate); 334 ALLOW_UNUSED_LOCAL(isolate);
319 335
336 v8::Local<v8::Object> holder = info.Holder();
337 ALLOW_UNUSED_LOCAL(holder);
338
320 // Prepare the value to be set. 339 // Prepare the value to be set.
321 V8StringResource<> cppValue = v8Value; 340 V8StringResource<> cppValue = v8Value;
322 if (!cppValue.Prepare()) 341 if (!cppValue.Prepare())
323 return; 342 return;
324 343
325 TestInterfaceImplementation::setStaticStringAttribute(cppValue); 344 TestInterfaceImplementation::setStaticStringAttribute(cppValue);
326 } 345 }
327 346
328 static void staticReturnDOMWrapperAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info) { 347 static void staticReturnDOMWrapperAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info) {
329 V8SetReturnValue(info, WTF::GetPtr(TestInterfaceImplementation::staticReturnDO MWrapperAttribute()), info.GetIsolate()->GetCurrentContext()->Global()); 348 V8SetReturnValue(info, WTF::GetPtr(TestInterfaceImplementation::staticReturnDO MWrapperAttribute()), info.GetIsolate()->GetCurrentContext()->Global());
330 } 349 }
331 350
332 static void staticReturnDOMWrapperAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 351 static void staticReturnDOMWrapperAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
333 v8::Isolate* isolate = info.GetIsolate(); 352 v8::Isolate* isolate = info.GetIsolate();
334 ALLOW_UNUSED_LOCAL(isolate); 353 ALLOW_UNUSED_LOCAL(isolate);
335 354
355 v8::Local<v8::Object> holder = info.Holder();
356 ALLOW_UNUSED_LOCAL(holder);
357
336 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "staticReturnDOMWrapperAttribute"); 358 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "staticReturnDOMWrapperAttribute");
337 359
338 // Prepare the value to be set. 360 // Prepare the value to be set.
339 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i nfo.GetIsolate(), v8Value); 361 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(i nfo.GetIsolate(), v8Value);
340 362
341 // Type check per: http://heycam.github.io/webidl/#es-interface 363 // Type check per: http://heycam.github.io/webidl/#es-interface
342 if (!cppValue) { 364 if (!cppValue) {
343 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf ace'."); 365 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf ace'.");
344 return; 366 return;
345 } 367 }
(...skipping 30 matching lines...) Expand all
376 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 398 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
377 399
378 V8SetReturnValueFast(info, WTF::GetPtr(impl->legacyInterfaceTypeCheckingAttrib ute()), impl); 400 V8SetReturnValueFast(info, WTF::GetPtr(impl->legacyInterfaceTypeCheckingAttrib ute()), impl);
379 } 401 }
380 402
381 static void legacyInterfaceTypeCheckingAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 403 static void legacyInterfaceTypeCheckingAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
382 v8::Isolate* isolate = info.GetIsolate(); 404 v8::Isolate* isolate = info.GetIsolate();
383 ALLOW_UNUSED_LOCAL(isolate); 405 ALLOW_UNUSED_LOCAL(isolate);
384 406
385 v8::Local<v8::Object> holder = info.Holder(); 407 v8::Local<v8::Object> holder = info.Holder();
408 ALLOW_UNUSED_LOCAL(holder);
409
386 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 410 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
387 411
388 // Prepare the value to be set. 412 // Prepare the value to be set.
389 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info. GetIsolate(), v8Value); 413 TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info. GetIsolate(), v8Value);
390 414
391 impl->setLegacyInterfaceTypeCheckingAttribute(cppValue); 415 impl->setLegacyInterfaceTypeCheckingAttribute(cppValue);
392 } 416 }
393 417
394 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) { 418 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) {
395 v8::Local<v8::Object> holder = info.Holder(); 419 v8::Local<v8::Object> holder = info.Holder();
396 420
397 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 421 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
398 422
399 V8SetReturnValueInt(info, impl->alwaysExposedAttribute()); 423 V8SetReturnValueInt(info, impl->alwaysExposedAttribute());
400 } 424 }
401 425
402 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 426 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
403 v8::Isolate* isolate = info.GetIsolate(); 427 v8::Isolate* isolate = info.GetIsolate();
404 ALLOW_UNUSED_LOCAL(isolate); 428 ALLOW_UNUSED_LOCAL(isolate);
405 429
406 v8::Local<v8::Object> holder = info.Holder(); 430 v8::Local<v8::Object> holder = info.Holder();
431 ALLOW_UNUSED_LOCAL(holder);
432
407 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 433 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
408 434
409 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "alwaysExposedAttribute"); 435 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "alwaysExposedAttribute");
410 436
411 // Prepare the value to be set. 437 // Prepare the value to be set.
412 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion); 438 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion);
413 if (exceptionState.HadException()) 439 if (exceptionState.HadException())
414 return; 440 return;
415 441
416 impl->setAlwaysExposedAttribute(cppValue); 442 impl->setAlwaysExposedAttribute(cppValue);
417 } 443 }
418 444
419 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) { 445 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) {
420 v8::Local<v8::Object> holder = info.Holder(); 446 v8::Local<v8::Object> holder = info.Holder();
421 447
422 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 448 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
423 449
424 V8SetReturnValueInt(info, impl->workerExposedAttribute()); 450 V8SetReturnValueInt(info, impl->workerExposedAttribute());
425 } 451 }
426 452
427 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 453 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
428 v8::Isolate* isolate = info.GetIsolate(); 454 v8::Isolate* isolate = info.GetIsolate();
429 ALLOW_UNUSED_LOCAL(isolate); 455 ALLOW_UNUSED_LOCAL(isolate);
430 456
431 v8::Local<v8::Object> holder = info.Holder(); 457 v8::Local<v8::Object> holder = info.Holder();
458 ALLOW_UNUSED_LOCAL(holder);
459
432 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 460 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
433 461
434 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "workerExposedAttribute"); 462 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "workerExposedAttribute");
435 463
436 // Prepare the value to be set. 464 // Prepare the value to be set.
437 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion); 465 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion);
438 if (exceptionState.HadException()) 466 if (exceptionState.HadException())
439 return; 467 return;
440 468
441 impl->setWorkerExposedAttribute(cppValue); 469 impl->setWorkerExposedAttribute(cppValue);
442 } 470 }
443 471
444 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) { 472 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) {
445 v8::Local<v8::Object> holder = info.Holder(); 473 v8::Local<v8::Object> holder = info.Holder();
446 474
447 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 475 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
448 476
449 V8SetReturnValueInt(info, impl->windowExposedAttribute()); 477 V8SetReturnValueInt(info, impl->windowExposedAttribute());
450 } 478 }
451 479
452 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 480 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
453 v8::Isolate* isolate = info.GetIsolate(); 481 v8::Isolate* isolate = info.GetIsolate();
454 ALLOW_UNUSED_LOCAL(isolate); 482 ALLOW_UNUSED_LOCAL(isolate);
455 483
456 v8::Local<v8::Object> holder = info.Holder(); 484 v8::Local<v8::Object> holder = info.Holder();
485 ALLOW_UNUSED_LOCAL(holder);
486
457 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 487 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
458 488
459 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "windowExposedAttribute"); 489 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "windowExposedAttribute");
460 490
461 // Prepare the value to be set. 491 // Prepare the value to be set.
462 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion); 492 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion);
463 if (exceptionState.HadException()) 493 if (exceptionState.HadException())
464 return; 494 return;
465 495
466 impl->setWindowExposedAttribute(cppValue); 496 impl->setWindowExposedAttribute(cppValue);
467 } 497 }
468 498
469 static void lenientThisAttributeAttributeGetter(const v8::FunctionCallbackInfo<v 8::Value>& info) { 499 static void lenientThisAttributeAttributeGetter(const v8::FunctionCallbackInfo<v 8::Value>& info) {
470 // [LenientThis] 500 // [LenientThis]
471 // Make sure that info.Holder() really points to an instance if [LenientThis]. 501 // Make sure that info.Holder() really points to an instance if [LenientThis].
472 if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate())) 502 if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate()))
473 return; // Return silently because of [LenientThis]. 503 return; // Return silently because of [LenientThis].
474 504
475 v8::Local<v8::Object> holder = info.Holder(); 505 v8::Local<v8::Object> holder = info.Holder();
476 506
477 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 507 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
478 508
479 V8SetReturnValue(info, impl->lenientThisAttribute().V8Value()); 509 V8SetReturnValue(info, impl->lenientThisAttribute().V8Value());
480 } 510 }
481 511
482 static void lenientThisAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info) { 512 static void lenientThisAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info) {
483 v8::Isolate* isolate = info.GetIsolate(); 513 v8::Isolate* isolate = info.GetIsolate();
484 ALLOW_UNUSED_LOCAL(isolate); 514 ALLOW_UNUSED_LOCAL(isolate);
485 515
516 v8::Local<v8::Object> holder = info.Holder();
517 ALLOW_UNUSED_LOCAL(holder);
518
486 // [LenientThis] 519 // [LenientThis]
487 // Make sure that info.Holder() really points to an instance if [LenientThis]. 520 // Make sure that info.Holder() really points to an instance if [LenientThis].
488 if (!V8TestInterface::hasInstance(info.Holder(), isolate)) 521 if (!V8TestInterface::hasInstance(holder, isolate))
489 return; // Return silently because of [LenientThis]. 522 return; // Return silently because of [LenientThis].
490 523
491 v8::Local<v8::Object> holder = info.Holder();
492 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 524 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
493 525
494 // Prepare the value to be set. 526 // Prepare the value to be set.
495 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8 Value); 527 ScriptValue cppValue = ScriptValue(ScriptState::Current(info.GetIsolate()), v8 Value);
496 528
497 impl->setLenientThisAttribute(cppValue); 529 impl->setLenientThisAttribute(cppValue);
498 } 530 }
499 531
500 static void secureContextAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) { 532 static void secureContextAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) {
501 v8::Local<v8::Object> holder = info.Holder(); 533 v8::Local<v8::Object> holder = info.Holder();
502 534
503 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 535 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
504 536
505 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextAttribute()), impl); 537 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextAttribute()), impl);
506 } 538 }
507 539
508 static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 540 static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
509 v8::Isolate* isolate = info.GetIsolate(); 541 v8::Isolate* isolate = info.GetIsolate();
510 ALLOW_UNUSED_LOCAL(isolate); 542 ALLOW_UNUSED_LOCAL(isolate);
511 543
512 v8::Local<v8::Object> holder = info.Holder(); 544 v8::Local<v8::Object> holder = info.Holder();
545 ALLOW_UNUSED_LOCAL(holder);
546
513 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 547 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
514 548
515 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextAttribute"); 549 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextAttribute");
516 550
517 // Prepare the value to be set. 551 // Prepare the value to be set.
518 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 552 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
519 553
520 // Type check per: http://heycam.github.io/webidl/#es-interface 554 // Type check per: http://heycam.github.io/webidl/#es-interface
521 if (!cppValue) { 555 if (!cppValue) {
522 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 556 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
523 return; 557 return;
524 } 558 }
525 559
526 impl->setSecureContextAttribute(cppValue); 560 impl->setSecureContextAttribute(cppValue);
527 } 561 }
528 562
529 static void secureContextRuntimeEnabledAttributeAttributeGetter(const v8::Functi onCallbackInfo<v8::Value>& info) { 563 static void secureContextRuntimeEnabledAttributeAttributeGetter(const v8::Functi onCallbackInfo<v8::Value>& info) {
530 v8::Local<v8::Object> holder = info.Holder(); 564 v8::Local<v8::Object> holder = info.Holder();
531 565
532 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 566 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
533 567
534 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextRuntimeEnabledAttrib ute()), impl); 568 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextRuntimeEnabledAttrib ute()), impl);
535 } 569 }
536 570
537 static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 571 static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
538 v8::Isolate* isolate = info.GetIsolate(); 572 v8::Isolate* isolate = info.GetIsolate();
539 ALLOW_UNUSED_LOCAL(isolate); 573 ALLOW_UNUSED_LOCAL(isolate);
540 574
541 v8::Local<v8::Object> holder = info.Holder(); 575 v8::Local<v8::Object> holder = info.Holder();
576 ALLOW_UNUSED_LOCAL(holder);
577
542 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 578 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
543 579
544 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextRuntimeEnabledAttribute"); 580 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextRuntimeEnabledAttribute");
545 581
546 // Prepare the value to be set. 582 // Prepare the value to be set.
547 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 583 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
548 584
549 // Type check per: http://heycam.github.io/webidl/#es-interface 585 // Type check per: http://heycam.github.io/webidl/#es-interface
550 if (!cppValue) { 586 if (!cppValue) {
551 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 587 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
552 return; 588 return;
553 } 589 }
554 590
555 impl->setSecureContextRuntimeEnabledAttribute(cppValue); 591 impl->setSecureContextRuntimeEnabledAttribute(cppValue);
556 } 592 }
557 593
558 static void secureContextWindowExposedAttributeAttributeGetter(const v8::Functio nCallbackInfo<v8::Value>& info) { 594 static void secureContextWindowExposedAttributeAttributeGetter(const v8::Functio nCallbackInfo<v8::Value>& info) {
559 v8::Local<v8::Object> holder = info.Holder(); 595 v8::Local<v8::Object> holder = info.Holder();
560 596
561 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 597 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
562 598
563 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWindowExposedAttribu te()), impl); 599 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWindowExposedAttribu te()), impl);
564 } 600 }
565 601
566 static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 602 static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
567 v8::Isolate* isolate = info.GetIsolate(); 603 v8::Isolate* isolate = info.GetIsolate();
568 ALLOW_UNUSED_LOCAL(isolate); 604 ALLOW_UNUSED_LOCAL(isolate);
569 605
570 v8::Local<v8::Object> holder = info.Holder(); 606 v8::Local<v8::Object> holder = info.Holder();
607 ALLOW_UNUSED_LOCAL(holder);
608
571 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 609 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
572 610
573 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextWindowExposedAttribute"); 611 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextWindowExposedAttribute");
574 612
575 // Prepare the value to be set. 613 // Prepare the value to be set.
576 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 614 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
577 615
578 // Type check per: http://heycam.github.io/webidl/#es-interface 616 // Type check per: http://heycam.github.io/webidl/#es-interface
579 if (!cppValue) { 617 if (!cppValue) {
580 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 618 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
581 return; 619 return;
582 } 620 }
583 621
584 impl->setSecureContextWindowExposedAttribute(cppValue); 622 impl->setSecureContextWindowExposedAttribute(cppValue);
585 } 623 }
586 624
587 static void secureContextWorkerExposedAttributeAttributeGetter(const v8::Functio nCallbackInfo<v8::Value>& info) { 625 static void secureContextWorkerExposedAttributeAttributeGetter(const v8::Functio nCallbackInfo<v8::Value>& info) {
588 v8::Local<v8::Object> holder = info.Holder(); 626 v8::Local<v8::Object> holder = info.Holder();
589 627
590 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 628 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
591 629
592 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWorkerExposedAttribu te()), impl); 630 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWorkerExposedAttribu te()), impl);
593 } 631 }
594 632
595 static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 633 static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Val ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
596 v8::Isolate* isolate = info.GetIsolate(); 634 v8::Isolate* isolate = info.GetIsolate();
597 ALLOW_UNUSED_LOCAL(isolate); 635 ALLOW_UNUSED_LOCAL(isolate);
598 636
599 v8::Local<v8::Object> holder = info.Holder(); 637 v8::Local<v8::Object> holder = info.Holder();
638 ALLOW_UNUSED_LOCAL(holder);
639
600 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 640 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
601 641
602 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextWorkerExposedAttribute"); 642 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextWorkerExposedAttribute");
603 643
604 // Prepare the value to be set. 644 // Prepare the value to be set.
605 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 645 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
606 646
607 // Type check per: http://heycam.github.io/webidl/#es-interface 647 // Type check per: http://heycam.github.io/webidl/#es-interface
608 if (!cppValue) { 648 if (!cppValue) {
609 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 649 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
610 return; 650 return;
611 } 651 }
612 652
613 impl->setSecureContextWorkerExposedAttribute(cppValue); 653 impl->setSecureContextWorkerExposedAttribute(cppValue);
614 } 654 }
615 655
616 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(con st v8::FunctionCallbackInfo<v8::Value>& info) { 656 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeGetter(con st v8::FunctionCallbackInfo<v8::Value>& info) {
617 v8::Local<v8::Object> holder = info.Holder(); 657 v8::Local<v8::Object> holder = info.Holder();
618 658
619 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 659 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
620 660
621 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWindowExposedRuntime EnabledAttribute()), impl); 661 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWindowExposedRuntime EnabledAttribute()), impl);
622 } 662 }
623 663
624 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 664 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
625 v8::Isolate* isolate = info.GetIsolate(); 665 v8::Isolate* isolate = info.GetIsolate();
626 ALLOW_UNUSED_LOCAL(isolate); 666 ALLOW_UNUSED_LOCAL(isolate);
627 667
628 v8::Local<v8::Object> holder = info.Holder(); 668 v8::Local<v8::Object> holder = info.Holder();
669 ALLOW_UNUSED_LOCAL(holder);
670
629 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 671 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
630 672
631 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextWindowExposedRuntimeEnabledAttribute"); 673 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextWindowExposedRuntimeEnabledAttribute");
632 674
633 // Prepare the value to be set. 675 // Prepare the value to be set.
634 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 676 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
635 677
636 // Type check per: http://heycam.github.io/webidl/#es-interface 678 // Type check per: http://heycam.github.io/webidl/#es-interface
637 if (!cppValue) { 679 if (!cppValue) {
638 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 680 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
639 return; 681 return;
640 } 682 }
641 683
642 impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue); 684 impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue);
643 } 685 }
644 686
645 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(con st v8::FunctionCallbackInfo<v8::Value>& info) { 687 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetter(con st v8::FunctionCallbackInfo<v8::Value>& info) {
646 v8::Local<v8::Object> holder = info.Holder(); 688 v8::Local<v8::Object> holder = info.Holder();
647 689
648 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 690 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
649 691
650 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWorkerExposedRuntime EnabledAttribute()), impl); 692 V8SetReturnValueFast(info, WTF::GetPtr(impl->secureContextWorkerExposedRuntime EnabledAttribute()), impl);
651 } 693 }
652 694
653 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 695 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
654 v8::Isolate* isolate = info.GetIsolate(); 696 v8::Isolate* isolate = info.GetIsolate();
655 ALLOW_UNUSED_LOCAL(isolate); 697 ALLOW_UNUSED_LOCAL(isolate);
656 698
657 v8::Local<v8::Object> holder = info.Holder(); 699 v8::Local<v8::Object> holder = info.Holder();
700 ALLOW_UNUSED_LOCAL(holder);
701
658 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 702 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
659 703
660 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextWorkerExposedRuntimeEnabledAttribute"); 704 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "secureContextWorkerExposedRuntimeEnabledAttribute");
661 705
662 // Prepare the value to be set. 706 // Prepare the value to be set.
663 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 707 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
664 708
665 // Type check per: http://heycam.github.io/webidl/#es-interface 709 // Type check per: http://heycam.github.io/webidl/#es-interface
666 if (!cppValue) { 710 if (!cppValue) {
667 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 711 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
668 return; 712 return;
669 } 713 }
670 714
671 impl->setSecureContextWorkerExposedRuntimeEnabledAttribute(cppValue); 715 impl->setSecureContextWorkerExposedRuntimeEnabledAttribute(cppValue);
672 } 716 }
673 717
674 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Funct ionCallbackInfo<v8::Value>& info) { 718 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Funct ionCallbackInfo<v8::Value>& info) {
675 V8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadOnl yLongAttribute()); 719 V8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadOnl yLongAttribute());
676 } 720 }
677 721
678 static void implementsStaticStringAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info) { 722 static void implementsStaticStringAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info) {
679 V8SetReturnValueString(info, TestInterfaceImplementation::implementsStaticStri ngAttribute(), info.GetIsolate()); 723 V8SetReturnValueString(info, TestInterfaceImplementation::implementsStaticStri ngAttribute(), info.GetIsolate());
680 } 724 }
681 725
682 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 726 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
683 v8::Isolate* isolate = info.GetIsolate(); 727 v8::Isolate* isolate = info.GetIsolate();
684 ALLOW_UNUSED_LOCAL(isolate); 728 ALLOW_UNUSED_LOCAL(isolate);
685 729
730 v8::Local<v8::Object> holder = info.Holder();
731 ALLOW_UNUSED_LOCAL(holder);
732
686 // Prepare the value to be set. 733 // Prepare the value to be set.
687 V8StringResource<> cppValue = v8Value; 734 V8StringResource<> cppValue = v8Value;
688 if (!cppValue.Prepare()) 735 if (!cppValue.Prepare())
689 return; 736 return;
690 737
691 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue); 738 TestInterfaceImplementation::setImplementsStaticStringAttribute(cppValue);
692 } 739 }
693 740
694 static void implementsReadonlyStringAttributeAttributeGetter(const v8::FunctionC allbackInfo<v8::Value>& info) { 741 static void implementsReadonlyStringAttributeAttributeGetter(const v8::FunctionC allbackInfo<v8::Value>& info) {
695 v8::Local<v8::Object> holder = info.Holder(); 742 v8::Local<v8::Object> holder = info.Holder();
696 743
697 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 744 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
698 745
699 V8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info.G etIsolate()); 746 V8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info.G etIsolate());
700 } 747 }
701 748
702 static void implementsStringAttributeAttributeGetter(const v8::FunctionCallbackI nfo<v8::Value>& info) { 749 static void implementsStringAttributeAttributeGetter(const v8::FunctionCallbackI nfo<v8::Value>& info) {
703 v8::Local<v8::Object> holder = info.Holder(); 750 v8::Local<v8::Object> holder = info.Holder();
704 751
705 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 752 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
706 753
707 V8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsolat e()); 754 V8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsolat e());
708 } 755 }
709 756
710 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::FunctionCallbackInfo<v8::Value>& info) { 757 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::FunctionCallbackInfo<v8::Value>& info) {
711 v8::Isolate* isolate = info.GetIsolate(); 758 v8::Isolate* isolate = info.GetIsolate();
712 ALLOW_UNUSED_LOCAL(isolate); 759 ALLOW_UNUSED_LOCAL(isolate);
713 760
714 v8::Local<v8::Object> holder = info.Holder(); 761 v8::Local<v8::Object> holder = info.Holder();
762 ALLOW_UNUSED_LOCAL(holder);
763
715 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 764 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
716 765
717 // Prepare the value to be set. 766 // Prepare the value to be set.
718 V8StringResource<> cppValue = v8Value; 767 V8StringResource<> cppValue = v8Value;
719 if (!cppValue.Prepare()) 768 if (!cppValue.Prepare())
720 return; 769 return;
721 770
722 impl->setImplementsStringAttribute(cppValue); 771 impl->setImplementsStringAttribute(cppValue);
723 } 772 }
724 773
725 static void implementsNodeAttributeAttributeGetter(const v8::FunctionCallbackInf o<v8::Value>& info) { 774 static void implementsNodeAttributeAttributeGetter(const v8::FunctionCallbackInf o<v8::Value>& info) {
726 v8::Local<v8::Object> holder = info.Holder(); 775 v8::Local<v8::Object> holder = info.Holder();
727 776
728 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 777 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
729 778
730 V8SetReturnValueFast(info, WTF::GetPtr(impl->implementsNodeAttribute()), impl) ; 779 V8SetReturnValueFast(info, WTF::GetPtr(impl->implementsNodeAttribute()), impl) ;
731 } 780 }
732 781
733 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 782 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
734 v8::Isolate* isolate = info.GetIsolate(); 783 v8::Isolate* isolate = info.GetIsolate();
735 ALLOW_UNUSED_LOCAL(isolate); 784 ALLOW_UNUSED_LOCAL(isolate);
736 785
737 v8::Local<v8::Object> holder = info.Holder(); 786 v8::Local<v8::Object> holder = info.Holder();
787 ALLOW_UNUSED_LOCAL(holder);
788
738 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 789 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
739 790
740 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "implementsNodeAttribute"); 791 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "implementsNodeAttribute");
741 792
742 // Prepare the value to be set. 793 // Prepare the value to be set.
743 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 794 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
744 795
745 // Type check per: http://heycam.github.io/webidl/#es-interface 796 // Type check per: http://heycam.github.io/webidl/#es-interface
746 if (!cppValue) { 797 if (!cppValue) {
747 exceptionState.ThrowTypeError("The provided value is not of type 'Node'."); 798 exceptionState.ThrowTypeError("The provided value is not of type 'Node'.");
(...skipping 11 matching lines...) Expand all
759 EventListener* cppValue(WTF::GetPtr(impl->implementsEventHandlerAttribute())); 810 EventListener* cppValue(WTF::GetPtr(impl->implementsEventHandlerAttribute()));
760 811
761 V8SetReturnValue(info, cppValue ? V8AbstractEventListener::Cast(cppValue)->Get ListenerOrNull(info.GetIsolate(), impl->GetExecutionContext()) : v8::Null(info.G etIsolate()).As<v8::Value>()); 812 V8SetReturnValue(info, cppValue ? V8AbstractEventListener::Cast(cppValue)->Get ListenerOrNull(info.GetIsolate(), impl->GetExecutionContext()) : v8::Null(info.G etIsolate()).As<v8::Value>());
762 } 813 }
763 814
764 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 815 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
765 v8::Isolate* isolate = info.GetIsolate(); 816 v8::Isolate* isolate = info.GetIsolate();
766 ALLOW_UNUSED_LOCAL(isolate); 817 ALLOW_UNUSED_LOCAL(isolate);
767 818
768 v8::Local<v8::Object> holder = info.Holder(); 819 v8::Local<v8::Object> holder = info.Holder();
820 ALLOW_UNUSED_LOCAL(holder);
821
769 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 822 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
770 823
771 // Prepare the value to be set. 824 // Prepare the value to be set.
772 MoveEventListenerToNewWrapper(isolate, holder, impl->implementsEventHandlerAtt ribute(), v8Value, V8TestInterface::eventListenerCacheIndex); 825 MoveEventListenerToNewWrapper(isolate, holder, impl->implementsEventHandlerAtt ribute(), v8Value, V8TestInterface::eventListenerCacheIndex);
773 826
774 impl->setImplementsEventHandlerAttribute(V8EventListenerHelper::GetEventListen er(ScriptState::ForReceiverObject(info), v8Value, true, kListenerFindOrCreate)); 827 impl->setImplementsEventHandlerAttribute(V8EventListenerHelper::GetEventListen er(ScriptState::ForReceiverObject(info), v8Value, true, kListenerFindOrCreate));
775 } 828 }
776 829
777 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Funct ionCallbackInfo<v8::Value>& info) { 830 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Funct ionCallbackInfo<v8::Value>& info) {
778 v8::Local<v8::Object> holder = info.Holder(); 831 v8::Local<v8::Object> holder = info.Holder();
779 832
780 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 833 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
781 834
782 V8SetReturnValueFast(info, WTF::GetPtr(impl->implementsRuntimeEnabledNodeAttri bute()), impl); 835 V8SetReturnValueFast(info, WTF::GetPtr(impl->implementsRuntimeEnabledNodeAttri bute()), impl);
783 } 836 }
784 837
785 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 838 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
786 v8::Isolate* isolate = info.GetIsolate(); 839 v8::Isolate* isolate = info.GetIsolate();
787 ALLOW_UNUSED_LOCAL(isolate); 840 ALLOW_UNUSED_LOCAL(isolate);
788 841
789 v8::Local<v8::Object> holder = info.Holder(); 842 v8::Local<v8::Object> holder = info.Holder();
843 ALLOW_UNUSED_LOCAL(holder);
844
790 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 845 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
791 846
792 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "implementsRuntimeEnabledNodeAttribute"); 847 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "implementsRuntimeEnabledNodeAttribute");
793 848
794 // Prepare the value to be set. 849 // Prepare the value to be set.
795 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 850 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
796 851
797 // Type check per: http://heycam.github.io/webidl/#es-interface 852 // Type check per: http://heycam.github.io/webidl/#es-interface
798 if (!cppValue) { 853 if (!cppValue) {
799 exceptionState.ThrowTypeError("The provided value is not of type 'Node'."); 854 exceptionState.ThrowTypeError("The provided value is not of type 'Node'.");
800 return; 855 return;
801 } 856 }
802 857
803 impl->setImplementsRuntimeEnabledNodeAttribute(cppValue); 858 impl->setImplementsRuntimeEnabledNodeAttribute(cppValue);
804 } 859 }
805 860
806 static void implements2StaticStringAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info) { 861 static void implements2StaticStringAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info) {
807 V8SetReturnValueString(info, TestImplements2::implements2StaticStringAttribute (), info.GetIsolate()); 862 V8SetReturnValueString(info, TestImplements2::implements2StaticStringAttribute (), info.GetIsolate());
808 } 863 }
809 864
810 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 865 static void implements2StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
811 v8::Isolate* isolate = info.GetIsolate(); 866 v8::Isolate* isolate = info.GetIsolate();
812 ALLOW_UNUSED_LOCAL(isolate); 867 ALLOW_UNUSED_LOCAL(isolate);
813 868
869 v8::Local<v8::Object> holder = info.Holder();
870 ALLOW_UNUSED_LOCAL(holder);
871
814 // Prepare the value to be set. 872 // Prepare the value to be set.
815 V8StringResource<> cppValue = v8Value; 873 V8StringResource<> cppValue = v8Value;
816 if (!cppValue.Prepare()) 874 if (!cppValue.Prepare())
817 return; 875 return;
818 876
819 TestImplements2::setImplements2StaticStringAttribute(cppValue); 877 TestImplements2::setImplements2StaticStringAttribute(cppValue);
820 } 878 }
821 879
822 static void implements2StringAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) { 880 static void implements2StringAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) {
823 v8::Local<v8::Object> holder = info.Holder(); 881 v8::Local<v8::Object> holder = info.Holder();
824 882
825 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 883 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
826 884
827 V8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*impl ), info.GetIsolate()); 885 V8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*impl ), info.GetIsolate());
828 } 886 }
829 887
830 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) { 888 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) {
831 v8::Isolate* isolate = info.GetIsolate(); 889 v8::Isolate* isolate = info.GetIsolate();
832 ALLOW_UNUSED_LOCAL(isolate); 890 ALLOW_UNUSED_LOCAL(isolate);
833 891
834 v8::Local<v8::Object> holder = info.Holder(); 892 v8::Local<v8::Object> holder = info.Holder();
893 ALLOW_UNUSED_LOCAL(holder);
894
835 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 895 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
836 896
837 // Prepare the value to be set. 897 // Prepare the value to be set.
838 V8StringResource<> cppValue = v8Value; 898 V8StringResource<> cppValue = v8Value;
839 if (!cppValue.Prepare()) 899 if (!cppValue.Prepare())
840 return; 900 return;
841 901
842 TestImplements2::setImplements2StringAttribute(*impl, cppValue); 902 TestImplements2::setImplements2StringAttribute(*impl, cppValue);
843 } 903 }
844 904
845 static void implements3StringAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) { 905 static void implements3StringAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) {
846 v8::Local<v8::Object> holder = info.Holder(); 906 v8::Local<v8::Object> holder = info.Holder();
847 907
848 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 908 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
849 909
850 V8SetReturnValueString(info, TestImplements3Implementation::implements3StringA ttribute(*impl), info.GetIsolate()); 910 V8SetReturnValueString(info, TestImplements3Implementation::implements3StringA ttribute(*impl), info.GetIsolate());
851 } 911 }
852 912
853 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) { 913 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) {
854 v8::Isolate* isolate = info.GetIsolate(); 914 v8::Isolate* isolate = info.GetIsolate();
855 ALLOW_UNUSED_LOCAL(isolate); 915 ALLOW_UNUSED_LOCAL(isolate);
856 916
857 v8::Local<v8::Object> holder = info.Holder(); 917 v8::Local<v8::Object> holder = info.Holder();
918 ALLOW_UNUSED_LOCAL(holder);
919
858 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 920 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
859 921
860 // Prepare the value to be set. 922 // Prepare the value to be set.
861 V8StringResource<> cppValue = v8Value; 923 V8StringResource<> cppValue = v8Value;
862 if (!cppValue.Prepare()) 924 if (!cppValue.Prepare())
863 return; 925 return;
864 926
865 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue); 927 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue);
866 } 928 }
867 929
868 static void implements3StaticStringAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info) { 930 static void implements3StaticStringAttributeAttributeGetter(const v8::FunctionCa llbackInfo<v8::Value>& info) {
869 V8SetReturnValueString(info, TestImplements3Implementation::implements3StaticS tringAttribute(), info.GetIsolate()); 931 V8SetReturnValueString(info, TestImplements3Implementation::implements3StaticS tringAttribute(), info.GetIsolate());
870 } 932 }
871 933
872 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 934 static void implements3StaticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
873 v8::Isolate* isolate = info.GetIsolate(); 935 v8::Isolate* isolate = info.GetIsolate();
874 ALLOW_UNUSED_LOCAL(isolate); 936 ALLOW_UNUSED_LOCAL(isolate);
875 937
938 v8::Local<v8::Object> holder = info.Holder();
939 ALLOW_UNUSED_LOCAL(holder);
940
876 // Prepare the value to be set. 941 // Prepare the value to be set.
877 V8StringResource<> cppValue = v8Value; 942 V8StringResource<> cppValue = v8Value;
878 if (!cppValue.Prepare()) 943 if (!cppValue.Prepare())
879 return; 944 return;
880 945
881 TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue); 946 TestImplements3Implementation::setImplements3StaticStringAttribute(cppValue);
882 } 947 }
883 948
884 static void partialLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v 8::Value>& info) { 949 static void partialLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v 8::Value>& info) {
885 v8::Local<v8::Object> holder = info.Holder(); 950 v8::Local<v8::Object> holder = info.Holder();
886 951
887 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 952 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
888 953
889 V8SetReturnValueInt(info, TestInterfacePartial::partialLongAttribute(*impl)); 954 V8SetReturnValueInt(info, TestInterfacePartial::partialLongAttribute(*impl));
890 } 955 }
891 956
892 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info) { 957 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info) {
893 v8::Isolate* isolate = info.GetIsolate(); 958 v8::Isolate* isolate = info.GetIsolate();
894 ALLOW_UNUSED_LOCAL(isolate); 959 ALLOW_UNUSED_LOCAL(isolate);
895 960
896 v8::Local<v8::Object> holder = info.Holder(); 961 v8::Local<v8::Object> holder = info.Holder();
962 ALLOW_UNUSED_LOCAL(holder);
963
897 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 964 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
898 965
899 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialLongAttribute"); 966 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialLongAttribute");
900 967
901 // Prepare the value to be set. 968 // Prepare the value to be set.
902 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion); 969 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion);
903 if (exceptionState.HadException()) 970 if (exceptionState.HadException())
904 return; 971 return;
905 972
906 TestInterfacePartial::setPartialLongAttribute(*impl, cppValue); 973 TestInterfacePartial::setPartialLongAttribute(*impl, cppValue);
907 } 974 }
908 975
909 static void partialStaticLongAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) { 976 static void partialStaticLongAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) {
910 V8SetReturnValueInt(info, TestInterfacePartial::partialStaticLongAttribute()); 977 V8SetReturnValueInt(info, TestInterfacePartial::partialStaticLongAttribute());
911 } 978 }
912 979
913 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) { 980 static void partialStaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) {
914 v8::Isolate* isolate = info.GetIsolate(); 981 v8::Isolate* isolate = info.GetIsolate();
915 ALLOW_UNUSED_LOCAL(isolate); 982 ALLOW_UNUSED_LOCAL(isolate);
916 983
984 v8::Local<v8::Object> holder = info.Holder();
985 ALLOW_UNUSED_LOCAL(holder);
986
917 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialStaticLongAttribute"); 987 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialStaticLongAttribute");
918 988
919 // Prepare the value to be set. 989 // Prepare the value to be set.
920 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion); 990 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion);
921 if (exceptionState.HadException()) 991 if (exceptionState.HadException())
922 return; 992 return;
923 993
924 TestInterfacePartial::setPartialStaticLongAttribute(cppValue); 994 TestInterfacePartial::setPartialStaticLongAttribute(cppValue);
925 } 995 }
926 996
927 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::FunctionCallbackInfo<v8::Value>& info) { 997 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::FunctionCallbackInfo<v8::Value>& info) {
928 v8::Local<v8::Object> holder = info.Holder(); 998 v8::Local<v8::Object> holder = info.Holder();
929 999
930 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1000 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
931 1001
932 ExecutionContext* executionContext = CurrentExecutionContext(info.GetIsolate() ); 1002 ExecutionContext* executionContext = CurrentExecutionContext(info.GetIsolate() );
933 1003
934 V8SetReturnValueInt(info, TestInterfacePartial::partialCallWithExecutionContex tLongAttribute(executionContext, *impl)); 1004 V8SetReturnValueInt(info, TestInterfacePartial::partialCallWithExecutionContex tLongAttribute(executionContext, *impl));
935 } 1005 }
936 1006
937 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 1007 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
938 v8::Isolate* isolate = info.GetIsolate(); 1008 v8::Isolate* isolate = info.GetIsolate();
939 ALLOW_UNUSED_LOCAL(isolate); 1009 ALLOW_UNUSED_LOCAL(isolate);
940 1010
941 v8::Local<v8::Object> holder = info.Holder(); 1011 v8::Local<v8::Object> holder = info.Holder();
1012 ALLOW_UNUSED_LOCAL(holder);
1013
942 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1014 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
943 1015
944 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialCallWithExecutionContextLongAttribute"); 1016 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialCallWithExecutionContextLongAttribute");
945 1017
946 // Prepare the value to be set. 1018 // Prepare the value to be set.
947 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion); 1019 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion);
948 if (exceptionState.HadException()) 1020 if (exceptionState.HadException())
949 return; 1021 return;
950 1022
951 ExecutionContext* executionContext = CurrentExecutionContext(isolate); 1023 ExecutionContext* executionContext = CurrentExecutionContext(isolate);
952 1024
953 TestInterfacePartial::setPartialCallWithExecutionContextLongAttribute(executio nContext, *impl, cppValue); 1025 TestInterfacePartial::setPartialCallWithExecutionContextLongAttribute(executio nContext, *impl, cppValue);
954 } 1026 }
955 1027
956 static void partialPartialEnumTypeAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info) { 1028 static void partialPartialEnumTypeAttributeAttributeGetter(const v8::FunctionCal lbackInfo<v8::Value>& info) {
957 v8::Local<v8::Object> holder = info.Holder(); 1029 v8::Local<v8::Object> holder = info.Holder();
958 1030
959 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1031 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
960 1032
961 V8SetReturnValueString(info, TestInterfacePartial::partialPartialEnumTypeAttri bute(*impl), info.GetIsolate()); 1033 V8SetReturnValueString(info, TestInterfacePartial::partialPartialEnumTypeAttri bute(*impl), info.GetIsolate());
962 } 1034 }
963 1035
964 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 1036 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
965 v8::Isolate* isolate = info.GetIsolate(); 1037 v8::Isolate* isolate = info.GetIsolate();
966 ALLOW_UNUSED_LOCAL(isolate); 1038 ALLOW_UNUSED_LOCAL(isolate);
967 1039
968 v8::Local<v8::Object> holder = info.Holder(); 1040 v8::Local<v8::Object> holder = info.Holder();
1041 ALLOW_UNUSED_LOCAL(holder);
1042
969 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1043 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
970 1044
971 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialPartialEnumTypeAttribute"); 1045 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialPartialEnumTypeAttribute");
972 1046
973 // Prepare the value to be set. 1047 // Prepare the value to be set.
974 V8StringResource<> cppValue = v8Value; 1048 V8StringResource<> cppValue = v8Value;
975 if (!cppValue.Prepare()) 1049 if (!cppValue.Prepare())
976 return; 1050 return;
977 1051
978 // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter 1052 // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter
(...skipping 17 matching lines...) Expand all
996 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1070 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
997 1071
998 V8SetReturnValueInt(info, TestInterfacePartial::partialSecureContextLongAttrib ute(*impl)); 1072 V8SetReturnValueInt(info, TestInterfacePartial::partialSecureContextLongAttrib ute(*impl));
999 } 1073 }
1000 1074
1001 static void partialSecureContextLongAttributeAttributeSetter(v8::Local<v8::Value > v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 1075 static void partialSecureContextLongAttributeAttributeSetter(v8::Local<v8::Value > v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
1002 v8::Isolate* isolate = info.GetIsolate(); 1076 v8::Isolate* isolate = info.GetIsolate();
1003 ALLOW_UNUSED_LOCAL(isolate); 1077 ALLOW_UNUSED_LOCAL(isolate);
1004 1078
1005 v8::Local<v8::Object> holder = info.Holder(); 1079 v8::Local<v8::Object> holder = info.Holder();
1080 ALLOW_UNUSED_LOCAL(holder);
1081
1006 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1082 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1007 1083
1008 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextLongAttribute"); 1084 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextLongAttribute");
1009 1085
1010 // Prepare the value to be set. 1086 // Prepare the value to be set.
1011 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion); 1087 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion);
1012 if (exceptionState.HadException()) 1088 if (exceptionState.HadException())
1013 return; 1089 return;
1014 1090
1015 TestInterfacePartial::setPartialSecureContextLongAttribute(*impl, cppValue); 1091 TestInterfacePartial::setPartialSecureContextLongAttribute(*impl, cppValue);
1016 } 1092 }
1017 1093
1018 static void partial2LongAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info) { 1094 static void partial2LongAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info) {
1019 v8::Local<v8::Object> holder = info.Holder(); 1095 v8::Local<v8::Object> holder = info.Holder();
1020 1096
1021 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1097 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1022 1098
1023 V8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2LongAtt ribute(*impl)); 1099 V8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2LongAtt ribute(*impl));
1024 } 1100 }
1025 1101
1026 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) { 1102 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) {
1027 v8::Isolate* isolate = info.GetIsolate(); 1103 v8::Isolate* isolate = info.GetIsolate();
1028 ALLOW_UNUSED_LOCAL(isolate); 1104 ALLOW_UNUSED_LOCAL(isolate);
1029 1105
1030 v8::Local<v8::Object> holder = info.Holder(); 1106 v8::Local<v8::Object> holder = info.Holder();
1107 ALLOW_UNUSED_LOCAL(holder);
1108
1031 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1109 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1032 1110
1033 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partial2LongAttribute"); 1111 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partial2LongAttribute");
1034 1112
1035 // Prepare the value to be set. 1113 // Prepare the value to be set.
1036 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion); 1114 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion);
1037 if (exceptionState.HadException()) 1115 if (exceptionState.HadException())
1038 return; 1116 return;
1039 1117
1040 TestInterfacePartial2Implementation::setPartial2LongAttribute(*impl, cppValue) ; 1118 TestInterfacePartial2Implementation::setPartial2LongAttribute(*impl, cppValue) ;
1041 } 1119 }
1042 1120
1043 static void partial2StaticLongAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) { 1121 static void partial2StaticLongAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) {
1044 V8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2StaticL ongAttribute()); 1122 V8SetReturnValueInt(info, TestInterfacePartial2Implementation::partial2StaticL ongAttribute());
1045 } 1123 }
1046 1124
1047 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) { 1125 static void partial2StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) {
1048 v8::Isolate* isolate = info.GetIsolate(); 1126 v8::Isolate* isolate = info.GetIsolate();
1049 ALLOW_UNUSED_LOCAL(isolate); 1127 ALLOW_UNUSED_LOCAL(isolate);
1050 1128
1129 v8::Local<v8::Object> holder = info.Holder();
1130 ALLOW_UNUSED_LOCAL(holder);
1131
1051 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partial2StaticLongAttribute"); 1132 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partial2StaticLongAttribute");
1052 1133
1053 // Prepare the value to be set. 1134 // Prepare the value to be set.
1054 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion); 1135 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(), v8Value, exceptionState, kNormalConversion);
1055 if (exceptionState.HadException()) 1136 if (exceptionState.HadException())
1056 return; 1137 return;
1057 1138
1058 TestInterfacePartial2Implementation::setPartial2StaticLongAttribute(cppValue); 1139 TestInterfacePartial2Implementation::setPartial2StaticLongAttribute(cppValue);
1059 } 1140 }
1060 1141
1061 static void partial2SecureContextAttributeAttributeGetter(const v8::FunctionCall backInfo<v8::Value>& info) { 1142 static void partial2SecureContextAttributeAttributeGetter(const v8::FunctionCall backInfo<v8::Value>& info) {
1062 v8::Local<v8::Object> holder = info.Holder(); 1143 v8::Local<v8::Object> holder = info.Holder();
1063 1144
1064 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1145 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1065 1146
1066 V8SetReturnValueFast(info, TestInterfacePartial2Implementation::partial2Secure ContextAttribute(*impl), impl); 1147 V8SetReturnValueFast(info, TestInterfacePartial2Implementation::partial2Secure ContextAttribute(*impl), impl);
1067 } 1148 }
1068 1149
1069 static void partial2SecureContextAttributeAttributeSetter(v8::Local<v8::Value> v 8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 1150 static void partial2SecureContextAttributeAttributeSetter(v8::Local<v8::Value> v 8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
1070 v8::Isolate* isolate = info.GetIsolate(); 1151 v8::Isolate* isolate = info.GetIsolate();
1071 ALLOW_UNUSED_LOCAL(isolate); 1152 ALLOW_UNUSED_LOCAL(isolate);
1072 1153
1073 v8::Local<v8::Object> holder = info.Holder(); 1154 v8::Local<v8::Object> holder = info.Holder();
1155 ALLOW_UNUSED_LOCAL(holder);
1156
1074 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1157 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1075 1158
1076 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partial2SecureContextAttribute"); 1159 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partial2SecureContextAttribute");
1077 1160
1078 // Prepare the value to be set. 1161 // Prepare the value to be set.
1079 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1162 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1080 1163
1081 // Type check per: http://heycam.github.io/webidl/#es-interface 1164 // Type check per: http://heycam.github.io/webidl/#es-interface
1082 if (!cppValue) { 1165 if (!cppValue) {
1083 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 1166 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
1084 return; 1167 return;
1085 } 1168 }
1086 1169
1087 TestInterfacePartial2Implementation::setPartial2SecureContextAttribute(*impl, cppValue); 1170 TestInterfacePartial2Implementation::setPartial2SecureContextAttribute(*impl, cppValue);
1088 } 1171 }
1089 1172
1090 static void partialSecureContextAttributeAttributeGetter(const v8::FunctionCallb ackInfo<v8::Value>& info) { 1173 static void partialSecureContextAttributeAttributeGetter(const v8::FunctionCallb ackInfo<v8::Value>& info) {
1091 v8::Local<v8::Object> holder = info.Holder(); 1174 v8::Local<v8::Object> holder = info.Holder();
1092 1175
1093 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1176 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1094 1177
1095 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textAttribute(*impl), impl); 1178 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textAttribute(*impl), impl);
1096 } 1179 }
1097 1180
1098 static void partialSecureContextAttributeAttributeSetter(v8::Local<v8::Value> v8 Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 1181 static void partialSecureContextAttributeAttributeSetter(v8::Local<v8::Value> v8 Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
1099 v8::Isolate* isolate = info.GetIsolate(); 1182 v8::Isolate* isolate = info.GetIsolate();
1100 ALLOW_UNUSED_LOCAL(isolate); 1183 ALLOW_UNUSED_LOCAL(isolate);
1101 1184
1102 v8::Local<v8::Object> holder = info.Holder(); 1185 v8::Local<v8::Object> holder = info.Holder();
1186 ALLOW_UNUSED_LOCAL(holder);
1187
1103 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1188 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1104 1189
1105 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextAttribute"); 1190 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextAttribute");
1106 1191
1107 // Prepare the value to be set. 1192 // Prepare the value to be set.
1108 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1193 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1109 1194
1110 // Type check per: http://heycam.github.io/webidl/#es-interface 1195 // Type check per: http://heycam.github.io/webidl/#es-interface
1111 if (!cppValue) { 1196 if (!cppValue) {
1112 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 1197 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
1113 return; 1198 return;
1114 } 1199 }
1115 1200
1116 TestInterfacePartialSecureContext::setPartialSecureContextAttribute(*impl, cpp Value); 1201 TestInterfacePartialSecureContext::setPartialSecureContextAttribute(*impl, cpp Value);
1117 } 1202 }
1118 1203
1119 static void partialSecureContextRuntimeEnabledAttributeAttributeGetter(const v8: :FunctionCallbackInfo<v8::Value>& info) { 1204 static void partialSecureContextRuntimeEnabledAttributeAttributeGetter(const v8: :FunctionCallbackInfo<v8::Value>& info) {
1120 v8::Local<v8::Object> holder = info.Holder(); 1205 v8::Local<v8::Object> holder = info.Holder();
1121 1206
1122 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1207 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1123 1208
1124 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textRuntimeEnabledAttribute(*impl), impl); 1209 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textRuntimeEnabledAttribute(*impl), impl);
1125 } 1210 }
1126 1211
1127 static void partialSecureContextRuntimeEnabledAttributeAttributeSetter(v8::Local <v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 1212 static void partialSecureContextRuntimeEnabledAttributeAttributeSetter(v8::Local <v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
1128 v8::Isolate* isolate = info.GetIsolate(); 1213 v8::Isolate* isolate = info.GetIsolate();
1129 ALLOW_UNUSED_LOCAL(isolate); 1214 ALLOW_UNUSED_LOCAL(isolate);
1130 1215
1131 v8::Local<v8::Object> holder = info.Holder(); 1216 v8::Local<v8::Object> holder = info.Holder();
1217 ALLOW_UNUSED_LOCAL(holder);
1218
1132 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1219 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1133 1220
1134 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextRuntimeEnabledAttribute"); 1221 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextRuntimeEnabledAttribute");
1135 1222
1136 // Prepare the value to be set. 1223 // Prepare the value to be set.
1137 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1224 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1138 1225
1139 // Type check per: http://heycam.github.io/webidl/#es-interface 1226 // Type check per: http://heycam.github.io/webidl/#es-interface
1140 if (!cppValue) { 1227 if (!cppValue) {
1141 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 1228 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
1142 return; 1229 return;
1143 } 1230 }
1144 1231
1145 TestInterfacePartialSecureContext::setPartialSecureContextRuntimeEnabledAttrib ute(*impl, cppValue); 1232 TestInterfacePartialSecureContext::setPartialSecureContextRuntimeEnabledAttrib ute(*impl, cppValue);
1146 } 1233 }
1147 1234
1148 static void partialSecureContextWindowExposedAttributeAttributeGetter(const v8:: FunctionCallbackInfo<v8::Value>& info) { 1235 static void partialSecureContextWindowExposedAttributeAttributeGetter(const v8:: FunctionCallbackInfo<v8::Value>& info) {
1149 v8::Local<v8::Object> holder = info.Holder(); 1236 v8::Local<v8::Object> holder = info.Holder();
1150 1237
1151 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1238 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1152 1239
1153 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textWindowExposedAttribute(*impl), impl); 1240 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textWindowExposedAttribute(*impl), impl);
1154 } 1241 }
1155 1242
1156 static void partialSecureContextWindowExposedAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 1243 static void partialSecureContextWindowExposedAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
1157 v8::Isolate* isolate = info.GetIsolate(); 1244 v8::Isolate* isolate = info.GetIsolate();
1158 ALLOW_UNUSED_LOCAL(isolate); 1245 ALLOW_UNUSED_LOCAL(isolate);
1159 1246
1160 v8::Local<v8::Object> holder = info.Holder(); 1247 v8::Local<v8::Object> holder = info.Holder();
1248 ALLOW_UNUSED_LOCAL(holder);
1249
1161 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1250 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1162 1251
1163 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextWindowExposedAttribute"); 1252 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextWindowExposedAttribute");
1164 1253
1165 // Prepare the value to be set. 1254 // Prepare the value to be set.
1166 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1255 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1167 1256
1168 // Type check per: http://heycam.github.io/webidl/#es-interface 1257 // Type check per: http://heycam.github.io/webidl/#es-interface
1169 if (!cppValue) { 1258 if (!cppValue) {
1170 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 1259 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
1171 return; 1260 return;
1172 } 1261 }
1173 1262
1174 TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedAttribu te(*impl, cppValue); 1263 TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedAttribu te(*impl, cppValue);
1175 } 1264 }
1176 1265
1177 static void partialSecureContextWorkerExposedAttributeAttributeGetter(const v8:: FunctionCallbackInfo<v8::Value>& info) { 1266 static void partialSecureContextWorkerExposedAttributeAttributeGetter(const v8:: FunctionCallbackInfo<v8::Value>& info) {
1178 v8::Local<v8::Object> holder = info.Holder(); 1267 v8::Local<v8::Object> holder = info.Holder();
1179 1268
1180 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1269 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1181 1270
1182 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textWorkerExposedAttribute(*impl), impl); 1271 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textWorkerExposedAttribute(*impl), impl);
1183 } 1272 }
1184 1273
1185 static void partialSecureContextWorkerExposedAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { 1274 static void partialSecureContextWorkerExposedAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
1186 v8::Isolate* isolate = info.GetIsolate(); 1275 v8::Isolate* isolate = info.GetIsolate();
1187 ALLOW_UNUSED_LOCAL(isolate); 1276 ALLOW_UNUSED_LOCAL(isolate);
1188 1277
1189 v8::Local<v8::Object> holder = info.Holder(); 1278 v8::Local<v8::Object> holder = info.Holder();
1279 ALLOW_UNUSED_LOCAL(holder);
1280
1190 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1281 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1191 1282
1192 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextWorkerExposedAttribute"); 1283 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextWorkerExposedAttribute");
1193 1284
1194 // Prepare the value to be set. 1285 // Prepare the value to be set.
1195 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1286 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1196 1287
1197 // Type check per: http://heycam.github.io/webidl/#es-interface 1288 // Type check per: http://heycam.github.io/webidl/#es-interface
1198 if (!cppValue) { 1289 if (!cppValue) {
1199 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 1290 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
1200 return; 1291 return;
1201 } 1292 }
1202 1293
1203 TestInterfacePartialSecureContext::setPartialSecureContextWorkerExposedAttribu te(*impl, cppValue); 1294 TestInterfacePartialSecureContext::setPartialSecureContextWorkerExposedAttribu te(*impl, cppValue);
1204 } 1295 }
1205 1296
1206 static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGet ter(const v8::FunctionCallbackInfo<v8::Value>& info) { 1297 static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGet ter(const v8::FunctionCallbackInfo<v8::Value>& info) {
1207 v8::Local<v8::Object> holder = info.Holder(); 1298 v8::Local<v8::Object> holder = info.Holder();
1208 1299
1209 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1300 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1210 1301
1211 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textWindowExposedRuntimeEnabledAttribute(*impl), impl); 1302 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textWindowExposedRuntimeEnabledAttribute(*impl), impl);
1212 } 1303 }
1213 1304
1214 static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSet ter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& inf o) { 1305 static void partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSet ter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& inf o) {
1215 v8::Isolate* isolate = info.GetIsolate(); 1306 v8::Isolate* isolate = info.GetIsolate();
1216 ALLOW_UNUSED_LOCAL(isolate); 1307 ALLOW_UNUSED_LOCAL(isolate);
1217 1308
1218 v8::Local<v8::Object> holder = info.Holder(); 1309 v8::Local<v8::Object> holder = info.Holder();
1310 ALLOW_UNUSED_LOCAL(holder);
1311
1219 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1312 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1220 1313
1221 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextWindowExposedRuntimeEnabledAttribute"); 1314 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextWindowExposedRuntimeEnabledAttribute");
1222 1315
1223 // Prepare the value to be set. 1316 // Prepare the value to be set.
1224 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1317 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1225 1318
1226 // Type check per: http://heycam.github.io/webidl/#es-interface 1319 // Type check per: http://heycam.github.io/webidl/#es-interface
1227 if (!cppValue) { 1320 if (!cppValue) {
1228 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 1321 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
1229 return; 1322 return;
1230 } 1323 }
1231 1324
1232 TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedRuntime EnabledAttribute(*impl, cppValue); 1325 TestInterfacePartialSecureContext::setPartialSecureContextWindowExposedRuntime EnabledAttribute(*impl, cppValue);
1233 } 1326 }
1234 1327
1235 static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGet ter(const v8::FunctionCallbackInfo<v8::Value>& info) { 1328 static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGet ter(const v8::FunctionCallbackInfo<v8::Value>& info) {
1236 v8::Local<v8::Object> holder = info.Holder(); 1329 v8::Local<v8::Object> holder = info.Holder();
1237 1330
1238 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1331 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1239 1332
1240 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textWorkerExposedRuntimeEnabledAttribute(*impl), impl); 1333 V8SetReturnValueFast(info, TestInterfacePartialSecureContext::partialSecureCon textWorkerExposedRuntimeEnabledAttribute(*impl), impl);
1241 } 1334 }
1242 1335
1243 static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSet ter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& inf o) { 1336 static void partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSet ter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& inf o) {
1244 v8::Isolate* isolate = info.GetIsolate(); 1337 v8::Isolate* isolate = info.GetIsolate();
1245 ALLOW_UNUSED_LOCAL(isolate); 1338 ALLOW_UNUSED_LOCAL(isolate);
1246 1339
1247 v8::Local<v8::Object> holder = info.Holder(); 1340 v8::Local<v8::Object> holder = info.Holder();
1341 ALLOW_UNUSED_LOCAL(holder);
1342
1248 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 1343 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
1249 1344
1250 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextWorkerExposedRuntimeEnabledAttribute"); 1345 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn terface", "partialSecureContextWorkerExposedRuntimeEnabledAttribute");
1251 1346
1252 // Prepare the value to be set. 1347 // Prepare the value to be set.
1253 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); 1348 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value);
1254 1349
1255 // Type check per: http://heycam.github.io/webidl/#es-interface 1350 // Type check per: http://heycam.github.io/webidl/#es-interface
1256 if (!cppValue) { 1351 if (!cppValue) {
1257 exceptionState.ThrowTypeError("The provided value is not of type 'bool'."); 1352 exceptionState.ThrowTypeError("The provided value is not of type 'bool'.");
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after
3431 3526
3432 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&)) { 3527 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&)) {
3433 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInter face = method; 3528 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInter face = method;
3434 } 3529 }
3435 3530
3436 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { 3531 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) {
3437 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPartia lInterface = method; 3532 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPartia lInterface = method;
3438 } 3533 }
3439 3534
3440 } // namespace blink 3535 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698