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

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

Issue 140663012: IDL compiler: Window-specific code + Window-only features (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
32 32
33 #include "config.h" 33 #include "config.h"
34 #if ENABLE(CONDITION) 34 #if ENABLE(CONDITION)
35 #include "V8TestInterfacePython.h" 35 #include "V8TestInterfacePython.h"
36 36
37 #include "RuntimeEnabledFeatures.h" 37 #include "RuntimeEnabledFeatures.h"
38 #include "V8Node.h" 38 #include "V8Node.h"
39 #include "V8ReferencedType.h" 39 #include "V8ReferencedType.h"
40 #include "V8TestImplementedAs.h"
40 #include "V8TestInterfaceEmpty.h" 41 #include "V8TestInterfaceEmpty.h"
41 #include "bindings/tests/idls/TestImplements.h" 42 #include "bindings/tests/idls/TestImplements.h"
42 #include "bindings/tests/idls/TestImplements2Implementation.h" 43 #include "bindings/tests/idls/TestImplements2Implementation.h"
43 #include "bindings/tests/idls/TestPartialInterfacePython.h" 44 #include "bindings/tests/idls/TestPartialInterfacePython.h"
44 #include "bindings/tests/idls/TestPartialInterfacePythonImplementation.h" 45 #include "bindings/tests/idls/TestPartialInterfacePythonImplementation.h"
45 #include "bindings/v8/ExceptionState.h" 46 #include "bindings/v8/ExceptionState.h"
46 #include "bindings/v8/V8AbstractEventListener.h" 47 #include "bindings/v8/V8AbstractEventListener.h"
47 #include "bindings/v8/V8DOMConfiguration.h" 48 #include "bindings/v8/V8DOMConfiguration.h"
48 #include "bindings/v8/V8EventListenerList.h" 49 #include "bindings/v8/V8EventListenerList.h"
49 #include "bindings/v8/V8ObjectConstructor.h" 50 #include "bindings/v8/V8ObjectConstructor.h"
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 TestPartialInterfacePythonImplementation::setPartial2StaticLongAttribute(cpp Value); 657 TestPartialInterfacePythonImplementation::setPartial2StaticLongAttribute(cpp Value);
657 } 658 }
658 659
659 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 660 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
660 { 661 {
661 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 662 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
662 TestInterfacePythonImplementationV8Internal::partial2StaticLongAttributeAttr ibuteSetter(jsValue, info); 663 TestInterfacePythonImplementationV8Internal::partial2StaticLongAttributeAttr ibuteSetter(jsValue, info);
663 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 664 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
664 } 665 }
665 666
667 static void TestInterfacePythonImplementationConstructorGetter(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
668 {
669 v8::Handle<v8::Value> data = info.Data();
670 ASSERT(data->IsExternal());
671 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext());
672 if (!perContextData)
673 return;
674 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data)));
675 }
676
677 static void TestInterfacePythonImplementationReplaceableAttributeSetter(v8::Loca l<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo <void>& info)
678 {
679 info.This()->ForceSet(name, jsValue);
680 }
681
682 static void TestInterfacePythonImplementationReplaceableAttributeSetterCallback( v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCall backInfo<void>& info)
683 {
684 TestInterfacePythonImplementationV8Internal::TestInterfacePythonImplementati onReplaceableAttributeSetter(name, jsValue, info);
685 }
686
666 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 687 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
667 { 688 {
668 if (UNLIKELY(info.Length() < 1)) { 689 if (UNLIKELY(info.Length() < 1)) {
669 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, inf o.Length())), info.GetIsolate()); 690 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, inf o.Length())), info.GetIsolate());
670 return; 691 return;
671 } 692 }
672 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 693 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
673 if (info.Length() > 0 && !info[0]->IsUndefined() && !V8TestInterfaceEmpty::h asInstance(info[0], info.GetIsolate())) { 694 if (info.Length() > 0 && !info[0]->IsUndefined() && !V8TestInterfaceEmpty::h asInstance(info[0], info.GetIsolate())) {
674 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", "parameter 1 is not of type 'TestInterfaceEm pty'."), info.GetIsolate()); 695 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", "parameter 1 is not of type 'TestInterfaceEm pty'."), info.GetIsolate());
675 return; 696 return;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 if (referencedName) { 946 if (referencedName) {
926 if (!DOMDataStore::containsWrapper<V8ReferencedType>(referencedName, iso late)) 947 if (!DOMDataStore::containsWrapper<V8ReferencedType>(referencedName, iso late))
927 wrap(referencedName, creationContext, isolate); 948 wrap(referencedName, creationContext, isolate);
928 DOMDataStore::setWrapperReference<V8ReferencedType>(wrapper, referencedN ame, isolate); 949 DOMDataStore::setWrapperReference<V8ReferencedType>(wrapper, referencedN ame, isolate);
929 } 950 }
930 setObjectGroup(object, wrapper, isolate); 951 setObjectGroup(object, wrapper, isolate);
931 } 952 }
932 953
933 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfacePythonAtt ributes[] = { 954 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfacePythonAtt ributes[] = {
934 {"testInterfacePythonAttribute", TestInterfacePythonImplementationV8Internal ::testInterfacePythonAttributeAttributeGetterCallback, TestInterfacePythonImplem entationV8Internal::testInterfacePythonAttributeAttributeSetterCallback, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */}, 955 {"testInterfacePythonAttribute", TestInterfacePythonImplementationV8Internal ::testInterfacePythonAttributeAttributeGetterCallback, TestInterfacePythonImplem entationV8Internal::testInterfacePythonAttributeAttributeSetterCallback, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */},
956 {"testImplementedAsConstructorAttribute", TestInterfacePythonImplementationV 8Internal::TestInterfacePythonImplementationConstructorGetter, TestInterfacePyth onImplementationV8Internal::TestInterfacePythonImplementationReplaceableAttribut eSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestImplementedAs::wrappe rTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::DontEnum), 0 /* on instance */},
935 {"perWorldBindingsStringAttribute", TestInterfacePythonImplementationV8Inter nal::perWorldBindingsStringAttributeAttributeGetterCallback, TestInterfacePython ImplementationV8Internal::perWorldBindingsStringAttributeAttributeSetterCallback , TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAt tributeGetterCallbackForMainWorld, TestInterfacePythonImplementationV8Internal:: perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , 0 /* on instance */}, 957 {"perWorldBindingsStringAttribute", TestInterfacePythonImplementationV8Inter nal::perWorldBindingsStringAttributeAttributeGetterCallback, TestInterfacePython ImplementationV8Internal::perWorldBindingsStringAttributeAttributeSetterCallback , TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAt tributeGetterCallbackForMainWorld, TestInterfacePythonImplementationV8Internal:: perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , 0 /* on instance */},
936 {"implementsReadonlyStringAttribute", TestInterfacePythonImplementationV8Int ernal::implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, sta tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8: :None), 0 /* on instance */}, 958 {"implementsReadonlyStringAttribute", TestInterfacePythonImplementationV8Int ernal::implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, sta tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8: :None), 0 /* on instance */},
937 {"implementsStringAttribute", TestInterfacePythonImplementationV8Internal::i mplementsStringAttributeAttributeGetterCallback, TestInterfacePythonImplementati onV8Internal::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_ cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::Non e), 0 /* on instance */}, 959 {"implementsStringAttribute", TestInterfacePythonImplementationV8Internal::i mplementsStringAttributeAttributeGetterCallback, TestInterfacePythonImplementati onV8Internal::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_ cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::Non e), 0 /* on instance */},
938 {"implementsNodeAttribute", TestInterfacePythonImplementationV8Internal::imp lementsNodeAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8 Internal::implementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v 8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 960 {"implementsNodeAttribute", TestInterfacePythonImplementationV8Internal::imp lementsNodeAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8 Internal::implementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v 8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
939 {"implementsEventHandlerAttribute", TestInterfacePythonImplementationV8Inter nal::implementsEventHandlerAttributeAttributeGetterCallback, TestInterfacePython ImplementationV8Internal::implementsEventHandlerAttributeAttributeSetterCallback , 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Property Attribute>(v8::None), 0 /* on instance */}, 961 {"implementsEventHandlerAttribute", TestInterfacePythonImplementationV8Inter nal::implementsEventHandlerAttributeAttributeGetterCallback, TestInterfacePython ImplementationV8Internal::implementsEventHandlerAttributeAttributeSetterCallback , 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Property Attribute>(v8::None), 0 /* on instance */},
940 {"implements3StringAttribute", TestInterfacePythonImplementationV8Internal:: implements3StringAttributeAttributeGetterCallback, TestInterfacePythonImplementa tionV8Internal::implements3StringAttributeAttributeSetterCallback, 0, 0, 0, stat ic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8:: None), 0 /* on instance */}, 962 {"implements3StringAttribute", TestInterfacePythonImplementationV8Internal:: implements3StringAttributeAttributeGetterCallback, TestInterfacePythonImplementa tionV8Internal::implements3StringAttributeAttributeSetterCallback, 0, 0, 0, stat ic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8:: None), 0 /* on instance */},
941 {"partial2LongAttribute", TestInterfacePythonImplementationV8Internal::parti al2LongAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Inte rnal::partial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acc essControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 963 {"partial2LongAttribute", TestInterfacePythonImplementationV8Internal::parti al2LongAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Inte rnal::partial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acc essControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
942 }; 964 };
943 965
944 static const V8DOMConfiguration::MethodConfiguration V8TestInterfacePythonMethod s[] = { 966 static const V8DOMConfiguration::MethodConfiguration V8TestInterfacePythonMethod s[] = {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 } 1106 }
1085 1107
1086 template<> 1108 template<>
1087 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate) 1109 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate)
1088 { 1110 {
1089 return toV8(impl, creationContext, isolate); 1111 return toV8(impl, creationContext, isolate);
1090 } 1112 }
1091 1113
1092 } // namespace WebCore 1114 } // namespace WebCore
1093 #endif // ENABLE(CONDITION) 1115 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698