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

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

Issue 2199643003: binding: Uses the current context if attribute/method is static. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "V8TestInterface2.h" 7 #include "V8TestInterface2.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 static void stringifierMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 232 static void stringifierMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
233 { 233 {
234 TestInterface2V8Internal::stringifierMethodMethod(info); 234 TestInterface2V8Internal::stringifierMethodMethod(info);
235 } 235 }
236 236
237 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 237 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
238 { 238 {
239 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes tInterface2", info.Holder(), info.GetIsolate()); 239 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes tInterface2", info.Holder(), info.GetIsolate());
240 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); 240 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
241 ScriptState* scriptState = ScriptState::forHolderObject(info); 241 ScriptState* scriptState = ScriptState::forReceiverObject(info);
242 Iterator* result = impl->keysForBinding(scriptState, exceptionState); 242 Iterator* result = impl->keysForBinding(scriptState, exceptionState);
243 if (exceptionState.hadException()) { 243 if (exceptionState.hadException()) {
244 exceptionState.throwIfNeeded(); 244 exceptionState.throwIfNeeded();
245 return; 245 return;
246 } 246 }
247 v8SetReturnValue(info, result); 247 v8SetReturnValue(info, result);
248 } 248 }
249 249
250 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 250 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
251 { 251 {
252 TestInterface2V8Internal::keysMethod(info); 252 TestInterface2V8Internal::keysMethod(info);
253 } 253 }
254 254
255 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 255 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
256 { 256 {
257 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T estInterface2", info.Holder(), info.GetIsolate()); 257 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T estInterface2", info.Holder(), info.GetIsolate());
258 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); 258 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
259 ScriptState* scriptState = ScriptState::forHolderObject(info); 259 ScriptState* scriptState = ScriptState::forReceiverObject(info);
260 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); 260 Iterator* result = impl->valuesForBinding(scriptState, exceptionState);
261 if (exceptionState.hadException()) { 261 if (exceptionState.hadException()) {
262 exceptionState.throwIfNeeded(); 262 exceptionState.throwIfNeeded();
263 return; 263 return;
264 } 264 }
265 v8SetReturnValue(info, result); 265 v8SetReturnValue(info, result);
266 } 266 }
267 267
268 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 268 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
269 { 269 {
270 TestInterface2V8Internal::valuesMethod(info); 270 TestInterface2V8Internal::valuesMethod(info);
271 } 271 }
272 272
273 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 273 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
274 { 274 {
275 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", " TestInterface2", info.Holder(), info.GetIsolate()); 275 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", " TestInterface2", info.Holder(), info.GetIsolate());
276 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); 276 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
277 ScriptState* scriptState = ScriptState::forHolderObject(info); 277 ScriptState* scriptState = ScriptState::forReceiverObject(info);
278 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); 278 Iterator* result = impl->entriesForBinding(scriptState, exceptionState);
279 if (exceptionState.hadException()) { 279 if (exceptionState.hadException()) {
280 exceptionState.throwIfNeeded(); 280 exceptionState.throwIfNeeded();
281 return; 281 return;
282 } 282 }
283 v8SetReturnValue(info, result); 283 v8SetReturnValue(info, result);
284 } 284 }
285 285
286 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 286 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
287 { 287 {
(...skipping 13 matching lines...) Expand all
301 ScriptValue thisArg; 301 ScriptValue thisArg;
302 { 302 {
303 if (!info[0]->IsFunction()) { 303 if (!info[0]->IsFunction()) {
304 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); 304 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
305 exceptionState.throwIfNeeded(); 305 exceptionState.throwIfNeeded();
306 return; 306 return;
307 } 307 }
308 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]) ; 308 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]) ;
309 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); 309 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]);
310 } 310 }
311 ScriptState* scriptState = ScriptState::forHolderObject(info); 311 ScriptState* scriptState = ScriptState::forReceiverObject(info);
312 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()) , callback, thisArg, exceptionState); 312 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()) , callback, thisArg, exceptionState);
313 if (exceptionState.hadException()) { 313 if (exceptionState.hadException()) {
314 exceptionState.throwIfNeeded(); 314 exceptionState.throwIfNeeded();
315 return; 315 return;
316 } 316 }
317 } 317 }
318 318
319 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 319 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
320 { 320 {
321 TestInterface2V8Internal::forEachMethod(info); 321 TestInterface2V8Internal::forEachMethod(info);
(...skipping 10 matching lines...) Expand all
332 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); 332 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
333 TestInterfaceEmpty* value; 333 TestInterfaceEmpty* value;
334 { 334 {
335 value = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), inf o[0]); 335 value = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), inf o[0]);
336 if (!value) { 336 if (!value) {
337 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter faceEmpty'."); 337 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter faceEmpty'.");
338 exceptionState.throwIfNeeded(); 338 exceptionState.throwIfNeeded();
339 return; 339 return;
340 } 340 }
341 } 341 }
342 ScriptState* scriptState = ScriptState::forHolderObject(info); 342 ScriptState* scriptState = ScriptState::forReceiverObject(info);
343 bool result = impl->hasForBinding(scriptState, value, exceptionState); 343 bool result = impl->hasForBinding(scriptState, value, exceptionState);
344 if (exceptionState.hadException()) { 344 if (exceptionState.hadException()) {
345 exceptionState.throwIfNeeded(); 345 exceptionState.throwIfNeeded();
346 return; 346 return;
347 } 347 }
348 v8SetReturnValueBool(info, result); 348 v8SetReturnValueBool(info, result);
349 } 349 }
350 350
351 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 351 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
352 { 352 {
353 TestInterface2V8Internal::hasMethod(info); 353 TestInterface2V8Internal::hasMethod(info);
354 } 354 }
355 355
356 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 356 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
357 { 357 {
358 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); 358 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
359 v8SetReturnValueString(info, impl->stringifierMethod(), info.GetIsolate()); 359 v8SetReturnValueString(info, impl->stringifierMethod(), info.GetIsolate());
360 } 360 }
361 361
362 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 362 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
363 { 363 {
364 TestInterface2V8Internal::toStringMethod(info); 364 TestInterface2V8Internal::toStringMethod(info);
365 } 365 }
366 366
367 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 367 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
368 { 368 {
369 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface2", info.Holder(), info.GetIsolate()); 369 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface2", info.Holder(), info.GetIsolate());
370 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); 370 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
371 ScriptState* scriptState = ScriptState::forHolderObject(info); 371 ScriptState* scriptState = ScriptState::forReceiverObject(info);
372 Iterator* result = impl->iterator(scriptState, exceptionState); 372 Iterator* result = impl->iterator(scriptState, exceptionState);
373 if (exceptionState.hadException()) { 373 if (exceptionState.hadException()) {
374 exceptionState.throwIfNeeded(); 374 exceptionState.throwIfNeeded();
375 return; 375 return;
376 } 376 }
377 v8SetReturnValue(info, result); 377 v8SetReturnValue(info, result);
378 } 378 }
379 379
380 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 380 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
381 { 381 {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 InstallTemplateFunction V8TestInterface2::installV8TestInterface2TemplateFunctio n = (InstallTemplateFunction)&V8TestInterface2::installV8TestInterface2Template; 665 InstallTemplateFunction V8TestInterface2::installV8TestInterface2TemplateFunctio n = (InstallTemplateFunction)&V8TestInterface2::installV8TestInterface2Template;
666 666
667 void V8TestInterface2::updateWrapperTypeInfo(InstallTemplateFunction installTemp lateFunction, PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInte rfaceObjectFunction) 667 void V8TestInterface2::updateWrapperTypeInfo(InstallTemplateFunction installTemp lateFunction, PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInte rfaceObjectFunction)
668 { 668 {
669 V8TestInterface2::installV8TestInterface2TemplateFunction = installTemplateF unction; 669 V8TestInterface2::installV8TestInterface2TemplateFunction = installTemplateF unction;
670 if (preparePrototypeAndInterfaceObjectFunction) 670 if (preparePrototypeAndInterfaceObjectFunction)
671 V8TestInterface2::wrapperTypeInfo.preparePrototypeAndInterfaceObjectFunc tion = preparePrototypeAndInterfaceObjectFunction; 671 V8TestInterface2::wrapperTypeInfo.preparePrototypeAndInterfaceObjectFunc tion = preparePrototypeAndInterfaceObjectFunction;
672 } 672 }
673 673
674 } // namespace blink 674 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698