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

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

Issue 340443004: IDL: reuse more code between CG for methods and constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rename scriptContext -> executionContext Created 6 years, 6 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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe tter(v8Value, info); 634 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe tter(v8Value, info);
635 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 635 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
636 } 636 }
637 #endif // ENABLE(PARTIAL_CONDITION) 637 #endif // ENABLE(PARTIAL_CONDITION)
638 638
639 #if ENABLE(PARTIAL_CONDITION) 639 #if ENABLE(PARTIAL_CONDITION)
640 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info) 640 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info)
641 { 641 {
642 v8::Handle<v8::Object> holder = info.Holder(); 642 v8::Handle<v8::Object> holder = info.Holder();
643 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); 643 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
644 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 644 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
645 v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionCont extLongAttribute(scriptContext, *impl)); 645 v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionCont extLongAttribute(executionContext, *impl));
646 } 646 }
647 #endif // ENABLE(PARTIAL_CONDITION) 647 #endif // ENABLE(PARTIAL_CONDITION)
648 648
649 #if ENABLE(PARTIAL_CONDITION) 649 #if ENABLE(PARTIAL_CONDITION)
650 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 650 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
651 { 651 {
652 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 652 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
653 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeGetter(info); 653 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeGetter(info);
654 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 654 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
655 } 655 }
656 #endif // ENABLE(PARTIAL_CONDITION) 656 #endif // ENABLE(PARTIAL_CONDITION)
657 657
658 #if ENABLE(PARTIAL_CONDITION) 658 #if ENABLE(PARTIAL_CONDITION)
659 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 659 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
660 { 660 {
661 v8::Handle<v8::Object> holder = info.Holder(); 661 v8::Handle<v8::Object> holder = info.Holder();
662 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); 662 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate());
663 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); 663 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
664 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState); 664 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
665 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 665 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
666 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(script Context, *impl, cppValue); 666 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut ionContext, *impl, cppValue);
667 } 667 }
668 #endif // ENABLE(PARTIAL_CONDITION) 668 #endif // ENABLE(PARTIAL_CONDITION)
669 669
670 #if ENABLE(PARTIAL_CONDITION) 670 #if ENABLE(PARTIAL_CONDITION)
671 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI nfo<void>& info) 671 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI nfo<void>& info)
672 { 672 {
673 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 673 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
674 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeSetter(v8Value, info); 674 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeSetter(v8Value, info);
675 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 675 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
676 } 676 }
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 v8::TryCatch block; 931 v8::TryCatch block;
932 V8RethrowTryCatchScope rethrow(block); 932 V8RethrowTryCatchScope rethrow(block);
933 TOSTRING_VOID_INTERNAL(strArg, info[0]); 933 TOSTRING_VOID_INTERNAL(strArg, info[0]);
934 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], inf o.GetIsolate())) { 934 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], inf o.GetIsolate())) {
935 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter faceEmpty'."); 935 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter faceEmpty'.");
936 exceptionState.throwIfNeeded(); 936 exceptionState.throwIfNeeded();
937 return; 937 return;
938 } 938 }
939 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[1])); 939 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[1]));
940 } 940 }
941 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 941 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
942 RefPtr<TestInterfaceEmpty> result = impl->implementsComplexMethod(scriptCont ext, strArg, testInterfaceEmptyArg, exceptionState); 942 RefPtr<TestInterfaceEmpty> result = impl->implementsComplexMethod(executionC ontext, strArg, testInterfaceEmptyArg, exceptionState);
943 if (exceptionState.hadException()) { 943 if (exceptionState.hadException()) {
944 exceptionState.throwIfNeeded(); 944 exceptionState.throwIfNeeded();
945 return; 945 return;
946 } 946 }
947 v8SetReturnValue(info, result.release()); 947 v8SetReturnValue(info, result.release());
948 } 948 }
949 949
950 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 950 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
951 { 951 {
952 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 952 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info); 1070 TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethod(info);
1071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1072 } 1072 }
1073 #endif // ENABLE(PARTIAL_CONDITION) 1073 #endif // ENABLE(PARTIAL_CONDITION)
1074 1074
1075 #if ENABLE(PARTIAL_CONDITION) 1075 #if ENABLE(PARTIAL_CONDITION)
1076 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 1076 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1077 { 1077 {
1078 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); 1078 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
1079 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 1079 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1080 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 1080 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
1081 TestPartialInterface::partialCallWithExecutionContextRaisesExceptionVoidMeth od(scriptContext, *impl, exceptionState); 1081 TestPartialInterface::partialCallWithExecutionContextRaisesExceptionVoidMeth od(executionContext, *impl, exceptionState);
1082 if (exceptionState.hadException()) { 1082 if (exceptionState.hadException()) {
1083 exceptionState.throwIfNeeded(); 1083 exceptionState.throwIfNeeded();
1084 return; 1084 return;
1085 } 1085 }
1086 } 1086 }
1087 #endif // ENABLE(PARTIAL_CONDITION) 1087 #endif // ENABLE(PARTIAL_CONDITION)
1088 1088
1089 #if ENABLE(PARTIAL_CONDITION) 1089 #if ENABLE(PARTIAL_CONDITION)
1090 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 1090 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
1091 { 1091 {
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 } 1507 }
1508 1508
1509 template<> 1509 template<>
1510 v8::Handle<v8::Value> toV8NoInline(TestInterfaceImplementation* impl, v8::Handle <v8::Object> creationContext, v8::Isolate* isolate) 1510 v8::Handle<v8::Value> toV8NoInline(TestInterfaceImplementation* impl, v8::Handle <v8::Object> creationContext, v8::Isolate* isolate)
1511 { 1511 {
1512 return toV8(impl, creationContext, isolate); 1512 return toV8(impl, creationContext, isolate);
1513 } 1513 }
1514 1514
1515 } // namespace WebCore 1515 } // namespace WebCore
1516 #endif // ENABLE(CONDITION) 1516 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698