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

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

Issue 654473002: JS binding: remove redundant type check in attr setter for TypeChecking interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: code rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface.h" 9 #include "V8TestInterface.h"
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 63 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
64 { 64 {
65 v8::Handle<v8::Object> holder = info.Holder(); 65 v8::Handle<v8::Object> holder = info.Holder();
66 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface", holder, info.GetIsolate()); 66 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface", holder, info.GetIsolate());
67 if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) { 67 if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) {
68 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'."); 68 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'.");
69 exceptionState.throwIfNeeded(); 69 exceptionState.throwIfNeeded();
70 return; 70 return;
71 } 71 }
72 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 72 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
73 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value); 73 TestInterfaceImplementation* cppValue = V8TestInterface::toImpl(v8::Handle<v 8::Object>::Cast(v8Value));
74 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); 74 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue));
75 } 75 }
76 76
77 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 77 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
78 { 78 {
79 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 79 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
80 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter (v8Value, info); 80 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter (v8Value, info);
81 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 81 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
82 } 82 }
83 83
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 423 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
424 { 424 {
425 v8::Handle<v8::Object> holder = info.Holder(); 425 v8::Handle<v8::Object> holder = info.Holder();
426 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterface", holder, info.GetIsolate()); 426 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterface", holder, info.GetIsolate());
427 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) { 427 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) {
428 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 428 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
429 exceptionState.throwIfNeeded(); 429 exceptionState.throwIfNeeded();
430 return; 430 return;
431 } 431 }
432 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 432 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
433 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 433 Node* cppValue = V8Node::toImpl(v8::Handle<v8::Object>::Cast(v8Value));
434 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue)); 434 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue));
435 } 435 }
436 436
437 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 437 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
438 { 438 {
439 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 439 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
440 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette r(v8Value, info); 440 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette r(v8Value, info);
441 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 441 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
442 } 442 }
443 443
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> v8Value, const v8::PropertyCallbackInfo<void>& info) 488 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> v8Value, const v8::PropertyCallbackInfo<void>& info)
489 { 489 {
490 v8::Handle<v8::Object> holder = info.Holder(); 490 v8::Handle<v8::Object> holder = info.Holder();
491 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); 491 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate());
492 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) { 492 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) {
493 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 493 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
494 exceptionState.throwIfNeeded(); 494 exceptionState.throwIfNeeded();
495 return; 495 return;
496 } 496 }
497 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 497 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
498 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 498 Node* cppValue = V8Node::toImpl(v8::Handle<v8::Object>::Cast(v8Value));
499 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue)); 499 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue));
500 } 500 }
501 501
502 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi d>& info) 502 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi d>& info)
503 { 503 {
504 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 504 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
505 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeSetter(v8Value, info); 505 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeSetter(v8Value, info);
506 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 506 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
507 } 507 }
508 508
(...skipping 14 matching lines...) Expand all
523 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8 ::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 523 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8 ::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
524 { 524 {
525 v8::Handle<v8::Object> holder = info.Holder(); 525 v8::Handle<v8::Object> holder = info.Holder();
526 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC ontextEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); 526 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC ontextEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate());
527 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) { 527 if (!V8Node::hasInstance(v8Value, info.GetIsolate())) {
528 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 528 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
529 exceptionState.throwIfNeeded(); 529 exceptionState.throwIfNeeded();
530 return; 530 return;
531 } 531 }
532 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 532 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
533 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 533 Node* cppValue = V8Node::toImpl(v8::Handle<v8::Object>::Cast(v8Value));
534 impl->setImplementsPerContextEnabledNodeAttribute(WTF::getPtr(cppValue)); 534 impl->setImplementsPerContextEnabledNodeAttribute(WTF::getPtr(cppValue));
535 } 535 }
536 536
537 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo< void>& info) 537 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo< void>& info)
538 { 538 {
539 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 539 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
540 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib uteAttributeSetter(v8Value, info); 540 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib uteAttributeSetter(v8Value, info);
541 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 541 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
542 } 542 }
543 543
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
2163 2163
2164 ScriptState::Scope scope(scriptState); 2164 ScriptState::Scope scope(scriptState);
2165 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 2165 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
2166 2166
2167 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate()); 2167 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate());
2168 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue)); 2168 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue));
2169 } 2169 }
2170 2170
2171 } // namespace blink 2171 } // namespace blink
2172 #endif // ENABLE(CONDITION) 2172 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_attributes.py ('k') | Source/bindings/tests/results/core/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698